Now that core functionality is depending on autoconf's AC_C_BIGENDIAN to be
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 6 Apr 2007 05:36:51 +0000 (05:36 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 6 Apr 2007 05:36:51 +0000 (05:36 +0000)
right, there seems precious little reason to have a pile of hand-maintained
endianness definitions in src/include/port/*.h.  Get rid of those, and make
the couple of places that used them depend on WORDS_BIGENDIAN instead.

22 files changed:
configure
configure.in
contrib/pgcrypto/crypt-blowfish.c
contrib/pgcrypto/md5.c
contrib/pgcrypto/px.h
contrib/pgcrypto/rijndael.c
contrib/pgcrypto/sha1.c
contrib/pgcrypto/sha2.c
src/backend/libpq/pqformat.c
src/include/pg_config.h.in
src/include/pg_config.h.win32
src/include/port/aix.h
src/include/port/dgux.h
src/include/port/hpux.h
src/include/port/sco.h
src/include/port/solaris.h
src/include/port/sunos4.h
src/include/port/svr4.h
src/include/port/ultrix4.h
src/include/port/univel.h
src/include/port/unixware.h
src/include/port/win32.h

index e53c705d7141059aa048cf55b5e78a345e76c402..9cb49ddf673261d437b114eca3bf29223f42d92d 100755 (executable)
--- a/configure
+++ b/configure
@@ -7788,8 +7788,7 @@ done
 
 
 
-
-for ac_header in crypt.h dld.h endian.h fp_class.h getopt.h ieeefp.h langinfo.h poll.h pwd.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/socket.h sys/shm.h sys/time.h sys/un.h termios.h utime.h wchar.h wctype.h kernel/OS.h kernel/image.h SupportDefs.h
+for ac_header in crypt.h dld.h fp_class.h getopt.h ieeefp.h langinfo.h poll.h pwd.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/socket.h sys/shm.h sys/time.h sys/un.h termios.h utime.h wchar.h wctype.h kernel/OS.h kernel/image.h SupportDefs.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
index 267fc90dc7d14852fb75848e381c675281556f4c..4bab5a17d75f9f225a3848424373b9ed25402c57 100644 (file)
@@ -773,7 +773,7 @@ fi
 ##
 
 dnl sys/socket.h is required by AC_FUNC_ACCEPT_ARGTYPES
-AC_CHECK_HEADERS([crypt.h dld.h endian.h fp_class.h getopt.h ieeefp.h langinfo.h poll.h pwd.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/socket.h sys/shm.h sys/time.h sys/un.h termios.h utime.h wchar.h wctype.h kernel/OS.h kernel/image.h SupportDefs.h])
+AC_CHECK_HEADERS([crypt.h dld.h fp_class.h getopt.h ieeefp.h langinfo.h poll.h pwd.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/socket.h sys/shm.h sys/time.h sys/un.h termios.h utime.h wchar.h wctype.h kernel/OS.h kernel/image.h SupportDefs.h])
 
 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
 # netinet/in.h is included first.
index 5c737cd13a488e77f964860451de782431b16bd9..c3713c792b8f1e5cef48930d3e13c89db59dc13a 100644 (file)
@@ -436,19 +436,19 @@ BF_encode(char *dst, const BF_word * src, int size)
 }
 
 static void
-BF_swap(BF_word * x, int count)
+BF_swap(BF_word *x, int count)
 {
-       static int      endianness_check = 1;
-       char       *is_little_endian = (char *) &endianness_check;
+       /* Swap on little-endian hardware, else do nothing */
+#ifndef WORDS_BIGENDIAN
        BF_word         tmp;
 
-       if (*is_little_endian)
-               do
-               {
-                       tmp = *x;
-                       tmp = (tmp << 16) | (tmp >> 16);
-                       *x++ = ((tmp & 0x00FF00FF) << 8) | ((tmp >> 8) & 0x00FF00FF);
-               } while (--count);
+       do
+       {
+               tmp = *x;
+               tmp = (tmp << 16) | (tmp >> 16);
+               *x++ = ((tmp & 0x00FF00FF) << 8) | ((tmp >> 8) & 0x00FF00FF);
+       } while (--count);
+#endif
 }
 
 #if BF_SCALE
