AutoSense.hpp Source File

| 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  * The Apache Software License, Version 1.1
    00003  *
    00004  * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
    00005  * reserved.
    00006  *
    00007  * Redistribution and use in source and binary forms, with or without
    00008  * modification, are permitted provided that the following conditions
    00009  * are met:
    00010  *
    00011  * 1. Redistributions of source code must retain the above copyright
    00012  *    notice, this list of conditions and the following disclaimer.
    00013  *
    00014  * 2. Redistributions in binary form must reproduce the above copyright
    00015  *    notice, this list of conditions and the following disclaimer in
    00016  *    the documentation and/or other materials provided with the
    00017  *    distribution.
    00018  *
    00019  * 3. The end-user documentation included with the redistribution,
    00020  *    if any, must include the following acknowledgment:
    00021  *       "This product includes software developed by the
    00022  *        Apache Software Foundation (http://www.apache.org/)."
    00023  *    Alternately, this acknowledgment may appear in the software itself,
    00024  *    if and wherever such third-party acknowledgments normally appear.
    00025  *
    00026  * 4. The names "Xerces" and "Apache Software Foundation" must
    00027  *    not be used to endorse or promote products derived from this
    00028  *    software without prior written permission. For written
    00029  *    permission, please contact apache\@apache.org.
    00030  *
    00031  * 5. Products derived from this software may not be called "Apache",
    00032  *    nor may "Apache" appear in their name, without prior written
    00033  *    permission of the Apache Software Foundation.
    00034  *
    00035  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    00036  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    00037  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    00038  * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
    00039  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    00040  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    00041  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    00042  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    00043  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    00044  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    00045  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    00046  * SUCH DAMAGE.
    00047  * ====================================================================
    00048  *
    00049  * This software consists of voluntary contributions made by many
    00050  * individuals on behalf of the Apache Software Foundation, and was
    00051  * originally based on software copyright (c) 1999, International
    00052  * Business Machines, Inc., http://www.ibm.com .  For more information
    00053  * on the Apache Software Foundation, please see
    00054  * <http://www.apache.org/>.
    00055  */
    00056
    00057 /*
    00058  * $Log: AutoSense.hpp,v $
    00059  * Revision 1.12  2003/05/21 21:08:04  knoaman
    00060  * gcc 2.95.x is generating an internal error for some template definitions, so
    00061  * we use the default memory manger in such cases.
    00062  *
    00063  * Revision 1.11  2003/05/12 09:44:19  gareth
    00064  * Port to NetBSD. Patch by Hiramatsu Yoshifumi.
    00065  *
    00066  * Revision 1.10  2003/03/27 16:16:43  tng
    00067  * use __IBMCPP__ instead of __xlC__ to determine xlC compiler
    00068  *
    00069  * Revision 1.9  2003/03/13 22:11:46  tng
    00070  * [Bug 17858] Support for QNX/Neutrino.  Patch from Chris McKillop.
    00071  *
    00072  * Revision 1.8  2002/12/02 20:40:49  tng
    00073  * [Bug 12490] Patches required to build Xerces-C++ on BeOS R5.  Patch from Andrew Bachmann.
    00074  *
    00075  * Revision 1.7  2002/10/29 18:58:33  tng
    00076  * Support for Linux/390
    00077  *
    00078  * Revision 1.6  2002/08/23 20:56:00  tng
    00079  * [Bug 11981] inproper "AND" operator in AutoSense.hpp.
    00080  *
    00081  * Revision 1.5  2002/08/19 18:35:56  tng
    00082  * [Bug 6467] Installing Xerces C++ on cygwin environment.
    00083  *
    00084  * Revision 1.4  2002/07/12 16:48:49  jberry
    00085  * Remove reliance on XML_MACOSX. XML_MACOS is used solely. Where qualification
    00086  * by compiler is required, look for the compiler explicitly such as with
    00087  * XML_METROWERKS or __APPLE__ (for the Apple GCC compiler).
    00088  *
    00089  * Add a few tweaks for compatibility with GCC3.1.
    00090  *
    00091  * This change may address Bug 10649.
    00092  *
    00093  * Revision 1.3  2002/03/04 20:31:14  tng
    00094  * [Bug 2868] AIX 4.3.3 mutex/atomic-operation changes for build.
    00095  *
    00096  * Revision 1.2  2002/02/27 22:38:34  peiyongz
    00097  * Bug# 6445 Caldera (SCO) OpenServer Port : patch from Martin Kalen
    00098  *
    00099  * Revision 1.1.1.1  2002/02/01 22:22:09  peiyongz
    00100  * sane_include
    00101  *
    00102  * Revision 1.21  2001/11/29 18:25:18  tng
    00103  * FreeBSD support by Michael Huedepohl.
    00104  *
    00105  * Revision 1.20  2001/05/11 13:26:26  tng
    00106  * Copyright update.
    00107  *
    00108  * Revision 1.19  2001/03/23 19:01:25  tng
    00109  * [Bug 1018]  AutoSense looks for "IRIX" when it should look for "sgi" or "__sgi".  By Jeff Harrell.
    00110  *
    00111  * Revision 1.18  2001/02/09 14:40:01  tng
    00112  * 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.
    00113  *
    00114  * Revision 1.17  2001/01/26 21:59:25  tng
    00115  * Change bug-todo list to xml format.  Other documentation fixes.
    00116  *
    00117  * Revision 1.16  2000/10/09 18:15:43  jberry
    00118  * Modify sensing of Mac OS X.
    00119  * PR:
    00120  * Obtained from:
    00121  * Submitted by:
    00122  * Reviewed by:
    00123  * PR:
    00124  * Obtained from:
    00125  * Submitted by:
    00126  * Reviewed by:
    00127  *
    00128  * Revision 1.15  2000/09/21 00:54:18  aruna1
    00129  * OS2 related changes given by Bill Schindler
    00130  *
    00131  * Revision 1.14  2000/08/01 18:26:02  aruna1
    00132  * Tru64 support added
    00133  *
    00134  * Revision 1.13  2000/07/18 18:25:58  andyh
    00135  * Mac OS update.
    00136  * Contributed by James Berry <jberry@criticalpath.com>
    00137  *
    00138  * Revision 1.12  2000/04/04 20:11:29  abagchi
    00139  * Added PTX support
    00140  *
    00141  * Revision 1.11  2000/03/02 19:54:37  roddey
    00142  * This checkin includes many changes done while waiting for the
    00143  * 1.1.0 code to be finished. I can't list them all here, but a list is
    00144  * available elsewhere.
    00145  *
    00146  * Revision 1.10  2000/03/02 01:51:00  aruna1
    00147  * Sun CC 5.0 related changes
    00148  *
    00149  * Revision 1.9  2000/02/24 20:05:23  abagchi
    00150  * Swat for removing Log from API docs
    00151  *
    00152  * Revision 1.8  2000/02/22 01:00:10  aruna1
    00153  * GNUGDefs references removed. Now only GCCDefs is used instead
    00154  *
    00155  * Revision 1.7  2000/02/06 07:48:00  rahulj
    00156  * Year 2K copyright swat.
    00157  *
    00158  * Revision 1.6  2000/02/01 23:43:22  abagchi
    00159  * AS/400 related change
    00160  *
    00161  * Revision 1.5  2000/01/21 22:12:29  abagchi
    00162  * OS390 Change: changed OE390 to OS390
    00163  *
    00164  * Revision 1.4  1999/12/18 00:47:01  rahulj
    00165  * Merged in some changes for OS390.
    00166  *
    00167  * Revision 1.3  1999/12/17 01:28:53  rahulj
    00168  * Merged in changes submitted for UnixWare 7 port. Platform
    00169  * specific files are still missing.
    00170  *
    00171  * Revision 1.2  1999/12/01 17:16:16  rahulj
    00172  * 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
    00173  *
    00174  * Revision 1.1.1.1  1999/11/09 01:03:55  twl
    00175  * Initial checkin
    00176  *
    00177  * Revision 1.2  1999/11/08 20:45:03  rahul
    00178  * Swat for adding in Product name and CVS comment log variable.
    00179  *
    00180  */
    00181
    00182 #ifndef AUTOSENSE_HPP
    00183 #define AUTOSENSE_HPP
    00184
    00185 // ---------------------------------------------------------------------------
    00186 //  This section attempts to auto detect the operating system. It will set
    00187 //  up XercesC specific defines that are used by the rest of the code.
    00188 // ---------------------------------------------------------------------------
    00189 #if defined(_AIX)
    00190     #define XML_AIX
    00191     #define XML_UNIX
    00192     #if defined(_AIXVERSION_430)
    00193         #define XML_AIX43  // for use of POSIX compliant pthread functions
    00194     #endif
    00195 #elif defined(_SEQUENT_)
    00196     #define XML_PTX
    00197     #define XML_UNIX
    00198 #elif defined(_HP_UX) || defined(__hpux) || defined(_HPUX_SOURCE)
    00199     #define XML_HPUX
    00200     #define XML_UNIX
    00201 #elif defined(SOLARIS) || defined(__SVR4)
    00202     #define XML_SOLARIS
    00203     #define XML_UNIX
    00204 #elif defined(_SCO_DS)
    00205     #define XML_OPENSERVER
    00206     #define XML_UNIX
    00207 #elif defined(__UNIXWARE__) || defined(__USLC__)
    00208     #define XML_UNIXWARE
    00209     #define XML_UNIX
    00210 #elif defined(__BEOS__)
    00211     #define XML_BEOS
    00212     #define XML_UNIX
    00213 #elif defined(__QNXNTO__)
    00214     #define XML_QNX
    00215     #define XML_UNIX
    00216 #elif defined(__linux__)
    00217     #define XML_LINUX
    00218     #define XML_UNIX
    00219     #if defined(__s390__)
    00220         #define XML_LINUX_390
    00221     #endif
    00222 #elif defined(__FreeBSD__)
    00223     #define XML_FREEBSD
    00224     #define XML_UNIX
    00225 #elif defined(IRIX) || defined(__sgi)
    00226     #define XML_IRIX
    00227     #define XML_UNIX
    00228 #elif defined(__MVS__)
    00229     #define XML_OS390
    00230     #define XML_UNIX
    00231 #elif defined(EXM_OS390)
    00232     #define XML_OS390
    00233     #define XML_UNIX
    00234 #elif defined(__OS400__)
    00235     #define XML_AS400
    00236     #define XML_UNIX
    00237 #elif defined(__OS2__)
    00238     #define XML_OS2
    00239 #elif defined(__TANDEM)
    00240     #define XML_TANDEM
    00241     #define XML_UNIX
    00242     #define XML_CSET
    00243 #elif defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__)
    00244     #define XML_WIN32
    00245     #ifndef WIN32
    00246       #define WIN32
    00247     #endif
    00248 #elif defined(__WINDOWS__)
    00249
    00250     // IBM VisualAge special handling
    00251     #if defined(__32BIT__)
    00252         #define XML_WIN32
    00253     #else
    00254         #define XML_WIN16
    00255     #endif
    00256 #elif defined(__MSDXML__)
    00257     #define XML_DOS
    00258
    00259 #elif defined(macintosh) || (defined(__APPLE__) && defined(__MACH__))
    00260     #define XML_MACOS
    00261 #elif defined(__alpha) && defined(__osf__)
    00262     #define XML_TRU64
    00263 #elif defined(__NetBSD__)
    00264     #define XML_NETBSD
    00265 #else
    00266     #error Code requires port to host OS!
    00267 #endif
    00268
    00269
    00270 // ---------------------------------------------------------------------------
    00271 //  This section attempts to autodetect the compiler being used. It will set
    00272 //  up Xerces specific defines that can be used by the rest of the code.
    00273 // ---------------------------------------------------------------------------
    00274 #if defined(__BORLANDC__)
    00275     #define XML_BORLAND
    00276 #elif defined(_MSC_VER)
    00277     #define XML_VISUALCPP
    00278 #elif defined(XML_SOLARIS)
    00279     #if defined(__SUNPRO_CC) && (__SUNPRO_CC >=0x500)
    00280         #define XML_SUNCC5
    00281     #elif defined(__SUNPRO_CC) && (__SUNPRO_CC <0x500)
    00282         #define XML_SUNCC
    00283     #elif defined(_EDG_RUNTIME_USES_NAMESPACES)
    00284         #define XML_SOLARIS_KAICC
    00285     #elif defined(__GNUG__)
    00286         #define XML_GCC
    00287     #else
    00288         #error Code requires port to current development environment
    00289     #endif
    00290 #elif defined (__QNXNTO__)
    00291     #define XML_QCC
    00292 #elif defined (__GNUG__) || defined(__BEOS__) || defined(__linux__) || defined(__CYGWIN__)
    00293     #define XML_GCC
    00294 #elif defined(XML_HPUX)
    00295     #if defined(EXM_HPUX)
    00296         #define XML_HPUX_KAICC
    00297     #elif (__cplusplus == 1)
    00298         #define XML_HPUX_CC
    00299     #elif (__cplusplus == 199707 || __cplusplus == 199711)
    00300         #define XML_HPUX_aCC
    00301     #endif
    00302 #elif defined(XML_IRIX)
    00303     #define XML_MIPSPRO_CC
    00304 #elif defined(XML_PTX)
    00305     #define XML_PTX_CC
    00306 #elif defined(XML_TANDEM)
    00307     #define XML_TANDEMCC
    00308 #elif defined(__MVS__) && defined(__cplusplus)
    00309     #define XML_MVSCPP
    00310 #elif defined(EXM_OS390) && defined(__cplusplus)
    00311     #define XML_MVSCPP
    00312 #elif defined(__IBMC__) || defined(__IBMCPP__)
    00313     #if defined(XML_WIN32)
    00314         #define XML_IBMVAW32
    00315     #elif defined(XML_OS2)
    00316         #define XML_IBMVAOS2
    00317         #if (__IBMC__ >= 400 || __IBMCPP__ >= 400)
    00318             #define XML_IBMVA4_OS2
    00319         #endif
    00320     #elif defined(XML_AIX)
    00321         #define XML_CSET
    00322     #endif
    00323 #elif defined(XML_TRU64) && defined(__DECCXX)
    00324     #define XML_DECCXX
    00325 #elif defined(__MWERKS__)
    00326     #define XML_METROWERKS
    00327 #elif defined(__OS400__)
    00328 #else
    00329     #error Code requires port to current development environment
    00330 #endif
    00331
    00332 // ---------------------------------------------------------------------------
    00333 //  The gcc compiler 2.95... is generating an internal error for some template
    00334 //  definitions. So, if we are compiling with gcc, have a specific define that
    00335 //  we can later use in the code.
    00336 // ---------------------------------------------------------------------------
    00337 #if defined(__GNUC__)
    00338 #define XML_GCC_VERSION (__GNUC__ * 10000 \
    00339                          + __GNUC_MINOR__ * 100 \
    00340                          + __GNUC_PATCHLEVEL__)
    00341 #endif
    00342
    00343
    00344 #endif

Copyright © 2000 The Apache Software Foundation. All Rights Reserved.