]> git.sur5r.net Git - openldap/commitdiff
Add byte ordering defines.
authorKurt Zeilenga <kurt@openldap.org>
Wed, 21 Oct 1998 02:22:05 +0000 (02:22 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 21 Oct 1998 02:22:05 +0000 (02:22 +0000)
include/ac/socket.h

index d6a3405702e9cd1ae6e479b0e42e5905eec99b13..b86b46dc59d96c4d65d7277474b0b2fd02db7372 100644 (file)
 
 #endif /* __alpha && !VMS */
 
+#ifndef BYTE_ORDER
+/*    
+ * Definitions for byte order, according to byte significance from low
+ * address to high.
+ */
+#define LITTLE_ENDIAN   1234   /* LSB first: i386, vax */
+#define BIG_ENDIAN  4321               /* MSB first: 68000, ibm, net */
+#define PDP_ENDIAN  3412               /* LSB first in word, MSW first in long */
+
+/* assume autoconf's AC_C_BIGENDIAN has been run */
+#ifdef WORDS_BIGENDIAN
+#define BYTE_ORDER  BIG_ENDIAN
+#else
+#define BYTE_ORDER  LITTLE_ENDIAN
+#endif
+
+#endif /* BYTE_ORDER */
 
 #endif /* _AC_SOCKET_H_ */