On Thu, 26 Sep 2002, Philip Willoughby wrote: > Yesterday, Bill Moseley wrote: > > >Does anyone know what macro name I can use to detect when running on IRIX > >6.5? I don't have access to the machine so I can't poke around headers. > >I'm not sure if there's an autoconf solution, or if I just need to find out > >what name I can use. > > Why do you need to know if it's IRIX? There probably isn't an autoconf > test since the philosophy of autoconf is to test for features and not > platforms. Have you looked on ac-archive for a test for the feature/bug you > need to detect? (http://www.gnu.org/software/ac-archive)
This is the same issuse I discussed here a week or so ago. We have a memory manager that aligns reads on sizeof(long), but that causes sigbus on some platforms when sizeof(long) == 4 but we need 8 byte alignment. I was never able to find "the" solution for testing this in our code and have resulted to testing for specific machines when the issue comes up. #if defined(__sparc__) || defined(IRIX) /* This is not exactly correct because not all __sparc__ machines require 8 */ #define PointerAlignmentSize 8 #else #define PointerAlignmentSize sizeof(long) #endif Someone pointed out the Postgres configure has a test, but didn't have time to work that out yet. > >Can I get gcc to dump the defined macros?A > > According to the man page the correct invocation is: > > gcc -E -dM <sourcefile.c> Thanks. At the end of 15 hours at the screen I failed to see that... -- Bill Moseley [EMAIL PROTECTED]
