bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Test for getaddrinfo() broken on Tru64 UNIX 5.1


From: Bruno Haible
Subject: Re: Test for getaddrinfo() broken on Tru64 UNIX 5.1
Date: Mon, 15 Oct 2007 20:28:35 +0200
User-agent: KMail/1.5.4

Ben Pfaff wrote:
> For what it's worth, <stddef.h> is a smaller header that also
> defines NULL.

You're right. Better use <stddef.h>.

2007-10-15  Bruno Haible  <address@hidden>

        * m4/getaddrinfo.m4 (gl_GETADDRINFO, gl_PREREQ_GETADDRINFO): Use
        <stddef.h> instead of <stdlib.h> since we only need NULL.
        Reported by Ben Pfaff <address@hidden>.

*** m4/getaddrinfo.m4.orig      2007-10-15 20:27:18.000000000 +0200
--- m4/getaddrinfo.m4   2007-10-15 20:26:08.000000000 +0200
***************
*** 21,27 ****
  #ifdef HAVE_NETDB_H
  #include <netdb.h>
  #endif
! #include <stdlib.h>
  ], [getaddrinfo("", "", NULL, NULL);],
        [gl_cv_func_getaddrinfo=yes],
        [gl_cv_func_getaddrinfo=no])])
--- 21,27 ----
  #ifdef HAVE_NETDB_H
  #include <netdb.h>
  #endif
! #include <stddef.h>
  ], [getaddrinfo("", "", NULL, NULL);],
        [gl_cv_func_getaddrinfo=yes],
        [gl_cv_func_getaddrinfo=no])])
***************
*** 35,41 ****
  #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
--- 35,41 ----
  #ifdef HAVE_WS2TCPIP_H
  #include <ws2tcpip.h>
  #endif
! #include <stddef.h>
  ], [getaddrinfo(NULL, NULL, NULL, NULL);], gl_cv_w32_getaddrinfo=yes)
      LIBS="$am_save_LIBS"])
      if test "$gl_cv_w32_getaddrinfo" = "yes"; then
***************
*** 61,67 ****
  #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])])
--- 61,67 ----
  #ifdef HAVE_WS2TCPIP_H
  #include <ws2tcpip.h>
  #endif
! #include <stddef.h>
  ], [gai_strerror (NULL);],
          [gl_cv_func_gai_strerror=yes],
          [gl_cv_func_gai_strerror=no])])
***************
*** 87,93 ****
  #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
--- 87,93 ----
  #ifdef HAVE_WINSOCK2_H
  #include <winsock2.h>
  #endif
! #include <stddef.h>
  ], [gethostbyname(NULL);], gl_cv_w32_gethostbyname=yes)
      LIBS="$am_save_LIBS"])
      if test "$gl_cv_w32_gethostbyname" = "yes"; then





reply via email to

[Prev in Thread] Current Thread [Next in Thread]