You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Bill Stoddard <st...@raleigh.ibm.com> on 2000/01/21 02:02:35 UTC

Re: cvs commit: apache-2.0/src/lib/apr/network_io/unix networkio.hsockaddr.c

Ahh, it's all becoming clearer now. I'll back this out.

apr/lib/apr_snprintf.c was using #ifdef HAVE_NETINET_IN_H. Is this correct?
Shouldn't it be using the internal APR definition, #if HAVE_NETINET_IN_H?

Bill


Re: cvs commit: apache-2.0/src/lib/apr/network_io/unix networkio.hsockaddr.c

Posted by Greg Stein <gs...@lyra.org>.
On Thu, 20 Jan 2000 rbb@apache.org wrote:
> On Thu, 20 Jan 2000, Bill Stoddard wrote:
> > Ahh, it's all becoming clearer now. I'll back this out.
> > 
> > apr/lib/apr_snprintf.c was using #ifdef HAVE_NETINET_IN_H. Is this correct?
> > Shouldn't it be using the internal APR definition, #if HAVE_NETINET_IN_H?
> 
> Yeah, it should be #if instead of #ifdef.  In this case, it really doesn't
> matter, except that it will match the rest of the def's.  If you are
> asking if it should use APR_HAVE_NETINET_H, the answer is no, that def is
> reserved for public header files.  I am not sure this is required, but it
> is conceivable that an internal file could need the header, but that
> platform decides it doesn't need to tell other programs that netinet/in.h
> is available.

If I understand correctly, this means we have three versions here:

1) HAVE_NETINET_IN_H, defined by Apache; for use by all Apache code
2) HAVE_NETINET_IN_H, defined by APR; for use "internally" by APR
3) APR_HAVE_NETINET_IN_H, defined by APR; for private use by the APR
   public header files

Can't we combine (2) and (3) by eliminating all uses of (2)? In other
words, the APR code uses #if APR_HAVE_NETINET_IN_H throughout.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/


Re: cvs commit: apache-2.0/src/lib/apr/network_io/unix networkio.hsockaddr.c

Posted by rb...@apache.org.
On Thu, 20 Jan 2000, Bill Stoddard wrote:

> Ahh, it's all becoming clearer now. I'll back this out.
> 
> apr/lib/apr_snprintf.c was using #ifdef HAVE_NETINET_IN_H. Is this correct?
> Shouldn't it be using the internal APR definition, #if HAVE_NETINET_IN_H?

Yeah, it should be #if instead of #ifdef.  In this case, it really doesn't
matter, except that it will match the rest of the def's.  If you are
asking if it should use APR_HAVE_NETINET_H, the answer is no, that def is
reserved for public header files.  I am not sure this is required, but it
is conceivable that an internal file could need the header, but that
platform decides it doesn't need to tell other programs that netinet/in.h
is available.

Ryan


Come to the first official Apache Software Foundation
Conference!!!   <http://ApacheCon.Com/>

_______________________________________________________________________________
Ryan Bloom                        	rbb@ntrnet.net
2121 Stonehenge Dr. Apt #3
Raleigh, NC 27615		Ryan Bloom -- thinker, adventurer, artist,
				     writer, but mostly, friend.
-------------------------------------------------------------------------------