secureswitools/swisistools/source/xmlparser/xerces/include/xercesc/util/AutoSense.hpp
changeset 0 ba25891c3a9e
child 1 c42dffbd5b4f
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 /*
       
    18  * Licensed to the Apache Software Foundation (ASF) under one or more
       
    19  * contributor license agreements.  See the NOTICE file distributed with
       
    20  * this work for additional information regarding copyright ownership.
       
    21  * The ASF licenses this file to You under the Apache License, Version 2.0
       
    22  * (the "License"); you may not use this file except in compliance with
       
    23  * the License.  You may obtain a copy of the License at
       
    24  * 
       
    25  *      http://www.apache.org/licenses/LICENSE-2.0
       
    26  * 
       
    27  * Unless required by applicable law or agreed to in writing, software
       
    28  * distributed under the License is distributed on an "AS IS" BASIS,
       
    29  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       
    30  * See the License for the specific language governing permissions and
       
    31  * limitations under the License.
       
    32  */
       
    33 
       
    34 /*
       
    35  * $Id: AutoSense.hpp 568078 2007-08-21 11:43:25Z amassari $
       
    36  */
       
    37 
       
    38 #ifndef AUTOSENSE_HPP
       
    39 #define AUTOSENSE_HPP
       
    40 
       
    41 // ---------------------------------------------------------------------------
       
    42 //  This section attempts to auto detect the operating system. It will set
       
    43 //  up XercesC specific defines that are used by the rest of the code.
       
    44 // ---------------------------------------------------------------------------
       
    45 #if defined(_AIX)
       
    46     #define XML_AIX
       
    47     #define XML_UNIX
       
    48     #if defined(_AIXVERSION_430)
       
    49         #define XML_AIX43  // for use of POSIX compliant pthread functions
       
    50     #endif
       
    51 #elif defined(_SEQUENT_)
       
    52     #define XML_PTX
       
    53     #define XML_UNIX
       
    54 #elif defined(_HP_UX) || defined(__hpux) || defined(_HPUX_SOURCE)
       
    55     #define XML_HPUX
       
    56     #define XML_UNIX
       
    57 #elif defined(SOLARIS) || defined(__SVR4)
       
    58     #define XML_SOLARIS
       
    59     #define XML_UNIX
       
    60 #elif defined(_SCO_DS)
       
    61     #define XML_OPENSERVER
       
    62     #define XML_UNIX
       
    63 #elif defined(__UNIXWARE__) || defined(__USLC__)
       
    64     #define XML_UNIXWARE
       
    65     #define XML_UNIX
       
    66 #elif defined(__BEOS__)
       
    67     #define XML_BEOS
       
    68     #define XML_UNIX
       
    69 #elif defined(__QNXNTO__)
       
    70     #define XML_QNX
       
    71     #define XML_UNIX
       
    72 #elif defined(__linux__)
       
    73     #define XML_LINUX
       
    74     #define XML_UNIX
       
    75     #if defined(__s390__)
       
    76         #define XML_LINUX_390
       
    77     #endif
       
    78 #elif defined(__FreeBSD__)
       
    79     #define XML_FREEBSD
       
    80     #define XML_UNIX
       
    81 #elif defined(IRIX) || defined(__sgi)
       
    82     #define XML_IRIX
       
    83     #define XML_UNIX
       
    84 #elif defined(__MVS__)
       
    85     #define XML_OS390
       
    86     #define XML_UNIX
       
    87 #elif defined(EXM_OS390)
       
    88     #define XML_OS390
       
    89     #define XML_UNIX
       
    90 #elif defined(__OS400__)
       
    91     #define XML_AS400
       
    92     #define XML_UNIX
       
    93 #elif defined(__OS2__)
       
    94     #define XML_OS2
       
    95 #elif defined(__TANDEM)
       
    96     #define XML_TANDEM
       
    97     #define XML_UNIX
       
    98     #define XML_CSET
       
    99 #elif defined(__CYGWIN__)
       
   100     #define XML_CYGWIN
       
   101     #ifndef WIN32
       
   102       #define WIN32
       
   103     #endif
       
   104 #elif defined(_WIN32) || defined(WIN32)
       
   105     #define XML_WIN32
       
   106     #ifndef WIN32
       
   107       #define WIN32
       
   108     #endif
       
   109 #elif defined(__WINDOWS__)
       
   110 
       
   111     // IBM VisualAge special handling
       
   112     #if defined(__32BIT__)
       
   113         #define XML_WIN32
       
   114     #else
       
   115         #define XML_WIN16
       
   116     #endif
       
   117 #elif defined(__MSDXML__)
       
   118     #define XML_DOS
       
   119 
       
   120 #elif defined(macintosh) || (defined(__APPLE__) && defined(__MACH__))
       
   121     #define XML_MACOS
       
   122 #elif defined(__alpha) && defined(__osf__)
       
   123     #define XML_TRU64
       
   124 #elif defined(__NetBSD__)
       
   125     #define XML_NETBSD
       
   126 #elif defined(__INTERIX)
       
   127     #define XML_INTERIX
       
   128     #define XML_UNIX
       
   129 #else
       
   130     #error Code requires port to host OS!
       
   131 #endif
       
   132 
       
   133 
       
   134 // ---------------------------------------------------------------------------
       
   135 //  This section attempts to autodetect the compiler being used. It will set
       
   136 //  up Xerces specific defines that can be used by the rest of the code.
       
   137 // ---------------------------------------------------------------------------
       
   138 #if defined(__BORLANDC__)
       
   139     #define XML_BORLAND
       
   140 #elif defined(_MSC_VER)
       
   141     #define XML_VISUALCPP
       
   142 #elif defined(XML_SOLARIS)
       
   143     #if defined(__SUNPRO_CC) && (__SUNPRO_CC >=0x500)
       
   144         #define XML_SUNCC5
       
   145 	#elif defined(__SUNPRO_CC) && (__SUNPRO_CC <0x500)
       
   146         #define XML_SUNCC
       
   147     #elif defined(_EDG_RUNTIME_USES_NAMESPACES)
       
   148         #define XML_SOLARIS_KAICC
       
   149     #elif defined(__GNUG__)
       
   150 		#define XML_GCC
       
   151     #else
       
   152         #error Code requires port to current development environment
       
   153     #endif
       
   154 #elif defined (__QNXNTO__)
       
   155     #define XML_QCC
       
   156 #elif defined(__IBMC__) || defined(__IBMCPP__)
       
   157     #if defined(XML_WIN32)
       
   158         #define XML_IBMVAW32
       
   159     #elif defined(XML_OS2)
       
   160         #define XML_IBMVAOS2
       
   161         #if (__IBMC__ >= 400 || __IBMCPP__ >= 400)
       
   162             #define XML_IBMVA4_OS2
       
   163         #endif
       
   164     #elif defined(XML_AIX) || defined(__linux__)
       
   165         #define XML_CSET              
       
   166     #elif defined(__MVS__) && defined(__cplusplus)
       
   167         #define XML_MVSCPP
       
   168     #elif defined(EXM_OS390) && defined(__cplusplus)
       
   169         #define XML_MVSCPP
       
   170     #endif
       
   171 #elif defined (__GNUG__) || defined(__BEOS__) || defined(__linux__) || defined(__CYGWIN__)
       
   172     #define XML_GCC
       
   173 #elif defined(XML_HPUX)
       
   174     #if defined(EXM_HPUX)
       
   175         #define XML_HPUX_KAICC
       
   176     #elif (__cplusplus == 1)
       
   177         #define XML_HPUX_CC
       
   178     #elif (__cplusplus == 199707 || __cplusplus == 199711)
       
   179         #define XML_HPUX_aCC
       
   180     #endif
       
   181 #elif defined(XML_IRIX)
       
   182     #define XML_MIPSPRO_CC
       
   183 #elif defined(XML_PTX)
       
   184     #define XML_PTX_CC
       
   185 #elif defined(XML_TANDEM)
       
   186     #define XML_TANDEMCC
       
   187 #elif defined(__MVS__) && defined(__cplusplus)
       
   188     #define XML_MVSCPP
       
   189 #elif defined(EXM_OS390) && defined(__cplusplus)
       
   190     #define XML_MVSCPP
       
   191 #elif defined(XML_TRU64) && defined(__DECCXX)
       
   192     #define XML_DECCXX
       
   193 #elif defined(__MWERKS__)
       
   194     #define XML_METROWERKS
       
   195 #elif defined(__OS400__)
       
   196 #elif defined(XML_UNIXWARE)
       
   197     #define XML_SCOCC
       
   198 #else
       
   199     #error Code requires port to current development environment
       
   200 #endif
       
   201 
       
   202 // ---------------------------------------------------------------------------
       
   203 //  The gcc compiler 2.95... is generating an internal error for some template
       
   204 //  definitions. So, if we are compiling with gcc, have a specific define that
       
   205 //  we can later use in the code.
       
   206 // ---------------------------------------------------------------------------
       
   207 #if defined(__GNUC__)
       
   208 #define XML_GCC_VERSION (__GNUC__ * 10000 \
       
   209                          + __GNUC_MINOR__ * 100 \
       
   210                          + __GNUC_PATCHLEVEL__)
       
   211 #endif
       
   212 
       
   213 
       
   214 #endif