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 #if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
11 #define XML_USE_MSC_EXTENSIONS 1
14 /* Expat tries very hard to make the API boundary very specifically
15 defined. There are two macros defined to control this boundary;
16 each of these can be defined before including this header to
17 achieve some different behavior, but doing so it not recommended or
20 XMLCALL - The calling convention to use for all calls across the
21 "library boundary." This will default to cdecl, and
22 try really hard to tell the compiler that's what we
25 XMLIMPORT - Whatever magic is needed to note that a function is
26 to be imported from a dynamically loaded library
27 (.dll, .so, or .sl, depending on your platform).
29 The XMLCALL macro was added in Expat 1.95.7. The only one which is
30 expected to be directly useful in client code is XMLCALL.
32 Note that on at least some Unix versions, the Expat library must be
33 compiled with the cdecl calling convention as the default since
34 system headers may assume the cdecl convention.
38 #define XMLCALL __cdecl
39 #elif defined(__GNUC__) && defined(__i386) && !defined(__INTEL_COMPILER)
40 #define XMLCALL __attribute__((cdecl))
42 /* For any platform which uses this definition and supports more than
43 one calling convention, we need to extend this definition to
44 declare the convention used on that platform, if it's possible to
47 If this is the case for your platform, please file a bug report
48 with information on how to identify your platform via the C
49 pre-processor and how to specify the same calling convention as the
50 platform's malloc() implementation.
54 #endif /* not defined XMLCALL */
57 #if !defined(XML_STATIC) && !defined(XMLIMPORT)
58 #ifndef XML_BUILDING_EXPAT
59 /* using Expat from an application */
61 #ifdef XML_USE_MSC_EXTENSIONS
62 #define XMLIMPORT __declspec(dllimport)
66 #endif /* not defined XML_STATIC */
69 /* If we didn't define it above, define it away: */
75 #define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
81 #ifdef XML_UNICODE_WCHAR_T
85 #ifdef XML_UNICODE /* Information is UTF-16 encoded. */
86 #ifdef XML_UNICODE_WCHAR_T
87 typedef wchar_t XML_Char
;
88 typedef wchar_t XML_LChar
;
90 typedef unsigned short XML_Char
;
91 typedef char XML_LChar
;
92 #endif /* XML_UNICODE_WCHAR_T */
93 #else /* Information is UTF-8 encoded. */
94 typedef char XML_Char
;
95 typedef char XML_LChar
;
96 #endif /* XML_UNICODE */
98 #ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */
99 #if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400
100 typedef __int64 XML_Index
;
101 typedef unsigned __int64 XML_Size
;
103 typedef long long XML_Index
;
104 typedef unsigned long long XML_Size
;
107 typedef long XML_Index
;
108 typedef unsigned long XML_Size
;
109 #endif /* XML_LARGE_SIZE */
115 #endif /* not Expat_External_INCLUDED */