http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Home

Readme
Release Info

Installation
Download
Build

FAQs
Samples
API Docs

DOM C++ Binding
Programming
Migration Guide

Feedback
Bug-Reporting
PDF Document

CVS Repository
Mail Archive

API Docs for SAX and DOM
 

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

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  * $Log: AutoSense.hpp,v $
00019  * Revision 1.15  2004/09/08 13:56:21  peiyongz
00020  * Apache License Version 2.0
00021  *
00022  * Revision 1.14  2004/02/17 15:56:50  neilg
00023  * fix for bug 25035; much thanks to Abe Backus
00024  *
00025  * Revision 1.13  2004/02/04 13:26:44  amassari
00026  * Added support for the Interix platform (Windows Services for Unix 3.5)
00027  *
00028  * Revision 1.12  2003/05/21 21:08:04  knoaman
00029  * gcc 2.95.x is generating an internal error for some template definitions, so
00030  * we use the default memory manger in such cases.
00031  *
00032  * Revision 1.11  2003/05/12 09:44:19  gareth
00033  * Port to NetBSD. Patch by Hiramatsu Yoshifumi.
00034  *
00035  * Revision 1.10  2003/03/27 16:16:43  tng
00036  * use __IBMCPP__ instead of __xlC__ to determine xlC compiler
00037  *
00038  * Revision 1.9  2003/03/13 22:11:46  tng
00039  * [Bug 17858] Support for QNX/Neutrino.  Patch from Chris McKillop.
00040  *
00041  * Revision 1.8  2002/12/02 20:40:49  tng
00042  * [Bug 12490] Patches required to build Xerces-C++ on BeOS R5.  Patch from Andrew Bachmann.
00043  *
00044  * Revision 1.7  2002/10/29 18:58:33  tng
00045  * Support for Linux/390
00046  *
00047  * Revision 1.6  2002/08/23 20:56:00  tng
00048  * [Bug 11981] inproper "AND" operator in AutoSense.hpp.
00049  *
00050  * Revision 1.5  2002/08/19 18:35:56  tng
00051  * [Bug 6467] Installing Xerces C++ on cygwin environment.
00052  *
00053  * Revision 1.4  2002/07/12 16:48:49  jberry
00054  * Remove reliance on XML_MACOSX. XML_MACOS is used solely. Where qualification
00055  * by compiler is required, look for the compiler explicitly such as with
00056  * XML_METROWERKS or __APPLE__ (for the Apple GCC compiler).
00057  *
00058  * Add a few tweaks for compatibility with GCC3.1.
00059  *
00060  * This change may address Bug 10649.
00061  *
00062  * Revision 1.3  2002/03/04 20:31:14  tng
00063  * [Bug 2868] AIX 4.3.3 mutex/atomic-operation changes for build.
00064  *
00065  * Revision 1.2  2002/02/27 22:38:34  peiyongz
00066  * Bug# 6445 Caldera (SCO) OpenServer Port : patch from Martin Kalen
00067  *
00068  * Revision 1.1.1.1  2002/02/01 22:22:09  peiyongz
00069  * sane_include
00070  *
00071  * Revision 1.21  2001/11/29 18:25:18  tng
00072  * FreeBSD support by Michael Huedepohl.
00073  *
00074  * Revision 1.20  2001/05/11 13:26:26  tng
00075  * Copyright update.
00076  *
00077  * Revision 1.19  2001/03/23 19:01:25  tng
00078  * [Bug 1018]  AutoSense looks for "IRIX" when it should look for "sgi" or "__sgi".  By Jeff Harrell.
00079  *
00080  * Revision 1.18  2001/02/09 14:40:01  tng
00081  * Update support for SCO UnixWare 7 (gcc).  Tested under UnixWare 7.1.1 with gcc version 2.95.2 19991024 (release) with gmake 3.79.1.  Updated by Martin Kalen.
00082  *
00083  * Revision 1.17  2001/01/26 21:59:25  tng
00084  * Change bug-todo list to xml format.  Other documentation fixes.
00085  *
00086  * Revision 1.16  2000/10/09 18:15:43  jberry
00087  * Modify sensing of Mac OS X.
00088  * PR:
00089  * Obtained from:
00090  * Submitted by:
00091  * Reviewed by:
00092  * PR:
00093  * Obtained from:
00094  * Submitted by:
00095  * Reviewed by:
00096  *
00097  * Revision 1.15  2000/09/21 00:54:18  aruna1
00098  * OS2 related changes given by Bill Schindler
00099  *
00100  * Revision 1.14  2000/08/01 18:26:02  aruna1
00101  * Tru64 support added
00102  *
00103  * Revision 1.13  2000/07/18 18:25:58  andyh
00104  * Mac OS update.
00105  * Contributed by James Berry <jberry@criticalpath.com>
00106  *
00107  * Revision 1.12  2000/04/04 20:11:29  abagchi
00108  * Added PTX support
00109  *
00110  * Revision 1.11  2000/03/02 19:54:37  roddey
00111  * This checkin includes many changes done while waiting for the
00112  * 1.1.0 code to be finished. I can't list them all here, but a list is
00113  * available elsewhere.
00114  *
00115  * Revision 1.10  2000/03/02 01:51:00  aruna1
00116  * Sun CC 5.0 related changes
00117  *
00118  * Revision 1.9  2000/02/24 20:05:23  abagchi
00119  * Swat for removing Log from API docs
00120  *
00121  * Revision 1.8  2000/02/22 01:00:10  aruna1
00122  * GNUGDefs references removed. Now only GCCDefs is used instead
00123  *
00124  * Revision 1.7  2000/02/06 07:48:00  rahulj
00125  * Year 2K copyright swat.
00126  *
00127  * Revision 1.6  2000/02/01 23:43:22  abagchi
00128  * AS/400 related change
00129  *
00130  * Revision 1.5  2000/01/21 22:12:29  abagchi
00131  * OS390 Change: changed OE390 to OS390
00132  *
00133  * Revision 1.4  1999/12/18 00:47:01  rahulj
00134  * Merged in some changes for OS390.
00135  *
00136  * Revision 1.3  1999/12/17 01:28:53  rahulj
00137  * Merged in changes submitted for UnixWare 7 port. Platform
00138  * specific files are still missing.
00139  *
00140  * Revision 1.2  1999/12/01 17:16:16  rahulj
00141  * Added support for IRIX 6.5.5 using SGI MIPSpro C++ 7.3 and 7.21 generating 32 bit objects. Changes submitted by Marc Stuessel
00142  *
00143  * Revision 1.1.1.1  1999/11/09 01:03:55  twl
00144  * Initial checkin
00145  *
00146  * Revision 1.2  1999/11/08 20:45:03  rahul
00147  * Swat for adding in Product name and CVS comment log variable.
00148  *
00149  */
00150 
00151 #ifndef AUTOSENSE_HPP
00152 #define AUTOSENSE_HPP
00153 
00154 // ---------------------------------------------------------------------------
00155 //  This section attempts to auto detect the operating system. It will set
00156 //  up XercesC specific defines that are used by the rest of the code.
00157 // ---------------------------------------------------------------------------
00158 #if defined(_AIX)
00159     #define XML_AIX
00160     #define XML_UNIX
00161     #if defined(_AIXVERSION_430)
00162         #define XML_AIX43  // for use of POSIX compliant pthread functions
00163     #endif
00164 #elif defined(_SEQUENT_)
00165     #define XML_PTX
00166     #define XML_UNIX
00167 #elif defined(_HP_UX) || defined(__hpux) || defined(_HPUX_SOURCE)
00168     #define XML_HPUX
00169     #define XML_UNIX
00170 #elif defined(SOLARIS) || defined(__SVR4)
00171     #define XML_SOLARIS
00172     #define XML_UNIX
00173 #elif defined(_SCO_DS)
00174     #define XML_OPENSERVER
00175     #define XML_UNIX
00176 #elif defined(__UNIXWARE__) || defined(__USLC__)
00177     #define XML_UNIXWARE
00178     #define XML_UNIX
00179 #elif defined(__BEOS__)
00180     #define XML_BEOS
00181     #define XML_UNIX
00182 #elif defined(__QNXNTO__)
00183     #define XML_QNX
00184     #define XML_UNIX
00185 #elif defined(__linux__)
00186     #define XML_LINUX
00187     #define XML_UNIX
00188     #if defined(__s390__)
00189         #define XML_LINUX_390
00190     #endif
00191 #elif defined(__FreeBSD__)
00192     #define XML_FREEBSD
00193     #define XML_UNIX
00194 #elif defined(IRIX) || defined(__sgi)
00195     #define XML_IRIX
00196     #define XML_UNIX
00197 #elif defined(__MVS__)
00198     #define XML_OS390
00199     #define XML_UNIX
00200 #elif defined(EXM_OS390)
00201     #define XML_OS390
00202     #define XML_UNIX
00203 #elif defined(__OS400__)
00204     #define XML_AS400
00205     #define XML_UNIX
00206 #elif defined(__OS2__)
00207     #define XML_OS2
00208 #elif defined(__TANDEM)
00209     #define XML_TANDEM
00210     #define XML_UNIX
00211     #define XML_CSET
00212 #elif defined(__CYGWIN__)
00213     #define XML_CYGWIN
00214     #ifndef WIN32
00215       #define WIN32
00216     #endif
00217 #elif defined(_WIN32) || defined(WIN32)
00218     #define XML_WIN32
00219     #ifndef WIN32
00220       #define WIN32
00221     #endif
00222 #elif defined(__WINDOWS__)
00223 
00224     // IBM VisualAge special handling
00225     #if defined(__32BIT__)
00226         #define XML_WIN32
00227     #else
00228         #define XML_WIN16
00229     #endif
00230 #elif defined(__MSDXML__)
00231     #define XML_DOS
00232 
00233 #elif defined(macintosh) || (defined(__APPLE__) && defined(__MACH__))
00234     #define XML_MACOS
00235 #elif defined(__alpha) && defined(__osf__)
00236     #define XML_TRU64
00237 #elif defined(__NetBSD__)
00238     #define XML_NETBSD
00239 #elif defined(__INTERIX)
00240     #define XML_INTERIX
00241     #define XML_UNIX
00242 #else
00243     #error Code requires port to host OS!
00244 #endif
00245 
00246 
00247 // ---------------------------------------------------------------------------
00248 //  This section attempts to autodetect the compiler being used. It will set
00249 //  up Xerces specific defines that can be used by the rest of the code.
00250 // ---------------------------------------------------------------------------
00251 #if defined(__BORLANDC__)
00252     #define XML_BORLAND
00253 #elif defined(_MSC_VER)
00254     #define XML_VISUALCPP
00255 #elif defined(XML_SOLARIS)
00256     #if defined(__SUNPRO_CC) && (__SUNPRO_CC >=0x500)
00257         #define XML_SUNCC5
00258     #elif defined(__SUNPRO_CC) && (__SUNPRO_CC <0x500)
00259         #define XML_SUNCC
00260     #elif defined(_EDG_RUNTIME_USES_NAMESPACES)
00261         #define XML_SOLARIS_KAICC
00262     #elif defined(__GNUG__)
00263         #define XML_GCC
00264     #else
00265         #error Code requires port to current development environment
00266     #endif
00267 #elif defined (__QNXNTO__)
00268     #define XML_QCC
00269 #elif defined (__GNUG__) || defined(__BEOS__) || defined(__linux__) || defined(__CYGWIN__)
00270     #define XML_GCC
00271 #elif defined(XML_HPUX)
00272     #if defined(EXM_HPUX)
00273         #define XML_HPUX_KAICC
00274     #elif (__cplusplus == 1)
00275         #define XML_HPUX_CC
00276     #elif (__cplusplus == 199707 || __cplusplus == 199711)
00277         #define XML_HPUX_aCC
00278     #endif
00279 #elif defined(XML_IRIX)
00280     #define XML_MIPSPRO_CC
00281 #elif defined(XML_PTX)
00282     #define XML_PTX_CC
00283 #elif defined(XML_TANDEM)
00284     #define XML_TANDEMCC
00285 #elif defined(__MVS__) && defined(__cplusplus)
00286     #define XML_MVSCPP
00287 #elif defined(EXM_OS390) && defined(__cplusplus)
00288     #define XML_MVSCPP
00289 #elif defined(__IBMC__) || defined(__IBMCPP__)
00290     #if defined(XML_WIN32)
00291         #define XML_IBMVAW32
00292     #elif defined(XML_OS2)
00293         #define XML_IBMVAOS2
00294         #if (__IBMC__ >= 400 || __IBMCPP__ >= 400)
00295             #define XML_IBMVA4_OS2
00296         #endif
00297     #elif defined(XML_AIX)
00298         #define XML_CSET              
00299     #endif
00300 #elif defined(XML_TRU64) && defined(__DECCXX)
00301     #define XML_DECCXX
00302 #elif defined(__MWERKS__)
00303     #define XML_METROWERKS
00304 #elif defined(__OS400__)
00305 #else
00306     #error Code requires port to current development environment
00307 #endif
00308 
00309 // ---------------------------------------------------------------------------
00310 //  The gcc compiler 2.95... is generating an internal error for some template
00311 //  definitions. So, if we are compiling with gcc, have a specific define that
00312 //  we can later use in the code.
00313 // ---------------------------------------------------------------------------
00314 #if defined(__GNUC__)
00315 #define XML_GCC_VERSION (__GNUC__ * 10000 \
00316                          + __GNUC_MINOR__ * 100 \
00317                          + __GNUC_PATCHLEVEL__)
00318 #endif
00319 
00320 
00321 #endif


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