apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apr CHANGES aclocal.m4 configure.in
Date Tue, 05 Dec 2000 23:15:05 GMT
trawick     00/12/05 15:15:04

  Modified:    .        CHANGES aclocal.m4 configure.in
  Log:
  Check more carefully for getaddrinfo().  Accept those that
  require <netdb.h> to be included (e.g., Tru64).  Reject those that
  fail a very basic operational test (e.g., AIX).
  
  Revision  Changes    Path
  1.15      +4 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- CHANGES	2000/12/04 16:09:20	1.14
  +++ CHANGES	2000/12/05 23:15:03	1.15
  @@ -1,4 +1,8 @@
   Changes with APR a9
  +  *) Check more carefully for getaddrinfo().  Accept those that
  +     require <netdb.h> to be included (e.g., Tru64).  Reject those that 
  +     fail a very basic operational test (e.g., AIX).  [Jeff Trawick]
  +
     *) Add apr_make_os_sock() for constructing a fully-capable APR
        socket.  [Jeff Trawick]
   
  
  
  
  1.33      +44 -0     apr/aclocal.m4
  
  Index: aclocal.m4
  ===================================================================
  RCS file: /home/cvs/apr/aclocal.m4,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- aclocal.m4	2000/12/02 03:24:24	1.32
  +++ aclocal.m4	2000/12/05 23:15:04	1.33
  @@ -186,6 +186,50 @@
   ])
   
   dnl
  +dnl check for working getaddrinfo()
  +dnl
  +
  +AC_DEFUN(APR_CHECK_WORKING_GETADDRINFO,[
  +  AC_CACHE_CHECK(for working getaddrinfo, ac_cv_working_getaddrinfo,[
  +  AC_TRY_RUN( [
  +#ifdef HAVE_NETDB_H
  +#include <netdb.h>
  +#endif
  +#ifdef HAVE_STRING_H
  +#include <string.h>
  +#endif
  +#ifdef HAVE_SYS_SOCKET_H
  +#include <sys/socket.h>
  +#endif
  +
  +void main(void) {
  +    struct addrinfo hints, *ai;
  +    int error;
  +
  +    memset(&hints, 0, sizeof(hints));
  +    hints.ai_family = AF_INET;
  +    hints.ai_socktype = SOCK_STREAM;
  +    error = getaddrinfo("127.0.0.1", "8080", &hints, &ai);
  +    if (error) {
  +        exit(1);
  +    }
  +    else {
  +        exit(0);
  +    }
  +}
  +],[
  +  ac_cv_working_getaddrinfo="yes"
  +],[
  +  ac_cv_working_getaddrinfo="no"
  +],[
  +  ac_cv_working_getaddrinfo="yes"
  +])])
  +if test "$ac_cv_working_getaddrinfo" = "yes"; then
  +  AC_DEFINE(HAVE_GETADDRINFO, 1, [Define if getaddrinfo exists and works well enough for
APR])
  +fi
  +])
  +
  +dnl
   dnl check for gethostbyname() which handles numeric address strings
   dnl
   
  
  
  
  1.183     +1 -1      apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apr/configure.in,v
  retrieving revision 1.182
  retrieving revision 1.183
  diff -u -r1.182 -r1.183
  --- configure.in	2000/12/04 23:42:09	1.182
  +++ configure.in	2000/12/05 23:15:04	1.183
  @@ -757,7 +757,7 @@
   echo $ac_n "${nl}Checking for IPv6 Networking support...${nl}"
   dnl # Start of checking for IPv6 support...
   AC_SEARCH_LIBS(getaddrinfo, inet6)
  -AC_CHECK_FUNCS(getaddrinfo)
  +APR_CHECK_WORKING_GETADDRINFO
   AC_CHECK_FUNCS(getipnodebyname)
   AC_CHECK_FUNCS(getipnodebyaddr)
   APR_CHECK_SOCKADDR_IN6
  
  
  

Mime
View raw message