httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guenter Knauf <>
Subject [VOTE] change gen_test_char to compile without APR
Date Wed, 25 Apr 2012 11:10:03 GMT
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

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:

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 
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.

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!

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

View raw message