fix build on Solaris 10/x86_64 in 64bit mode with Sun Studio 11
От | Stefan Kaltenbrunner |
---|---|
Тема | fix build on Solaris 10/x86_64 in 64bit mode with Sun Studio 11 |
Дата | |
Msg-id | 45A0D2C5.1080803@kaltenbrunner.cc обсуждение исходный текст |
Ответы |
Re: [PATCHES] fix build on Solaris 10/x86_64 in 64bit mode with Sun
Re: [PATCHES] fix build on Solaris 10/x86_64 in 64bit mode with Sun Studio 11 Re: [PATCHES] fix build on Solaris 10/x86_64 in 64bit mode with Sun Studio 11 |
Список | pgsql-patches |
on an Intel based Solaris 10U2 box using Sun Studio 11 with -xarch=generic64 we get a compile time failure in contrib/pgcrypto because BYTE_ORDER is not defined. in src/include/port/solaris.h we define it to little endian only for __i386 - however in 64bit mode the compiler only defines __amd64 causing YTE_ORDER to be undefined. The other option would be to use __x86 which is defined on all intel architectures. attached is a quick hack to allow pgcrypto to compile on that platform. Stefan --- /export/home/pgbuild/pgbuildfarm/HEAD/pgsql/src/include/port/solaris.h Thu Oct 5 00:49:44 2006 +++ src/include/port/solaris.h Sun Jan 7 09:24:51 2007 @@ -5,6 +5,10 @@ * symbols are defined on both GCC and Solaris CC, although GCC * doesn't document them. The __xxx__ symbols are only on GCC. */ +#if defined(__amd64) && !defined(__amd64__) +#define __amd64__ +#endif + #if defined(__i386) && !defined(__i386__) #define __i386__ #endif @@ -34,6 +38,9 @@ #ifdef __i386__ #define BYTE_ORDER LITTLE_ENDIAN #endif +#ifdef __amd64__ +#define BYTE_ORDER LITTLE_ENDIAN +#endif #endif /*
В списке pgsql-patches по дате отправления: