summaryrefslogtreecommitdiff
path: root/m4/getaddrinfo.m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2007-10-15 13:12:04 +0200
committerBruno Haible <bruno@clisp.org>2007-10-15 13:12:04 +0200
commit02aba6c181f55255a017f8dac825ae3361c9d47e (patch)
tree66ad09391de8c18bac9d1db69274db66ce6349ca /m4/getaddrinfo.m4
parent8a6e5bb487a40cd9b4fa943b4455c05fa1fddaaa (diff)
downloadgnulib-02aba6c181f55255a017f8dac825ae3361c9d47e.tar.gz
Ensure NULL is defined, before using it.
Diffstat (limited to 'm4/getaddrinfo.m4')
-rw-r--r--m4/getaddrinfo.m43
1 files changed, 3 insertions, 0 deletions
diff --git a/m4/getaddrinfo.m4 b/m4/getaddrinfo.m4
index df6077920a..0234c70d94 100644
--- a/m4/getaddrinfo.m4
+++ b/m4/getaddrinfo.m4
@@ -35,6 +35,7 @@ AC_DEFUN([gl_GETADDRINFO],
#ifdef HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
#endif
+#include <stdlib.h>
], [getaddrinfo(NULL, NULL, NULL, NULL);], gl_cv_w32_getaddrinfo=yes)
LIBS="$am_save_LIBS"])
if test "$gl_cv_w32_getaddrinfo" = "yes"; then
@@ -60,6 +61,7 @@ AC_DEFUN([gl_GETADDRINFO],
#ifdef HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
#endif
+#include <stdlib.h>
], [gai_strerror (NULL);],
[gl_cv_func_gai_strerror=yes],
[gl_cv_func_gai_strerror=no])])
@@ -85,6 +87,7 @@ AC_DEFUN([gl_PREREQ_GETADDRINFO], [
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
+#include <stdlib.h>
], [gethostbyname(NULL);], gl_cv_w32_gethostbyname=yes)
LIBS="$am_save_LIBS"])
if test "$gl_cv_w32_gethostbyname" = "yes"; then