Roland Mainz wrote:
>Ian Collins wrote:
>
>
>>Roland Mainz wrote:
>>
>>
>>>Garrett D'Amore wrote:
>>>
>>>
>>>>Roland Mainz wrote:
>>>>
>>>>
>[snip]
>
>
>>>Erm, the code which generates the final headers works like this (shell
>>>pseudocode):
>>>-- snip --
>>>(
>>> print "/* header */"
>>> /usr/bin/diff -D<symbol>" 32bitinclude/foo.h 64bitinclude/foo.h
>>>) >${ROOT}/usr/include/ast/foo.h
>>>-- snip --
>>>
>>>We can't "inject" a "#include <sys/isa_defs.h>" between "header" and the
>>>"diff" because this will alter the behaviour of the AST includes (they
>>>are not designed to handle this kind of hackery). Right now we use
>>>either |__amd64| (on x86) or |__sparcv9| (on SPARC) instead of |_LP64|
>>>which I thought that this would be a acceptable compromise.
>>>
>>>
>>Aren't you including <sys/types.h> anywhere in the code? If so, you
>>have <sys/isa_defs.h> which defines _LP64.
>>
>>
>
>That will not work because the |#ifdef <symbol> /*64bitinclude*/ #else
>/*32bitinclude*/ #endif| comes before all other cpp statements (or
>better: The "#ifdef <symbol>" part comes before all other cpp
>statements), including "#include"s which are done in the single AST
>headers.
>
>
I see. How horrible.
I've had to face code like that before and it's a bit of a no win
situation trying to modernise it.
Ian
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code