httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Fritsch ...@sfritsch.de>
Subject Re: [VOTE] change gen_test_char to compile without APR
Date Thu, 26 Apr 2012 21:00:16 GMT
On Wednesday 25 April 2012, Guenter Knauf wrote:
> Hi all,
> as some of you might have seen I did already some time back work on
> getting gen_test_char compiled with the build instead of the host
> compiler (I did this mainly for the NetWare builds since before it
> was a real pain to build httpd with gen_test_char built for host).
> Also the demand for general cross compilation comes up every now
> and then, and the only thing which is in the way is the
> compilation of gen_test_char ...
> Please take a look at gen_test_char.c in current httpd-HEAD;
> the only thing which relies on APR is this part:
> 
> #define apr_isalnum(c) (isalnum(((unsigned char)(c))))
> #define apr_isalpha(c) (isalpha(((unsigned char)(c))))
> #define apr_iscntrl(c) (iscntrl(((unsigned char)(c))))
> #define apr_isprint(c) (isprint(((unsigned char)(c))))
> #include <ctype.h>
> #define APR_HAVE_STDIO_H 1
> #define APR_HAVE_STRING_H 1
> 
> that means that gen_test_char.c includes:
> #include "apr.h"
> #include "apr_lib.h"
> only to get those defines above from apr_lib.h + the three macros:
> APR_HAVE_CTYPE_H
> APR_HAVE_STDIO_H
> APR_HAVE_STRING_H
> 
> for all platforms these three macros are most likely set to 1;
> these are standard C headers, and I cant imagine of a platform
> which doesnt have these.
> The other four defines for apr_is* are also unconditional in
> apr_lib.h so every platform uses them, thus every platform must
> have them in ctype.h.

These four functions are part of C89. AFAIK we don't support platforms 
that don't at least have C89.

> Therefore I believe that its safe to always compile gen_test_char.c
> with the build compiler without APR and without libtool; just
> like: $(CC_FOR_BUILD) gen_test_char.c -o gen_test_char
> 
> If we would agree to this then we wouldnt need any special handling
> in the server/Makefile and would always set in configure
> CC_FOR_BUILD=$(CC) unless cross compilation is detected.
> 
> Therefore I would like to simplify compilation of gen_test_char
> this way; please give a vote about this change, and if you
> disagree please explain your concerns! Thanks!
> 
> Vote:

[ +1 ] change gen_test_char.c to always compile without APR
[    ] leave it as it is because ...

Mime
View raw message