cvs: php4 / configure.in /main network.c

From: Date: Thu, 07 Sep 2000 17:56:12 +0000
Subject: cvs: php4 / configure.in /main network.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-1624@lists.php.net to get a copy of this message
venaas Thu Sep 7 10:56:12 2000 EDT Modified files: /php4 configure.in /php4/main network.c Log: Better IPv6 checking Index: php4/configure.in diff -u php4/configure.in:1.176 php4/configure.in:1.177 --- php4/configure.in:1.176 Tue Sep 5 08:35:52 2000 +++ php4/configure.in Thu Sep 7 10:56:11 2000 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.176 2000/09/05 15:35:52 venaas Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.177 2000/09/07 17:56:11 venaas Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -328,6 +328,15 @@ dnl Checks for types AC_TYPE_SIZE_T AC_TYPE_UID_T + +dnl Check for struct sockaddr_in6 +AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_struct_sockaddr_in6, +[AC_TRY_COMPILE([#include <sys/socket.h> +#include <netinet/in.h>], [struct sockaddr_in6 s; s;], + ac_cv_struct_sockaddr_in6=yes, ac_cv_struct_sockaddr_in6=no)]) +if test "$ac_cv_struct_sockaddr_in6" = yes; then + AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6,1,[Whether you have struct sockaddr_in6]) +fi dnl Checks for library functions. AC_FUNC_VPRINTF Index: php4/main/network.c diff -u php4/main/network.c:1.7 php4/main/network.c:1.8 --- php4/main/network.c:1.7 Tue Sep 5 12:06:29 2000 +++ php4/main/network.c Thu Sep 7 10:56:12 2000 @@ -15,7 +15,7 @@ | Authors: Stig Venaas <venaas@uninett.no> | +----------------------------------------------------------------------+ */ -/* $Id: network.c,v 1.7 2000/09/05 19:06:29 zeev Exp $ */ +/* $Id: network.c,v 1.8 2000/09/07 17:56:12 venaas Exp $ */ #include "php.h" @@ -93,7 +93,7 @@ sap = *sal; do { switch (sai->ai_family) { -# ifdef AF_INET6 +# ifdef HAVE_STRUCT_SOCKADDR_IN6 case AF_INET6: { *sap = emalloc(sizeof(struct sockaddr_in6)); if (*sap == NULL) { @@ -167,7 +167,7 @@ s = socket((*sal)->sa_family, socktype, 0); if (s != SOCK_ERR) { switch ((*sal)->sa_family) { -#if defined( HAVE_GETADDRINFO ) && defined( AF_INET6 ) +#if defined( HAVE_GETADDRINFO ) && defined( HAVE_STRUCT_SOCKADDR_IN6 ) case AF_INET6: { struct sockaddr_in6 *sa = (struct sockaddr_in6 *)*sal;

« previous php.cvs (#1624) next »