Skip to content
Snippets Groups Projects
Commit 1d8bde2f authored by Gareth Reakes's avatar Gareth Reakes
Browse files

Added macros in so we can determine whether to do things like iostream as...

Added macros in so we can determine whether to do things like iostream as opposed to iostream.h and whether to use std:: or not.


git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@175055 13f79535-47bb-0310-9956-ffa450edef68
parent 00d405fa
No related branches found
No related tags found
No related merge requests found
...@@ -57,6 +57,9 @@ ...@@ -57,6 +57,9 @@
/* /*
* $Id$ * $Id$
* $Log$ * $Log$
* Revision 1.7 2003/05/29 11:18:37 gareth
* Added macros in so we can determine whether to do things like iostream as opposed to iostream.h and whether to use std:: or not.
*
* Revision 1.6 2003/01/24 20:20:22 tng * Revision 1.6 2003/01/24 20:20:22 tng
* Add method flush to XMLFormatTarget * Add method flush to XMLFormatTarget
* *
...@@ -80,7 +83,12 @@ ...@@ -80,7 +83,12 @@
*/ */
#include <xercesc/framework/StdOutFormatTarget.hpp> #include <xercesc/framework/StdOutFormatTarget.hpp>
#if defined(XERCES_NEW_IOSTREAMS)
#include <iostream>
#else
#include <iostream.h> #include <iostream.h>
#endif
XERCES_CPP_NAMESPACE_BEGIN XERCES_CPP_NAMESPACE_BEGIN
...@@ -92,7 +100,7 @@ StdOutFormatTarget::~StdOutFormatTarget() ...@@ -92,7 +100,7 @@ StdOutFormatTarget::~StdOutFormatTarget()
void StdOutFormatTarget::flush() void StdOutFormatTarget::flush()
{ {
cout.flush(); XERCES_STD_QUALIFIER cout.flush();
} }
void StdOutFormatTarget::writeChars(const XMLByte* const toWrite void StdOutFormatTarget::writeChars(const XMLByte* const toWrite
...@@ -104,8 +112,8 @@ void StdOutFormatTarget::writeChars(const XMLByte* const toWrite ...@@ -104,8 +112,8 @@ void StdOutFormatTarget::writeChars(const XMLByte* const toWrite
// Without the cast, it was printing the pointer value in hex. // Without the cast, it was printing the pointer value in hex.
// Quite annoying, considering every other platform printed // Quite annoying, considering every other platform printed
// the string with the explicit cast to char* below. // the string with the explicit cast to char* below.
cout.write((char *) toWrite, (int) count); XERCES_STD_QUALIFIER cout.write((char *) toWrite, (int) count);
cout.flush(); XERCES_STD_QUALIFIER cout.flush();
} }
......
...@@ -56,6 +56,9 @@ ...@@ -56,6 +56,9 @@
/* /*
* $Log$ * $Log$
* Revision 1.7 2003/05/29 11:18:37 gareth
* Added macros in so we can determine whether to do things like iostream as opposed to iostream.h and whether to use std:: or not.
*
* Revision 1.6 2002/11/05 21:43:55 tng * Revision 1.6 2002/11/05 21:43:55 tng
* Turn on C++ Namespace support only if using AIX xlC version 4 or higher. * Turn on C++ Namespace support only if using AIX xlC version 4 or higher.
* *
...@@ -193,6 +196,10 @@ typedef int XMLInt32; ...@@ -193,6 +196,10 @@ typedef int XMLInt32;
#define XERCES_DEBUG #define XERCES_DEBUG
#endif #endif
#if __IBMCPP__ >= 400
#define XERCES_NEW_IOSTREAMS
#define XERCES_STD_NAMESPACE
#endif
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Provide some common string ops that are different/notavail on CSet // Provide some common string ops that are different/notavail on CSet
......
...@@ -56,6 +56,9 @@ ...@@ -56,6 +56,9 @@
/* /*
* $Log$ * $Log$
* Revision 1.7 2003/05/29 11:18:37 gareth
* Added macros in so we can determine whether to do things like iostream as opposed to iostream.h and whether to use std:: or not.
*
* Revision 1.6 2002/11/18 20:38:11 tng * Revision 1.6 2002/11/18 20:38:11 tng
* [Bug 14612] GCCDefs clashes with cygwin's string.h for stricmp and strnicmp. * [Bug 14612] GCCDefs clashes with cygwin's string.h for stricmp and strnicmp.
* *
...@@ -197,6 +200,10 @@ typedef int XMLInt32; ...@@ -197,6 +200,10 @@ typedef int XMLInt32;
#define XERCES_DEBUG #define XERCES_DEBUG
#endif #endif
#if __GNUC__ >= 3
#define XERCES_NEW_IOSTREAMS
#define XERCES_STD_NAMESPACE
#endif
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Provide some common string ops that are different/notavail on GCC // Provide some common string ops that are different/notavail on GCC
......
...@@ -56,6 +56,9 @@ ...@@ -56,6 +56,9 @@
/* /*
* $Log$ * $Log$
* Revision 1.6 2003/05/29 11:18:37 gareth
* Added macros in so we can determine whether to do things like iostream as opposed to iostream.h and whether to use std:: or not.
*
* Revision 1.5 2002/11/04 14:45:20 tng * Revision 1.5 2002/11/04 14:45:20 tng
* C++ Namespace Support. * C++ Namespace Support.
* *
...@@ -196,6 +199,10 @@ typedef int XMLInt32; ...@@ -196,6 +199,10 @@ typedef int XMLInt32;
#define XERCES_DEBUG #define XERCES_DEBUG
#endif #endif
#if __SUNPRO_CC >= 0x500
#define XERCES_NEW_IOSTREAMS
#define XERCES_STD_NAMESPACE
#endif
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Provide some common string ops that are different/notavail on CC // Provide some common string ops that are different/notavail on CC
......
...@@ -56,6 +56,9 @@ ...@@ -56,6 +56,9 @@
/* /*
* $Log$ * $Log$
* Revision 1.8 2003/05/29 11:18:37 gareth
* Added macros in so we can determine whether to do things like iostream as opposed to iostream.h and whether to use std:: or not.
*
* Revision 1.7 2002/11/04 14:45:20 tng * Revision 1.7 2002/11/04 14:45:20 tng
* C++ Namespace Support. * C++ Namespace Support.
* *
...@@ -204,6 +207,10 @@ typedef int XMLInt32; ...@@ -204,6 +207,10 @@ typedef int XMLInt32;
#define XERCES_DEBUG #define XERCES_DEBUG
#endif #endif
#if _MSV_VER > 1300
#define XERCES_NEW_IOSTREAMS
#define XERCES_STD_NAMESPACE
#endif
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// The name of the DLL that is built by the Visual C++ version of the // The name of the DLL that is built by the Visual C++ version of the
......
...@@ -56,6 +56,9 @@ ...@@ -56,6 +56,9 @@
/* /*
* $Log$ * $Log$
* Revision 1.15 2003/05/29 11:18:37 gareth
* Added macros in so we can determine whether to do things like iostream as opposed to iostream.h and whether to use std:: or not.
*
* Revision 1.14 2003/05/12 09:44:19 gareth * Revision 1.14 2003/05/12 09:44:19 gareth
* Port to NetBSD. Patch by Hiramatsu Yoshifumi. * Port to NetBSD. Patch by Hiramatsu Yoshifumi.
* *
...@@ -452,6 +455,15 @@ typedef XMLUInt32 UCS4Ch; ...@@ -452,6 +455,15 @@ typedef XMLUInt32 UCS4Ch;
#define XERCES_CPP_NAMESPACE_QUALIFIER #define XERCES_CPP_NAMESPACE_QUALIFIER
#endif #endif
#if defined(XERCES_STD_NAMESPACE)
#define XERCES_USING_STD(NAME) using std :: NAME;
#define XERCES_STD_QUALIFIER std ::
#else
#define XERCES_USING_STD(NAME)
#define XERCES_STD_QUALIFIER
#endif
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Set up the import/export keyword for our core projects. The // Set up the import/export keyword for our core projects. The
// PLATFORM_XXXX keywords are set in the per-development environment // PLATFORM_XXXX keywords are set in the per-development environment
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment