diff options
author | briano%netscape.com <devnull@localhost> | 1999-05-13 01:40:19 +0000 |
---|---|---|
committer | briano%netscape.com <devnull@localhost> | 1999-05-13 01:40:19 +0000 |
commit | 5cbac88454b208498969bcfaff20d9b09a4f77cd (patch) | |
tree | bedfd1823e711f2c8d39eee8f8b5aca2baaa5bca | |
parent | fff6189e2e1f117cc169aa4eda75ffc9d0ce32a1 (diff) | |
download | nss-hg-5cbac88454b208498969bcfaff20d9b09a4f77cd.tar.gz |
Added support for QNX, and replaced a pile of platform-specific ifdefs with HAVE_SYS_BYTEORDER_H.
-rw-r--r-- | dbm/include/mcom_db.h | 52 |
1 files changed, 22 insertions, 30 deletions
diff --git a/dbm/include/mcom_db.h b/dbm/include/mcom_db.h index 0fb1233c6..3f2d517c9 100644 --- a/dbm/include/mcom_db.h +++ b/dbm/include/mcom_db.h @@ -61,6 +61,20 @@ #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 @@ -102,18 +116,14 @@ #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 @@ -122,33 +132,15 @@ #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 |