apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/misc/unix errorcodes.c
Date Fri, 07 Dec 2001 15:48:06 GMT
trawick     01/12/07 07:48:06

  Modified:    .        CHANGES configure.in
               build    apr_network.m4
               misc/unix errorcodes.c
  Log:
  don't try to use getaddrinfo() on systems without gai_strerror()
  
  this fixes a build error on RedHat 5.2
  
  Revision  Changes    Path
  1.193     +3 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.192
  retrieving revision 1.193
  diff -u -r1.192 -r1.193
  --- CHANGES	2001/12/06 13:43:45	1.192
  +++ CHANGES	2001/12/07 15:48:05	1.193
  @@ -1,5 +1,8 @@
   Changes with APR b1  
   
  +  *) Fix build breakage on systems with getaddrinfo() but not 
  +     gai_strerror() (e.g., RedHat 5.2).  [Jeff Trawick]
  +
     *) Fix a problem in Unix apr_file_dup() which caused 0 to be returned
        by the first read.  [Stas Bekman <stas@stason.org>]
   
  
  
  
  1.384     +2 -0      apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apr/configure.in,v
  retrieving revision 1.383
  retrieving revision 1.384
  diff -u -r1.383 -r1.384
  --- configure.in	2001/12/04 20:37:38	1.383
  +++ configure.in	2001/12/07 15:48:05	1.384
  @@ -1319,7 +1319,9 @@
     [ user_disabled_ipv6=0 ] )
   
   AC_SEARCH_LIBS(getaddrinfo, inet6)
  +AC_SEARCH_LIBS(gai_strerror, inet6)
   AC_SEARCH_LIBS(getnameinfo, inet6)
  +AC_CHECK_FUNCS(gai_strerror)
   APR_CHECK_WORKING_GETADDRINFO
   APR_CHECK_NEGATIVE_EAI
   APR_CHECK_WORKING_GETNAMEINFO
  
  
  
  1.11      +9 -1      apr/build/apr_network.m4
  
  Index: apr_network.m4
  ===================================================================
  RCS file: /home/cvs/apr/build/apr_network.m4,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- apr_network.m4	2001/11/27 03:50:49	1.10
  +++ apr_network.m4	2001/12/07 15:48:05	1.11
  @@ -5,6 +5,10 @@
   dnl
   dnl check for working getaddrinfo()
   dnl
  +dnl Note that if the system doesn't have gai_strerror(), we
  +dnl can't use getaddrinfo() because we can't get strings
  +dnl describing the error codes.
  +dnl
   AC_DEFUN(APR_CHECK_WORKING_GETADDRINFO,[
     AC_CACHE_CHECK(for working getaddrinfo, ac_cv_working_getaddrinfo,[
     AC_TRY_RUN( [
  @@ -44,7 +48,11 @@
     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])
  +  if test "$ac_cv_func_gai_strerror" != "yes"; then
  +    ac_cv_working_getaddrinfo="no"
  +  else
  +    AC_DEFINE(HAVE_GETADDRINFO, 1, [Define if getaddrinfo exists and works well enough
for APR])
  +  fi
   fi
   ])
   
  
  
  
  1.45      +1 -1      apr/misc/unix/errorcodes.c
  
  Index: errorcodes.c
  ===================================================================
  RCS file: /home/cvs/apr/misc/unix/errorcodes.c,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- errorcodes.c	2001/11/12 01:16:00	1.44
  +++ errorcodes.c	2001/12/07 15:48:06	1.45
  @@ -410,7 +410,7 @@
           return stuffbuffer(buf, bufsize, "APR does not understand this error code");
       }
       else if (statcode < APR_OS_START_SYSERR) {
  -#if defined(HAVE_GETADDRINFO)
  +#if defined(HAVE_GAI_STRERROR)
           statcode -= APR_OS_START_EAIERR;
   #if defined(NEGATIVE_EAI)
           statcode = -statcode;
  
  
  

Mime
View raw message