PATCH: More compatibility header extensions
Loren James Rittle
rittle@latour.rsch.comm.mot.com
Mon May 22 19:40:00 GMT 2000
> I will be extending the libstdc++-v3 compatibility headers as required
> to pass existing g++ dejagnu tests that use them. Here is the first
> minor patch. At a minimum, these new files are still needed:
> complex.h, fstream.h, iomanip.h, ostream.h, stream.h and strstream.h.
Here is another batch compatibility header extensions. This is the
minimum additional support required to pass the majority of g++
dejagnu tests (with previously posted but pending testsuite patch to
fix bonified namespace problems). It would have been better to split
iostream.h into the parts required for istream.h and ostream.h, but
since these headers are only for backwards compatibility, it seemed OK
to punt on the issue. 9 tests are still failing over libstdc++-v2 in
my environment. 2 tests fail due to the classic C library symbols not
yet being found in namespace std. The remaining tests fail due to
completely withdrawn symbols and/or lack of default constructors
(e.g. ostream () and runtime_error ()) and whereas libstdc++-v2 use to
provide them.
Tested (in already bootstrapped tree) on i686-unknown-freebsdelf3.4.
Since none of these files are touched or consulted during a bootstrap,
this approach seems safe.
2000-05-22 Loren J. Rittle <ljrittle@acm.org>
* backward/alloc.h (__default_alloc_template): Only expose
implementation-specific symbol, if it exists in the
configuration.
* backward/iostream.h (ends): Expose symbol.
* backward/strstream.h: New file.
* backward/stream.h: New file.
* backward/ostream.h: New file.
* backward/istream.h: New file.
* backward/fstream.h: New file.
* backward/complex.h: New file.
* backward/iomanip.h: New file.
Index: backward/alloc.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/backward/alloc.h,v
retrieving revision 1.1
diff -p -r1.1 alloc.h
*** alloc.h 2000/04/21 20:33:28 1.1
--- alloc.h 2000/05/23 01:49:50
*************** using __STD::__malloc_alloc_template;
*** 27,33 ****
--- 27,35 ----
using __STD::malloc_alloc;
using __STD::simple_alloc;
using __STD::debug_alloc;
+ #ifndef __USE_MALLOC
using __STD::__default_alloc_template;
+ #endif
using __STD::alloc;
using __STD::single_client_alloc;
#ifdef __STL_STATIC_TEMPLATE_MEMBER_BUG
Index: backward/iostream.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/backward/iostream.h,v
retrieving revision 1.2
diff -p -r1.2 iostream.h
*** iostream.h 2000/05/09 07:27:22 1.2
--- iostream.h 2000/05/23 01:49:50
*************** using __STD::wclog;
*** 50,55 ****
--- 50,56 ----
#endif
using __STD::endl;
+ using __STD::ends;
#endif /* __STL_USE_NAMESPACES */
#endif /* _CPP_BACKWARD_IOSTREAM_H */
Index: backward/strstream.h
*** /dev/null Mon May 22 20:59:02 2000
--- backward/strstream.h Mon May 22 17:33:55 2000
***************
*** 0 ****
--- 1,44 ----
+ // Copyright (C) 2000 Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+ // software; you can redistribute it and/or modify it under the
+ // terms of the GNU General Public License as published by the
+ // Free Software Foundation; either version 2, or (at your option)
+ // any later version.
+
+ // This library is distributed in the hope that it will be useful,
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ // GNU General Public License for more details.
+
+ // You should have received a copy of the GNU General Public License along
+ // with this library; see the file COPYING. If not, write to the Free
+ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ // USA.
+
+ // As a special exception, you may use this file as part of a free software
+ // library without restriction. Specifically, if other files instantiate
+ // templates or use macros or inline functions from this file, or you compile
+ // this file and link it with other files to produce an executable, this
+ // file does not by itself cause the resulting executable to be covered by
+ // the GNU General Public License. This exception does not however
+ // invalidate any other reasons why the executable file might be covered by
+ // the GNU General Public License.
+
+ #ifndef _CPP_BACKWARD_STRSTREAM_H
+ #define _CPP_BACKWARD_STRSTREAM_H 1
+
+ #include <bits/std_strstream.h>
+
+ #ifdef __STL_USE_NAMESPACES
+ using __STD::strstreambuf;
+ using __STD::istrstream;
+ using __STD::ostrstream;
+ using __STD::strstream;
+ #endif /* __STL_USE_NAMESPACES */
+
+ #endif /* _CPP_BACKWARD_STRSTREAM_H */
+
+ // Local Variables:
+ // mode:C++
+ // End:
Index: backward/stream.h
*** /dev/null Mon May 22 20:59:02 2000
--- backward/stream.h Mon May 22 17:41:34 2000
***************
*** 0 ****
--- 1,37 ----
+ // Copyright (C) 2000 Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+ // software; you can redistribute it and/or modify it under the
+ // terms of the GNU General Public License as published by the
+ // Free Software Foundation; either version 2, or (at your option)
+ // any later version.
+
+ // This library is distributed in the hope that it will be useful,
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ // GNU General Public License for more details.
+
+ // You should have received a copy of the GNU General Public License along
+ // with this library; see the file COPYING. If not, write to the Free
+ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ // USA.
+
+ // As a special exception, you may use this file as part of a free software
+ // library without restriction. Specifically, if other files instantiate
+ // templates or use macros or inline functions from this file, or you compile
+ // this file and link it with other files to produce an executable, this
+ // file does not by itself cause the resulting executable to be covered by
+ // the GNU General Public License. This exception does not however
+ // invalidate any other reasons why the executable file might be covered by
+ // the GNU General Public License.
+
+ #ifndef _CPP_BACKWARD_STREAM_H
+ #define _CPP_BACKWARD_STREAM_H 1
+
+ #include <backward/iostream.h>
+
+ #endif /* _CPP_BACKWARD_STREAM_H */
+
+ // Local Variables:
+ // mode:C++
+ // End:
Index: backward/ostream.h
*** /dev/null Mon May 22 20:59:02 2000
--- backward/ostream.h Mon May 22 17:42:13 2000
***************
*** 0 ****
--- 1,37 ----
+ // Copyright (C) 2000 Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+ // software; you can redistribute it and/or modify it under the
+ // terms of the GNU General Public License as published by the
+ // Free Software Foundation; either version 2, or (at your option)
+ // any later version.
+
+ // This library is distributed in the hope that it will be useful,
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ // GNU General Public License for more details.
+
+ // You should have received a copy of the GNU General Public License along
+ // with this library; see the file COPYING. If not, write to the Free
+ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ // USA.
+
+ // As a special exception, you may use this file as part of a free software
+ // library without restriction. Specifically, if other files instantiate
+ // templates or use macros or inline functions from this file, or you compile
+ // this file and link it with other files to produce an executable, this
+ // file does not by itself cause the resulting executable to be covered by
+ // the GNU General Public License. This exception does not however
+ // invalidate any other reasons why the executable file might be covered by
+ // the GNU General Public License.
+
+ #ifndef _CPP_BACKWARD_OSTREAM_H
+ #define _CPP_BACKWARD_OSTREAM_H 1
+
+ #include <backward/iostream.h>
+
+ #endif /* _CPP_BACKWARD_OSTREAM_H */
+
+ // Local Variables:
+ // mode:C++
+ // End:
Index: backward/istream.h
*** /dev/null Mon May 22 20:59:02 2000
--- backward/istream.h Mon May 22 17:42:27 2000
***************
*** 0 ****
--- 1,37 ----
+ // Copyright (C) 2000 Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+ // software; you can redistribute it and/or modify it under the
+ // terms of the GNU General Public License as published by the
+ // Free Software Foundation; either version 2, or (at your option)
+ // any later version.
+
+ // This library is distributed in the hope that it will be useful,
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ // GNU General Public License for more details.
+
+ // You should have received a copy of the GNU General Public License along
+ // with this library; see the file COPYING. If not, write to the Free
+ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ // USA.
+
+ // As a special exception, you may use this file as part of a free software
+ // library without restriction. Specifically, if other files instantiate
+ // templates or use macros or inline functions from this file, or you compile
+ // this file and link it with other files to produce an executable, this
+ // file does not by itself cause the resulting executable to be covered by
+ // the GNU General Public License. This exception does not however
+ // invalidate any other reasons why the executable file might be covered by
+ // the GNU General Public License.
+
+ #ifndef _CPP_BACKWARD_ISTREAM_H
+ #define _CPP_BACKWARD_ISTREAM_H 1
+
+ #include <backward/iostream.h>
+
+ #endif /* _CPP_BACKWARD_ISTREAM_H */
+
+ // Local Variables:
+ // mode:C++
+ // End:
Index: backward/fstream.h
*** /dev/null Mon May 22 20:59:02 2000
--- backward/fstream.h Mon May 22 17:47:35 2000
***************
*** 0 ****
--- 1,50 ----
+ // Copyright (C) 2000 Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+ // software; you can redistribute it and/or modify it under the
+ // terms of the GNU General Public License as published by the
+ // Free Software Foundation; either version 2, or (at your option)
+ // any later version.
+
+ // This library is distributed in the hope that it will be useful,
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ // GNU General Public License for more details.
+
+ // You should have received a copy of the GNU General Public License along
+ // with this library; see the file COPYING. If not, write to the Free
+ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ // USA.
+
+ // As a special exception, you may use this file as part of a free software
+ // library without restriction. Specifically, if other files instantiate
+ // templates or use macros or inline functions from this file, or you compile
+ // this file and link it with other files to produce an executable, this
+ // file does not by itself cause the resulting executable to be covered by
+ // the GNU General Public License. This exception does not however
+ // invalidate any other reasons why the executable file might be covered by
+ // the GNU General Public License.
+
+ #ifndef _CPP_BACKWARD_FSTREAM_H
+ #define _CPP_BACKWARD_FSTREAM_H 1
+
+ #include <bits/std_fstream.h>
+
+ #ifdef __STL_USE_NAMESPACES
+ using __STD::ifstream;
+ using __STD::ofstream;
+ using __STD::fstream;
+
+ #ifdef _GLIBCPP_USE_WCHAR_T
+ using __STD::wifstream;
+ using __STD::wofstream;
+ using __STD::wfstream;
+ #endif
+
+ #endif /* __STL_USE_NAMESPACES */
+
+ #endif /* _CPP_BACKWARD_FSTREAM_H */
+
+ // Local Variables:
+ // mode:C++
+ // End:
Index: backward/complex.h
*** /dev/null Mon May 22 20:59:02 2000
--- backward/complex.h Mon May 22 18:35:18 2000
***************
*** 0 ****
--- 1,47 ----
+
+ // Copyright (C) 2000 Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+ // software; you can redistribute it and/or modify it under the
+ // terms of the GNU General Public License as published by the
+ // Free Software Foundation; either version 2, or (at your option)
+ // any later version.
+
+ // This library is distributed in the hope that it will be useful,
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ // GNU General Public License for more details.
+
+ // You should have received a copy of the GNU General Public License along
+ // with this library; see the file COPYING. If not, write to the Free
+ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ // USA.
+
+ // As a special exception, you may use this file as part of a free software
+ // library without restriction. Specifically, if other files instantiate
+ // templates or use macros or inline functions from this file, or you compile
+ // this file and link it with other files to produce an executable, this
+ // file does not by itself cause the resulting executable to be covered by
+ // the GNU General Public License. This exception does not however
+ // invalidate any other reasons why the executable file might be covered by
+ // the GNU General Public License.
+
+ #ifndef _CPP_BACKWARD_COMPLEX_H
+ #define _CPP_BACKWARD_COMPLEX_H 1
+
+ #include <bits/stl_config.h>
+ #include <bits/std_complex.h>
+
+ #ifdef __STL_USE_NAMESPACES
+ using __STD::complex;
+ #endif /* __STL_USE_NAMESPACES */
+
+ typedef complex<float> float_complex;
+ typedef complex<double> double_complex;
+ typedef complex<long double> long_double_complex;
+
+ #endif /* _CPP_BACKWARD_COMPLEX_H */
+
+ // Local Variables:
+ // mode:C++
+ // End:
Index: backward/iomanip.h
*** /dev/null Mon May 22 20:59:02 2000
--- backward/iomanip.h Mon May 22 18:40:06 2000
***************
*** 0 ****
--- 1,48 ----
+
+ // Copyright (C) 2000 Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+ // software; you can redistribute it and/or modify it under the
+ // terms of the GNU General Public License as published by the
+ // Free Software Foundation; either version 2, or (at your option)
+ // any later version.
+
+ // This library is distributed in the hope that it will be useful,
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ // GNU General Public License for more details.
+
+ // You should have received a copy of the GNU General Public License along
+ // with this library; see the file COPYING. If not, write to the Free
+ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ // USA.
+
+ // As a special exception, you may use this file as part of a free software
+ // library without restriction. Specifically, if other files instantiate
+ // templates or use macros or inline functions from this file, or you compile
+ // this file and link it with other files to produce an executable, this
+ // file does not by itself cause the resulting executable to be covered by
+ // the GNU General Public License. This exception does not however
+ // invalidate any other reasons why the executable file might be covered by
+ // the GNU General Public License.
+
+ #ifndef _CPP_BACKWARD_IOMANIP_H
+ #define _CPP_BACKWARD_IOMANIP_H 1
+
+ #include <backward/iostream.h>
+ #include <bits/std_iomanip.h>
+
+ #ifdef __STL_USE_NAMESPACES
+ using __STD::resetiosflags;
+ using __STD::setiosflags;
+ using __STD::setbase;
+ using __STD::setfill;
+ using __STD::setprecision;
+ using __STD::setw;
+ #endif /* __STL_USE_NAMESPACES */
+
+ #endif /* _CPP_BACKWARD_IOMANIP_H */
+
+ // Local Variables:
+ // mode:C++
+ // End:
More information about the Libstdc++
mailing list