make the patch work on both -current and -stable

This commit is contained in:
Ying-Chieh Liao 2002-10-01 03:13:17 +00:00
parent 114b7928ef
commit af81cd0d20
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=67275

View File

@ -1,29 +1,14 @@
--- newmat9.cpp.orig Fri Sep 6 23:36:13 2002
+++ newmat9.cpp Fri Sep 6 23:53:30 2002
@@ -23,11 +23,6 @@
#define REPORT {}
--- newmat9.cpp.orig Wed Oct 17 14:46:04 2001
+++ newmat9.cpp Tue Oct 1 11:00:36 2002
@@ -24,8 +24,10 @@
#endif
-// for G++ 3.01
// for G++ 3.01
-#ifndef _Ios_Fmtflags
-#define _Ios_Fmtflags long
-#endif
-
ostream& operator<<(ostream& s, const BaseMatrix& X)
{
GeneralMatrix* gm = ((BaseMatrix&)X).Evaluate(); operator<<(s, *gm);
@@ -38,7 +33,13 @@
ostream& operator<<(ostream& s, const GeneralMatrix& X)
{
MatrixRow mr((GeneralMatrix*)&X, LoadOnEntry);
- int w = s.width(); int nr = X.Nrows(); _Ios_Fmtflags f = s.flags();
+ int w = s.width(); int nr = X.Nrows();
+#if defined __GNUG__ && __GNUG__ < 3
+ _Ios_Fmtflags
+#if __GNUC__ < 3
#define _Ios_Fmtflags long
+#else
+ ios_base::fmtflags
+#endif
+ f = s.flags();
s.setf(ios::fixed, ios::floatfield);
for (int i=1; i<=nr; i++)
{
+#define _Ios_Fmtflags ios_base::fmtflags
#endif
ostream& operator<<(ostream& s, const BaseMatrix& X)