source: NonGTP/Xerces/xercesc/util/XercesDefs.hpp @ 188

Revision 188, 16.9 KB checked in by mattausch, 19 years ago (diff)

added xercesc to support

Line 
1/*
2 * The Apache Software License, Version 1.1
3 *
4 * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
5 * reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 *
11 * 1. Redistributions of source code must retain the above copyright
12 *    notice, this list of conditions and the following disclaimer.
13 *
14 * 2. Redistributions in binary form must reproduce the above copyright
15 *    notice, this list of conditions and the following disclaimer in
16 *    the documentation and/or other materials provided with the
17 *    distribution.
18 *
19 * 3. The end-user documentation included with the redistribution,
20 *    if any, must include the following acknowledgment:
21 *       "This product includes software developed by the
22 *        Apache Software Foundation (http://www.apache.org/)."
23 *    Alternately, this acknowledgment may appear in the software itself,
24 *    if and wherever such third-party acknowledgments normally appear.
25 *
26 * 4. The names "Xerces" and "Apache Software Foundation" must
27 *    not be used to endorse or promote products derived from this
28 *    software without prior written permission. For written
29 *    permission, please contact apache\@apache.org.
30 *
31 * 5. Products derived from this software may not be called "Apache",
32 *    nor may "Apache" appear in their name, without prior written
33 *    permission of the Apache Software Foundation.
34 *
35 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
36 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
37 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
38 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
39 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
40 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
41 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
42 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
43 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
44 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
45 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
46 * SUCH DAMAGE.
47 * ====================================================================
48 *
49 * This software consists of voluntary contributions made by many
50 * individuals on behalf of the Apache Software Foundation, and was
51 * originally based on software copyright (c) 1999, International
52 * Business Machines, Inc., http://www.ibm.com .  For more information
53 * on the Apache Software Foundation, please see
54 * <http://www.apache.org/>.
55 */
56
57/*
58 * $Log: XercesDefs.hpp,v $
59 * Revision 1.16  2004/02/04 13:26:44  amassari
60 * Added support for the Interix platform (Windows Services for Unix 3.5)
61 *
62 * Revision 1.15  2003/05/29 11:18:37  gareth
63 * Added macros in so we can determine whether to do things like iostream as opposed to iostream.h and whether to use std:: or not.
64 *
65 * Revision 1.14  2003/05/12 09:44:19  gareth
66 * Port to NetBSD. Patch by Hiramatsu Yoshifumi.
67 *
68 * Revision 1.13  2003/03/13 22:11:46  tng
69 * [Bug 17858] Support for QNX/Neutrino.  Patch from Chris McKillop.
70 *
71 * Revision 1.12  2003/02/23 05:44:12  jberry
72 * Ripple through changes of BeOSDefs.h name change
73 *
74 * Revision 1.11  2002/12/31 19:31:07  tng
75 * [Bug 15590] BeOSDefs.hpp has wrong case in CVS.
76 *
77 * Revision 1.10  2002/12/02 20:40:49  tng
78 * [Bug 12490] Patches required to build Xerces-C++ on BeOS R5.  Patch from Andrew Bachmann.
79 *
80 * Revision 1.9  2002/11/05 21:44:21  tng
81 * Do not code using namespace in a global header.
82 *
83 * Revision 1.8  2002/11/04 14:40:12  tng
84 * C++ Namespace Support.
85 *
86 * Revision 1.7  2002/07/12 16:48:49  jberry
87 * Remove reliance on XML_MACOSX. XML_MACOS is used solely. Where qualification
88 * by compiler is required, look for the compiler explicitly such as with
89 * XML_METROWERKS or __APPLE__ (for the Apple GCC compiler).
90 *
91 * Add a few tweaks for compatibility with GCC3.1.
92 *
93 * This change may address Bug 10649.
94 *
95 * Revision 1.6  2002/07/10 12:56:45  tng
96 * [Bug 9154] Requesting Xerces Version Macro.
97 *
98 * Revision 1.5  2002/05/21 19:35:08  tng
99 * Update from 1.7 to 2.0
100 *
101 * Revision 1.4  2002/02/27 22:38:34  peiyongz
102 * Bug# 6445 Caldera (SCO) OpenServer Port : patch from Martin Kalen
103 *
104 * Revision 1.3  2002/02/20 21:41:54  tng
105 * project files changes for Xerces-C++ 1.7.
106 *
107 * Revision 1.2  2002/02/17 21:12:06  jberry
108 * Adjust "sane includes" include path for Mac OS.
109 *
110 * I've also changed this path for XML_AS400, XML_TRU64, XML_PTX_CC, and XML_DECCXX
111 * 'cause it looks like the right thing to do...hope that's not a mistake.
112 *
113 * Revision 1.1.1.1  2002/02/01 22:22:13  peiyongz
114 * sane_include
115 *
116 * Revision 1.18  2001/11/29 18:25:18  tng
117 * FreeBSD support by Michael Huedepohl.
118 *
119 * Revision 1.17  2001/11/23 17:19:33  tng
120 * Change from 1.5.2 to 1.6.0
121 *
122 * Revision 1.16  2001/10/15 16:27:35  tng
123 * Changes for Xerces-C 1.5.2
124 *
125 * Revision 1.15  2001/07/13 20:16:38  tng
126 * Update for release 1.5.1.
127 *
128 * Revision 1.14  2001/06/05 13:52:25  tng
129 * Change Version number from Xerces 1.4 to 1.5.  By Pei Yong Zhang.
130 *
131 * Revision 1.13  2001/05/11 13:26:32  tng
132 * Copyright update.
133 *
134 * Revision 1.12  2001/02/08 14:15:33  tng
135 * enable COMPAQ Tru64 UNIX machines to build xerces-c with gcc (tested using COMPAQ gcc version2.95.2 19991024 (release) and Tru64 V5.0 1094).  Added by Martin Kalen.
136 *
137 * Revision 1.11  2001/01/25 19:17:06  tng
138 * const should be used instead of static const.  Fixed by Khaled Noaman.
139 *
140 * Revision 1.10  2001/01/12 22:09:07  tng
141 * Various update for Xerces 1.4
142 *
143 * Revision 1.9  2000/11/07 18:14:39  andyh
144 * Fix incorrect version number in gXercesMinVersion.
145 * From Pieter Van-Dyck
146 *
147 * Revision 1.8  2000/11/02 07:23:27  roddey
148 * Just a test of checkin access
149 *
150 * Revision 1.7  2000/08/18 21:29:14  andyh
151 * Change version to 1.3 in preparation for upcoming Xerces 1.3
152 * and XML4C 3.3 stable releases
153 *
154 * Revision 1.6  2000/08/07 20:31:34  jpolast
155 * include SAX2_EXPORT module
156 *
157 * Revision 1.5  2000/08/01 18:26:02  aruna1
158 * Tru64 support added
159 *
160 * Revision 1.4  2000/07/29 05:36:37  jberry
161 * Fix misspelling in Mac OS port
162 *
163 * Revision 1.3  2000/07/19 18:20:12  andyh
164 * Macintosh port: fix problems with yesterday's code checkin.  A couple
165 * of the changes were mangled or missed.
166 *
167 * Revision 1.2  2000/04/04 20:11:29  abagchi
168 * Added PTX support
169 *
170 * Revision 1.1  2000/03/02 19:54:50  roddey
171 * This checkin includes many changes done while waiting for the
172 * 1.1.0 code to be finished. I can't list them all here, but a list is
173 * available elsewhere.
174 *
175 * Revision 1.13  2000/03/02 01:51:00  aruna1
176 * Sun CC 5.0 related changes
177 *
178 * Revision 1.12  2000/02/24 20:05:26  abagchi
179 * Swat for removing Log from API docs
180 *
181 * Revision 1.11  2000/02/22 01:00:10  aruna1
182 * GNUGDefs references removed. Now only GCCDefs is used instead
183 *
184 * Revision 1.10  2000/02/06 07:48:05  rahulj
185 * Year 2K copyright swat.
186 *
187 * Revision 1.9  2000/02/01 23:43:32  abagchi
188 * AS/400 related change
189 *
190 * Revision 1.8  2000/01/21 22:12:29  abagchi
191 * OS390 Change: changed OE390 to OS390
192 *
193 * Revision 1.7  2000/01/14 01:18:35  roddey
194 * Added a macro, XMLStrL(), which is defined one way or another according
195 * to whether the per-compiler file defines XML_LSTRSUPPORT or not. This
196 * allows conditional support of L"" type prefixes.
197 *
198 * Revision 1.6  2000/01/14 00:52:06  roddey
199 * Updated the version information for the next release, i.e. 1.1.0
200 *
201 * Revision 1.5  1999/12/17 01:28:53  rahulj
202 * Merged in changes submitted for UnixWare 7 port. Platform
203 * specific files are still missing.
204 *
205 * Revision 1.4  1999/12/16 23:47:10  rahulj
206 * Updated for version 1.0.1
207 *
208 * Revision 1.3  1999/12/01 17:16:16  rahulj
209 * Added support for IRIX 6.5.5 using SGI MIPSpro C++ 7.3 and 7.21 generating 32 bit objects. Changes submitted by Marc Stuessel
210 *
211 * Revision 1.2  1999/11/10 02:02:51  abagchi
212 * Changed version numbers
213 *
214 * Revision 1.1.1.1  1999/11/09 01:05:35  twl
215 * Initial checkin
216 *
217 * Revision 1.3  1999/11/08 20:45:19  rahul
218 * Swat for adding in Product name and CVS comment log variable.
219 *
220 */
221
222
223#if !defined(XERCESDEFS_HPP)
224#define XERCESDEFS_HPP
225
226// ---------------------------------------------------------------------------
227//  Include the Xerces version information; this is kept in a separate file to
228//  make modification simple and obvious. Updates to the version header file
229// ---------------------------------------------------------------------------
230#include    <xercesc/util/XercesVersion.hpp>
231
232
233// ---------------------------------------------------------------------------
234//  Include the header that does automatic sensing of the current platform
235//  and compiler.
236// ---------------------------------------------------------------------------
237#include    <xercesc/util/AutoSense.hpp>
238
239
240
241// ---------------------------------------------------------------------------
242//  According to the platform we include a platform specific file. This guy
243//  will set up any platform specific stuff, such as character mode.
244// ---------------------------------------------------------------------------
245#if defined(XML_WIN32)
246#include    <xercesc/util/Platforms/Win32/Win32Defs.hpp>
247#endif
248
249#if defined(XML_AIX)
250#include    <xercesc/util/Platforms/AIX/AIXDefs.hpp>
251#endif
252
253#if defined(XML_SOLARIS)
254#include    <xercesc/util/Platforms/Solaris/SolarisDefs.hpp>
255#endif
256
257#if defined(XML_OPENSERVER)
258#include    <xercesc/util/Platforms/OpenServer/OpenServerDefs.hpp>
259#endif
260
261#if defined(XML_UNIXWARE)
262#include    <xercesc/util/Platforms/UnixWare/UnixWareDefs.hpp>
263#endif
264
265#if defined(XML_HPUX)
266#include    <xercesc/util/Platforms/HPUX/HPUXDefs.hpp>
267#endif
268
269#if defined(XML_IRIX)
270#include    <xercesc/util/Platforms/IRIX/IRIXDefs.hpp>
271#endif
272
273#if defined(XML_INTERIX)
274#include    <xercesc/util/Platforms/Interix/InterixDefs.hpp>
275#endif
276
277#if defined(XML_TANDEM)
278#include    <xercesc/util/Platforms/Tandem/TandemDefs.hpp>
279#endif
280
281#if defined(XML_BEOS)
282#include    <xercesc/util/Platforms/BeOS/BeOSDefs.hpp>
283#endif
284
285#if defined(XML_LINUX)
286#include    <xercesc/util/Platforms/Linux/LinuxDefs.hpp>
287#endif
288
289#if defined(XML_FREEBSD)
290#include    <xercesc/util/Platforms/FreeBSD/FreeBSDDefs.hpp>
291#endif
292
293#if defined(XML_OS390)
294#include    <xercesc/util/Platforms/OS390/OS390Defs.hpp>
295#endif
296
297#if defined(XML_PTX)
298#include    <xercesc/util/Platforms/PTX/PTXDefs.hpp>
299#endif
300
301#if defined(XML_OS2)
302#include    <xercesc/util/Platforms/OS2/OS2Defs.hpp>
303#endif
304
305#if defined(XML_MACOS)
306#include        <xercesc/util/Platforms/MacOS/MacOSDefs.hpp>
307#endif
308
309#if defined(XML_AS400)
310#include        <xercesc/util/Platforms/OS400/OS400Defs.hpp>
311#endif
312
313#if defined(XML_TRU64)
314#include        <xercesc/util/Platforms/Tru64/Tru64Defs.hpp>
315#endif
316
317#if defined(XML_QNX)
318#include        <xercesc/util/Platforms/QNX/QNXDefs.hpp>
319#endif
320
321// ---------------------------------------------------------------------------
322//  And now we subinclude a header according to the development environment
323//  we are on. This guy defines for each platform some basic stuff that is
324//  specific to the development environment.
325// ---------------------------------------------------------------------------
326#if defined(XML_VISUALCPP)
327#include    <xercesc/util/Compilers/VCPPDefs.hpp>
328#endif
329
330#if defined(XML_CSET)
331#include    <xercesc/util/Compilers/CSetDefs.hpp>
332#endif
333
334#if defined(XML_BORLAND)
335#include    <xercesc/util/Compilers/BorlandCDefs.hpp>
336#endif
337
338#if defined(XML_SUNCC) || defined(XML_SUNCC5)
339#include    <xercesc/util/Compilers/SunCCDefs.hpp>
340#endif
341
342#if defined(XML_SCOCC)
343#include    <xercesc/util/Compilers/SCOCCDefs.hpp>
344#endif
345
346#if defined(XML_SOLARIS_KAICC)
347#include    <xercesc/util/Compilers/SunKaiDefs.hpp>
348#endif
349
350#if defined(XML_HPUX_CC) || defined(XML_HPUX_aCC) || defined(XML_HPUX_KAICC)
351#include    <xercesc/util/Compilers/HPCCDefs.hpp>
352#endif
353
354#if defined(XML_MIPSPRO_CC)
355#include    <xercesc/util/Compilers/MIPSproDefs.hpp>
356#endif
357
358#if defined(XML_TANDEMCC)
359#include    <xercesc/util/Compilers/TandemCCDefs.hpp>
360#endif
361
362#if defined(XML_GCC)
363#include    <xercesc/util/Compilers/GCCDefs.hpp>
364#endif
365
366#if defined(XML_MVSCPP)
367#include    <xercesc/util/Compilers/MVSCPPDefs.hpp>
368#endif
369
370#if defined(XML_IBMVAW32)
371#include    <xercesc/util/Compilers/IBMVAW32Defs.hpp>
372#endif
373
374#if defined(XML_IBMVAOS2)
375#include    <xercesc/util/Compilers/IBMVAOS2Defs.hpp>
376#endif
377
378#if defined(XML_METROWERKS)
379#include        <xercesc/util/Compilers/CodeWarriorDefs.hpp>
380#endif
381
382#if defined(XML_PTX_CC)
383#include        <xercesc/util/Compilers/PTXCCDefs.hpp>
384#endif
385
386#if defined(XML_AS400)
387#include        <xercesc/util/Compilers/OS400SetDefs.hpp>
388#endif
389
390#if defined(XML_DECCXX)
391#include        <xercesc/util/Compilers/DECCXXDefs.hpp>
392#endif
393
394#if defined(XML_QCC)
395#include        <xercesc/util/Compilers/QCCDefs.hpp>
396#endif
397
398// ---------------------------------------------------------------------------
399//  Some general typedefs that are defined for internal flexibility.
400//
401//  Note  that UTF16Ch is fixed at 16 bits, whereas XMLCh floats in size per
402//  platform, to whatever is the native wide char format there. UCS4Ch is
403//  fixed at 32 bits. The types we defined them in terms of are defined per
404//  compiler, using whatever types are the right ones for them to get these
405//  16/32 bit sizes.
406//
407// ---------------------------------------------------------------------------
408typedef unsigned char       XMLByte;
409typedef XMLUInt16           UTF16Ch;
410typedef XMLUInt32           UCS4Ch;
411
412
413// ---------------------------------------------------------------------------
414//  Handle boolean. If the platform can handle booleans itself, then we
415//  map our boolean type to the native type. Otherwise we create a default
416//  one as an int and define const values for true and false.
417//
418//  This flag will be set in the per-development environment stuff above.
419// ---------------------------------------------------------------------------
420#if defined(NO_NATIVE_BOOL)
421  #ifndef bool
422    typedef int     bool;
423  #endif
424  #ifndef true
425    #define  true     1
426  #endif
427  #ifndef false
428    #define false 0
429  #endif
430#endif
431
432#if defined(XML_NETBSD)
433#include       <xercesc/util/Platforms/NetBSD/NetBSDDefs.hpp>
434#endif
435
436// ---------------------------------------------------------------------------
437//  According to whether the compiler suports L"" type strings, we define
438//  the XMLStrL() macro one way or another.
439// ---------------------------------------------------------------------------
440#if defined(XML_LSTRSUPPORT)
441#define XMLStrL(str)  L##str
442#else
443#define XMLStrL(str)  str
444#endif
445
446
447// ---------------------------------------------------------------------------
448// Define namespace symbols if the compiler supports it.
449// ---------------------------------------------------------------------------
450#if defined(XERCES_HAS_CPP_NAMESPACE)
451    #define XERCES_CPP_NAMESPACE_BEGIN namespace XERCES_CPP_NAMESPACE {
452    #define XERCES_CPP_NAMESPACE_END  }
453    #define XERCES_CPP_NAMESPACE_USE using namespace XERCES_CPP_NAMESPACE;
454    #define XERCES_CPP_NAMESPACE_QUALIFIER XERCES_CPP_NAMESPACE::
455
456    namespace XERCES_CPP_NAMESPACE { }
457    namespace xercesc = XERCES_CPP_NAMESPACE;
458#else
459    #define XERCES_CPP_NAMESPACE_BEGIN
460    #define XERCES_CPP_NAMESPACE_END
461    #define XERCES_CPP_NAMESPACE_USE
462    #define XERCES_CPP_NAMESPACE_QUALIFIER
463#endif
464
465#if defined(XERCES_STD_NAMESPACE)
466        #define XERCES_USING_STD(NAME) using std :: NAME;
467        #define XERCES_STD_QUALIFIER  std ::
468#else
469        #define XERCES_USING_STD(NAME)
470        #define XERCES_STD_QUALIFIER
471#endif
472
473
474// ---------------------------------------------------------------------------
475//  Set up the import/export keyword  for our core projects. The
476//  PLATFORM_XXXX keywords are set in the per-development environment
477//  include above.
478// ---------------------------------------------------------------------------
479#if defined(PROJ_XMLUTIL)
480#define XMLUTIL_EXPORT PLATFORM_EXPORT
481#else
482#define XMLUTIL_EXPORT PLATFORM_IMPORT
483#endif
484
485#if defined(PROJ_XMLPARSER)
486#define XMLPARSER_EXPORT PLATFORM_EXPORT
487#else
488#define XMLPARSER_EXPORT PLATFORM_IMPORT
489#endif
490
491#if defined(PROJ_SAX4C)
492#define SAX_EXPORT PLATFORM_EXPORT
493#else
494#define SAX_EXPORT PLATFORM_IMPORT
495#endif
496
497#if defined(PROJ_SAX2)
498#define SAX2_EXPORT PLATFORM_EXPORT
499#else
500#define SAX2_EXPORT PLATFORM_IMPORT
501#endif
502
503#if defined(PROJ_DOM)
504#define CDOM_EXPORT PLATFORM_EXPORT
505#else
506#define CDOM_EXPORT PLATFORM_IMPORT
507#endif
508
509#if defined(PROJ_PARSERS)
510#define PARSERS_EXPORT  PLATFORM_EXPORT
511#else
512#define PARSERS_EXPORT  PLATFORM_IMPORT
513#endif
514
515#if defined(PROJ_VALIDATORS)
516#define VALIDATORS_EXPORT  PLATFORM_EXPORT
517#else
518#define VALIDATORS_EXPORT  PLATFORM_IMPORT
519#endif
520
521#endif
Note: See TracBrowser for help on using the repository browser.