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

Revision 358, 7.7 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: VCPPDefs.hpp,v $
19 * Revision 1.10  2004/09/08 13:56:32  peiyongz
20 * Apache License Version 2.0
21 *
22 * Revision 1.9  2003/05/29 13:52:36  gareth
23 * fixed typo for version number
24 *
25 * Revision 1.8  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.7  2002/11/04 14:45:20  tng
29 * C++ Namespace Support.
30 *
31 * Revision 1.6  2002/06/25 16:05:24  tng
32 * DOM L3: move the operator delete to DOMDocumentImpl.hpp
33 *
34 * Revision 1.5  2002/05/28 12:57:17  tng
35 * Fix typo.
36 *
37 * Revision 1.4  2002/05/27 18:02:40  tng
38 * define XMLSize_t, XMLSSize_t and their associate MAX
39 *
40 * Revision 1.3  2002/05/21 19:45:53  tng
41 * Define DOMSize_t and XMLSize_t
42 *
43 * Revision 1.2  2002/04/17 20:30:01  tng
44 * [Bug 7583] Build warnings with MS Visual Studio .NET.
45 *
46 * Revision 1.1.1.1  2002/02/01 22:22:19  peiyongz
47 * sane_include
48 *
49 * Revision 1.13  2001/06/04 20:11:54  tng
50 * IDOM: Complete IDNodeIterator, IDTreeWalker, IDNodeFilter.
51 *
52 * Revision 1.12  2001/06/04 13:45:06  tng
53 * The "hash" argument clashes with STL hash.  Fixed by Pei Yong Zhang.
54 *
55 * Revision 1.11  2001/05/29 18:50:24  tng
56 * IDOM: call allocate directly for array allocation to avoid overloading operator new[] which leads to compilation error on SUN CC 4.2
57 *
58 * Revision 1.10  2001/05/28 20:59:21  tng
59 * IDOM: move operator new[] to VCPPDefs as only Windows VCPP requires its presense
60 *
61 * Revision 1.9  2001/05/23 20:35:03  tng
62 * IDOM: Move operator delete to VCPPDefs.hpp as only VCPP needs a matching delete operator.
63 *
64 * Revision 1.8  2001/03/02 20:53:08  knoaman
65 * Schema: Regular expression - misc. updates for error messages,
66 * and additions of new functions to XMLString class.
67 *
68 * Revision 1.7  2000/06/16 21:13:23  rahulj
69 * Add 'D' suffix to the library name for the 'DEBUG' build
70 * configuration.
71 *
72 * Revision 1.6  2000/03/02 19:55:09  roddey
73 * This checkin includes many changes done while waiting for the
74 * 1.1.0 code to be finished. I can't list them all here, but a list is
75 * available elsewhere.
76 *
77 * Revision 1.5  2000/02/06 07:48:18  rahulj
78 * Year 2K copyright swat.
79 *
80 * Revision 1.4  2000/01/14 01:19:22  roddey
81 * Added a define of XML_LSTRSUPPORT to indicate supoprt of L"" type
82 * prefixes on this compiler.
83 *
84 * Revision 1.3  2000/01/14 00:51:30  roddey
85 * Added the requested XMLStrL() macro to support some portable
86 * optimization of DOM code. This still needs to be added to the other
87 * per-compiler files.
88 *
89 * Revision 1.2  1999/11/10 21:26:14  abagchi
90 * Changed the DLL name
91 *
92 * Revision 1.1.1.1  1999/11/09 01:07:41  twl
93 * Initial checkin
94 *
95 * Revision 1.3  1999/11/08 20:45:25  rahul
96 * Swat for adding in Product name and CVS comment log variable.
97 *
98 */
99
100#if !defined(VCPPDEFS_HPP)
101#define VCPPDEFS_HPP
102
103// ---------------------------------------------------------------------------
104//  Include some runtime files that will be needed product wide
105// ---------------------------------------------------------------------------
106#include <sys/types.h>  // for size_t and ssize_t
107#include <limits.h>  // for MAX of size_t and ssize_t
108
109// ---------------------------------------------------------------------------
110//  A define in the build for each project is also used to control whether
111//  the export keyword is from the project's viewpoint or the client's.
112//  These defines provide the platform specific keywords that they need
113//  to do this.
114// ---------------------------------------------------------------------------
115#define PLATFORM_EXPORT     __declspec(dllexport)
116#define PLATFORM_IMPORT     __declspec(dllimport)
117
118// ---------------------------------------------------------------------------
119//  Indicate that we do not support native bools
120//  If the compiler can handle boolean itself, do not define it
121// ---------------------------------------------------------------------------
122// #define NO_NATIVE_BOOL
123
124// ---------------------------------------------------------------------------
125//  Each compiler might support L"" prefixed constants. There are places
126//  where it is advantageous to use the L"" where it supported, to avoid
127//  unnecessary transcoding.
128//  If your compiler does not support it, don't define this.
129// ---------------------------------------------------------------------------
130#define XML_LSTRSUPPORT
131
132// ---------------------------------------------------------------------------
133//  Indicate that we support C++ namespace
134//  Do not define it if the compile cannot handle C++ namespace
135// ---------------------------------------------------------------------------
136#define XERCES_HAS_CPP_NAMESPACE
137
138// ---------------------------------------------------------------------------
139//  Define our version of the XML character
140// ---------------------------------------------------------------------------
141typedef unsigned short  XMLCh;
142
143// ---------------------------------------------------------------------------
144//  Define unsigned 16 and 32 bits integers
145// ---------------------------------------------------------------------------
146typedef unsigned short  XMLUInt16;
147typedef unsigned int    XMLUInt32;
148
149// ---------------------------------------------------------------------------
150//  Define signed 32 bits integers
151// ---------------------------------------------------------------------------
152typedef int             XMLInt32;
153
154// ---------------------------------------------------------------------------
155//  XMLSize_t is the unsigned integral type.
156// ---------------------------------------------------------------------------
157#if defined(_SIZE_T) && defined(SIZE_MAX) && defined(_SSIZE_T) && defined(SSIZE_MAX)
158    typedef size_t              XMLSize_t;
159    #define XML_SIZE_MAX        SIZE_MAX
160    typedef ssize_t             XMLSSize_t;
161    #define XML_SSIZE_MAX       SSIZE_MAX
162#else
163    typedef unsigned long       XMLSize_t;
164    #define XML_SIZE_MAX        ULONG_MAX
165    typedef long                XMLSSize_t;
166    #define XML_SSIZE_MAX       LONG_MAX
167#endif
168
169// ---------------------------------------------------------------------------
170//  Force on the Xerces debug token if it was on in the build environment
171// ---------------------------------------------------------------------------
172#if defined(_DEBUG)
173#define XERCES_DEBUG
174#endif
175
176#if _MSC_VER > 1300
177#define XERCES_NEW_IOSTREAMS
178#define XERCES_STD_NAMESPACE
179#endif
180
181// ---------------------------------------------------------------------------
182//  The name of the DLL that is built by the Visual C++ version of the
183//  system. We append a previously defined token which holds the DLL
184//  versioning string. This is defined in XercesDefs.hpp which is what this
185//  file is included into.
186// ---------------------------------------------------------------------------
187#if defined(XERCES_DEBUG)
188const char* const Xerces_DLLName = "xerces-c_" Xerces_DLLVersionStr "D";
189#else
190const char* const Xerces_DLLName = "xerces-c_" Xerces_DLLVersionStr;
191#endif
192
193
194#endif //VCPPDEFS_HPP
195
Note: See TracBrowser for help on using the repository browser.