]> git.proxmox.com Git - mirror_edk2.git/blob - AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Modules/expat/expat_external.h
AppPkg/.../Python-2.7.10: AppPkg.dsc, pyconfig.h, PyMod-2.7.10
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.10 / PyMod-2.7.10 / Modules / expat / expat_external.h
1 /* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
2 See the file COPYING for copying permission.
3 */
4
5 #ifndef Expat_External_INCLUDED
6 #define Expat_External_INCLUDED 1
7
8 /* External API definitions */
9
10 /* Namespace external symbols to allow multiple libexpat version to
11 co-exist. */
12 #if !defined(UEFI_C_SOURCE)
13 #include "pyexpatns.h"
14 #endif
15
16 #if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
17 #define XML_USE_MSC_EXTENSIONS 1
18 #endif
19
20 /* Expat tries very hard to make the API boundary very specifically
21 defined. There are two macros defined to control this boundary;
22 each of these can be defined before including this header to
23 achieve some different behavior, but doing so it not recommended or
24 tested frequently.
25
26 XMLCALL - The calling convention to use for all calls across the
27 "library boundary." This will default to cdecl, and
28 try really hard to tell the compiler that's what we
29 want.
30
31 XMLIMPORT - Whatever magic is needed to note that a function is
32 to be imported from a dynamically loaded library
33 (.dll, .so, or .sl, depending on your platform).
34
35 The XMLCALL macro was added in Expat 1.95.7. The only one which is
36 expected to be directly useful in client code is XMLCALL.
37
38 Note that on at least some Unix versions, the Expat library must be
39 compiled with the cdecl calling convention as the default since
40 system headers may assume the cdecl convention.
41 */
42 #ifndef XMLCALL
43 #if defined(_MSC_VER)
44 #define XMLCALL __cdecl
45 #elif defined(__GNUC__) && defined(__i386) && !defined(__INTEL_COMPILER)
46 #define XMLCALL __attribute__((cdecl))
47 #else
48 /* For any platform which uses this definition and supports more than
49 one calling convention, we need to extend this definition to
50 declare the convention used on that platform, if it's possible to
51 do so.
52
53 If this is the case for your platform, please file a bug report
54 with information on how to identify your platform via the C
55 pre-processor and how to specify the same calling convention as the
56 platform's malloc() implementation.
57 */
58 #define XMLCALL
59 #endif
60 #endif /* not defined XMLCALL */
61
62
63 #if !defined(XML_STATIC) && !defined(XMLIMPORT)
64 #ifndef XML_BUILDING_EXPAT
65 /* using Expat from an application */
66
67 #ifdef XML_USE_MSC_EXTENSIONS
68 #define XMLIMPORT __declspec(dllimport)
69 #endif
70
71 #endif
72 #endif /* not defined XML_STATIC */
73
74
75 /* If we didn't define it above, define it away: */
76 #ifndef XMLIMPORT
77 #define XMLIMPORT
78 #endif
79
80
81 #define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
82
83 #ifdef __cplusplus
84 extern "C" {
85 #endif
86
87 #ifdef XML_UNICODE_WCHAR_T
88 #define XML_UNICODE
89 #endif
90
91 #ifdef XML_UNICODE /* Information is UTF-16 encoded. */
92 #ifdef XML_UNICODE_WCHAR_T
93 typedef wchar_t XML_Char;
94 typedef wchar_t XML_LChar;
95 #else
96 typedef unsigned short XML_Char;
97 typedef char XML_LChar;
98 #endif /* XML_UNICODE_WCHAR_T */
99 #else /* Information is UTF-8 encoded. */
100 typedef char XML_Char;
101 typedef char XML_LChar;
102 #endif /* XML_UNICODE */
103
104 #ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */
105 #if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400
106 typedef __int64 XML_Index;
107 typedef unsigned __int64 XML_Size;
108 #else
109 typedef long long XML_Index;
110 typedef unsigned long long XML_Size;
111 #endif
112 #else
113 typedef long XML_Index;
114 typedef unsigned long XML_Size;
115 #endif /* XML_LARGE_SIZE */
116
117 #ifdef __cplusplus
118 }
119 #endif
120
121 #endif /* not Expat_External_INCLUDED */