You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Greg Ames <gr...@raleigh.ibm.com> on 2000/06/23 21:15:58 UTC

[PATCH] htonl unresolved in http_config.c

The htonl() in main/http_config.c wasn't being resolved on OS/390 because it requires
arpa/inet.h.   I believe this is due to the recent cleanup of include/ap_config.h.  Doing
the #ifdef/#include in httpd_config.c works fine also, but looks kinda ugly to me - I'd
rather let APR take care of platform differences when possible.

Greg

Index: lib/apr/include/apr_network_io.h
===================================================================
RCS file: /cvs/apache/apache-2.0/src/lib/apr/include/apr_network_io.h,v
retrieving revision 1.42
diff -u -d -b -w -r1.42 apr_network_io.h
--- apr_network_io.h    2000/06/22 19:09:44 1.42
+++ apr_network_io.h    2000/06/23 18:54:23
@@ -62,6 +62,9 @@
 #if APR_HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif

 #ifdef __cplusplus
 extern "C" {





Re: [PATCH] htonl unresolved in http_config.c

Posted by Greg Ames <gr...@raleigh.ibm.com>.
rbb@covalent.net wrote:
> 
> > The htonl() in main/http_config.c wasn't being resolved on OS/390 because it requires
> > arpa/inet.h.   I believe this is due to the recent cleanup of include/ap_config.h.  Doing
> > the #ifdef/#include in httpd_config.c works fine also, but looks kinda ugly to me - I'd
> > rather let APR take care of platform differences when possible.
> 
> This needs to be done in http_config.c.  This is not a header that APR
> needs.  I am still working on fixing the config system so that APR can
> handle more of these.  In the meantime, let's not confuse the issues be
> making APR include things it doesn't need.
>

OK - I moved it back.  Greg
 
Index: main/http_config.c
===================================================================
RCS file: /cvs/apache/apache-2.0/src/main/http_config.c,v
retrieving revision 1.66
diff -u -d -b -w -r1.66 http_config.c
--- http_config.c	2000/06/18 13:33:29	1.66
+++ http_config.c	2000/06/23 19:58:36
@@ -76,6 +76,9 @@
 #include "ap_config.h"
 #include "apr_portable.h"
 #include "apr_file_io.h"
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif 
 #include "httpd.h"
 #include "http_config.h"
 #include "http_core.h"

Re: [PATCH] htonl unresolved in http_config.c

Posted by rb...@covalent.net.

> The htonl() in main/http_config.c wasn't being resolved on OS/390 because it requires
> arpa/inet.h.   I believe this is due to the recent cleanup of include/ap_config.h.  Doing
> the #ifdef/#include in httpd_config.c works fine also, but looks kinda ugly to me - I'd
> rather let APR take care of platform differences when possible.

This needs to be done in http_config.c.  This is not a header that APR
needs.  I am still working on fixing the config system so that APR can
handle more of these.  In the meantime, let's not confuse the issues be
making APR include things it doesn't need.

Ryan

> 
> Greg
> 
> Index: lib/apr/include/apr_network_io.h
> ===================================================================
> RCS file: /cvs/apache/apache-2.0/src/lib/apr/include/apr_network_io.h,v
> retrieving revision 1.42
> diff -u -d -b -w -r1.42 apr_network_io.h
> --- apr_network_io.h    2000/06/22 19:09:44 1.42
> +++ apr_network_io.h    2000/06/23 18:54:23
> @@ -62,6 +62,9 @@
>  #if APR_HAVE_NETINET_IN_H
>  #include <netinet/in.h>
>  #endif
> +#ifdef HAVE_ARPA_INET_H
> +#include <arpa/inet.h>
> +#endif
> 
>  #ifdef __cplusplus
>  extern "C" {
> 
> 
> 
> 


_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------