diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2010-05-10 16:05:42 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-05-10 16:30:31 -0700 |
commit | 032f651824869c429cc24fbd9f7a23e84ed34b1f (patch) | |
tree | 57296a3cf301022dd600d7375874d24f28ae1905 /src | |
parent | 35dd0fb2716f7848be34bd66f7420a5f2f3c80e7 (diff) | |
download | node-new-032f651824869c429cc24fbd9f7a23e84ed34b1f.tar.gz |
Check for strings.h
Diffstat (limited to 'src')
-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 |
9 files changed, 51 insertions, 10 deletions
diff --git a/src/node.cc b/src/node.cc index 0fb925d648..bfb481e75e 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 d757b9623c..bae738bf63 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 6c84514e14..d240d6fbf7 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 284ae4996d..50519b4279 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 c43225a528..4148ea010f 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 f9fd27c122..b1cbd9b044 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 865bf7c506..d9d485ce7a 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 88ae9c6940..816ec961ca 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 c27e6f3726..fab00aeeac 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; |