Subject | Re: [IB-Architect] First impressions |
---|---|
Author | Jan Mikkelsen |
Post date | 2000-07-29T23:17:45Z |
reed mideke wrote:
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
>Andi Kleen wrote:generates.
>> What you really want are just individual features like autoconf
>> (HAVE_BIG_ENDIAN, HAVE_UNIXFUNCTIONX, HAVE_UNIXFUNCTIONY,HAVE_X86PROPERTY, etc.)
>> All of them should be possible to test for individually in a configurescript.
>> The long run benefit is that ports get much easier.Yes. But I don't think they should be #ifdefs.
>>
>> -Andi
>>
>Right. I agree 100% that this is the way it >should< be.
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