apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dr...@apache.org
Subject cvs commit: apr/build apr_network.m4
Date Thu, 05 Apr 2001 18:08:31 GMT
dreid       01/04/05 11:08:31

  Modified:    .        configure.in
               build    apr_network.m4
  Log:
  Change the getnameinfo check so that it should work on Tru64.
  
  Revision  Changes    Path
  1.276     +1 -1      apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apr/configure.in,v
  retrieving revision 1.275
  retrieving revision 1.276
  diff -u -r1.275 -r1.276
  --- configure.in	2001/04/03 20:57:44	1.275
  +++ configure.in	2001/04/05 18:08:30	1.276
  @@ -991,7 +991,7 @@
   AC_SEARCH_LIBS(getaddrinfo, inet6)
   AC_SEARCH_LIBS(getnameinfo, inet6)
   APR_CHECK_WORKING_GETADDRINFO
  -AC_CHECK_FUNCS(getnameinfo)
  +APR_CHECK_WORKING_GETNAMEINFO
   AC_CHECK_FUNCS(getipnodebyname)
   AC_CHECK_FUNCS(getipnodebyaddr)
   APR_CHECK_SOCKADDR_IN6
  
  
  
  1.4       +54 -0     apr/build/apr_network.m4
  
  Index: apr_network.m4
  ===================================================================
  RCS file: /home/cvs/apr/build/apr_network.m4,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- apr_network.m4	2001/04/03 00:02:02	1.3
  +++ apr_network.m4	2001/04/05 18:08:30	1.4
  @@ -48,6 +48,60 @@
   fi
   ])
   
  +dnl
  +dnl check for working getnameinfo()
  +dnl
  +AC_DEFUN(APR_CHECK_WORKING_GETNAMEINFO,[
  +  AC_CACHE_CHECK(for working getnameinfo, ac_cv_working_getnameinfo,[
  +  AC_TRY_RUN( [
  +#ifdef HAVE_NETDB_H
  +#include <netdb.h>
  +#endif
  +#ifdef HAVE_STRING_H
  +#include <string.h>
  +#endif
  +#ifdef HAVE_SYS_TYPES_H
  +#include <sys/types.h>
  +#endif
  +#ifdef HAVE_SYS_SOCKET_H
  +#include <sys/socket.h>
  +#endif
  +#ifdef HAVE_NETINET_IN_H
  +#include <netinet/in.h>
  +#endif
  +
  +void main(void) {
  +    struct sockaddr_in sa;
  +    char hbuf[256];
  +    int error;
  +
  +    sa.sin_family = AF_INET;
  +    sa.sin_port = 0;
  +    sa.sin_addr.s_addr = inet_addr("127.0.0.1");
  +#ifdef SIN6_LEN
  +    sa.sin_len = sizeof(sa);
  +#endif
  +
  +    error = getnameinfo((const struct sockaddr *)&sa, sizeof(sa),
  +                        hbuf, 256, NULL, 0,
  +                        NI_NAMEREQD);
  +    if (error) {
  +        exit(1);
  +    } else {
  +        exit(0);
  +    }
  +}
  +],[
  +  ac_cv_working_getnameinfo="yes"
  +],[
  +  ac_cv_working_getnameinfo="no"
  +],[
  +  ac_cv_working_getnameinfo="yes"
  +])])
  +if test "$ac_cv_working_getnameinfo"="yes"; then
  +  AC_DEFINE(HAVE_GETNAMEINFO, 1, [Define if getnameinfo exists])
  +fi
  +])
   
   dnl
   dnl check for gethostbyname() which handles numeric address strings
  
  
  

Mime
View raw message