apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/network_io/unix sa_common.c
Date Wed, 24 Apr 2002 20:13:52 GMT
trawick     02/04/24 13:13:52

  Modified:    .        configure.in
               build    apr_network.m4
               network_io/unix sa_common.c
  Log:
  for the gethostbyname() path in apr_sockaddr_info_get(), always handle
  numeric address strings...  this solved a weird binary compatibility
  problem
  
  Submitted by:	Jon Travis
  Reviewed by:	Jeff Trawick
  
  Revision  Changes    Path
  1.435     +0 -2      apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apr/configure.in,v
  retrieving revision 1.434
  retrieving revision 1.435
  diff -u -r1.434 -r1.435
  --- configure.in	24 Apr 2002 16:39:40 -0000	1.434
  +++ configure.in	24 Apr 2002 20:13:52 -0000	1.435
  @@ -1525,8 +1525,6 @@
   
   APR_CHECK_SOCKADDR_SA_LEN
   
  -APR_CHECK_GETHOSTBYNAME_NAS
  -
   dnl Check the types only if we have gethostbyname_r
   if test "$ac_cv_func_gethostbyname_r" = "yes"; then
       APR_CHECK_GETHOSTBYNAME_R_STYLE
  
  
  
  1.17      +0 -47     apr/build/apr_network.m4
  
  Index: apr_network.m4
  ===================================================================
  RCS file: /home/cvs/apr/build/apr_network.m4,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- apr_network.m4	15 Apr 2002 05:55:24 -0000	1.16
  +++ apr_network.m4	24 Apr 2002 20:13:52 -0000	1.17
  @@ -170,53 +170,6 @@
   fi
   ])
   
  -
  -dnl
  -dnl check for gethostbyname() which handles numeric address strings
  -dnl
  -AC_DEFUN(APR_CHECK_GETHOSTBYNAME_NAS,[
  -  AC_CACHE_CHECK(for gethostbyname() which handles numeric address strings, ac_cv_gethostbyname_nas,[
  -  AC_TRY_RUN( [
  -#ifdef HAVE_SYS_TYPES_H
  -#include <sys/types.h>
  -#endif
  -#ifdef HAVE_NETINET_IN_H
  -#include <netinet/in.h>
  -#endif
  -#ifdef HAVE_ARPA_INET_H
  -#include <arpa/inet.h>
  -#endif
  -#ifdef HAVE_NETDB_H
  -#include <netdb.h>
  -#endif
  -#ifdef HAVE_STDLIB_H
  -#include <stdlib.h>
  -#endif
  -void main(void) {
  -    struct hostent *he = gethostbyname("127.0.0.1");
  -    if (he == NULL) {
  -        exit(1);
  -    }
  -    he = gethostbyname("255.255.255.255");
  -    if (he == NULL) {
  -        exit(1);
  -    }
  -    else {
  -        exit(0);
  -    }
  -}
  -],[
  -  ac_cv_gethostbyname_nas="yes"
  -],[
  -  ac_cv_gethostbyname_nas="no"
  -],[
  -  ac_cv_gethostbyname_nas="yes"
  -])])
  -if test "$ac_cv_gethostbyname_nas" = "yes"; then
  -  AC_DEFINE(GETHOSTBYNAME_HANDLES_NAS, 1, [Define if gethostbyname() handles nnn.nnn.nnn.nnn])
  -fi
  -])
  -
   dnl
   dnl Checks the definition of gethostbyname_r and gethostbyaddr_r
   dnl which are different for glibc, solaris and assorted other operating
  
  
  
  1.55      +0 -4      apr/network_io/unix/sa_common.c
  
  Index: sa_common.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/unix/sa_common.c,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- sa_common.c	1 Apr 2002 14:13:45 -0000	1.54
  +++ sa_common.c	24 Apr 2002 20:13:52 -0000	1.55
  @@ -417,7 +417,6 @@
               family = APR_INET; /* we don't support IPv6 here */
           }
   
  -#ifndef GETHOSTBYNAME_HANDLES_NAS
           if (*hostname >= '0' && *hostname <= '9' &&
               strspn(hostname, "0123456789.") == strlen(hostname)) {
               struct in_addr ipaddr;
  @@ -426,7 +425,6 @@
               save_addrinfo(p, *sa, ipaddr, port);
           }
           else {
  -#endif
   #if APR_HAS_THREADS && !defined(GETHOSTBYNAME_IS_THREAD_SAFE) && \
       defined(HAVE_GETHOSTBYNAME_R) && !defined(BEOS)
   #if defined(GETHOSTBYNAME_R_HOSTENT_DATA)
  @@ -474,9 +472,7 @@
                             port);
               ++curaddr;
           }
  -#ifndef GETHOSTBYNAME_HANDLES_NAS
           }
  -#endif
       }
       else {
           (*sa)->pool = p;
  
  
  

Mime
View raw message