summaryrefslogtreecommitdiff
path: root/lib/libexpat
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2015-05-23 00:53:26 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2015-05-23 00:53:26 +0000
commit15fdc289ce222a608352cd35ff7a6cf799b88002 (patch)
treea6dece5b81f34591f693dc3e1f0c10ae52e6765c /lib/libexpat
parent5d9881f43c337ce8b3ba8bc28f1dcf051fb042f8 (diff)
define BYTEORDER so the endian tests will work
ok deraadt@ miod@
Diffstat (limited to 'lib/libexpat')
-rw-r--r--lib/libexpat/expat_config.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/libexpat/expat_config.h b/lib/libexpat/expat_config.h
index 810c42fee84..f10244538a3 100644
--- a/lib/libexpat/expat_config.h
+++ b/lib/libexpat/expat_config.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: expat_config.h,v 1.1 2004/09/22 21:36:54 espie Exp $ */
+/* $OpenBSD: expat_config.h,v 1.2 2015/05/23 00:53:25 jsg Exp $ */
/* quick and dirty conf for OpenBSD */
@@ -6,3 +6,12 @@
#define XML_CONTEXT_BYTES 1024
#define XML_DTD 1
#define XML_NS 1
+
+#include <endian.h>
+#if BYTE_ORDER == LITTLE_ENDIAN
+#define BYTEORDER 1234
+#elif BYTE_ORDER == BIG_ENDIAN
+#define BYTEORDER 4321
+#else
+#error "unknown byte order"
+#endif