apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject [PATCH] move APR_INADDR_NONE definition
Date Mon, 29 Sep 2003 19:44:36 GMT
Is there any reason why APR_INADDR_NONE must be defined in apr.h and
detected at configure-time which I'm missing?

Index: configure.in
===================================================================
RCS file: /home/cvs/apr/configure.in,v
retrieving revision 1.538
diff -u -r1.538 configure.in
--- configure.in	29 Sep 2003 16:10:08 -0000	1.538
+++ configure.in	29 Sep 2003 19:39:15 -0000
@@ -1021,8 +1021,6 @@
 
 APR_CHECK_SOCKLEN_T
 
-APR_INADDR_NONE
-
 dnl Checks for pointer size
 AC_CHECK_SIZEOF(void*, 4)
 
Index: build/apr_network.m4
===================================================================
RCS file: /home/cvs/apr/build/apr_network.m4,v
retrieving revision 1.27
diff -u -r1.27 apr_network.m4
--- build/apr_network.m4	29 Sep 2003 19:38:35 -0000	1.27
+++ build/apr_network.m4	29 Sep 2003 19:39:15 -0000
@@ -689,41 +689,6 @@
 ])
 
 dnl
-dnl APR_INADDR_NONE
-dnl
-dnl checks for missing INADDR_NONE macro
-dnl
-AC_DEFUN(APR_INADDR_NONE,[
-  AC_CACHE_CHECK(whether system defines INADDR_NONE, ac_cv_inaddr_none,[
-  AC_TRY_COMPILE([
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-],[
-unsigned long foo = INADDR_NONE;
-],[
-    ac_cv_inaddr_none=yes
-],[
-    ac_cv_inaddr_none=no
-])])
-  if test "$ac_cv_inaddr_none" = "no"; then
-    apr_inaddr_none="((unsigned int) 0xffffffff)"
-  else
-    apr_inaddr_none="INADDR_NONE"
-  fi
-])
-
-
-dnl
 dnl APR_H_ERRNO_COMPILE_CHECK
 dnl
 AC_DEFUN(APR_H_ERRNO_COMPILE_CHECK,[
Index: include/apr.hnw
===================================================================
RCS file: /home/cvs/apr/include/apr.hnw,v
retrieving revision 1.34
diff -u -r1.34 apr.hnw
--- include/apr.hnw	15 Apr 2003 21:45:58 -0000	1.34
+++ include/apr.hnw	29 Sep 2003 19:39:15 -0000
@@ -234,11 +234,6 @@
  */
 #define APR_FILES_AS_SOCKETS      1
 
-/* Not all platforms have a real INADDR_NONE.  This macro replaces INADDR_NONE
- * on all platforms.
- */
-#define APR_INADDR_NONE           INADDR_NONE
-
 /* This macro indicates whether or not EBCDIC is the native character set.
  */
 #define APR_CHARSET_EBCDIC        0
Index: include/apr.hw
===================================================================
RCS file: /home/cvs/apr/include/apr.hw,v
retrieving revision 1.115
diff -u -r1.115 apr.hw
--- include/apr.hw	15 Apr 2003 22:28:13 -0000	1.115
+++ include/apr.hw	29 Sep 2003 19:39:15 -0000
@@ -333,11 +333,6 @@
  */
 #define APR_FILES_AS_SOCKETS      0
 
-/* Not all platforms have a real INADDR_NONE.  This macro replaces INADDR_NONE
- * on all platforms.
- */
-#define APR_INADDR_NONE           INADDR_NONE
-
 /* This macro indicates whether or not EBCDIC is the native character set.
  */
 #define APR_CHARSET_EBCDIC        0
Index: include/apr_network_io.h
===================================================================
RCS file: /home/cvs/apr/include/apr_network_io.h,v
retrieving revision 1.145
diff -u -r1.145 apr_network_io.h
--- include/apr_network_io.h	29 Sep 2003 16:10:08 -0000	1.145
+++ include/apr_network_io.h	29 Sep 2003 19:39:15 -0000
@@ -157,6 +157,16 @@
 };
 #endif
 
+/** @def APR_INADDR_NONE
+ * Not all platforms have a real INADDR_NONE.  This macro replaces
+ * INADDR_NONE on all platforms.
+ */
+#ifdef INADDR_NONE
+#define APR_INADDR_NONE INADDR_NONE
+#else
+#define APR_INADDR_NONE ((unsigned int) 0xffffffff)
+#endif
+
 /**
  * @def APR_INET
  * Not all platforms have these defined, so we'll define them here

Mime
View raw message