apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: apr/include apr.h.in apr_network_io.h
Date Mon, 29 Sep 2003 16:10:08 GMT
jorton      2003/09/29 09:10:08

  Modified:    .        configure.in
               build    apr_network.m4
               include  apr.h.in apr_network_io.h
  Log:
  For platforms which have "struct sockaddr_stroage", allow
  apr_sockaddr_t to be extended in the future whilst retaining
  binary compatibility across builds with and without IPv6
  enabled.
  
  * build/apr_network.m4 (APR_CHECK_SOCKADDR_STORAGE): New
  macro.
  
  * configure.in: Use it.
  
  * include/apr.h.in: Define APR_HAVE_SA_STORAGE.
  
  * include/apr_network_io.h: Add a "struct sockaddr_storage"
  field to the 'sa' union in apr_sockaddr_t.
  
  Revision  Changes    Path
  1.538     +1 -0      apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apr/configure.in,v
  retrieving revision 1.537
  retrieving revision 1.538
  diff -u -u -r1.537 -r1.538
  --- configure.in	29 Sep 2003 14:20:02 -0000	1.537
  +++ configure.in	29 Sep 2003 16:10:08 -0000	1.538
  @@ -1801,6 +1801,7 @@
   APR_CHECK_NEGATIVE_EAI
   APR_CHECK_WORKING_GETNAMEINFO
   APR_CHECK_SOCKADDR_IN6
  +APR_CHECK_SOCKADDR_STORAGE
   
   have_ipv6="0"
   if test "$user_disabled_ipv6" = 1; then
  
  
  
  1.26      +20 -0     apr/build/apr_network.m4
  
  Index: apr_network.m4
  ===================================================================
  RCS file: /home/cvs/apr/build/apr_network.m4,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -u -r1.25 -r1.26
  --- apr_network.m4	29 Sep 2003 11:31:59 -0000	1.25
  +++ apr_network.m4	29 Sep 2003 16:10:08 -0000	1.26
  @@ -640,6 +640,26 @@
   fi
   ])
   
  +AC_DEFUN(APR_CHECK_SOCKADDR_STORAGE,[
  +AC_CACHE_CHECK(for sockaddr_storage, apr_cv_define_sockaddr_storage,[
  +AC_TRY_COMPILE([
  +#ifdef HAVE_SYS_TYPES_H
  +#include <sys/types.h>
  +#endif
  +#ifdef HAVE_NETINET_IN_H
  +#include <netinet/in.h>
  +#endif
  +],[struct sockaddr_storage sa;],
  +[apr_cv_define_sockaddr_storage=yes],
  +[apr_cv_define_sockaddr_storage=no])])
  +
  +if test "$apr_cv_define_sockaddr_storage" = "yes"; then
  +  have_sa_storage=1
  +else
  +  have_sa_storage=0
  +fi
  +AC_SUBST(have_sa_storage)
  +])
   
   AC_DEFUN(APR_CHECK_SOCKADDR_IN6,[
   AC_CACHE_CHECK(for sockaddr_in6, ac_cv_define_sockaddr_in6,[
  
  
  
  1.125     +1 -0      apr/include/apr.h.in
  
  Index: apr.h.in
  ===================================================================
  RCS file: /home/cvs/apr/include/apr.h.in,v
  retrieving revision 1.124
  retrieving revision 1.125
  diff -u -u -r1.124 -r1.125
  --- apr.h.in	12 May 2003 10:49:42 -0000	1.124
  +++ apr.h.in	29 Sep 2003 16:10:08 -0000	1.125
  @@ -230,6 +230,7 @@
   #define APR_HAVE_SIGACTION      @have_sigaction@
   #define APR_HAVE_SIGSUSPEND     @have_sigsuspend@
   #define APR_HAVE_SIGWAIT        @have_sigwait@
  +#define APR_HAVE_SA_STORAGE     @have_sa_storage@
   #define APR_HAVE_STRCASECMP     @have_strcasecmp@
   #define APR_HAVE_STRDUP         @have_strdup@
   #define APR_HAVE_STRICMP        @have_stricmp@
  
  
  
  1.145     +5 -0      apr/include/apr_network_io.h
  
  Index: apr_network_io.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_network_io.h,v
  retrieving revision 1.144
  retrieving revision 1.145
  diff -u -u -r1.144 -r1.145
  --- apr_network_io.h	17 Sep 2003 14:19:16 -0000	1.144
  +++ apr_network_io.h	29 Sep 2003 16:10:08 -0000	1.145
  @@ -260,6 +260,11 @@
           /** IPv6 sockaddr structure */
           struct sockaddr_in6 sin6;
   #endif
  +#if APR_HAVE_SA_STORAGE
  +        /** Placeholder to ensure that the size of this union is not
  +         * dependent on whether APR_HAVE_IPV6 is defined. */
  +        struct sockaddr_storage sas;
  +#endif
       } sa;
   };
   
  
  
  

Mime
View raw message