[prev in list] [next in list] [prev in thread] [next in thread]
List: xerces-cvs
Subject: cvs commit: xml-xerces/c/src/xercesc/util XercesDefs.hpp
From: gareth () apache ! org
Date: 2003-05-29 11:18:38
[Download RAW message or body]
gareth 2003/05/29 04:18:38
Modified: c/src/xercesc/framework StdOutFormatTarget.cpp
c/src/xercesc/util/Compilers CSetDefs.hpp GCCDefs.hpp
SunCCDefs.hpp VCPPDefs.hpp
c/src/xercesc/util XercesDefs.hpp
Log:
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 Changes Path
1.7 +12 -4 xml-xerces/c/src/xercesc/framework/StdOutFormatTarget.cpp
Index: StdOutFormatTarget.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/framework/StdOutFormatTarget.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- StdOutFormatTarget.cpp 24 Jan 2003 20:20:22 -0000 1.6
+++ StdOutFormatTarget.cpp 29 May 2003 11:18:37 -0000 1.7
@@ -57,6 +57,9 @@
/*
* $Id$
* $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
* Add method flush to XMLFormatTarget
*
@@ -80,7 +83,12 @@
*/
#include <xercesc/framework/StdOutFormatTarget.hpp>
+
+#if defined(XERCES_NEW_IOSTREAMS)
+#include <iostream>
+#else
#include <iostream.h>
+#endif
XERCES_CPP_NAMESPACE_BEGIN
@@ -92,7 +100,7 @@
void StdOutFormatTarget::flush()
{
- cout.flush();
+ XERCES_STD_QUALIFIER cout.flush();
}
void StdOutFormatTarget::writeChars(const XMLByte* const toWrite
@@ -104,8 +112,8 @@
// Without the cast, it was printing the pointer value in hex.
// Quite annoying, considering every other platform printed
// the string with the explicit cast to char* below.
- cout.write((char *) toWrite, (int) count);
- cout.flush();
+ XERCES_STD_QUALIFIER cout.write((char *) toWrite, (int) count);
+ XERCES_STD_QUALIFIER cout.flush();
}
1.7 +7 -0 xml-xerces/c/src/xercesc/util/Compilers/CSetDefs.hpp
Index: CSetDefs.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/Compilers/CSetDefs.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- CSetDefs.hpp 5 Nov 2002 21:43:55 -0000 1.6
+++ CSetDefs.hpp 29 May 2003 11:18:37 -0000 1.7
@@ -56,6 +56,9 @@
/*
* $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
* Turn on C++ Namespace support only if using AIX xlC version 4 or higher.
*
@@ -193,6 +196,10 @@
#define XERCES_DEBUG
#endif
+#if __IBMCPP__ >= 400
+#define XERCES_NEW_IOSTREAMS
+#define XERCES_STD_NAMESPACE
+#endif
// ---------------------------------------------------------------------------
// Provide some common string ops that are different/notavail on CSet
1.7 +7 -0 xml-xerces/c/src/xercesc/util/Compilers/GCCDefs.hpp
Index: GCCDefs.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/Compilers/GCCDefs.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- GCCDefs.hpp 18 Nov 2002 20:38:11 -0000 1.6
+++ GCCDefs.hpp 29 May 2003 11:18:37 -0000 1.7
@@ -56,6 +56,9 @@
/*
* $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
* [Bug 14612] GCCDefs clashes with cygwin's string.h for stricmp and strnicmp.
*
@@ -197,6 +200,10 @@
#define XERCES_DEBUG
#endif
+#if __GNUC__ >= 3
+#define XERCES_NEW_IOSTREAMS
+#define XERCES_STD_NAMESPACE
+#endif
// ---------------------------------------------------------------------------
// Provide some common string ops that are different/notavail on GCC
1.6 +7 -0 xml-xerces/c/src/xercesc/util/Compilers/SunCCDefs.hpp
Index: SunCCDefs.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/Compilers/SunCCDefs.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- SunCCDefs.hpp 4 Nov 2002 14:45:20 -0000 1.5
+++ SunCCDefs.hpp 29 May 2003 11:18:37 -0000 1.6
@@ -56,6 +56,9 @@
/*
* $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
* C++ Namespace Support.
*
@@ -196,6 +199,10 @@
#define XERCES_DEBUG
#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
1.8 +7 -0 xml-xerces/c/src/xercesc/util/Compilers/VCPPDefs.hpp
Index: VCPPDefs.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/Compilers/VCPPDefs.hpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- VCPPDefs.hpp 4 Nov 2002 14:45:20 -0000 1.7
+++ VCPPDefs.hpp 29 May 2003 11:18:37 -0000 1.8
@@ -56,6 +56,9 @@
/*
* $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
* C++ Namespace Support.
*
@@ -204,6 +207,10 @@
#define XERCES_DEBUG
#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
1.15 +12 -0 xml-xerces/c/src/xercesc/util/XercesDefs.hpp
Index: XercesDefs.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/XercesDefs.hpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- XercesDefs.hpp 12 May 2003 09:44:19 -0000 1.14
+++ XercesDefs.hpp 29 May 2003 11:18:37 -0000 1.15
@@ -56,6 +56,9 @@
/*
* $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
* Port to NetBSD. Patch by Hiramatsu Yoshifumi.
*
@@ -451,6 +454,15 @@
#define XERCES_CPP_NAMESPACE_USE
#define XERCES_CPP_NAMESPACE_QUALIFIER
#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
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic