Added support for QNX, and replaced a pile of platform-specific ifdefs with HAVE_SYS_BYTEORDER_H.
authorbriano%netscape.com
Thu, 13 May 1999 01:40:19 +0000
changeset 129 a493f27a964b232184d8b50a3688e97d336c0986
parent 128 9f2fc321dd07f81d2c47d6fc8d83c59dcba059b6
child 130 a68ad6ea6f21ac1e4d9dffb60d2dae48f9155b74
push idunknown
push userunknown
push dateunknown
Added support for QNX, and replaced a pile of platform-specific ifdefs with HAVE_SYS_BYTEORDER_H.
dbm/include/mcom_db.h
--- a/dbm/include/mcom_db.h
+++ b/dbm/include/mcom_db.h
@@ -56,16 +56,30 @@
 
 #ifndef HAVE_SYS_CDEFS_H
 #include "cdefs.h"
 #else
 #include <cdefs.h>
 #endif
 #include "prtypes.h"
 
+#ifdef HAVE_SYS_BYTEORDER_H
+#include <sys/types.h>
+#include <sys/byteorder.h>
+#endif
+
+#ifdef __linux
+#include <endian.h>
+#ifndef BYTE_ORDER
+#define BYTE_ORDER    __BYTE_ORDER
+#define BIG_ENDIAN    __BIG_ENDIAN
+#define LITTLE_ENDIAN __LITTLE_ENDIAN
+#endif
+#endif /* __linux */
+
 #ifdef __sgi
 #define BYTE_ORDER BIG_ENDIAN
 #define BIG_ENDIAN      4321
 #define LITTLE_ENDIAN   1234            /* LSB first: i386, vax, all NT risc */
 #define	__BIT_TYPES_DEFINED__
 #endif
 
 #ifdef __sun
@@ -97,63 +111,41 @@
 #define BYTE_ORDER BIG_ENDIAN
 #else
 #define BYTE_ORDER LITTLE_ENDIAN
 #endif
 
 #endif /* !BYTE_ORDER */
 #endif /* __sun */
 
-#ifdef __linux
-# include <endian.h>
-# ifndef BYTE_ORDER
-#  define BYTE_ORDER    __BYTE_ORDER
-#  define BIG_ENDIAN    __BIG_ENDIAN
-#  define LITTLE_ENDIAN __LITTLE_ENDIAN
-# endif
-#endif /* __linux */
+#ifdef NCR
+#include <sys/endian.h>
+#endif
 
-#if defined(SCO) || defined(UNIXWARE) || defined(SNI) || defined(NCR) || defined(NEC) || defined(DGUX)
-#include <sys/types.h>
-#include <sys/byteorder.h>
+#ifdef QNX
+#define LITTLE_ENDIAN	1234
+#define BIG_ENDIAN	4321
+#define BYTE_ORDER	LITTLE_ENDIAN
 #endif
 
 #ifdef SCO
 #include <sys/bitypes.h>
 #define MAXPATHLEN 	1024              
 #endif
 
 #ifdef SNI
-#include <sys/types.h>
-#include <sys/byteorder.h>
 /* #include <sys/hetero.h> */
 #define BYTE_ORDER BIG_ENDIAN
 #define BIG_ENDIAN      4321
 #define LITTLE_ENDIAN   1234
 #endif
 
-#ifdef UNIXWARE
-#include <sys/types.h>
-#include <sys/byteorder.h>
-#endif
-
-#ifdef DGUX
-#include <sys/types.h>
-#include <sys/byteorder.h>
-#endif
-
-#ifdef NCR
-#include <sys/endian.h>
-#endif
-
 #ifdef macintosh
 #include <unix.h>
-#endif
-
-#ifndef macintosh
+#else
 #include <fcntl.h>
 #endif
 
 #if defined(_WINDOWS) || defined(XP_OS2)
 #include <stdio.h>
 #include <io.h>
 #include <limits.h>