On 20.06.2013 22:38, Branko Čibej wrote:
> On 20.06.2013 22:30, Branko Čibej wrote:
>> On 20.06.2013 17:52, Rainer Jung wrote:
>>> 1.8.0 calls gcc with -std=c90. For my Solaris 10 Sparc using gcc 4.7.2
>>> this leads to "_STRICT_STDC" getting defined and then limits.h no longer
>>> defines PATH_MAX. So apr.h bombs out during compile with:
>>>
>>> #error no decision has been made on APR_PATH_MAX for your platform
>>>
>>> Adding e.g. "EXTRA_CPPFLAGS = -D__EXTENSIONS__" fixes on my platform.
>>>
>>> gcc manual as I understand it says -std=c90 and -std=c89 are the same
>>> and both are equivalent to -ansi. Was that intended as a new flag for 1.8.0?
>> The intended flag was -std=c90, yes.
>> You should be able to use just plain CFLAGS= instead of EXTRA_CPPFLAGS=,
>> the problem with initial CFLAGS being overriden should have been fixed.
>>
>>> The flag is set by SVN_CC_MODE_SETUP in build/ac-macros/compiler.m4 and
>>> passes along into CMODEFLAGS in the Makefile.
>> Yup.
>>
>>> On Solaris that means "turn off any non c90 features". If you want all
>>> of the c90 compatible extensions on top of c90, then you need to define
>>> __EXTENSIONS__.
>> Could you provide a patch that does that? I expect the best place would
>> be in the SVN_CC_MODE_SETUP macro in compiler.m4.
>
> By the way, I wouldn't be surprised if this was a problem on HP-UX and
> AIX as well; from what I recall, they used to show similar behaviour.
> Unfortunately I don't have access to any of these platforms to test on.
I could bake something Solaris specific, which would be defining
"__EXTENSIONS__" or something more POSIX like which also works here,
namely defining "_POSIX_SOURCE". Unfortunately I've got not idea to
which platforms in addition to Solaris I should apply "_POSIX_SOURCE".
Not the best starting point for a good patch.
Regards,
Rainer
Received on 2013-06-20 23:18:44 CEST