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

Revision 358, 5.6 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 * $Id: BorlandCDefs.hpp,v 1.7 2004/09/08 13:56:32 peiyongz Exp $
19 */
20
21#if !defined(BORLANDCDEFS_HPP)
22#define BORLANDCDEFS_HPP
23
24// ---------------------------------------------------------------------------
25// The following values represent various compiler version levels stored in
26// the precompiler macro __BORLANDC__, along with the associated C++Builder
27// IDE and compiler versions.
28//
29//      __BORLANDC__         IDE             Compiler
30//      ------------    --------------  ------------------
31//         0x510        BCB1            Borland C++ 5.1
32//         0x530        BCB3            Borland C++ 5.3
33//         0x540        BCB4            Borland C++ 5.4
34//         0x550        BCB5            Borland C++ 5.5
35//         0x551        BCB5 (patch 1)  Borland C++ 5.5.1
36//
37// Thus, a single copy of this file may be used to define a build environment
38// for any Borland C++Builder compiler.
39// ---------------------------------------------------------------------------
40
41// ---------------------------------------------------------------------------
42//  Include some runtime files that will be needed product wide
43// ---------------------------------------------------------------------------
44#include <sys/types.h>  // for size_t and ssize_t
45#include <limits.h>  // for MAX of size_t and ssize_t
46
47// ---------------------------------------------------------------------------
48//  A define in the build for each project is also used to control whether
49//  the export keyword is from the project's viewpoint or the client's.
50//  These defines provide the platform specific keywords that they need
51//  to do this.
52// ---------------------------------------------------------------------------
53#define PLATFORM_EXPORT     __declspec(dllexport)
54#define PLATFORM_IMPORT     __declspec(dllimport)
55
56// ---------------------------------------------------------------------------
57//  Indicate that we do not support native bools
58//  If the compiler can handle boolean itself, do not define it
59// ---------------------------------------------------------------------------
60// #define NO_NATIVE_BOOL
61
62// ---------------------------------------------------------------------------
63//  Each compiler might support L"" prefixed constants. There are places
64//  where it is advantageous to use the L"" where it supported, to avoid
65//  unnecessary transcoding.
66//  If your compiler does not support it, don't define this.
67// ---------------------------------------------------------------------------
68#define XML_LSTRSUPPORT
69
70// ---------------------------------------------------------------------------
71//  Indicate that we support C++ namespace
72//  Do not define it if the compile cannot handle C++ namespace
73// ---------------------------------------------------------------------------
74#define XERCES_HAS_CPP_NAMESPACE
75
76// ---------------------------------------------------------------------------
77//  Define our version of the XML character
78// ---------------------------------------------------------------------------
79#if (__BORLANDC__ < 0x540)
80typedef unsigned short  XMLCh;
81#else
82typedef wchar_t  XMLCh;
83#endif (__BORLANDC__ < 0x540)
84
85// ---------------------------------------------------------------------------
86//  Define unsigned 16 and 32 bits integers
87// ---------------------------------------------------------------------------
88typedef unsigned short  XMLUInt16;
89typedef unsigned int    XMLUInt32;
90
91// ---------------------------------------------------------------------------
92//  Define signed 32 bits integers
93// ---------------------------------------------------------------------------
94typedef int             XMLInt32;
95
96// ---------------------------------------------------------------------------
97//  XMLSize_t is the unsigned integral type.
98// ---------------------------------------------------------------------------
99#if defined(_SIZE_T) && defined(SIZE_MAX) && defined(_SSIZE_T) && defined(SSIZE_MAX)
100    typedef size_t              XMLSize_t;
101    #define XML_SIZE_MAX        SIZE_MAX
102    typedef ssize_t             XMLSSize_t;
103    #define XML_SSIZE_MAX       SSIZE_MAX
104#else
105    typedef unsigned long       XMLSize_t;
106    #define XML_SIZE_MAX        ULONG_MAX
107    typedef long                XMLSSize_t;
108    #define XML_SSIZE_MAX       LONG_MAX
109#endif
110
111
112//WLH-2000-08-18 -- Add more compiler quirk cross-defines
113#define _itoa  std::itoa
114
115
116// ---------------------------------------------------------------------------
117//  Force on the Xerces debug token if it was on in the build environment
118// ---------------------------------------------------------------------------
119#ifdef _DEBUG
120#define XERCES_DEBUG
121#endif
122
123
124// ---------------------------------------------------------------------------
125//  The name of the DLL as built by the Borland projects. At this time, it
126//  does not use the versioning stuff.
127// ---------------------------------------------------------------------------
128const char* const Xerces_DLLName = "XercesLib";
129
130#endif //BORLANDCDEFS_HPP
Note: See TracBrowser for help on using the repository browser.