From 537cf17ca975c0526f3af19d116adda8266ef622 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 21 Jul 2017 16:52:39 +0200 Subject: [PATCH] Supporting updated expat for Xcode builds --- src/expat/lib/macconfig.h | 66 ++++++++++++++++++--------------------- src/expat/lib/xmlparse.c | 2 ++ src/expat/lib/xmlrole.c | 6 ++-- src/expat/lib/xmltok.c | 6 ++-- 4 files changed, 39 insertions(+), 41 deletions(-) diff --git a/src/expat/lib/macconfig.h b/src/expat/lib/macconfig.h index 2725caaf54..9638afd335 100644 --- a/src/expat/lib/macconfig.h +++ b/src/expat/lib/macconfig.h @@ -11,43 +11,39 @@ #ifndef MACCONFIG_H #define MACCONFIG_H +/* use wxWidgets' configure */ +#include "wx/setup.h" -/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ +#ifdef WORDS_BIGENDIAN #define BYTEORDER 4321 +#else +#define BYTEORDER 1234 +#endif -/* Define to 1 if you have the `bcopy' function. */ -#undef HAVE_BCOPY - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE - -/* Define to 1 if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* whether byteorder is bigendian */ -#define WORDS_BIGENDIAN - -/* Define to specify how much context to retain around the current parse - point. */ -#undef XML_CONTEXT_BYTES - -/* Define to make parameter entity parsing functionality available. */ -#define XML_DTD - -/* Define to make XML Namespaces functionality available. */ -#define XML_NS - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `long' if does not define. */ -#define off_t long - -/* Define to `unsigned' if does not define. */ -#undef size_t - +#define STDC_HEADERS 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_DLFCN_H 1 +#define STDC_HEADERS 1 +#define HAVE_MEMMOVE 1 +#define HAVE_BCOPY 1 +#define HAVE_ARC4RANDOM_BUF 1 +#define HAVE_FCNTL_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_GETPAGESIZE 1 +#define HAVE_MMAP 1 +#define XML_NS 1 +#define XML_DTD 1 +#define XML_CONTEXT_BYTES 1024 #endif /* ifndef MACCONFIG_H */ diff --git a/src/expat/lib/xmlparse.c b/src/expat/lib/xmlparse.c index ba1fd9ae7c..1d53f50720 100644 --- a/src/expat/lib/xmlparse.c +++ b/src/expat/lib/xmlparse.c @@ -27,6 +27,8 @@ #ifdef _WIN32 #include "winconfig.h" +#elif defined( __APPLE__ ) && !defined(HAVE_EXPAT_CONFIG_H) +#include "macconfig.h" #elif defined(HAVE_EXPAT_CONFIG_H) #include #endif /* ndef _WIN32 */ diff --git a/src/expat/lib/xmlrole.c b/src/expat/lib/xmlrole.c index a7c5630279..7e58b35e07 100644 --- a/src/expat/lib/xmlrole.c +++ b/src/expat/lib/xmlrole.c @@ -6,10 +6,10 @@ #ifdef _WIN32 #include "winconfig.h" -#else -#ifdef HAVE_EXPAT_CONFIG_H +#elif defined( __APPLE__ ) && !defined(HAVE_EXPAT_CONFIG_H) +#include "macconfig.h" +#elif defined(HAVE_EXPAT_CONFIG_H) #include -#endif #endif /* ndef _WIN32 */ #include "expat_external.h" diff --git a/src/expat/lib/xmltok.c b/src/expat/lib/xmltok.c index cdf0720dd8..c5394febcd 100644 --- a/src/expat/lib/xmltok.c +++ b/src/expat/lib/xmltok.c @@ -6,10 +6,10 @@ #ifdef _WIN32 #include "winconfig.h" -#else -#ifdef HAVE_EXPAT_CONFIG_H +#elif defined( __APPLE__ ) && !defined(HAVE_EXPAT_CONFIG_H) +#include "macconfig.h" +#elif defined(HAVE_EXPAT_CONFIG_H) #include -#endif #endif /* ndef _WIN32 */ #include "expat_external.h"