1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/parser/expat/lib/expat_external.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,121 @@ 1.4 +/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd 1.5 + See the file COPYING for copying permission. 1.6 +*/ 1.7 + 1.8 +#ifndef Expat_External_INCLUDED 1.9 +#define Expat_External_INCLUDED 1 1.10 + 1.11 +/* External API definitions */ 1.12 + 1.13 +#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__) 1.14 +#define XML_USE_MSC_EXTENSIONS 1 1.15 +#endif 1.16 + 1.17 +/* Expat tries very hard to make the API boundary very specifically 1.18 + defined. There are two macros defined to control this boundary; 1.19 + each of these can be defined before including this header to 1.20 + achieve some different behavior, but doing so it not recommended or 1.21 + tested frequently. 1.22 + 1.23 + XMLCALL - The calling convention to use for all calls across the 1.24 + "library boundary." This will default to cdecl, and 1.25 + try really hard to tell the compiler that's what we 1.26 + want. 1.27 + 1.28 + XMLIMPORT - Whatever magic is needed to note that a function is 1.29 + to be imported from a dynamically loaded library 1.30 + (.dll, .so, or .sl, depending on your platform). 1.31 + 1.32 + The XMLCALL macro was added in Expat 1.95.7. The only one which is 1.33 + expected to be directly useful in client code is XMLCALL. 1.34 + 1.35 + Note that on at least some Unix versions, the Expat library must be 1.36 + compiled with the cdecl calling convention as the default since 1.37 + system headers may assume the cdecl convention. 1.38 +*/ 1.39 +#ifndef XMLCALL 1.40 +#if defined(XML_USE_MSC_EXTENSIONS) 1.41 +#define XMLCALL __cdecl 1.42 +#elif defined(__GNUC__) && defined(__i386) 1.43 +#define XMLCALL __attribute__((cdecl)) 1.44 +#else 1.45 +/* For any platform which uses this definition and supports more than 1.46 + one calling convention, we need to extend this definition to 1.47 + declare the convention used on that platform, if it's possible to 1.48 + do so. 1.49 + 1.50 + If this is the case for your platform, please file a bug report 1.51 + with information on how to identify your platform via the C 1.52 + pre-processor and how to specify the same calling convention as the 1.53 + platform's malloc() implementation. 1.54 +*/ 1.55 +#define XMLCALL 1.56 +#endif 1.57 +#endif /* not defined XMLCALL */ 1.58 + 1.59 + 1.60 +#if !defined(XML_STATIC) && !defined(XMLIMPORT) 1.61 +#ifndef XML_BUILDING_EXPAT 1.62 +/* using Expat from an application */ 1.63 + 1.64 +#ifdef XML_USE_MSC_EXTENSIONS 1.65 +#define XMLIMPORT __declspec(dllimport) 1.66 +#endif 1.67 + 1.68 +#endif 1.69 +#endif /* not defined XML_STATIC */ 1.70 + 1.71 + 1.72 +/* If we didn't define it above, define it away: */ 1.73 +#ifndef XMLIMPORT 1.74 +#define XMLIMPORT 1.75 +#endif 1.76 + 1.77 + 1.78 +#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL 1.79 + 1.80 +#ifdef __cplusplus 1.81 +extern "C" { 1.82 +#endif 1.83 + 1.84 +#ifdef XML_UNICODE_WCHAR_T 1.85 +#define XML_UNICODE 1.86 +#endif 1.87 + 1.88 +/* BEGIN MOZILLA CHANGE (typedef XML_Char to char16_t) */ 1.89 +#if 0 1.90 + 1.91 +#ifdef XML_UNICODE /* Information is UTF-16 encoded. */ 1.92 +#ifdef XML_UNICODE_WCHAR_T 1.93 +typedef wchar_t XML_Char; 1.94 +typedef wchar_t XML_LChar; 1.95 +#else 1.96 +typedef unsigned short XML_Char; 1.97 +typedef char XML_LChar; 1.98 +#endif /* XML_UNICODE_WCHAR_T */ 1.99 +#else /* Information is UTF-8 encoded. */ 1.100 +typedef char XML_Char; 1.101 +typedef char XML_LChar; 1.102 +#endif /* XML_UNICODE */ 1.103 + 1.104 +#endif 1.105 +/* END MOZILLA CHANGE */ 1.106 + 1.107 +#ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */ 1.108 +#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400 1.109 +typedef __int64 XML_Index; 1.110 +typedef unsigned __int64 XML_Size; 1.111 +#else 1.112 +typedef long long XML_Index; 1.113 +typedef unsigned long long XML_Size; 1.114 +#endif 1.115 +#else 1.116 +typedef long XML_Index; 1.117 +typedef unsigned long XML_Size; 1.118 +#endif /* XML_LARGE_SIZE */ 1.119 + 1.120 +#ifdef __cplusplus 1.121 +} 1.122 +#endif 1.123 + 1.124 +#endif /* not Expat_External_INCLUDED */