index 3a47a9ce17f224a98351af3681e8fda0ccb3f919..f69cd05b234416356c2c17dbe4bca70beb4f8890 100644 (file)
 #include "px.h"
 #include "md5.h"
 
-/* sanity check */
-#if !defined(BYTE_ORDER) || (BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN)
-#error Define BYTE_ORDER to be equal to either LITTLE_ENDIAN or BIG_ENDIAN
-#endif
-
 #define SHIFT(X, s) (((X) << (s)) | ((X) >> (32 - (s))))
 
 #define F(X, Y, Z) (((X) & (Y)) | ((~X) & (Z)))
@@ -201,10 +196,9 @@ md5_pad(md5_ctxt * ctxt)
        }
 
        /* 8 byte word */
-#if BYTE_ORDER == LITTLE_ENDIAN
+#ifndef WORDS_BIGENDIAN
        memmove(&ctxt->md5_buf[56], &ctxt->md5_n8[0], 8);
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
+#else
        ctxt->md5_buf[56] = ctxt->md5_n8[7];
        ctxt->md5_buf[57] = ctxt->md5_n8[6];
        ctxt->md5_buf[58] = ctxt->md5_n8[5];
@@ -222,10 +216,9 @@ void
 md5_result(uint8 *digest, md5_ctxt * ctxt)
 {
        /* 4 byte words */
-#if BYTE_ORDER == LITTLE_ENDIAN
+#ifndef WORDS_BIGENDIAN
        memmove(digest, &ctxt->md5_st8[0], 16);
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
+#else
        digest[0] = ctxt->md5_st8[3];
        digest[1] = ctxt->md5_st8[2];
        digest[2] = ctxt->md5_st8[1];
@@ -245,7 +238,7 @@ md5_result(uint8 *digest, md5_ctxt * ctxt)
 #endif
 }
 
-#if BYTE_ORDER == BIG_ENDIAN
+#ifdef WORDS_BIGENDIAN
 static uint32 X[16];
 #endif
 
@@ -257,10 +250,9 @@ md5_calc(uint8 *b64, md5_ctxt * ctxt)
        uint32          C = ctxt->md5_stc;
        uint32          D = ctxt->md5_std;
 
-#if BYTE_ORDER == LITTLE_ENDIAN
+#ifndef WORDS_BIGENDIAN
        uint32     *X = (uint32 *) b64;
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
+#else
        /* 4 byte words */
        /* what a brute force but fast! */
        uint8      *y = (uint8 *) X;
index 1ef3813ae3986320add0d596e0d0ee397f558834..cf3740800459d19cdfb78cbe7716e22e438c62b9 100644 (file)
 
 #include <sys/types.h>
 #include <sys/param.h>
-#ifdef HAVE_ENDIAN_H
-#include <endian.h>
-#endif
-
-#ifndef BYTE_ORDER
-#error BYTE_ORDER must be defined as LITTLE_ENDIAN or BIG_ENDIAN
-#endif
 
 /* keep debug messages? */
 #define PX_DEBUG
index cb65d554787981210da1d21a2c25b18fc6ca9016..a0a7d10790c716ce6d5359b369d3a2321d1d7d7a 100644 (file)
@@ -47,12 +47,6 @@ Mean:                   500 cycles =    51.2 mbits/sec
 #include "px.h"
 #include "rijndael.h"
 
-/* sanity check */
-#if !defined(BYTE_ORDER) || (BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN)
-#error Define BYTE_ORDER to be equal to either LITTLE_ENDIAN or BIG_ENDIAN
-#endif
-
-
 #define PRE_CALC_TABLES
 #define LARGE_TABLES
 
