From de857347b6c0e2b26fe287925daaebbc056df1f6 Mon Sep 17 00:00:00 2001
From: Greg Stein <gstein@users.sourceforge.net>
Date: Fri, 17 May 2002 21:42:05 +0000
Subject: [PATCH] Remove acconfig.h altogether by removing XML_BYTE_ORDER. We
 can simply use the BYTEORDER constant that ac_c_bigendian_cross.m4 generates.

* accconfig.h: removed; obsolete.

* lib/winconfig.h:
  - set the BYTEORDER constant, rather than XML_BYTE_ORDER, and leave
    a note about what we're assuming.

* lib/xmltok.c, lib/xmltok_ns.c:
  - change all XML_BYTE_ORDER references to BYTEORDER, and
    update the constants from 12, 21 to 1234, 4321 respectively.
---
 expat/acconfig.h      |  7 -------
 expat/lib/winconfig.h |  6 +++---
 expat/lib/xmltok.c    | 12 ++++++------
 expat/lib/xmltok_ns.c |  4 ++--
 4 files changed, 11 insertions(+), 18 deletions(-)
 delete mode 100644 expat/acconfig.h

diff --git a/expat/acconfig.h b/expat/acconfig.h
deleted file mode 100644
index ce186c40..00000000
--- a/expat/acconfig.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* This file is used by autoheader to add items to expat_config.h.in */
-
-#ifdef WORDS_BIGENDIAN
-#define XML_BYTE_ORDER 21
-#else
-#define XML_BYTE_ORDER 12
-#endif
diff --git a/expat/lib/winconfig.h b/expat/lib/winconfig.h
index 62adba09..073452b9 100644
--- a/expat/lib/winconfig.h
+++ b/expat/lib/winconfig.h
@@ -5,8 +5,6 @@
 ** This is free software. You are permitted to copy, distribute, or modify
 ** it under the terms of the MIT/X license (contained in the COPYING file
 ** with this distribution.)
-**
-**
 */
 
 #ifndef WINCONFIG_H
@@ -21,7 +19,9 @@
 
 #define XML_NS 1
 #define XML_DTD 1
-#define XML_BYTE_ORDER 12
 #define XML_CONTEXT_BYTES 1024
 
+/* we will assume all Windows platforms are little endian */
+#define BYTEORDER 1234
+
 #endif /* ndef WINCONFIG_H */
diff --git a/expat/lib/xmltok.c b/expat/lib/xmltok.c
index 5d632363..9ff6c84e 100644
--- a/expat/lib/xmltok.c
+++ b/expat/lib/xmltok.c
@@ -657,7 +657,7 @@ little2_isNmstrtMin(const ENCODING *enc, const char *p)
 
 static const struct normal_encoding little2_encoding_ns = { 
   { VTABLE, 2, 0,
-#if XML_BYTE_ORDER == 12
+#if BYTEORDER == 1234
     1
 #else
     0
@@ -674,7 +674,7 @@ static const struct normal_encoding little2_encoding_ns = {
 
 static const struct normal_encoding little2_encoding = { 
   { VTABLE, 2, 0,
-#if XML_BYTE_ORDER == 12
+#if BYTEORDER == 1234
     1
 #else
     0
@@ -689,7 +689,7 @@ static const struct normal_encoding little2_encoding = {
   STANDARD_VTABLE(little2_)
 };
 
-#if XML_BYTE_ORDER != 21
+#if BYTEORDER != 4321
 
 #ifdef XML_NS
 
@@ -796,7 +796,7 @@ big2_isNmstrtMin(const ENCODING *enc, const char *p)
 
 static const struct normal_encoding big2_encoding_ns = {
   { VTABLE, 2, 0,
-#if XML_BYTE_ORDER == 21
+#if BYTEORDER == 4321
   1
 #else
   0
@@ -813,7 +813,7 @@ static const struct normal_encoding big2_encoding_ns = {
 
 static const struct normal_encoding big2_encoding = {
   { VTABLE, 2, 0,
-#if XML_BYTE_ORDER == 21
+#if BYTEORDER == 4321
   1
 #else
   0
@@ -828,7 +828,7 @@ static const struct normal_encoding big2_encoding = {
   STANDARD_VTABLE(big2_)
 };
 
-#if XML_BYTE_ORDER != 12
+#if BYTEORDER != 1234
 
 #ifdef XML_NS
 
diff --git a/expat/lib/xmltok_ns.c b/expat/lib/xmltok_ns.c
index 21859738..31467244 100644
--- a/expat/lib/xmltok_ns.c
+++ b/expat/lib/xmltok_ns.c
@@ -5,9 +5,9 @@ const ENCODING *NS(XmlGetUtf8InternalEncoding)(void)
 
 const ENCODING *NS(XmlGetUtf16InternalEncoding)(void)
 {
-#if XML_BYTE_ORDER == 12
+#if BYTEORDER == 1234
   return &ns(internal_little2_encoding).enc;
-#elif XML_BYTE_ORDER == 21
+#elif BYTEORDER == 4321
   return &ns(internal_big2_encoding).enc;
 #else
   const short n = 1;
-- 
2.40.0