[PATCH] c[includes]

Theodore Papadopoulo Theodore.Papadopoulo@sophia.inria.fr
Thu Sep 21 11:53:00 GMT 2000


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
 --------------------------------------------------------------------



-------------- next part --------------
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Content-Type: text/plain; charset=us-ascii


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
 --------------------------------------------------------------------



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.2 (GNU/Linux)
Comment: Exmh version 2.2 06/23/2000

iD8DBQE5ylknIzTj8qrxOU4RAhaaAJ0bHwVRybyWFDJbM2FLYKTTfbW+CwCgwBtT
lzJ+Q06FthJ/5bj4PttP/m0=
=MNKb
-----END PGP SIGNATURE-----


More information about the Libstdc++ mailing list