@@ -73,11 +67,7 @@ static void gen_tabs(void);
 
 #define byte(x,n)      ((u1byte)((x) >> (8 * (n))))
 
-#if BYTE_ORDER != LITTLE_ENDIAN
-#define BYTE_SWAP
-#endif
-
-#ifdef BYTE_SWAP
+#ifdef WORDS_BIGENDIAN
 #define io_swap(x)     bswap(x)
 #else
 #define io_swap(x)     (x)
index 0025f5768053ffbf33cf90aa259e8bcc71da67ce..a33e46302de48a807df0f88e3e0bb83c56677b88 100644 (file)
 #include "px.h"
 #include "sha1.h"
 
-/* sanity check */
-#if !defined(BYTE_ORDER) || (BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN)
-#error Define BYTE_ORDER to be equal to either LITTLE_ENDIAN or BIG_ENDIAN
-#endif
-
 /* constant table */
 static uint32 _K[] = {0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6};
 
@@ -98,7 +93,7 @@ sha1_step(struct sha1_ctxt * ctxt)
                                s;
        uint32          tmp;
 
-#if BYTE_ORDER == LITTLE_ENDIAN
+#ifndef WORDS_BIGENDIAN
        struct sha1_ctxt tctxt;
 
        memmove(&tctxt.m.b8[0], &ctxt->m.b8[0], 64);
@@ -264,7 +259,7 @@ sha1_pad(struct sha1_ctxt * ctxt)
        memset(&ctxt->m.b8[padstart], 0, padlen - 8);
        COUNT += (padlen - 8);
        COUNT %= 64;
-#if BYTE_ORDER == BIG_ENDIAN
+#ifdef WORDS_BIGENDIAN
        PUTPAD(ctxt->c.b8[0]);
        PUTPAD(ctxt->c.b8[1]);
        PUTPAD(ctxt->c.b8[2]);
@@ -320,7 +315,7 @@ sha1_result(struct sha1_ctxt * ctxt, uint8 *digest0)
 
        digest = (uint8 *) digest0;
        sha1_pad(ctxt);
-#if BYTE_ORDER == BIG_ENDIAN
+#ifdef WORDS_BIGENDIAN
        memmove(digest, &ctxt->h.b8[0], 20);
 #else
        digest[0] = ctxt->h.b8[3];
index ac80bc8f10780b5d3d9a18a188f5d90ed54d79b5..87492ccf73185b5fc62fe91e87eed93fec3b181f 100644 (file)
  *
  */
 
-
-/*** SHA-256/384/512 Machine Architecture Definitions *****************/
-/*
- * BYTE_ORDER NOTE:
- *
- * Please make sure that your system defines BYTE_ORDER.  If your
- * architecture is little-endian, make sure it also defines
- * LITTLE_ENDIAN and that the two (BYTE_ORDER and LITTLE_ENDIAN) are
- * equivilent.
- *
- * If your system does not define the above, then you can do so by
- * hand like this:
- *
- *      #define LITTLE_ENDIAN 1234
- *      #define BIG_ENDIAN    4321
- *
- * And for little-endian machines, add:
- *
- *      #define BYTE_ORDER LITTLE_ENDIAN
- *
- * Or for big-endian machines:
- *
- *      #define BYTE_ORDER BIG_ENDIAN
- *
- * The FreeBSD machine this was written on defines BYTE_ORDER
- * appropriately by including <sys/types.h> (which in turn includes
- * <machine/endian.h> where the appropriate definitions are actually
- * made).
- */
-#if !defined(BYTE_ORDER) || (BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN)
-#error Define BYTE_ORDER to be equal to either LITTLE_ENDIAN or BIG_ENDIAN
-#endif
-
-
 /*** SHA-256/384/512 Various Length Definitions ***********************/
 /* NOTE: Most of these are in sha2.h */
 #define SHA256_SHORT_BLOCK_LENGTH      (SHA256_BLOCK_LENGTH - 8)
