diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-11-15 20:16:40 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-11-16 09:23:46 +0100 |
commit | 8912421cf3829a4fd65877fd1255125c191f6f89 (patch) | |
tree | 6b89fecf0738a1f80792bbe7453730f7882f1d54 /lib/string.in.h | |
parent | 3fe87cf7aff396d7bd993aa009f48eb8afd6c1cd (diff) | |
download | guile-8912421cf3829a4fd65877fd1255125c191f6f89.tar.gz |
Use Gnulib's `inet_ntop' and `inet_pton' modules.
* m4/gnulib-cache.m4: Add `inet_ntop' and `inet_pton'.
* configure.ac: Don't check for `inet_ntop' and `inet_pton'.
* libguile/socket.c (scm_inet_pton, scm_inet_ntop): Compile regardless
of `HAVE_INET_PTON' and `HAVE_INET_NTOP' respectively.
* libguile/filesys.c: Use <stdlib.h> instead of <canonicalize.h>.
Diffstat (limited to 'lib/string.in.h')
-rw-r--r-- | lib/string.in.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/string.in.h b/lib/string.in.h index fe1142562..7074b15ef 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -28,6 +28,8 @@ #ifndef _GL_STRING_H #define _GL_STRING_H +/* NetBSD 5.0 mis-defines NULL. */ +#include <stddef.h> #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ @@ -201,11 +203,11 @@ extern char *strdup (char const *__s); /* Return a newly allocated copy of at most N bytes of STRING. */ #if @GNULIB_STRNDUP@ -# if ! @HAVE_STRNDUP@ +# if @REPLACE_STRNDUP@ # undef strndup # define strndup rpl_strndup # endif -# if ! @HAVE_STRNDUP@ || ! @HAVE_DECL_STRNDUP@ +# if @REPLACE_STRNDUP@ || ! @HAVE_DECL_STRNDUP@ extern char *strndup (char const *__string, size_t __n); # endif #elif defined GNULIB_POSIXCHECK @@ -397,7 +399,13 @@ extern char *strcasestr (const char *haystack, const char *needle) See also strsep(). */ #if @GNULIB_STRTOK_R@ -# if ! @HAVE_DECL_STRTOK_R@ +# if @REPLACE_STRTOK_R@ +# undef strtok_r +# define strtok_r rpl_strtok_r +# elif @UNDEFINE_STRTOK_R@ +# undef strtok_r +# endif +# if ! @HAVE_DECL_STRTOK_R@ || @REPLACE_STRTOK_R@ extern char *strtok_r (char *restrict s, char const *restrict delim, char **restrict save_ptr); # endif |