]>
git.saurik.com Git - wxWidgets.git/blob - src/expat/lib/expat_external.h
2944bff520d1d318112dba4c627537a8dd9fa5a5
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 /* wxWidgets modification: always predefine XML_STATIC as we always use
9 Expat as a static library.
15 /* External API definitions */
17 #if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
18 #define XML_USE_MSC_EXTENSIONS 1
21 /* Expat tries very hard to make the API boundary very specifically
22 defined. There are two macros defined to control this boundary;
23 each of these can be defined before including this header to
24 achieve some different behavior, but doing so it not recommended or
27 XMLCALL - The calling convention to use for all calls across the
28 "library boundary." This will default to cdecl, and
29 try really hard to tell the compiler that's what we
32 XMLIMPORT - Whatever magic is needed to note that a function is
33 to be imported from a dynamically loaded library
34 (.dll, .so, or .sl, depending on your platform).
36 The XMLCALL macro was added in Expat 1.95.7. The only one which is
37 expected to be directly useful in client code is XMLCALL.
39 Note that on at least some Unix versions, the Expat library must be
40 compiled with the cdecl calling convention as the default since
41 system headers may assume the cdecl convention.
45 #define XMLCALL __cdecl
46 #elif defined(__GNUC__) && defined(__i386) && !defined(__INTEL_COMPILER)
47 #define XMLCALL __attribute__((cdecl))
49 /* For any platform which uses this definition and supports more than
50 one calling convention, we need to extend this definition to
51 declare the convention used on that platform, if it's possible to
54 If this is the case for your platform, please file a bug report
55 with information on how to identify your platform via the C
56 pre-processor and how to specify the same calling convention as the
57 platform's malloc() implementation.
61 #endif /* not defined XMLCALL */
64 #if !defined(XML_STATIC) && !defined(XMLIMPORT)
65 #ifndef XML_BUILDING_EXPAT
66 /* using Expat from an application */
68 #ifdef XML_USE_MSC_EXTENSIONS
69 #define XMLIMPORT __declspec(dllimport)
73 #endif /* not defined XML_STATIC */
76 /* If we didn't define it above, define it away: */
82 #define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
88 #ifdef XML_UNICODE_WCHAR_T
92 #ifdef XML_UNICODE /* Information is UTF-16 encoded. */
93 #ifdef XML_UNICODE_WCHAR_T
94 typedef wchar_t XML_Char
;
95 typedef wchar_t XML_LChar
;
97 typedef unsigned short XML_Char
;
98 typedef char XML_LChar
;
99 #endif /* XML_UNICODE_WCHAR_T */
100 #else /* Information is UTF-8 encoded. */
101 typedef char XML_Char
;
102 typedef char XML_LChar
;
103 #endif /* XML_UNICODE */
105 #ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */
106 #if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400
107 typedef __int64 XML_Index
;
108 typedef unsigned __int64 XML_Size
;
110 typedef long long XML_Index
;
111 typedef unsigned long long XML_Size
;
114 typedef long XML_Index
;
115 typedef unsigned long XML_Size
;
116 #endif /* XML_LARGE_SIZE */
122 #endif /* not Expat_External_INCLUDED */