@@ -98,7 +64,7 @@
 
 
 /*** ENDIAN REVERSAL MACROS *******************************************/
-#if BYTE_ORDER == LITTLE_ENDIAN
+#ifndef WORDS_BIGENDIAN
 #define REVERSE32(w,x) { \
        uint32 tmp = (w); \
        tmp = (tmp >> 16) | (tmp << 16); \
        (x) = ((tmp & 0xffff0000ffff0000ULL) >> 16) | \
                  ((tmp & 0x0000ffff0000ffffULL) << 16); \
 }
-#endif   /* BYTE_ORDER == LITTLE_ENDIAN */
+#endif /* not bigendian */
 
 /*
  * Macro for incrementally adding the unsigned 64-bit integer n to the
@@ -539,7 +505,7 @@ SHA256_Last(SHA256_CTX * context)
        unsigned int usedspace;
 
        usedspace = (context->bitcount >> 3) % SHA256_BLOCK_LENGTH;
-#if BYTE_ORDER == LITTLE_ENDIAN
+#ifndef WORDS_BIGENDIAN
        /* Convert FROM host byte order */
        REVERSE64(context->bitcount, context->bitcount);
 #endif
@@ -589,7 +555,7 @@ SHA256_Final(uint8 digest[], SHA256_CTX * context)
        {
                SHA256_Last(context);
 
-#if BYTE_ORDER == LITTLE_ENDIAN
+#ifndef WORDS_BIGENDIAN
                {
                        /* Convert TO host byte order */
                        int                     j;
@@ -865,7 +831,7 @@ SHA512_Last(SHA512_CTX * context)
        unsigned int usedspace;
 
        usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH;
-#if BYTE_ORDER == LITTLE_ENDIAN
+#ifndef WORDS_BIGENDIAN
        /* Convert FROM host byte order */
        REVERSE64(context->bitcount[0], context->bitcount[0]);
        REVERSE64(context->bitcount[1], context->bitcount[1]);
@@ -918,7 +884,7 @@ SHA512_Final(uint8 digest[], SHA512_CTX * context)
                SHA512_Last(context);
 
                /* Save the hash data for output: */
-#if BYTE_ORDER == LITTLE_ENDIAN
+#ifndef WORDS_BIGENDIAN
                {
                        /* Convert TO host byte order */
                        int                     j;
@@ -963,7 +929,7 @@ SHA384_Final(uint8 digest[], SHA384_CTX * context)
                SHA512_Last((SHA512_CTX *) context);
 
                /* Save the hash data for output: */
-#if BYTE_ORDER == LITTLE_ENDIAN
+#ifndef WORDS_BIGENDIAN
                {
                        /* Convert TO host byte order */
                        int                     j;
@@ -1006,7 +972,7 @@ SHA224_Final(uint8 digest[], SHA224_CTX * context)
        {
                SHA256_Last(context);
 
-#if BYTE_ORDER == LITTLE_ENDIAN
+#ifndef WORDS_BIGENDIAN
                {
                        /* Convert TO host byte order */
                        int                     j;
index a48f259230d2543a823f85031c08897d884cfa41..5e131da75d623535d0e52ad617bcf1bf3a26de55 100644 (file)
@@ -72,9 +72,6 @@
 #include <sys/param.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
-#ifdef HAVE_ENDIAN_H
-#include <endian.h>
-#endif
 
 #include "libpq/libpq.h"
 #include "libpq/pqformat.h"
@@ -312,20 +309,16 @@ pq_sendfloat8(StringInfo buf, float8 f)
        swap.h[0] = htonl(swap.h[0]);
        swap.h[1] = htonl(swap.h[1]);
 
-       /* Have to figure out endianness by testing... */
-       if (((uint32) 1) == htonl((uint32) 1))
-       {
-               /* machine seems to be big-endian, send h[0] first */
-               appendBinaryStringInfo(buf, (char *) &swap.h[0], 4);
-               appendBinaryStringInfo(buf, (char *) &swap.h[1], 4);
-       }
-       else
-       {
-               /* machine seems to be little-endian, send h[1] first */
-               appendBinaryStringInfo(buf, (char *) &swap.h[1], 4);
-               appendBinaryStringInfo(buf, (char *) &swap.h[0], 4);
-       }
+#ifdef WORDS_BIGENDIAN
+       /* machine seems to be big-endian, send h[0] first */
+       appendBinaryStringInfo(buf, (char *) &swap.h[0], 4);
+       appendBinaryStringInfo(buf, (char *) &swap.h[1], 4);
 #else
+       /* machine seems to be little-endian, send h[1] first */
+       appendBinaryStringInfo(buf, (char *) &swap.h[1], 4);
+       appendBinaryStringInfo(buf, (char *) &swap.h[0], 4);
+#endif
+#else  /* INT64 works */
        union
        {
                float8          f;
@@ -549,21 +542,17 @@ pq_getmsgfloat8(StringInfo msg)
                uint32          h[2];
        }                       swap;
 
-       /* Have to figure out endianness by testing... */
-       if (((uint32) 1) == htonl((uint32) 1))
-       {
-               /* machine seems to be big-endian, receive h[0] first */
-               swap.h[0] = pq_getmsgint(msg, 4);
-               swap.h[1] = pq_getmsgint(msg, 4);
-       }
-       else
-       {
-               /* machine seems to be little-endian, receive h[1] first */
-               swap.h[1] = pq_getmsgint(msg, 4);
-               swap.h[0] = pq_getmsgint(msg, 4);
-       }
-       return swap.f;
+#ifdef WORDS_BIGENDIAN
+       /* machine seems to be big-endian, receive h[0] first */
+       swap.h[0] = pq_getmsgint(msg, 4);
+       swap.h[1] = pq_getmsgint(msg, 4);
 #else
+       /* machine seems to be little-endian, receive h[1] first */
+       swap.h[1] = pq_getmsgint(msg, 4);
+       swap.h[0] = pq_getmsgint(msg, 4);
+#endif
+       return swap.f;
+#else  /* INT64 works */
        union
        {
                float8          f;
index 35c1be6f9c1af650d50b8fc25cb2b244f5824f3c..b76dcd874f88f6d63dcf1363103d0e90baf0b43e 100644 (file)
 /* Define to 1 if you have the <editline/readline.h> header file. */
 #undef HAVE_EDITLINE_READLINE_H
 
-/* Define to 1 if you have the <endian.h> header file. */
-#undef HAVE_ENDIAN_H
-
 /* Define to 1 if you have the `fcvt' function. */
 #undef HAVE_FCVT
 
index 9f3c1ac8699441d6d606a54d8fde3b077e3a0ac5..a8f489d91d07e3591255b7fcaa7b35253f15cf90 100644 (file)
 /* Define to 1 if you have the <editline/readline.h> header file. */
 /* #undef HAVE_EDITLINE_READLINE_H */
 
-/* Define to 1 if you have the <endian.h> header file. */
-/* #undef HAVE_ENDIAN_H */
-
 /* Define to 1 if you have the `fcvt' function. */
 #define HAVE_FCVT 1
 
index 0fde5763b87b9ce2a13376309714c478ef313b1e..5ce3d29a113b41cd19c0c1a863610e6a255c4ec2 100644 (file)
@@ -1,5 +1,2 @@
 #define CLASS_CONFLICT
 #define DISABLE_XOPEN_NLS
-
-#include <sys/machine.h>               /* ENDIAN definitions for network
-                                                                * communication */
index 827360f7c1a714669928340a76965884f99b70a2..30bbf91dc23b7374a7f874755ea61e568c895285 100644 (file)
@@ -1,15 +1,3 @@
 /* $PostgreSQL$ */
 
-#ifndef                        BIG_ENDIAN
-#define                        BIG_ENDIAN              4321
-#endif
-#ifndef                        LITTLE_ENDIAN
-#define                        LITTLE_ENDIAN   1234
-#endif
-#ifndef                        PDP_ENDIAN
-#define                        PDP_ENDIAN              3412
-#endif
-#ifndef                        BYTE_ORDER
-#define                        BYTE_ORDER              BIG_ENDIAN
-
-#endif
+/* nothing needed */
index 619a3fd78222e90ce0dc3280b1b8e60dcb22924a..30bbf91dc23b7374a7f874755ea61e568c895285 100644 (file)
@@ -1,27 +1,3 @@
 /* $PostgreSQL$ */
 
-#ifndef                        BIG_ENDIAN
-#define                        BIG_ENDIAN              4321
-#endif
-#ifndef                        LITTLE_ENDIAN
-#define                        LITTLE_ENDIAN   1234
-#endif
-#ifndef                        PDP_ENDIAN
-#define                        PDP_ENDIAN              3412
-#endif
-
-#if defined(__hppa)
-
-#ifndef                        BYTE_ORDER
-#define                        BYTE_ORDER              BIG_ENDIAN
-#endif
-#elif defined(__ia64)
-
-/* HPUX runs IA64 in big-endian mode */
-#ifndef                        BYTE_ORDER
-#define                        BYTE_ORDER              BIG_ENDIAN
-#endif
-#else
-#error unrecognized CPU type for HP-UX
-
-#endif
+/* nothing needed */
index b4e975c89d06d7de3106732c9616257169d91e9d..2f05116d3e129ee0078a742565570fdf10386d3a 100644 (file)
@@ -2,17 +2,3 @@
 #define SCO_ACCEPT_BUG
 
 #define USE_UNIVEL_CC
-
-#ifndef                        BIG_ENDIAN
-#define                        BIG_ENDIAN              4321
-#endif
-#ifndef                        LITTLE_ENDIAN
-#define                        LITTLE_ENDIAN   1234
-#endif
-#ifndef                        PDP_ENDIAN
-#define                        PDP_ENDIAN              3412
-#endif
-#ifndef                        BYTE_ORDER
-#define                        BYTE_ORDER              LITTLE_ENDIAN
-
-#endif
index 9f0f47ffcdfb577bdae128b0f47c7398fba9b1b3..7c9de4035f7fa1531b19e28b0e595ffdb58844c8 100644 (file)
 #include <sys/isa_defs.h>
 #endif
 
-#ifndef                        BIG_ENDIAN
-#define                        BIG_ENDIAN              4321
-#endif
-#ifndef                        LITTLE_ENDIAN
-#define                        LITTLE_ENDIAN   1234
-#endif
-#ifndef                        PDP_ENDIAN
-#define                        PDP_ENDIAN              3412
-#endif
-
-#ifndef                        BYTE_ORDER
-#ifdef __sparc__
-#define                  BYTE_ORDER      BIG_ENDIAN
-#endif
-#ifdef __i386__
-#define                 BYTE_ORDER              LITTLE_ENDIAN
-#endif
-#if defined(__amd64___) || defined(__x86_64__)
-#define                 BYTE_ORDER              LITTLE_ENDIAN
-#endif
-#endif
-
 /*
  * Many versions of Solaris have broken strtod() --- see bug #4751182.
  * This has been fixed in current versions of Solaris:
index f7545fc6fae89e989fd0bf9ee0db56a33b403fc4..48fdbffb91ccd8e8fe4db0668c61af46cef79193 100644 (file)
@@ -1,16 +1,2 @@
 /* sprintf() returns char *, not int, on SunOS 4.1.x */
 #define SPRINTF_CHAR
-
-#ifndef                        BIG_ENDIAN
-#define                        BIG_ENDIAN              4321
-#endif
-#ifndef                        LITTLE_ENDIAN
-#define                        LITTLE_ENDIAN   1234
-#endif
-#ifndef                        PDP_ENDIAN
-#define                        PDP_ENDIAN              3412
-#endif
-#ifndef                        BYTE_ORDER
-#define                        BYTE_ORDER              BIG_ENDIAN
-
-#endif
index 2c38612c4d864eeb9c0be7d7f98b8833fed220cc..7366299b8a2a34bd3208927f61168e1284434ed0 100644 (file)
@@ -1,6 +1,3 @@
-#ifndef                        BYTE_ORDER
-#ifdef                 MIPSEB
-#define                        BYTE_ORDER              BIG_ENDIAN
-#endif
+/* $PostgreSQL */
 
-#endif
+/* nothing needed */
index c199afcbea5acad24430968be2aca34811a73b38..7df0abc34dca625708796dad99ce1bbd6bd5b176 100644 (file)
@@ -1,19 +1,6 @@
 #define NOFIXADE
 #define NEED_STRDUP
 
-#ifndef                        BIG_ENDIAN
-#define                        BIG_ENDIAN              4321
-#endif
-#ifndef                        LITTLE_ENDIAN
-#define                        LITTLE_ENDIAN   1234
-#endif
-#ifndef                        PDP_ENDIAN
-#define                        PDP_ENDIAN              3412
-#endif
-#ifndef                        BYTE_ORDER
-#define                        BYTE_ORDER              LITTLE_ENDIAN
-#endif
-
 /*
  * Except for those system calls and library functions that are either
  * - covered by the C standard library and Posix.1
index d94e7f263b61bbbdd104b68a98fc4c8464d17e39..ca054166d191a3f9e8c1eb83f47efb7d2182be36 100644 (file)
@@ -3,17 +3,3 @@
  * the native UNIXWARE C compiler.
  ***************************************/
 #define USE_UNIVEL_CC
-
-#ifndef                        BIG_ENDIAN
-#define                        BIG_ENDIAN              4321
-#endif
-#ifndef                        LITTLE_ENDIAN
-#define                        LITTLE_ENDIAN   1234
-#endif
-#ifndef                        PDP_ENDIAN
-#define                        PDP_ENDIAN              3412
-#endif
-#ifndef                        BYTE_ORDER
-#define                        BYTE_ORDER              LITTLE_ENDIAN
-
-#endif
index aef47166981f265934f756c77c9ba87db82b5a4c..6cddddac2e03c028ddf148ad794fc737a20b2c7b 100644 (file)
@@ -6,17 +6,3 @@
  * the native UNIXWARE C compiler.
  ***************************************/
 #define USE_UNIVEL_CC
-
-#ifndef                        BIG_ENDIAN
-#define                        BIG_ENDIAN              4321
-#endif
-#ifndef                        LITTLE_ENDIAN
-#define                        LITTLE_ENDIAN   1234
-#endif
-#ifndef                        PDP_ENDIAN
-#define                        PDP_ENDIAN              3412
-#endif
-#ifndef                        BYTE_ORDER
-#define                        BYTE_ORDER              LITTLE_ENDIAN
-
-#endif
index 418593a6db9ecd36fb23f7e48c74044279f05bff..ef79f6da4f56b910b2d2ffdccd668e17d79f0607 100644 (file)
@@ -299,20 +299,6 @@ typedef unsigned short mode_t;
 #define isinf(x) ((_fpclass(x) == _FPCLASS_PINF) || (_fpclass(x) == _FPCLASS_NINF))
 #define isnan(x) _isnan(x)
 
-#ifndef                        BIG_ENDIAN
-#define                        BIG_ENDIAN              4321
-#endif
-#ifndef                        LITTLE_ENDIAN
-#define                        LITTLE_ENDIAN   1234
-#endif
-#ifndef                        PDP_ENDIAN
-#define                        PDP_ENDIAN              3412
-#endif
-
-#ifndef BYTE_ORDER
-#define BYTE_ORDER LITTLE_ENDIAN
-#endif
-
 /* Pulled from Makefile.port in mingw */
 #define DLSUFFIX ".dll"