diff options
-rw-r--r-- | src/node.cc | 7 | ||||
-rw-r--r-- | src/node_buffer.cc | 8 | ||||
-rw-r--r-- | src/node_child_process.cc | 7 | ||||
-rw-r--r-- | src/node_crypto.cc | 6 | ||||
-rw-r--r-- | src/node_events.cc | 8 | ||||
-rw-r--r-- | src/node_file.cc | 7 | ||||
-rw-r--r-- | src/node_net2.cc | 6 | ||||
-rw-r--r-- | src/node_stat_watcher.cc | 6 | ||||
-rw-r--r-- | src/node_stdio.cc | 6 | ||||
-rw-r--r-- | wscript | 2 |
10 files changed, 53 insertions, 10 deletions
diff --git a/src/node.cc b/src/node.cc index 0fb925d64..bfb481e75 100644 --- a/src/node.cc +++ b/src/node.cc @@ -5,7 +5,6 @@ #include <stdio.h> #include <stdlib.h> -#include <strings.h> #include <limits.h> /* PATH_MAX */ #include <assert.h> #include <unistd.h> @@ -14,6 +13,12 @@ #include <sys/types.h> #include <unistd.h> /* setuid, getuid */ +#ifdef HAVE_STRINGS_H +# include <strings.h> +#else +# include <string.h> +#endif + #include <node_buffer.h> #include <node_io_watcher.h> #include <node_net2.h> diff --git a/src/node_buffer.cc b/src/node_buffer.cc index d757b9623..bae738bf6 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -4,7 +4,13 @@ #include <stdlib.h> // malloc, free #include <v8.h> -#include <string.h> // memcpy +// memcpy +#ifdef HAVE_STRINGS_H +# include <strings.h> +#else +# include <string.h> +#endif + #include <arpa/inet.h> // htons, htonl diff --git a/src/node_child_process.cc b/src/node_child_process.cc index 6c84514e1..d240d6fbf 100644 --- a/src/node_child_process.cc +++ b/src/node_child_process.cc @@ -3,7 +3,6 @@ #include <node.h> #include <assert.h> -#include <string.h> #include <stdlib.h> #include <errno.h> #include <unistd.h> @@ -13,6 +12,12 @@ #include <sys/wait.h> #endif +#ifdef HAVE_STRINGS_H +# include <strings.h> +#else +# include <string.h> +#endif + extern char **environ; namespace node { diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 284ae4996..50519b427 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -4,7 +4,11 @@ #include <node.h> #include <node_buffer.h> -#include <string.h> +#ifdef HAVE_STRINGS_H +# include <strings.h> +#else +# include <string.h> +#endif #include <stdlib.h> #include <errno.h> diff --git a/src/node_events.cc b/src/node_events.cc index c43225a52..4148ea010 100644 --- a/src/node_events.cc +++ b/src/node_events.cc @@ -3,14 +3,18 @@ #include <assert.h> #include <stdlib.h> -#include <string.h> -#include <strings.h> #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #include <arpa/inet.h> /* inet_ntop */ #include <netinet/in.h> /* sockaddr_in, sockaddr_in6 */ +#ifdef HAVE_STRINGS_H +# include <strings.h> +#else +# include <string.h> +#endif + #include <node.h> #include <ev.h> #include <v8.h> diff --git a/src/node_file.cc b/src/node_file.cc index f9fd27c12..b1cbd9b04 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -10,10 +10,15 @@ #include <stdlib.h> #include <unistd.h> #include <assert.h> -#include <string.h> #include <errno.h> #include <limits.h> +#ifdef HAVE_STRINGS_H +# include <strings.h> +#else +# include <string.h> +#endif + /* used for readlink, AIX doesn't provide it */ #ifndef PATH_MAX #define PATH_MAX 4096 diff --git a/src/node_net2.cc b/src/node_net2.cc index 865bf7c50..d9d485ce7 100644 --- a/src/node_net2.cc +++ b/src/node_net2.cc @@ -4,7 +4,11 @@ #include <node.h> #include <node_buffer.h> -#include <string.h> +#ifdef HAVE_STRINGS_H +# include <strings.h> +#else +# include <string.h> +#endif #include <stdlib.h> #include <sys/types.h> diff --git a/src/node_stat_watcher.cc b/src/node_stat_watcher.cc index 88ae9c694..816ec961c 100644 --- a/src/node_stat_watcher.cc +++ b/src/node_stat_watcher.cc @@ -2,8 +2,12 @@ #include <node_stat_watcher.h> #include <assert.h> -#include <string.h> #include <stdlib.h> +#ifdef HAVE_STRINGS_H +# include <strings.h> +#else +# include <string.h> +#endif namespace node { diff --git a/src/node_stdio.cc b/src/node_stdio.cc index c27e6f372..fab00aeea 100644 --- a/src/node_stdio.cc +++ b/src/node_stdio.cc @@ -3,7 +3,11 @@ #include <unistd.h> #include <fcntl.h> -#include <string.h> +#ifdef HAVE_STRINGS_H +# include <strings.h> +#else +# include <string.h> +#endif #include <errno.h> using namespace v8; @@ -114,6 +114,8 @@ def configure(conf): conf.env["USE_DEBUG"] = Options.options.debug conf.env["USE_SYSTEM"] = Options.options.system + conf.check_cc(header_name="strings.h") + conf.check(lib='dl', uselib_store='DL') if not sys.platform.startswith("sunos"): conf.env.append_value("CCFLAGS", "-rdynamic") |