summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2007-06-12 16:45:40 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2007-06-12 16:45:40 +0000
commit79e6ccdde5e38095d21663064e9cc43dfedef6fe (patch)
tree9a538c4cd2c47155d7dd3500eb8df9c75b6ad3b8 /cpukit
parent2007-06-12 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-79e6ccdde5e38095d21663064e9cc43dfedef6fe.tar.bz2
2007-06-12 Ralf Corsépius <ralf.corsepius@rtems.org>
* shttpd/defs.h: Eliminate my_strncasecmp. * shttpd/string.c: Eliminate my_strncasecmp.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog5
-rw-r--r--cpukit/shttpd/defs.h10
-rw-r--r--cpukit/shttpd/string.c2
3 files changed, 17 insertions, 0 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index bd713fe643..a2ece02959 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,5 +1,10 @@
2007-06-12 Ralf Corsépius <ralf.corsepius@rtems.org>
+ * shttpd/defs.h: Eliminate my_strncasecmp.
+ * shttpd/string.c: Eliminate my_strncasecmp.
+
+2007-06-12 Ralf Corsépius <ralf.corsepius@rtems.org>
+
* wrapup/Makefile.am: Pickup ../libmd/libmd.a.
* pppd/Makefile.am: Reflect moving out md*.
* pppd/md4.h, pppd/md4.c, pppd/md5.c, pppd/md5.h: Remove (moved to
diff --git a/cpukit/shttpd/defs.h b/cpukit/shttpd/defs.h
index a1e871a4f4..7a86992bbe 100644
--- a/cpukit/shttpd/defs.h
+++ b/cpukit/shttpd/defs.h
@@ -381,8 +381,18 @@ extern void my_strlcpy(register char *, register const char *, size_t);
#define my_strlcpy(d,s,l) strlcpy(d,s,l)
#endif
+#ifndef HAVE_STRNCASECMP
extern int my_strncasecmp(register const char *,
register const char *, size_t);
+#else
+#ifdef __rtems__
+/* strncasecmp should be in strings.h, but newlib has it in <string.h> */
+#include <string.h>
+#else
+#include <strings.h>
+#endif
+#define my_strncasecmp(s1,s2,l) strncasecmp(s1,s2,l)
+#endif
#ifndef HAVE_STRNDUP
extern char *my_strndup(const char *ptr, size_t len);
diff --git a/cpukit/shttpd/string.c b/cpukit/shttpd/string.c
index 34e5a721fa..d77f32c417 100644
--- a/cpukit/shttpd/string.c
+++ b/cpukit/shttpd/string.c
@@ -20,6 +20,7 @@ my_strlcpy(register char *dst, register const char *src, size_t n)
}
#endif
+#ifndef HAVE_STRNCASECMP
int
my_strncasecmp(const char *str1, const char *str2, size_t len)
{
@@ -33,6 +34,7 @@ my_strncasecmp(const char *str1, const char *str2, size_t len)
return (ret);
}
+#endif
#ifndef HAVE_STRNDUP
char *