source: NonGTP/Xerces/xerces-c_2_8_0/include/xercesc/util/Compilers/BorlandCDefs.hpp @ 2674

Revision 2674, 5.7 KB checked in by mattausch, 16 years ago (diff)
Line 
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements.  See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License.  You may obtain a copy of the License at
8 *
9 *      http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18/*
19 * $Id: BorlandCDefs.hpp 568078 2007-08-21 11:43:25Z amassari $
20 */
21
22#if !defined(BORLANDCDEFS_HPP)
23#define BORLANDCDEFS_HPP
24
25// ---------------------------------------------------------------------------
26// The following values represent various compiler version levels stored in
27// the precompiler macro __BORLANDC__, along with the associated C++Builder
28// IDE and compiler versions.
29//
30//      __BORLANDC__         IDE             Compiler
31//      ------------    --------------  ------------------
32//         0x510        BCB1            Borland C++ 5.1
33//         0x530        BCB3            Borland C++ 5.3
34//         0x540        BCB4            Borland C++ 5.4
35//         0x550        BCB5            Borland C++ 5.5
36//         0x551        BCB5 (patch 1)  Borland C++ 5.5.1
37//
38// Thus, a single copy of this file may be used to define a build environment
39// for any Borland C++Builder compiler.
40// ---------------------------------------------------------------------------
41
42// ---------------------------------------------------------------------------
43//  Include some runtime files that will be needed product wide
44// ---------------------------------------------------------------------------
45#include <sys/types.h>  // for size_t and ssize_t
46#include <limits.h>  // for MAX of size_t and ssize_t
47
48// ---------------------------------------------------------------------------
49//  A define in the build for each project is also used to control whether
50//  the export keyword is from the project's viewpoint or the client's.
51//  These defines provide the platform specific keywords that they need
52//  to do this.
53// ---------------------------------------------------------------------------
54#define PLATFORM_EXPORT     __declspec(dllexport)
55#define PLATFORM_IMPORT     __declspec(dllimport)
56
57// ---------------------------------------------------------------------------
58//  Indicate that we do not support native bools
59//  If the compiler can handle boolean itself, do not define it
60// ---------------------------------------------------------------------------
61// #define NO_NATIVE_BOOL
62
63// ---------------------------------------------------------------------------
64//  Each compiler might support L"" prefixed constants. There are places
65//  where it is advantageous to use the L"" where it supported, to avoid
66//  unnecessary transcoding.
67//  If your compiler does not support it, don't define this.
68// ---------------------------------------------------------------------------
69#define XML_LSTRSUPPORT
70
71// ---------------------------------------------------------------------------
72//  Indicate that we support C++ namespace
73//  Do not define it if the compile cannot handle C++ namespace
74// ---------------------------------------------------------------------------
75#define XERCES_HAS_CPP_NAMESPACE
76
77// ---------------------------------------------------------------------------
78//  Define our version of the XML character
79// ---------------------------------------------------------------------------
80#if (__BORLANDC__ < 0x540)
81typedef unsigned short  XMLCh;
82#else
83typedef wchar_t  XMLCh;
84#endif (__BORLANDC__ < 0x540)
85
86// ---------------------------------------------------------------------------
87//  Define unsigned 16 and 32 bits integers
88// ---------------------------------------------------------------------------
89typedef unsigned short  XMLUInt16;
90typedef unsigned int    XMLUInt32;
91
92// ---------------------------------------------------------------------------
93//  Define signed 32 bits integers
94// ---------------------------------------------------------------------------
95typedef int             XMLInt32;
96
97// ---------------------------------------------------------------------------
98//  XMLSize_t is the unsigned integral type.
99// ---------------------------------------------------------------------------
100#if defined(_SIZE_T) && defined(SIZE_MAX) && defined(_SSIZE_T) && defined(SSIZE_MAX)
101    typedef size_t              XMLSize_t;
102    #define XML_SIZE_MAX        SIZE_MAX
103    typedef ssize_t             XMLSSize_t;
104    #define XML_SSIZE_MAX       SSIZE_MAX
105#else
106    typedef unsigned long       XMLSize_t;
107    #define XML_SIZE_MAX        ULONG_MAX
108    typedef long                XMLSSize_t;
109    #define XML_SSIZE_MAX       LONG_MAX
110#endif
111
112
113//WLH-2000-08-18 -- Add more compiler quirk cross-defines
114#define _itoa  std::itoa
115
116
117// ---------------------------------------------------------------------------
118//  Force on the Xerces debug token if it was on in the build environment
119// ---------------------------------------------------------------------------
120#ifdef _DEBUG
121#define XERCES_DEBUG
122#endif
123
124
125// ---------------------------------------------------------------------------
126//  The name of the DLL as built by the Borland projects. At this time, it
127//  does not use the versioning stuff.
128// ---------------------------------------------------------------------------
129const char* const Xerces_DLLName = "XercesLib";
130
131#endif //BORLANDCDEFS_HPP
Note: See TracBrowser for help on using the repository browser.