This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] 2/3 gcc cleanups for "C" compatibility work


Something like this is also necessary...

2002-06-18  Benjamin Kosnik  <bkoz@redhat.com>

	* ginclude/stddef.h: Use namespace std.
	* ginclude/stdarg.h: Same.

Index: ginclude/stdarg.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ginclude/stdarg.h,v
retrieving revision 1.15
diff -c -p -r1.15 stdarg.h
*** ginclude/stdarg.h	30 Mar 2000 00:03:14 -0000	1.15
--- ginclude/stdarg.h	18 Jun 2002 19:13:23 -0000
***************
*** 1,4 ****
! /* Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 1,5 ----
! /* Copyright (C) 1989, 1997, 1998, 1999, 2000, 2002
!    Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
*************** typedef __gnuc_va_list va_list;
*** 107,113 ****
--- 108,121 ----
  #ifndef _VA_LIST_T_H
  /* The macro __va_list__ is used by BeOS.  */
  #ifndef __va_list__
+ #if __cplusplus
+ namespace std
+ {
+   extern "C" typedef __gnuc_va_list va_list;
+ }
+ #else
  typedef __gnuc_va_list va_list;
+ #endif
  #endif /* not __va_list__ */
  #endif /* not _VA_LIST_T_H */
  #endif /* not _VA_LIST */
*************** typedef __gnuc_va_list va_list;
*** 136,138 ****
--- 144,148 ----
  
  #endif /* not _ANSI_STDARG_H_ */
  #endif /* not _STDARG_H */
Index: ginclude/stddef.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ginclude/stddef.h,v
retrieving revision 1.14
diff -c -p -r1.14 stddef.h
*** ginclude/stddef.h	9 Jan 2002 04:56:25 -0000	1.14
--- ginclude/stddef.h	18 Jun 2002 19:13:23 -0000
***************
*** 1,4 ****
! /* Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 1,5 ----
! /* Copyright (C) 1989, 1997, 1998, 1999, 2000, 2002
!    Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
*************** _TYPE_wchar_t;
*** 114,119 ****
--- 115,127 ----
  #undef _TYPE_wchar_t
  #endif
  
+ #if __cplusplus
+ namespace std
+ {
+   extern "C"
+     {
+ #endif
+ 
  /* In case nobody has defined these types, but we aren't running under
     GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
     __WCHAR_TYPE__ have reasonable values.  This can happen if the
*************** typedef long ssize_t;
*** 221,226 ****
--- 229,238 ----
  #undef	__need_size_t
  #endif /* _STDDEF_H or __need_size_t.  */
  
+ #if __cplusplus
+  } 
+ } 
+ #endif
  
  /* Wide character type.
     Locale-writers should change this as necessary to


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]