On Sat, 28 Feb 2004, Matthieu Herrb wrote: >While working on OpenBSD/amd64 support for XFree86, I found out that the >C preprocessor symbol for AMD64 machines was changed from __x86_64__ to >__AMD64__. But looking at what gcc defines on different AMD63 systems >(*BSD, Linux), it looks __AMD64__ is never used. Generally __amd64__ is >defined. >linux.cf add -D__AMD64__ to StandardCppDefines, so the code actually >works there. >Also, in many places where checks are done for 64 bits arches, the test >is in the form > >#if defined(_LP64) || defined(__alpha__) .... || defined(__AMD64__). > >Since on the BSDs gcc defines _LP64, these conditions will be true. But >there are a few cases where the _LP64 test is missing. > >Any clues on how to fix that correctly (after 4.4) ? Instead of >enumerating all the LP64 arches in several different places, it would be > better imho to make sure _LP64 is defined and only testing on this.
If the test is just to determine wether or not a 64bit architecture is being built for, then __arch64__ is a better test. I've noticed a bunch of places in the source which test for each possible 64bit architecture, and which need to have any new 64bit arches added as time goes on. __arch64__ would fix that also. -- Mike A. Harris _______________________________________________ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel