source: trunk/VUT/GtpVisibilityPreprocessor/support/xerces/include/xercesc/util/Compilers/GCCDefs.hpp @ 358

Revision 358, 8.0 KB checked in by bittner, 19 years ago (diff)

xerces added

Line 
1/*
2 * Copyright 1999-2002,2004 The Apache Software Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 * $Log: GCCDefs.hpp,v $
19 * Revision 1.9  2004/09/08 13:56:32  peiyongz
20 * Apache License Version 2.0
21 *
22 * Revision 1.8  2004/03/15 17:06:06  amassari
23 * - Added support for MinGW (bug#23176)
24 *
25 * Revision 1.7  2003/05/29 11:18:37  gareth
26 * 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.
27 *
28 * Revision 1.6  2002/11/18 20:38:11  tng
29 * [Bug 14612] GCCDefs clashes with cygwin's string.h for stricmp and strnicmp.
30 *
31 * Revision 1.5  2002/11/04 14:45:20  tng
32 * C++ Namespace Support.
33 *
34 * Revision 1.4  2002/05/28 12:57:17  tng
35 * Fix typo.
36 *
37 * Revision 1.3  2002/05/27 18:02:40  tng
38 * define XMLSize_t, XMLSSize_t and their associate MAX
39 *
40 * Revision 1.2  2002/05/21 19:45:53  tng
41 * Define DOMSize_t and XMLSize_t
42 *
43 * Revision 1.1.1.1  2002/02/01 22:22:18  peiyongz
44 * sane_include
45 *
46 * Revision 1.14  2001/07/06 17:11:58  tng
47 * Automatic build of single-threaded library.  By Martin Kalen.
48 *
49 * Revision 1.13  2001/03/02 20:52:58  knoaman
50 * Schema: Regular expression - misc. updates for error messages,
51 * and additions of new functions to XMLString class.
52 *
53 * Revision 1.12  2001/02/08 14:15:33  tng
54 * 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.
55 *
56 * Revision 1.11  2000/10/17 00:52:00  andyh
57 * Change XMLCh back to unsigned short on all platforms.
58 *
59 * Revision 1.10  2000/03/09 01:22:29  abagchi
60 * Added header guards to include inlines only once
61 *
62 * Revision 1.9  2000/03/02 19:55:08  roddey
63 * This checkin includes many changes done while waiting for the
64 * 1.1.0 code to be finished. I can't list them all here, but a list is
65 * available elsewhere.
66 *
67 * Revision 1.8  2000/02/22 01:00:48  aruna1
68 * GNUGDefs references removed. Now only GCCDefs is used instead
69 *
70 * Revision 1.7  2000/02/06 07:48:17  rahulj
71 * Year 2K copyright swat.
72 *
73 * Revision 1.6  2000/01/14 02:08:29  abagchi
74 * Sorry GCC does not support long strings
75 *
76 * Revision 1.5  2000/01/14 01:55:09  abagchi
77 * Added XML_LSTRSUPPORT
78 *
79 * Revision 1.4  2000/01/13 01:39:11  abagchi
80 * Changed unsigned short to wchar_t for XMLCh
81 *
82 * Revision 1.3  1999/11/12 20:36:54  rahulj
83 * Changed library name to xerces-c.lib.
84 *
85 * Revision 1.1.1.1  1999/11/09 01:07:32  twl
86 * Initial checkin
87 *
88 * Revision 1.2  1999/11/08 20:45:23  rahul
89 * Swat for adding in Product name and CVS comment log variable.
90 *
91 */
92
93#if !defined(GCCDEFS_HPP)
94#define GCCDEFS_HPP
95
96// ---------------------------------------------------------------------------
97//  Include some runtime files that will be needed product wide
98// ---------------------------------------------------------------------------
99#include <sys/types.h>  // for size_t and ssize_t
100#include <limits.h>  // for MAX of size_t and ssize_t
101
102// ---------------------------------------------------------------------------
103//  A define in the build for each project is also used to control whether
104//  the export keyword is from the project's viewpoint or the client's.
105//  These defines provide the platform specific keywords that they need
106//  to do this.
107// ---------------------------------------------------------------------------
108#if defined(__MINGW32__)
109#define PLATFORM_EXPORT __declspec(dllexport)
110#define PLATFORM_IMPORT __declspec(dllimport)
111#else
112#define PLATFORM_EXPORT
113#define PLATFORM_IMPORT
114#endif
115
116// ---------------------------------------------------------------------------
117//  Indicate that we do not support native bools
118//  If the compiler can handle boolean itself, do not define it
119// ---------------------------------------------------------------------------
120// #define NO_NATIVE_BOOL
121
122// ---------------------------------------------------------------------------
123//  Each compiler might support L"" prefixed constants. There are places
124//  where it is advantageous to use the L"" where it supported, to avoid
125//  unnecessary transcoding.
126//  If your compiler does not support it, don't define this.
127// ---------------------------------------------------------------------------
128// #define XML_LSTRSUPPORT
129
130// ---------------------------------------------------------------------------
131//  Indicate that we support C++ namespace
132//  Do not define it if the compile cannot handle C++ namespace
133// ---------------------------------------------------------------------------
134#define XERCES_HAS_CPP_NAMESPACE
135
136// ---------------------------------------------------------------------------
137//  Define our version of the XML character
138// ---------------------------------------------------------------------------
139typedef unsigned short XMLCh;
140
141// ---------------------------------------------------------------------------
142//  Define unsigned 16 and 32 bits integers
143// ---------------------------------------------------------------------------
144typedef unsigned short  XMLUInt16;
145typedef unsigned int    XMLUInt32;
146
147// ---------------------------------------------------------------------------
148//  Define signed 32 bits integers
149// ---------------------------------------------------------------------------
150typedef int             XMLInt32;
151
152// ---------------------------------------------------------------------------
153//  XMLSize_t is the unsigned integral type.
154// ---------------------------------------------------------------------------
155#if defined(_SIZE_T) && defined(SIZE_MAX) && defined(_SSIZE_T) && defined(SSIZE_MAX)
156    typedef size_t              XMLSize_t;
157    #define XML_SIZE_MAX        SIZE_MAX
158    typedef ssize_t             XMLSSize_t;
159    #define XML_SSIZE_MAX       SSIZE_MAX
160#else
161    typedef unsigned long       XMLSize_t;
162    #define XML_SIZE_MAX        ULONG_MAX
163    typedef long                XMLSSize_t;
164    #define XML_SSIZE_MAX       LONG_MAX
165#endif
166
167// ---------------------------------------------------------------------------
168//  Force on the Xerces debug token if it was on in the build environment
169// ---------------------------------------------------------------------------
170#if defined(_DEBUG)
171#define XERCES_DEBUG
172#endif
173
174#if __GNUC__ >= 3
175#define XERCES_NEW_IOSTREAMS
176#define XERCES_STD_NAMESPACE
177#endif
178
179// ---------------------------------------------------------------------------
180//  Provide some common string ops that are different/notavail on GCC
181// ---------------------------------------------------------------------------
182#if !defined(XML_TRU64) && !defined(XML_GCC)
183inline char toupper(const char toUpper)
184{
185    if ((toUpper >= 'a') && (toUpper <= 'z'))
186        return char(toUpper - 0x20);
187    return toUpper;
188}
189
190inline char tolower(const char toLower)
191{
192    if ((toLower >= 'A') && (toLower <= 'Z'))
193        return char(toLower + 0x20);
194    return toLower;
195}
196#endif
197
198#if !defined(__CYGWIN__) && !defined(__MINGW32__)
199
200int stricmp(const char* const str1, const char* const  str2);
201int strnicmp(const char* const str1, const char* const  str2, const unsigned int count);
202
203#endif // ! __CYGWIN__
204
205
206// ---------------------------------------------------------------------------
207//  The name of the DLL that is built by the GCC version of the system.
208// ---------------------------------------------------------------------------
209const char* const Xerces_DLLName = "libxerces-c";
210
211#endif  // GCCDEFS_HPP
212
Note: See TracBrowser for help on using the repository browser.