]>
git.proxmox.com Git - mirror_edk2.git/blob - AppPkg/Applications/Python/PyMod-2.7.2/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.
5 #ifndef Expat_External_INCLUDED
6 #define Expat_External_INCLUDED 1
8 /* External API definitions */
10 /* Namespace external symbols to allow multiple libexpat version to
12 #if !defined(UEFI_C_SOURCE)
13 #include "pyexpatns.h"
16 #if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
17 #define XML_USE_MSC_EXTENSIONS 1
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
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
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).
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.
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.
43 #if defined(XML_USE_MSC_EXTENSIONS)
44 #define XMLCALL __cdecl
45 #elif defined(__GNUC__) && defined(__i386)
46 #define XMLCALL __attribute__((cdecl))
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
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.
60 #endif /* not defined XMLCALL */
63 #if !defined(XML_STATIC) && !defined(XMLIMPORT)
64 #ifndef XML_BUILDING_EXPAT
65 /* using Expat from an application */
67 #ifdef XML_USE_MSC_EXTENSIONS
68 #define XMLIMPORT __declspec(dllimport)
72 #endif /* not defined XML_STATIC */
75 /* If we didn't define it above, define it away: */
81 #define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
87 #ifdef XML_UNICODE_WCHAR_T
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
;
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 */
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
;
109 typedef long long XML_Index
;
110 typedef unsigned long long XML_Size
;
113 typedef long XML_Index
;
114 typedef unsigned long XML_Size
;
115 #endif /* XML_LARGE_SIZE */
121 #endif /* not Expat_External_INCLUDED */