This is the mail archive of the
libstdc++@sources.redhat.com
mailing list for the libstdc++ project.
[PATCH] c[includes]
- To: libstdc++ at sources dot redhat dot com
- Subject: [PATCH] c[includes]
- From: Theodore Papadopoulo <Theodore dot Papadopoulo at sophia dot inria dot fr>
- Date: Thu, 21 Sep 2000 20:53:27 +0200
Another source of errors in the gcc testsuite is the fact that the
function of the c headers are not in the std namespace as required
by the standard. At least, this is true for abort and malloc.
However, I'm not sure that a patch like the following is completely
safe (it seems to introduce other regressions of course, but I guess
these are C++ file that are not using the proper std::...
If this is OK, then I'll try to remove the other regressions in the
testsuite.
ChangeLog:
2000-09-21 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
bits/std_cstdlib.h: Put C functions in the std namespace.
Index: libstdc++-v3/bits/std_cstdlib.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/bits/std_cstdlib.h,v
retrieving revision 1.3
diff -c -3 -p -r1.3 std_cstdlib.h
*** std_cstdlib.h 2000/07/21 01:02:32 1.3
--- std_cstdlib.h 2000/09/21 18:48:42
***************
*** 36,54 ****
#ifndef _CPP_CSTDLIB
#define _CPP_CSTDLIB 1
// This keeps isanum, et al from being propagated as macros.
#if __linux__
#define __USE_ISOC9X 1
#endif
# pragma GCC system_header
# include_next <stdlib.h>
-
- #endif // _CPP_CSTDLIB
-
!
!
!
!
--- 36,53 ----
#ifndef _CPP_CSTDLIB
#define _CPP_CSTDLIB 1
+ #include <bits/c++config.h>
+
// This keeps isanum, et al from being propagated as macros.
#if __linux__
#define __USE_ISOC9X 1
#endif
+ __STL_BEGIN_NAMESPACE
+
# pragma GCC system_header
# include_next <stdlib.h>
+ __STL_END_NAMESPACE
! #endif // _CPP_CSTDLIB
--------------------------------------------------------------------
Theodore Papadopoulo
Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01
--------------------------------------------------------------------
PGP signature