]> granicus.if.org Git - php/commitdiff
Typedef socklen_t, if it is not available
authorSascha Schumann <sas@php.net>
Thu, 30 Dec 1999 16:09:17 +0000 (16:09 +0000)
committerSascha Schumann <sas@php.net>
Thu, 30 Dec 1999 16:09:17 +0000 (16:09 +0000)
acinclude.m4
main/php.h

index 188659a5550f8cae3a3fa24bc17f23b7989fbcbf..b45ca77debf869a1f5fec304bf0a0699357c8099 100644 (file)
@@ -117,8 +117,8 @@ socklen_t x;
 ],[
   ac_cv_socklen_t=no
 ]))
-if test "$ac_cv_socklen_t" = "no"; then
-  AC_DEFINE(socklen_t, unsigned int)
+if test "$ac_cv_socklen_t" = "yes"; then
+  AC_DEFINE(HAVE_SOCKLEN_T, 1, [Whether you have socklen_t])
 fi
 ])
 
index a1ec7cba1d5d92e43cdec6fa510d66f4ccff0523..1269bc15692df2e0b47b2654d733a383ddc60ca4 100644 (file)
@@ -108,6 +108,10 @@ size_t strlcat(char *dst, const char *src, size_t siz);
 char *strtok_r(char *s, const char *delim, char **last);
 #endif
 
+#ifndef HAVE_SOCKLEN_T
+typedef unsigned int socklen_t;
+#endif
+
 #include "request_info.h"
 
 #if HAVE_LIBDL