summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Expat/src/expat_external.h')
-rw-r--r--3rdParty/Expat/src/expat_external.h92
1 files changed, 63 insertions, 29 deletions
diff --git a/3rdParty/Expat/src/expat_external.h b/3rdParty/Expat/src/expat_external.h
index 892eb4b..875225d 100644
--- a/3rdParty/Expat/src/expat_external.h
+++ b/3rdParty/Expat/src/expat_external.h
@@ -1,5 +1,33 @@
1/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd 1/*
2 See the file COPYING for copying permission. 2 __ __ _
3 ___\ \/ /_ __ __ _| |_
4 / _ \\ /| '_ \ / _` | __|
5 | __// \| |_) | (_| | |_
6 \___/_/\_\ .__/ \__,_|\__|
7 |_| XML parser
8
9 Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
10 Copyright (c) 2000-2017 Expat development team
11 Licensed under the MIT license:
12
13 Permission is hereby granted, free of charge, to any person obtaining
14 a copy of this software and associated documentation files (the
15 "Software"), to deal in the Software without restriction, including
16 without limitation the rights to use, copy, modify, merge, publish,
17 distribute, sublicense, and/or sell copies of the Software, and to permit
18 persons to whom the Software is furnished to do so, subject to the
19 following conditions:
20
21 The above copyright notice and this permission notice shall be included
22 in all copies or substantial portions of the Software.
23
24 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
27 NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
28 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
29 OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
30 USE OR OTHER DEALINGS IN THE SOFTWARE.
3*/ 31*/
4 32
5#ifndef Expat_External_INCLUDED 33#ifndef Expat_External_INCLUDED
@@ -8,7 +36,7 @@
8/* External API definitions */ 36/* External API definitions */
9 37
10#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__) 38#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
11#define XML_USE_MSC_EXTENSIONS 1 39# define XML_USE_MSC_EXTENSIONS 1
12#endif 40#endif
13 41
14/* Expat tries very hard to make the API boundary very specifically 42/* Expat tries very hard to make the API boundary very specifically
@@ -34,11 +62,11 @@
34 system headers may assume the cdecl convention. 62 system headers may assume the cdecl convention.
35*/ 63*/
36#ifndef XMLCALL 64#ifndef XMLCALL
37#if defined(_MSC_VER) 65# if defined(_MSC_VER)
38#define XMLCALL __cdecl 66# define XMLCALL __cdecl
39#elif defined(__GNUC__) && defined(__i386) && !defined(__INTEL_COMPILER) 67# elif defined(__GNUC__) && defined(__i386) && !defined(__INTEL_COMPILER)
40#define XMLCALL __attribute__((cdecl)) 68# define XMLCALL __attribute__((cdecl))
41#else 69# else
42/* For any platform which uses this definition and supports more than 70/* For any platform which uses this definition and supports more than
43 one calling convention, we need to extend this definition to 71 one calling convention, we need to extend this definition to
44 declare the convention used on that platform, if it's possible to 72 declare the convention used on that platform, if it's possible to
@@ -49,41 +77,45 @@
49 pre-processor and how to specify the same calling convention as the 77 pre-processor and how to specify the same calling convention as the
50 platform's malloc() implementation. 78 platform's malloc() implementation.
51*/ 79*/
52#define XMLCALL 80# define XMLCALL
53#endif 81# endif
54#endif /* not defined XMLCALL */ 82#endif /* not defined XMLCALL */
55 83
56 84
57#if !defined(XML_STATIC) && !defined(XMLIMPORT) 85#if !defined(XML_STATIC) && !defined(XMLIMPORT)
58#ifndef XML_BUILDING_EXPAT 86# ifndef XML_BUILDING_EXPAT
59/* using Expat from an application */ 87/* using Expat from an application */
60 88
61#ifdef XML_USE_MSC_EXTENSIONS 89# ifdef XML_USE_MSC_EXTENSIONS
62#define XMLIMPORT __declspec(dllimport) 90# define XMLIMPORT __declspec(dllimport)
63#endif 91# endif
64 92
65#endif 93# endif
66#endif /* not defined XML_STATIC */ 94#endif /* not defined XML_STATIC */
67 95
68#if !defined(XMLIMPORT) && defined(__GNUC__) && (__GNUC__ >= 4) 96#ifndef XML_ENABLE_VISIBILITY
69#define XMLIMPORT __attribute__ ((visibility ("default"))) 97# define XML_ENABLE_VISIBILITY 0
98#endif
99
100#if !defined(XMLIMPORT) && XML_ENABLE_VISIBILITY
101# define XMLIMPORT __attribute__ ((visibility ("default")))
70#endif 102#endif
71 103
72/* If we didn't define it above, define it away: */ 104/* If we didn't define it above, define it away: */
73#ifndef XMLIMPORT 105#ifndef XMLIMPORT
74#define XMLIMPORT 106# define XMLIMPORT
75#endif 107#endif
76 108
77#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)) 109#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
78#define XML_ATTR_MALLOC __attribute__((__malloc__)) 110# define XML_ATTR_MALLOC __attribute__((__malloc__))
79#else 111#else
80#define XML_ATTR_MALLOC 112# define XML_ATTR_MALLOC
81#endif 113#endif
82 114
83#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) 115#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
84#define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x))) 116# define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
85#else 117#else
86#define XML_ATTR_ALLOC_SIZE(x) 118# define XML_ATTR_ALLOC_SIZE(x)
87#endif 119#endif
88 120
89#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL 121#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
@@ -93,33 +125,35 @@ extern "C" {
93#endif 125#endif
94 126
95#ifdef XML_UNICODE_WCHAR_T 127#ifdef XML_UNICODE_WCHAR_T
96# define XML_UNICODE 128# ifndef XML_UNICODE
129# define XML_UNICODE
130# endif
97# if defined(__SIZEOF_WCHAR_T__) && (__SIZEOF_WCHAR_T__ != 2) 131# if defined(__SIZEOF_WCHAR_T__) && (__SIZEOF_WCHAR_T__ != 2)
98# error "sizeof(wchar_t) != 2; Need -fshort-wchar for both Expat and libc" 132# error "sizeof(wchar_t) != 2; Need -fshort-wchar for both Expat and libc"
99# endif 133# endif
100#endif 134#endif
101 135
102#ifdef XML_UNICODE /* Information is UTF-16 encoded. */ 136#ifdef XML_UNICODE /* Information is UTF-16 encoded. */
103#ifdef XML_UNICODE_WCHAR_T 137# ifdef XML_UNICODE_WCHAR_T
104typedef wchar_t XML_Char; 138typedef wchar_t XML_Char;
105typedef wchar_t XML_LChar; 139typedef wchar_t XML_LChar;
106#else 140# else
107typedef unsigned short XML_Char; 141typedef unsigned short XML_Char;
108typedef char XML_LChar; 142typedef char XML_LChar;
109#endif /* XML_UNICODE_WCHAR_T */ 143# endif /* XML_UNICODE_WCHAR_T */
110#else /* Information is UTF-8 encoded. */ 144#else /* Information is UTF-8 encoded. */
111typedef char XML_Char; 145typedef char XML_Char;
112typedef char XML_LChar; 146typedef char XML_LChar;
113#endif /* XML_UNICODE */ 147#endif /* XML_UNICODE */
114 148
115#ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */ 149#ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */
116#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400 150# if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400
117typedef __int64 XML_Index; 151typedef __int64 XML_Index;
118typedef unsigned __int64 XML_Size; 152typedef unsigned __int64 XML_Size;
119#else 153# else
120typedef long long XML_Index; 154typedef long long XML_Index;
121typedef unsigned long long XML_Size; 155typedef unsigned long long XML_Size;
122#endif 156# endif
123#else 157#else
124typedef long XML_Index; 158typedef long XML_Index;
125typedef unsigned long XML_Size; 159typedef unsigned long XML_Size;