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. /usr/bin/diff isn't that clever to dismantle the whole include
file, it's just a text diff which adds #ifdef/#else/#endif to seperate
the differences.

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) [EMAIL PROTECTED]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to