Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Dev

[VOTE] change gen_test_char to compile without APR

 

 

Apache dev RSS feed   Index | Next | Previous | View Threaded


fuankg at apache

Apr 25, 2012, 4:10 AM

Post #1 of 6 (302 views)
Permalink
[VOTE] change gen_test_char to compile without APR

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.

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:
[ ] change gen_test_char.c to always compile without APR
[ ] leave it as it is because ...


sf at sfritsch

Apr 26, 2012, 2:00 PM

Post #2 of 6 (289 views)
Permalink
Re: [VOTE] change gen_test_char to compile without APR [In reply to]

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


wrowe at rowe-clan

Apr 26, 2012, 2:19 PM

Post #3 of 6 (290 views)
Permalink
Re: [VOTE] change gen_test_char to compile without APR [In reply to]

On 4/26/2012 4:00 PM, Stefan Fritsch wrote:
>>
>> 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.

Those exist for const'ness only. We should be fine. +1.


fuankg at apache

May 3, 2012, 8:39 AM

Post #4 of 6 (271 views)
Permalink
Re: [VOTE] change gen_test_char to compile without APR [In reply to]

Am 25.04.2012 13:10, schrieb Guenter Knauf:
> 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:
> [x] change gen_test_char.c to always compile without APR
> [ ] leave it as it is because ...
just for the records (and to pop up this again now one week latter)
here's my own vote; then so far sf, wrowe and me +1 for the change and
nobody against within one week; I'll patch later trunk, and update my
backport proposals unless someone speaks up now with something against.

Gün.


wrowe at rowe-clan

May 7, 2012, 1:13 PM

Post #5 of 6 (258 views)
Permalink
Re: [VOTE] change gen_test_char to compile without APR [In reply to]

> Vote:
> [X] change gen_test_char.c to always compile without APR

for 2.4 forwards.


wrowe at rowe-clan

May 7, 2012, 1:14 PM

Post #6 of 6 (259 views)
Permalink
Re: [VOTE] change gen_test_char to compile without APR [In reply to]

On 5/3/2012 10:39 AM, Guenter Knauf wrote:
>>
>> Vote:
>> [x] change gen_test_char.c to always compile without APR
>> [ ] leave it as it is because ...
> just for the records (and to pop up this again now one week latter) here's my own vote;
> then so far sf, wrowe and me +1 for the change and nobody against within one week; I'll
> patch later trunk, and update my backport proposals unless someone speaks up now with
> something against.

If the output is nonvolatile, you should structure the make such that we should
conditionally build from the date stamps of the origin .c and output .c sources,
just as we already do for the mod_ssl bison/yacc -b generated lexars.

Apache dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.