xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aparna Vasanth <avasa...@brocade.com>
Subject RE: NO_NATIVE_BOOL
Date Mon, 05 Feb 2001 17:57:43 GMT
Hi Matt.
Actually, I faced the same problem on AIX.
We had the bool definition. I corrected it by changing the
util/Compilers/CSetDefs.hpp file.
I commented out the statement which defines the NATIVE_BOOL macro.
Similarly, You'd probably have to edit the
util/Compilers/SunCCDefs.hpp, I think.
The statements below should be checked and edited in SunCCDefs.hpp

// ---------------------------------------------------------------------------
// Indicate that we do not support native bools
// ---------------------------------------------------------------------------
#if !defined(_BOOL)
#define NO_NATIVE_BOOL
#endif

Cheers
Aps

-----Original Message-----
From: Matthias Nutt [mailto:msnutt@forwiss.de]
Sent: Monday, February 05, 2001 7:04 AM
To: xerces-c-dev@xml.apache.org
Subject: NO_NATIVE_BOOL


hi folks,

I had the following problem using Xerces-C (Version 1.2.0).
Compiling my code on Linux works straight forward, but on 
Sun (SunOS 5.7, CC 4.2) it fails. Here is the reason why:

Compiling Xerces was not problem, but to get the code
working together with the LEDA library is. Compiling
fails because in LEDA "bool" is typedefed to "char" and
in Xerces "bool" is typedefed to "int".

So I edited util/XercesDefs.hpp:

// ---------------------------------------------------------------------------
//  Handle boolean. If the platform can handle booleans itself, then we
//  map our boolean type to the native type. Otherwise we create a default
//  one as an int and define const values for true and false.
//
//  This flag will be set in the per-development environment stuff above.
// ---------------------------------------------------------------------------
#if defined(NO_NATIVE_BOOL)
  #ifndef bool
    #ifdef __sun
        // This is a dirty hack by Matthias Nutt
        // On our system using LEDA bool is already typedefed as char
        // Matthias Nutt, Feb. 2001
        typedef char bool;
    #else
        typedef int     bool;
    #endif
  #endif
  #ifndef true
    #define  true     1
  #endif
  #ifndef false
    #define false 0
  #endif
#endif

Currently I dont know a solution for this. Maybe some of you has
a good hint for this problem. 

Bye Matthias


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Mime
View raw message