apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject Re: APR_CHECK_GETHOSTBYNAME_R_STYLE (ick)
Date Thu, 09 Aug 2001 16:49:14 GMT
[ This message belongs at dev@apr.apache.org not new-httpd ]

On Thu, Aug 09, 2001 at 05:46:40AM -0500, new-httpd@thewrittenword.com wrote:
> Between Solaris, HP-UX, AIX, Tru64 UNIX, and IRIX, there are three
> possibilities for the number of arguments to gethostbyname_r: 3, 5, 6.
> 
> I think the test to determine the number of arguments in
> apr_network.m4 is inadequate. The ones used by the cURL program
> (http://curl.haxx.se) seem far more robust in that it uses AC_TRY_RUN
> to determine the correct number of arguments rather than a modified
> AC_TRY_COMPILE.

I believe that AC_TRY_COMPILE_NO_WARNING is the correct test to use
here.  We have already determined that the gethostbyname_r function
exists - we do not need to link or run a test program.  If we have
the wrong arguments to the function, we will receive a compiler 
warning and we will fail the test.  I do not see what the additional
steps of the AC_TRY_RUN test will give us.

You may be correct that the names are slightly misleading.  However,
Sterling originally intended those values to be indicative of what
the style was rather than how many arguments.  Personally, I don't
care much about names.  No one is ever happy with our names anyway.
Feel free to submit a patch that changes the #defines names if you 
want.  -- justin


Mime
View raw message