source: NonGTP/Xerces/xerces/include/xercesc/util/Compilers/TandemCCDefs.hpp @ 358

Revision 358, 6.3 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: TandemCCDefs.hpp,v $
19 * Revision 1.6  2004/09/08 13:56:32  peiyongz
20 * Apache License Version 2.0
21 *
22 * Revision 1.5  2002/11/04 14:45:20  tng
23 * C++ Namespace Support.
24 *
25 * Revision 1.4  2002/05/28 12:57:17  tng
26 * Fix typo.
27 *
28 * Revision 1.3  2002/05/27 18:02:40  tng
29 * define XMLSize_t, XMLSSize_t and their associate MAX
30 *
31 * Revision 1.2  2002/05/21 19:45:53  tng
32 * Define DOMSize_t and XMLSize_t
33 *
34 * Revision 1.1.1.1  2002/02/01 22:22:19  peiyongz
35 * sane_include
36 *
37 * Revision 1.6  2000/03/09 18:54:45  abagchi
38 * Added header-guards to include inlines only once
39 *
40 * Revision 1.5  2000/03/02 19:55:09  roddey
41 * This checkin includes many changes done while waiting for the
42 * 1.1.0 code to be finished. I can't list them all here, but a list is
43 * available elsewhere.
44 *
45 * Revision 1.4  2000/02/06 07:48:18  rahulj
46 * Year 2K copyright swat.
47 *
48 * Revision 1.3  1999/11/12 20:37:03  rahulj
49 * Changed library name to xerces-c.lib.
50 *
51 * Revision 1.1.1.1  1999/11/09 01:07:40  twl
52 * Initial checkin
53 *
54 * Revision 1.2  1999/11/08 20:45:25  rahul
55 * Swat for adding in Product name and CVS comment log variable.
56 *
57 */
58
59#if !defined(TANDEMCCDEFS_HPP)
60#define TANDEMCCDEFS_HPP
61
62// ---------------------------------------------------------------------------
63//  Include some runtime files that will be needed product wide
64// ---------------------------------------------------------------------------
65#include <sys/types.h>  // for size_t and ssize_t
66#include <limits.h>  // for MAX of size_t and ssize_t
67
68// ---------------------------------------------------------------------------
69//  A define in the build for each project is also used to control whether
70//  the export keyword is from the project's viewpoint or the client's.
71//  These defines provide the platform specific keywords that they need
72//  to do this.
73// ---------------------------------------------------------------------------
74#define PLATFORM_EXPORT
75#define PLATFORM_IMPORT
76
77// ---------------------------------------------------------------------------
78//  Indicate that we do not support native bools
79//  If the compiler can handle boolean itself, do not define it
80// ---------------------------------------------------------------------------
81// #define NO_NATIVE_BOOL
82
83// ---------------------------------------------------------------------------
84//  Each compiler might support L"" prefixed constants. There are places
85//  where it is advantageous to use the L"" where it supported, to avoid
86//  unnecessary transcoding.
87//  If your compiler does not support it, don't define this.
88// ---------------------------------------------------------------------------
89// #define XML_LSTRSUPPORT
90
91// ---------------------------------------------------------------------------
92//  Indicate that we support C++ namespace
93//  Do not define it if the compile cannot handle C++ namespace
94// ---------------------------------------------------------------------------
95// #define XERCES_HAS_CPP_NAMESPACE
96
97// ---------------------------------------------------------------------------
98//  Define our version of the XML character
99// ---------------------------------------------------------------------------
100typedef unsigned short XMLCh;
101
102// ---------------------------------------------------------------------------
103//  Define unsigned 16 and 32 bits integers
104// ---------------------------------------------------------------------------
105typedef unsigned short  XMLUInt16;
106typedef unsigned int    XMLUInt32;
107
108// ---------------------------------------------------------------------------
109//  Define signed 32 bits integers
110// ---------------------------------------------------------------------------
111typedef int             XMLInt32;
112
113// ---------------------------------------------------------------------------
114//  XMLSize_t is the unsigned integral type.
115// ---------------------------------------------------------------------------
116#if defined(_SIZE_T) && defined(SIZE_MAX) && defined(_SSIZE_T) && defined(SSIZE_MAX)
117    typedef size_t              XMLSize_t;
118    #define XML_SIZE_MAX        SIZE_MAX
119    typedef ssize_t             XMLSSize_t;
120    #define XML_SSIZE_MAX       SSIZE_MAX
121#else
122    typedef unsigned long       XMLSize_t;
123    #define XML_SIZE_MAX        ULONG_MAX
124    typedef long                XMLSSize_t;
125    #define XML_SSIZE_MAX       LONG_MAX
126#endif
127
128// ---------------------------------------------------------------------------
129//  Force on the Xerces debug token if it was on in the build environment
130// ---------------------------------------------------------------------------
131#if defined(_DEBUG)
132#define XERCES_DEBUG
133#endif
134
135
136// ---------------------------------------------------------------------------
137//  Provide some common string ops that are different.
138// ---------------------------------------------------------------------------
139inline char toupper(const char toUpper)
140{
141    if ((toUpper >= 'a') && (toUpper <= 'z'))
142        return char(toUpper - 0x20);
143    return toUpper;
144}
145
146inline char tolower(const char toLower)
147{
148    if ((toLower >= 'A') && (toLower <= 'Z'))
149        return char(toLower + 0x20);
150    return toLower;
151}
152
153int stricmp(const char* const str1, const char* const  str2);
154int strnicmp(const char* const str1, const char* const  str2, const unsigned int count);
155
156
157// ---------------------------------------------------------------------------
158//  The name of the DLL that is built by the system.
159// ---------------------------------------------------------------------------
160const char* const Xerces_DLLName = "libxerces-c";
161
162#endif  // TANDEMCCDEFS_HPP
Note: See TracBrowser for help on using the repository browser.