Roland Mainz wrote: > Glenn Fowler wrote: > >> On Mon, 5 Feb 2007 15:42:49 -0500 James Carlson wrote: >> >>> Glenn Fowler writes: >>> That's exactly my question: rather than saying vaguely that it >>> "screws-up" the compilation, what actual problems are seen? >>> >> sorry, I don't like "x doesn't work", with no further info, either >> >> Roland, can you dig up the original msg for this problem? >> > > The problem doesn't affect you directly. > The issue is that we need a way to distingish between 32bit and 64bit > because we merge arch/${platform}/inlcude/ast/ includes from 32bit and > 64bit builds via "/usr/bin/diff -D<symbol>". The problem is that we > can't use |_LP64| for <symbol> since the Sun Workshop/Forte/Studio > compilers do not set |_LP64| (gcc set it, e.g. > -- snip -- > $ (touch foo.h; /usr/sfw/bin/cpp -m64 -dM foo.h) | fgrep _LP64 > #define __LP64__ 1 > #define _LP64 1 > -- snip -- > ) and "injecting" a |#include <sys/isa_defs.h>| will fork() the includes > in a completely unpredictable manner (I've tried that - the sources > compile and the code doesn't pass the test suite anymore (and I really > don't have the time to figure out why it breaks somewhere in the ~~1000 > source files we have... that's more a job for Mr. Sisyphus)). >
Huh? sys/isa_defs.h should come in via sys/types.h. If you're not getting sys/types.h, then all bets are off. isa_defs.h gets the _LP64 by looking at __amd64 or __sparcv9. You could use the same tests, but I would discourage you from doing so. Also, looking at Forte, it looks like it defines __x86_64 and __amd64, so you have options there. (I've not checked the sparc output. Use "cc -# -xarch=amd64 -E /dev/null" to show the flags passed to the preprocessor. -- Garrett > ---- > > Bye, > Roland > > -- Garrett D'Amore, Principal Software Engineer Tadpole Computer / Computing Technologies Division, General Dynamics C4 Systems http://www.tadpolecomputer.com/ Phone: 951 325-2134 Fax: 951 325-2191