2 * See the file LICENSE for redistribution information.
4 * Copyright (c) 1996, 1997, 1998
5 * Sleepycat Software. All rights reserved.
11 static const char sccsid
[] = "@(#)db_byteorder.c 10.5 (Sleepycat) 4/10/98";
14 #ifndef NO_SYSTEM_INCLUDES
15 #include <sys/types.h>
19 #if BYTE_ORDER == BIG_ENDIAN
20 #define WORDS_BIGENDIAN 1
28 #include "common_ext.h"
32 * Return if we need to do byte swapping, checking for illegal
35 * PUBLIC: int __db_byteorder __P((DB_ENV *, int));
38 __db_byteorder(dbenv
, lorder
)
46 #if defined(WORDS_BIGENDIAN)
47 return (DB_SWAPBYTES
);
52 #if defined(WORDS_BIGENDIAN)
55 return (DB_SWAPBYTES
);
59 "illegal byte order, only big and little-endian supported");