Subject Re: [IB-Architect] First impressions
Author Jan Mikkelsen
reed mideke wrote:
>Andi Kleen wrote:
>> What you really want are just individual features like autoconf
generates.
>> (HAVE_BIG_ENDIAN, HAVE_UNIXFUNCTIONX, HAVE_UNIXFUNCTIONY,
HAVE_X86PROPERTY, etc.)
>> All of them should be possible to test for individually in a configure
script.
>> The long run benefit is that ports get much easier.
>>
>> -Andi
>>
>Right. I agree 100% that this is the way it >should< be.


Yes. But I don't think they should be #ifdefs.

For example, jrd/time.h is on the right path. Instead of having #ifdefs
throughout the code to pull in the right system provided time.h, the code
includes jrd/time.h, which contains the #ifdefs. However, rather than
having one file which contains essentially six (in the case of jrd/time.h)
different versions depending on the proprocessor, have six files and use the
appropriate one for the build at hand.

Generic makefile rules can be easily written to handle this approach without
the requirement for something like an autoconf harness to build a set of
preprocessor definitions.

Jan Mikkelsen