Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Check for strings.h
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed May 10, 2010
1 parent 35dd0fb commit 032f651
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 10 deletions.
7 changes: 6 additions & 1 deletion src/node.cc
Expand Up @@ -5,7 +5,6 @@

#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <limits.h> /* PATH_MAX */
#include <assert.h>
#include <unistd.h>
Expand All @@ -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>
Expand Down
8 changes: 7 additions & 1 deletion src/node_buffer.cc
Expand Up @@ -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

Expand Down
7 changes: 6 additions & 1 deletion src/node_child_process.cc
Expand Up @@ -3,7 +3,6 @@
#include <node.h>

#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
Expand All @@ -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 {
Expand Down
6 changes: 5 additions & 1 deletion src/node_crypto.cc
Expand Up @@ -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>
Expand Down
8 changes: 6 additions & 2 deletions src/node_events.cc
Expand Up @@ -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>
Expand Down
7 changes: 6 additions & 1 deletion src/node_file.cc
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion src/node_net2.cc
Expand Up @@ -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>
Expand Down
6 changes: 5 additions & 1 deletion src/node_stat_watcher.cc
Expand Up @@ -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 {

Expand Down
6 changes: 5 additions & 1 deletion src/node_stdio.cc
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions wscript
Expand Up @@ -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")
Expand Down

0 comments on commit 032f651

Please sign in to comment.