1--- pg_config.h.orig 2010-09-22 10:29:59.000000000 -0700 2+++ pg_config.h 2010-09-22 11:59:47.000000000 -0700 3@@ -17,16 +17,34 @@ 4 #define AC_APPLE_UNIVERSAL_BUILD 1 5 6 /* The normal alignment of `double', in bytes. */ 7-#define ALIGNOF_DOUBLE 8 8+#if defined (__LP64__) 9+ #define ALIGNOF_DOUBLE 8 10+#else 11+ #define ALIGNOF_DOUBLE 4 12+#endif 13 14 /* The normal alignment of `int', in bytes. */ 15-#define ALIGNOF_INT 4 16+#if defined (__LP64__) 17+ #define ALIGNOF_INT 8 18+#else 19+ #define ALIGNOF_INT 4 20+#endif 21 22 /* The normal alignment of `long', in bytes. */ 23-#define ALIGNOF_LONG 8 24+ 25+#if defined (__LP64__) 26+ #define ALIGNOF_LONG 8 27+#else 28+ #define ALIGNOF_LONG 4 29+#endif 30 31 /* The normal alignment of `long long int', in bytes. */ 32 /* #undef ALIGNOF_LONG_LONG_INT */ 33+#if defined (__LP64__) 34+ /* #undef ALIGNOF_LONG_LONG_INT */ 35+#else 36+ #define ALIGNOF_LONG_LONG_INT 4 37+#endif 38 39 /* The normal alignment of `short', in bytes. */ 40 #define ALIGNOF_SHORT 2 41@@ -67,7 +85,11 @@ 42 43 /* float8, int8, and related values are passed by value if 'true', by 44 reference if 'false' */ 45-#define FLOAT8PASSBYVAL true 46+#if defined (__LP64__) 47+ #define FLOAT8PASSBYVAL true 48+#else 49+ #define FLOAT8PASSBYVAL false 50+#endif 51 52 /* Define to 1 if getpwuid_r() takes a 5th argument. */ 53 #define GETPWUID_R_5ARG /**/ 54@@ -326,16 +348,28 @@ 55 56 /* Define to 1 if constants of type 'long long int' should have the suffix LL. 57 */ 58-/* #undef HAVE_LL_CONSTANTS */ 59+#if defined (__LP64__) 60+ /* #undef HAVE_LL_CONSTANTS */ 61+#else 62+ #define HAVE_LL_CONSTANTS 1 63+#endif 64 65 /* Define to 1 if `long int' works and is 64 bits. */ 66-#define HAVE_LONG_INT_64 1 67+#if defined (__LP64__) 68+ #define HAVE_LONG_INT_64 1 69+#else 70+ /* #undef HAVE_LONG_INT_64 */ 71+#endif 72 73 /* Define to 1 if the system has the type `long long int'. */ 74 #define HAVE_LONG_LONG_INT 1 75 76 /* Define to 1 if `long long int' works and is 64 bits. */ 77-/* #undef HAVE_LONG_LONG_INT_64 */ 78+#if defined (__LP64__) 79+ /* #undef HAVE_LONG_LONG_INT_64 */ 80+#else 81+ #define HAVE_LONG_LONG_INT_64 1 82+#endif 83 84 /* Define to 1 if you have the `memmove' function. */ 85 #define HAVE_MEMMOVE 1 86@@ -655,13 +689,21 @@ 87 /* #undef HAVE_WINLDAP_H */ 88 89 /* Define to the appropriate snprintf format for 64-bit ints. */ 90-#define INT64_FORMAT "%ld" 91+#if defined (__LP64__) 92+ #define INT64_FORMAT "%ld" 93+#else 94+ #define INT64_FORMAT "%lld" 95+#endif 96 97 /* Define to build with Kerberos 5 support. (--with-krb5) */ 98 #define KRB5 1 99 100 /* Define as the maximum alignment requirement of any C data type. */ 101-#define MAXIMUM_ALIGNOF 8 102+#if defined (__LP64__) 103+ #define MAXIMUM_ALIGNOF 8 104+#else 105+ #define MAXIMUM_ALIGNOF 4 106+#endif 107 108 /* Define bytes to use libc memset(). */ 109 #define MEMSET_LOOP_LIMIT 1024 110@@ -725,10 +767,18 @@ 111 #define SIZEOF_OFF_T 8 112 113 /* The size of `size_t', as computed by sizeof. */ 114-#define SIZEOF_SIZE_T 8 115+#if defined (__LP64__) 116+ #define SIZEOF_SIZE_T 8 117+#else 118+ #define SIZEOF_SIZE_T 4 119+#endif 120 121 /* The size of `void *', as computed by sizeof. */ 122-#define SIZEOF_VOID_P 8 123+#if defined (__LP64__) 124+ #define SIZEOF_VOID_P 8 125+#else 126+ #define SIZEOF_VOID_P 4 127+#endif 128 129 /* Define to 1 if you have the ANSI C header files. */ 130 #define STDC_HEADERS 1 131@@ -740,7 +790,11 @@ 132 /* #undef TM_IN_SYS_TIME */ 133 134 /* Define to the appropriate snprintf format for unsigned 64-bit ints. */ 135-#define UINT64_FORMAT "%lu" 136+#if defined (__LP64__) 137+ #define UINT64_FORMAT "%lu" 138+#else 139+ #define UINT64_FORMAT "%llu" 140+#endif 141 142 /* Define to 1 to build with assertion checks. (--enable-cassert) */ 143 /* #undef USE_ASSERT_CHECKING */ 144@@ -754,7 +808,11 @@ 145 146 /* Define to 1 if you want float8, int8, etc values to be passed by value. 147 (--enable-float8-byval) */ 148-#define USE_FLOAT8_BYVAL 1 149+#if defined (__LP64__) 150+ #define USE_FLOAT8_BYVAL 1 151+#else 152+ /* #undef USE_FLOAT8_BYVAL */ 153+#endif 154 155 /* Define to 1 if "static inline" works without unwanted warnings from 156 compilations where static inline functions are defined but not called. */ 157 158