summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct1
-rw-r--r--configure.ac2
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/Makefile.am3
-rw-r--r--src/http-header-glue.c1
-rw-r--r--src/mod_compress.c2
-rw-r--r--src/mod_ssi.c2
-rw-r--r--src/sys-strings.h20
8 files changed, 28 insertions, 4 deletions
diff --git a/SConstruct b/SConstruct
index 0d65d8b3..762fad1b 100644
--- a/SConstruct
+++ b/SConstruct
@@ -189,6 +189,7 @@ if 1:
stdint.h
stdlib.h
string.h
+ strings.h
sys/devpoll.h
sys/epoll.h
sys/event.h
diff --git a/configure.ac b/configure.ac
index b8b3eb17..e818cb5f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -110,7 +110,7 @@ CPPFLAGS="${CPPFLAGS} -D_REENTRANT -D__EXTENSIONS__"
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h netinet/in.h stdlib.h string.h \
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h netinet/in.h stdlib.h string.h strings.h \
sys/socket.h sys/time.h unistd.h sys/sendfile.h sys/uio.h \
getopt.h sys/epoll.h sys/select.h poll.h sys/poll.h sys/devpoll.h sys/filio.h \
sys/mman.h sys/event.h port.h pwd.h \
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b37b192b..de14e0e0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -93,6 +93,7 @@ check_include_files(poll.h HAVE_POLL_H)
check_include_files(pwd.h HAVE_PWD_H)
check_include_files(stddef.h HAVE_STDDEF_H)
check_include_files(stdint.h HAVE_STDINT_H)
+check_include_files(strings.h HAVE_STRINGS_H)
check_include_files(syslog.h HAVE_SYSLOG_H)
# check for fastcgi lib, for the tests only
diff --git a/src/Makefile.am b/src/Makefile.am
index 9e4e050d..b07a9cb2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -381,7 +381,8 @@ hdr = server.h base64.h buffer.h network.h log.h keyvalue.h \
mod_ssi.h mod_ssi_expr.h inet_ntop_cache.h \
configparser.h mod_ssi_exprparser.h \
rand.h \
- sys-endian.h sys-mmap.h sys-socket.h mod_cml.h mod_cml_funcs.h \
+ sys-endian.h sys-mmap.h sys-socket.h sys-strings.h \
+ mod_cml.h mod_cml_funcs.h \
safe_memclear.h splaytree.h proc_open.h status_counter.h \
mod_magnet_cache.h
diff --git a/src/http-header-glue.c b/src/http-header-glue.c
index 535ef9ba..c308af06 100644
--- a/src/http-header-glue.c
+++ b/src/http-header-glue.c
@@ -16,6 +16,7 @@
#include <time.h>
+#include "sys-strings.h"
#include "sys-socket.h"
#ifndef _WIN32
#include <netdb.h>
diff --git a/src/mod_compress.c b/src/mod_compress.c
index f08805dc..41ad68d1 100644
--- a/src/mod_compress.c
+++ b/src/mod_compress.c
@@ -13,12 +13,12 @@
#include <sys/types.h>
#include <sys/stat.h>
+#include "sys-strings.h"
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
-#include <strings.h>
#include <errno.h>
#include <time.h>
diff --git a/src/mod_ssi.c b/src/mod_ssi.c
index bb76b379..3842bbe9 100644
--- a/src/mod_ssi.c
+++ b/src/mod_ssi.c
@@ -13,11 +13,11 @@
#include "sys-socket.h"
#include <sys/types.h>
+#include "sys-strings.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
-#include <strings.h>
#include <errno.h>
#include <fcntl.h>
#include <time.h>
diff --git a/src/sys-strings.h b/src/sys-strings.h
new file mode 100644
index 00000000..d4ff0f31
--- /dev/null
+++ b/src/sys-strings.h
@@ -0,0 +1,20 @@
+#ifndef LI_SYS_STRINGS_H
+#define LI_SYS_STRINGS_H
+#include "first.h"
+
+#if defined(HAVE_STRINGS_H)
+
+#include <strings.h>
+
+#else /* HAVE_STRINGS_H */
+
+#ifdef _MSC_VER
+#define strcasecmp(s1,s2) _stricmp(s1,s2)
+#define strncasecmp(s1,s2,n) _strnicmp(s1,s2,n)
+#else
+/* ??? */
+#endif
+
+#endif /* HAVE_STRINGS_H */
+
+#endif