summaryrefslogtreecommitdiffstats
path: root/include/osdep.h
diff options
context:
space:
mode:
authorwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-12-03 09:08:29 +0800
committerwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-12-03 09:08:29 +0800
commit3655862b3fa51afaf5c01a2cfea600169f3cd609 (patch)
tree7e8aa3d8e50b25920d421f62d59eae06837b26f6 /include/osdep.h
parent5cefa8237ce2a2c2ad86d956a086c386fb013364 (diff)
downloadpttbbs-3655862b3fa51afaf5c01a2cfea600169f3cd609.tar
pttbbs-3655862b3fa51afaf5c01a2cfea600169f3cd609.tar.gz
pttbbs-3655862b3fa51afaf5c01a2cfea600169f3cd609.tar.bz2
pttbbs-3655862b3fa51afaf5c01a2cfea600169f3cd609.tar.lz
pttbbs-3655862b3fa51afaf5c01a2cfea600169f3cd609.tar.xz
pttbbs-3655862b3fa51afaf5c01a2cfea600169f3cd609.tar.zst
pttbbs-3655862b3fa51afaf5c01a2cfea600169f3cd609.zip
changed money in fileheader_t into union
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2363 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'include/osdep.h')
-rw-r--r--include/osdep.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/osdep.h b/include/osdep.h
index 8e790595..84bd04fc 100644
--- a/include/osdep.h
+++ b/include/osdep.h
@@ -14,6 +14,12 @@
#define _XOPEN_SOURCE
#define _ISOC99_SOURCE
+
+ #if BYTE_ORDER == BIG_ENDIAN
+ #define _BIG_ENDIAN
+ #else
+ #define _LITTLE_ENDIAN
+ #endif
#elif defined(__linux__)
@@ -22,6 +28,13 @@
#include <sys/ioctl.h>
#include <sys/file.h> /* for flock() */
#include <strings.h> /* for strcasecmp() */
+ #include <endian.h> /* for __BYTE_ORDER */
+
+ #if __BYTE_ORDER == __BIG_ENDIAN
+ #define _BIG_ENDIAN
+ #else
+ #define _LITTLE_ENDIAN
+ #endif
#define NEED_STRCASESTR
#define NEED_STRLCPY