Xerces-C++: AutoSense.hpp Source File

| API Docs for SAX and DOM |
| Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages # AutoSense.hpp Go to the documentation of this file.
    00001 /*
    00002  * Copyright 1999-2002,2004 The Apache Software Foundation.
    00003  *
    00004  * Licensed under the Apache License, Version 2.0 (the "License");
    00005  * you may not use this file except in compliance with the License.
    00006  * You may obtain a copy of the License at
    00007  *
    00008  *      http://www.apache.org/licenses/LICENSE-2.0
    00009  *
    00010  * Unless required by applicable law or agreed to in writing, software
    00011  * distributed under the License is distributed on an "AS IS" BASIS,
    00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00013  * See the License for the specific language governing permissions and
    00014  * limitations under the License.
    00015  */
    00016
    00017 /*
    00018  * $Id: AutoSense.hpp 191054 2005-06-17 02:56:35Z jberry $
    00019  */
    00020
    00021 #ifndef AUTOSENSE_HPP
    00022 #define AUTOSENSE_HPP
    00023
    00024 // ---------------------------------------------------------------------------
    00025 //  This section attempts to auto detect the operating system. It will set
    00026 //  up XercesC specific defines that are used by the rest of the code.
    00027 // ---------------------------------------------------------------------------
    00028 #if defined(_AIX)
    00029     #define XML_AIX
    00030     #define XML_UNIX
    00031     #if defined(_AIXVERSION_430)
    00032         #define XML_AIX43  // for use of POSIX compliant pthread functions
    00033     #endif
    00034 #elif defined(_SEQUENT_)
    00035     #define XML_PTX
    00036     #define XML_UNIX
    00037 #elif defined(_HP_UX) || defined(__hpux) || defined(_HPUX_SOURCE)
    00038     #define XML_HPUX
    00039     #define XML_UNIX
    00040 #elif defined(SOLARIS) || defined(__SVR4)
    00041     #define XML_SOLARIS
    00042     #define XML_UNIX
    00043 #elif defined(_SCO_DS)
    00044     #define XML_OPENSERVER
    00045     #define XML_UNIX
    00046 #elif defined(__UNIXWARE__) || defined(__USLC__)
    00047     #define XML_UNIXWARE
    00048     #define XML_UNIX
    00049 #elif defined(__BEOS__)
    00050     #define XML_BEOS
    00051     #define XML_UNIX
    00052 #elif defined(__QNXNTO__)
    00053     #define XML_QNX
    00054     #define XML_UNIX
    00055 #elif defined(__linux__)
    00056     #define XML_LINUX
    00057     #define XML_UNIX
    00058     #if defined(__s390__)
    00059         #define XML_LINUX_390
    00060     #endif
    00061 #elif defined(__FreeBSD__)
    00062     #define XML_FREEBSD
    00063     #define XML_UNIX
    00064 #elif defined(IRIX) || defined(__sgi)
    00065     #define XML_IRIX
    00066     #define XML_UNIX
    00067 #elif defined(__MVS__)
    00068     #define XML_OS390
    00069     #define XML_UNIX
    00070 #elif defined(EXM_OS390)
    00071     #define XML_OS390
    00072     #define XML_UNIX
    00073 #elif defined(__OS400__)
    00074     #define XML_AS400
    00075     #define XML_UNIX
    00076 #elif defined(__OS2__)
    00077     #define XML_OS2
    00078 #elif defined(__TANDEM)
    00079     #define XML_TANDEM
    00080     #define XML_UNIX
    00081     #define XML_CSET
    00082 #elif defined(__CYGWIN__)
    00083     #define XML_CYGWIN
    00084     #ifndef WIN32
    00085       #define WIN32
    00086     #endif
    00087 #elif defined(_WIN32) || defined(WIN32)
    00088     #define XML_WIN32
    00089     #ifndef WIN32
    00090       #define WIN32
    00091     #endif
    00092 #elif defined(__WINDOWS__)
    00093
    00094     // IBM VisualAge special handling
    00095     #if defined(__32BIT__)
    00096         #define XML_WIN32
    00097     #else
    00098         #define XML_WIN16
    00099     #endif
    00100 #elif defined(__MSDXML__)
    00101     #define XML_DOS
    00102
    00103 #elif defined(macintosh) || (defined(__APPLE__) && defined(__MACH__))
    00104     #define XML_MACOS
    00105 #elif defined(__alpha) && defined(__osf__)
    00106     #define XML_TRU64
    00107 #elif defined(__NetBSD__)
    00108     #define XML_NETBSD
    00109 #elif defined(__INTERIX)
    00110     #define XML_INTERIX
    00111     #define XML_UNIX
    00112 #else
    00113     #error Code requires port to host OS!
    00114 #endif
    00115
    00116
    00117 // ---------------------------------------------------------------------------
    00118 //  This section attempts to autodetect the compiler being used. It will set
    00119 //  up Xerces specific defines that can be used by the rest of the code.
    00120 // ---------------------------------------------------------------------------
    00121 #if defined(__BORLANDC__)
    00122     #define XML_BORLAND
    00123 #elif defined(_MSC_VER)
    00124     #define XML_VISUALCPP
    00125 #elif defined(XML_SOLARIS)
    00126     #if defined(__SUNPRO_CC) && (__SUNPRO_CC >=0x500)
    00127         #define XML_SUNCC5
    00128     #elif defined(__SUNPRO_CC) && (__SUNPRO_CC <0x500)
    00129         #define XML_SUNCC
    00130     #elif defined(_EDG_RUNTIME_USES_NAMESPACES)
    00131         #define XML_SOLARIS_KAICC
    00132     #elif defined(__GNUG__)
    00133         #define XML_GCC
    00134     #else
    00135         #error Code requires port to current development environment
    00136     #endif
    00137 #elif defined (__QNXNTO__)
    00138     #define XML_QCC
    00139 #elif defined(__IBMC__) || defined(__IBMCPP__)
    00140     #if defined(XML_WIN32)
    00141         #define XML_IBMVAW32
    00142     #elif defined(XML_OS2)
    00143         #define XML_IBMVAOS2
    00144         #if (__IBMC__ >= 400 || __IBMCPP__ >= 400)
    00145             #define XML_IBMVA4_OS2
    00146         #endif
    00147     #elif defined(XML_AIX) || defined(__linux__)
    00148         #define XML_CSET
    00149     #elif defined(__MVS__) && defined(__cplusplus)
    00150         #define XML_MVSCPP
    00151     #elif defined(EXM_OS390) && defined(__cplusplus)
    00152         #define XML_MVSCPP
    00153     #endif
    00154 #elif defined (__GNUG__) || defined(__BEOS__) || defined(__linux__) || defined(__CYGWIN__)
    00155     #define XML_GCC
    00156 #elif defined(XML_HPUX)
    00157     #if defined(EXM_HPUX)
    00158         #define XML_HPUX_KAICC
    00159     #elif (__cplusplus == 1)
    00160         #define XML_HPUX_CC
    00161     #elif (__cplusplus == 199707 || __cplusplus == 199711)
    00162         #define XML_HPUX_aCC
    00163     #endif
    00164 #elif defined(XML_IRIX)
    00165     #define XML_MIPSPRO_CC
    00166 #elif defined(XML_PTX)
    00167     #define XML_PTX_CC
    00168 #elif defined(XML_TANDEM)
    00169     #define XML_TANDEMCC
    00170 #elif defined(__MVS__) && defined(__cplusplus)
    00171     #define XML_MVSCPP
    00172 #elif defined(EXM_OS390) && defined(__cplusplus)
    00173     #define XML_MVSCPP
    00174 #elif defined(XML_TRU64) && defined(__DECCXX)
    00175     #define XML_DECCXX
    00176 #elif defined(__MWERKS__)
    00177     #define XML_METROWERKS
    00178 #elif defined(__OS400__)
    00179 #elif defined(XML_UNIXWARE)
    00180     #define XML_SCOCC
    00181 #else
    00182     #error Code requires port to current development environment
    00183 #endif
    00184
    00185 // ---------------------------------------------------------------------------
    00186 //  The gcc compiler 2.95... is generating an internal error for some template
    00187 //  definitions. So, if we are compiling with gcc, have a specific define that
    00188 //  we can later use in the code.
    00189 // ---------------------------------------------------------------------------
    00190 #if defined(__GNUC__)
    00191 #define XML_GCC_VERSION (__GNUC__ * 10000 \
    00192                          + __GNUC_MINOR__ * 100 \
    00193                          + __GNUC_PATCHLEVEL__)
    00194 #endif
    00195
    00196
    00197 #endif

Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved.