[PATCH] Use configure results for compile time decisions

Richard Guenther rguenth at tat.physik.uni-tuebingen.de
Fri Jan 10 23:51:05 UTC 2003


Hi!

This patch cleans up the conditional inclusion of ios/iostream and the
std::ios_base::fmtflags issue remaining for intel compiler support.

Ok?

Richard.

2002Jan11  Richard Guenther <richard.guenther at uni-tuebingen.de>

	* src/IO/DiskLayout.cmpl.cpp: include ios, if available, else
	iostream.
	src/IO/FileSetReader.cmpl.cpp: likewise.
	src/IO/FileSetReader.cpp: likewise.
	src/IO/tests/DiskLayoutTest1.cpp: likewise.
	src/IO/tests/FileSetReaderTest0.cpp: likewise.
	src/IO/tests/dumper.cpp: likewise.
	src/Tiny/TinyMatrix.h: likewise.
	src/Tiny/Vector.h: likewise.
	src/Utilities/Inform.h: use POOMA_NO_IOSBASE_FMTFLAGS rather than
	compiler dependend symbols for decision of
	std::ios_base::fmtflags.

Index: src/IO/DiskLayout.cmpl.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/IO/DiskLayout.cmpl.cpp,v
retrieving revision 1.8
diff -u -r1.8 DiskLayout.cmpl.cpp
--- src/IO/DiskLayout.cmpl.cpp	15 Oct 2001 17:34:30 -0000	1.8
+++ src/IO/DiskLayout.cmpl.cpp	10 Jan 2003 23:46:19 -0000
@@ -53,9 +53,7 @@
 #include "Layout/UniformGridLayout.h"
 #include "Tulip/RemoteProxy.h"

-// Re-check this when GCC 3.0 is ported
-
-#if defined(__CYGWIN32__)
+#if POOMA_NO_IOS_HEADER
 #include <iostream>
 #else
 #include <ios>
Index: src/IO/FileSetReader.cmpl.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/IO/FileSetReader.cmpl.cpp,v
retrieving revision 1.9
diff -u -r1.9 FileSetReader.cmpl.cpp
--- src/IO/FileSetReader.cmpl.cpp	15 Oct 2001 17:34:31 -0000	1.9
+++ src/IO/FileSetReader.cmpl.cpp	10 Jan 2003 23:46:20 -0000
@@ -43,9 +43,7 @@

 #include <iostream>

-// Really should add a POOMA_HAS_IOS_INCLUDE config macro.
-
-#if !(defined(__GNUC__) && (__GNUC__ < 3))
+#if !POOMA_NO_IOS_HEADER
 # include <ios>
 #endif

Index: src/IO/FileSetReader.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/IO/FileSetReader.cpp,v
retrieving revision 1.6
diff -u -r1.6 FileSetReader.cpp
--- src/IO/FileSetReader.cpp	15 Oct 2001 17:34:31 -0000	1.6
+++ src/IO/FileSetReader.cpp	10 Jan 2003 23:46:22 -0000
@@ -44,9 +44,7 @@

 #include <iostream>

-// Really should add a POOMA_HAS_IOS_INCLUDE config macro.
-
-#if !(defined(__GNUC__) && (__GNUC__ < 3))
+#if !POOMA_NO_IOS_HEADER
 # include <ios>
 #endif

Index: src/IO/tests/DiskLayoutTest1.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/IO/tests/DiskLayoutTest1.cpp,v
retrieving revision 1.6
diff -u -r1.6 DiskLayoutTest1.cpp
--- src/IO/tests/DiskLayoutTest1.cpp	3 Oct 2001 21:09:53 -0000	1.6
+++ src/IO/tests/DiskLayoutTest1.cpp	10 Jan 2003 23:46:22 -0000
@@ -48,7 +48,7 @@

 #include <fstream>

-#if !defined(__CYGWIN32__)
+#if !POOMA_NO_IOS_HEADER
 # include <ios>
 #endif

Index: src/IO/tests/FileSetReaderTest0.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/IO/tests/FileSetReaderTest0.cpp,v
retrieving revision 1.1
diff -u -r1.1 FileSetReaderTest0.cpp
--- src/IO/tests/FileSetReaderTest0.cpp	3 Oct 2001 21:11:22 -0000	1.1
+++ src/IO/tests/FileSetReaderTest0.cpp	10 Jan 2003 23:46:23 -0000
@@ -44,7 +44,7 @@

 #include <fstream>

-#if !(defined(__GNUC__) && __GNUC__ < 3)
+#if !POOMA_NO_IOS_HEADER
 # include <ios>
 #endif

Index: src/IO/tests/dumper.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/IO/tests/dumper.cpp,v
retrieving revision 1.4
diff -u -r1.4 dumper.cpp
--- src/IO/tests/dumper.cpp	3 Oct 2001 17:40:17 -0000	1.4
+++ src/IO/tests/dumper.cpp	10 Jan 2003 23:46:24 -0000
@@ -32,8 +32,8 @@
 #include <string>
 #include <algorithm> // replace

-#if !(defined(__GNUC__) && __GNUC__ < 3)
-#include <ios>
+#if !POOMA_NO_IOS_HEADER
+#  include <ios>
 #endif

 using std::cout;
Index: src/Tiny/TinyMatrix.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Tiny/TinyMatrix.h,v
retrieving revision 1.13
diff -u -r1.13 TinyMatrix.h
--- src/Tiny/TinyMatrix.h	18 Sep 2001 05:17:48 -0000	1.13
+++ src/Tiny/TinyMatrix.h	10 Jan 2003 23:46:25 -0000
@@ -56,7 +56,11 @@
 #include "Tiny/TinyMatrixEngine.h"
 #include "Tiny/TinyMatrixElements.h"
 #include "Tiny/TinyMatrixOperators.h"
+#if POOMA_NO_IOS_HEADER
+#include <iostream>
+#else
 #include <ios>
+#endif

 //-----------------------------------------------------------------------------
 // Forward Declarations:
Index: src/Tiny/Vector.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Tiny/Vector.h,v
retrieving revision 1.28
diff -u -r1.28 Vector.h
--- src/Tiny/Vector.h	5 Mar 2002 16:14:38 -0000	1.28
+++ src/Tiny/Vector.h	10 Jan 2003 23:46:26 -0000
@@ -56,7 +56,11 @@
 #include "Tiny/VectorEngine.h"
 #include "Tiny/VectorElements.h"
 #include "Tiny/VectorOperators.h"
+#if POOMA_NO_IOS_HEADER
+#include <iostream>
+#else
 #include <ios>
+#endif

 //-----------------------------------------------------------------------------
 // Forward Declarations:
Index: src/Utilities/Inform.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Utilities/Inform.h,v
retrieving revision 1.29
diff -u -r1.29 Inform.h
--- src/Utilities/Inform.h	23 Mar 2001 15:34:54 -0000	1.29
+++ src/Utilities/Inform.h	10 Jan 2003 23:46:27 -0000
@@ -275,8 +275,7 @@
   void print() { flush(); }
   void output() { flush(); }

-#if (defined(__MWERKS__) && __MWERKS__ >= 0x2301) \
- || (defined(__GLIBCPP__) && __GLIBCPP__ >= 20001129)
+#if !POOMA_NO_IOSBASE_FMTFLAGS
   typedef std::ios_base::fmtflags FmtFlags_t;
 #else
   typedef long FmtFlags_t;




More information about the pooma-dev mailing list