This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
glibc-2.3, namespace std work part 1
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Wed, 28 Aug 2002 23:42:21 -0700
- Subject: glibc-2.3, namespace std work part 1
Posted for reference only, mostly incomplete.
2002-08-28 Benjamin Kosnik <bkoz@redhat.com>
* include/c_compatibility/stdlib.h: Add __c99 injections.
* include/c_compatibility/stdio.h: Same.
* include/c_compatibility/math.h: Same.
* include/c_compatibility/wchar.h: Same.
* include/bits/c++config: Add _GLIBCPP_USE_NAMESPACES.
* include/c/std_cctype.h: Include c++config.h.
* include/c/std_clocale.h: Same.
* include/c/std_csetjmp.h: Same.
* include/c/std_csignal.h: Same.
* include/c/std_cstdarg.h: Same.
* include/c/std_cstdio.h: Same.
* include/c/std_cstdlib.h: Same.
* include/c/std_cstring.h: Same.
* include/c/std_ctime.h: Same.
Index: include/bits/c++config
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/c++config,v
retrieving revision 1.465
diff -c -p -r1.465 c++config
*** include/bits/c++config 28 Aug 2002 07:17:28 -0000 1.465
--- include/bits/c++config 29 Aug 2002 06:48:21 -0000
***************
*** 1,6 ****
// Predefined symbols and macros -*- C++ -*-
! // Copyright (C) 1997, 1998, 1999, 2000, 2001 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
--- 1,7 ----
// Predefined symbols and macros -*- C++ -*-
! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
! // 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
***************
*** 30,38 ****
#ifndef _CPP_CPPCONFIG
#define _CPP_CPPCONFIG 1
- // Pick up any OS-specific definitions.
- #include <bits/os_defines.h>
-
// The current version of the C++ library in compressed ISO date format.
#define __GLIBCPP__ 20020828
--- 31,36 ----
***************
*** 49,54 ****
--- 47,56 ----
// by the compiler, but instead instantiated into the library binary.
#define _GLIBCPP_FULLY_COMPLIANT_HEADERS 1
+ // When defined, underlying "C" library puts certain types and
+ // fucntions into namespace std, instead of the global namespace.
+ #define _GLIBCPP_USE_NAMESPACES 1
+
// To enable older, ARM-style iostreams and other anachronisms use this.
//#define _GLIBCPP_DEPRECATED 1
*************** libstdc++-v3/include/bits/c++config befo
*** 81,85 ****
--- 83,90 ----
// The remainder of the prewritten config is mostly automatic; all the
// user hooks are listed above.
+
+ // Pick up any OS-specific definitions.
+ #include <bits/os_defines.h>
// End of prewritten config; the discovered settings follow.
Index: include/c/std_cctype.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c/std_cctype.h,v
retrieving revision 1.3
diff -c -p -r1.3 std_cctype.h
*** include/c/std_cctype.h 27 Mar 2002 04:29:31 -0000 1.3
--- include/c/std_cctype.h 29 Aug 2002 06:48:21 -0000
***************
*** 36,41 ****
--- 36,43 ----
#pragma GCC system_header
+ #include <bits/c++config.h>
+
#include_next <ctype.h>
#endif
Index: include/c/std_clocale.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c/std_clocale.h,v
retrieving revision 1.3
diff -c -p -r1.3 std_clocale.h
*** include/c/std_clocale.h 27 Mar 2002 04:29:31 -0000 1.3
--- include/c/std_clocale.h 29 Aug 2002 06:48:21 -0000
***************
*** 36,41 ****
--- 36,43 ----
#pragma GCC system_header
+ #include <bits/c++config.h>
+
#include_next <locale.h>
#endif
Index: include/c/std_csetjmp.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c/std_csetjmp.h,v
retrieving revision 1.4
diff -c -p -r1.4 std_csetjmp.h
*** include/c/std_csetjmp.h 21 Jun 2002 20:20:41 -0000 1.4
--- include/c/std_csetjmp.h 29 Aug 2002 06:48:21 -0000
***************
*** 36,41 ****
--- 36,43 ----
#pragma GCC system_header
+ #include <bits/c++config.h>
+
#include_next <setjmp.h>
// Get rid of those macros defined in <setjmp.h> in lieu of real functions.
Index: include/c/std_csignal.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c/std_csignal.h,v
retrieving revision 1.3
diff -c -p -r1.3 std_csignal.h
*** include/c/std_csignal.h 27 Mar 2002 04:29:31 -0000 1.3
--- include/c/std_csignal.h 29 Aug 2002 06:48:21 -0000
***************
*** 36,41 ****
--- 36,45 ----
#pragma GCC system_header
+ #include <bits/c++config.h>
+
+ #undef __need_sig_atomic_t
+ #undef __need_sigset_t
#include_next <signal.h>
#endif
Index: include/c/std_cstdarg.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c/std_cstdarg.h,v
retrieving revision 1.4
diff -c -p -r1.4 std_cstdarg.h
*** include/c/std_cstdarg.h 20 Jun 2002 19:08:20 -0000 1.4
--- include/c/std_cstdarg.h 29 Aug 2002 06:48:21 -0000
***************
*** 37,42 ****
--- 37,44 ----
#pragma GCC system_header
#undef __need___va_list
+ #include <bits/c++config.h>
+
#include_next <stdarg.h>
#endif
Index: include/c/std_cstddef.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c/std_cstddef.h,v
retrieving revision 1.4
diff -c -p -r1.4 std_cstddef.h
*** include/c/std_cstddef.h 20 Jun 2002 19:08:20 -0000 1.4
--- include/c/std_cstddef.h 29 Aug 2002 06:48:21 -0000
***************
*** 36,45 ****
#pragma GCC system_header
! #define __need_size_t
! #define __need_ptrdiff_t
! #define __need_NULL
! #define __need_offsetof
#include_next <stddef.h>
#endif
--- 36,47 ----
#pragma GCC system_header
! #undef __need_size_t
! #undef __need_ptrdiff_t
! #undef __need_NULL
! #undef __need_offsetof
! #undef __need_wint_t
! #undef __need_wchar_t
#include_next <stddef.h>
#endif
Index: include/c/std_cstdio.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c/std_cstdio.h,v
retrieving revision 1.4
diff -c -p -r1.4 std_cstdio.h
*** include/c/std_cstdio.h 21 Jun 2002 20:20:41 -0000 1.4
--- include/c/std_cstdio.h 29 Aug 2002 06:48:21 -0000
***************
*** 36,41 ****
--- 36,43 ----
#pragma GCC system_header
+ #include <bits/c++config.h>
+
#include_next <stdio.h>
// Get rid of those macros defined in <stdio.h> in lieu of real functions.
Index: include/c/std_cstdlib.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c/std_cstdlib.h,v
retrieving revision 1.3
diff -c -p -r1.3 std_cstdlib.h
*** include/c/std_cstdlib.h 27 Mar 2002 04:29:31 -0000 1.3
--- include/c/std_cstdlib.h 29 Aug 2002 06:48:21 -0000
***************
*** 36,41 ****
--- 36,43 ----
#pragma GCC system_header
+ #include <bits/c++config.h>
+
#include_next <stdlib.h>
#endif
Index: include/c/std_cstring.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c/std_cstring.h,v
retrieving revision 1.3
diff -c -p -r1.3 std_cstring.h
*** include/c/std_cstring.h 27 Mar 2002 04:29:31 -0000 1.3
--- include/c/std_cstring.h 29 Aug 2002 06:48:21 -0000
***************
*** 36,41 ****
--- 36,43 ----
#pragma GCC system_header
+ #include <bits/c++config.h>
+
#include_next <string.h>
#endif
Index: include/c/std_ctime.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c/std_ctime.h,v
retrieving revision 1.3
diff -c -p -r1.3 std_ctime.h
*** include/c/std_ctime.h 27 Mar 2002 04:29:31 -0000 1.3
--- include/c/std_ctime.h 29 Aug 2002 06:48:21 -0000
***************
*** 36,41 ****
--- 36,46 ----
#pragma GCC system_header
+ #include <bits/c++config.h>
+
+ #undef __need_clock_t
+ #undef __need_time_t
+ #undef __need_timespec
#include_next <time.h>
#endif
Index: include/c/std_cwchar.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c/std_cwchar.h,v
retrieving revision 1.6
diff -c -p -r1.6 std_cwchar.h
*** include/c/std_cwchar.h 3 Jul 2002 17:14:21 -0000 1.6
--- include/c/std_cwchar.h 29 Aug 2002 06:48:21 -0000
***************
*** 1,4 ****
! // -*- C++ -*- forwarding header.
// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
//
--- 1,4 ----
! s// -*- C++ -*- forwarding header.
// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
//
***************
*** 41,46 ****
--- 41,47 ----
#include <ctime>
#if _GLIBCPP_HAVE_WCHAR_H
+ #undef __need_mbstate_t
#include_next <wchar.h>
#endif
Index: include/c_compatibility/math.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c_compatibility/math.h,v
retrieving revision 1.1
diff -c -p -r1.1 math.h
*** include/c_compatibility/math.h 21 Jun 2002 20:20:44 -0000 1.1
--- include/c_compatibility/math.h 29 Aug 2002 06:48:21 -0000
*************** using std::floor;
*** 57,74 ****
using std::fmod;
#if _GLIBCPP_USE_C99
! using std::fpclassify;
! using std::isfinite;
! using std::isinf;
! using std::isnan;
! using std::isnormal;
! using std::signbit;
! using std::isgreater;
! using std::isgreaterequal;
! using std::isless;
! using std::islessequal;
! using std::islessgreater;
! using std::isunordered;
#endif
#endif
--- 57,74 ----
using std::fmod;
#if _GLIBCPP_USE_C99
! using __c99::fpclassify;
! using __c99::isfinite;
! using __c99::isinf;
! using __c99::isnan;
! using __c99::isnormal;
! using __c99::signbit;
! using __c99::isgreater;
! using __c99::isgreaterequal;
! using __c99::isless;
! using __c99::islessequal;
! using __c99::islessgreater;
! using __c99::isunordered;
#endif
#endif
Index: include/c_compatibility/stdio.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c_compatibility/stdio.h,v
retrieving revision 1.1
diff -c -p -r1.1 stdio.h
*** include/c_compatibility/stdio.h 21 Jun 2002 20:20:44 -0000 1.1
--- include/c_compatibility/stdio.h 29 Aug 2002 06:48:21 -0000
*************** using std::feof;
*** 82,85 ****
--- 82,93 ----
using std::ferror;
using std::perror;
+ #if _GLIBCPP_USE_C99
+ using __c99::snprintf;
+ using __c99::vfscanf;
+ using __c99::vscanf;
+ using __c99::vsnprintf;
+ using __c99::vsscanf;
+ #endif
+
#endif
Index: include/c_compatibility/stdlib.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c_compatibility/stdlib.h,v
retrieving revision 1.1
diff -c -p -r1.1 stdlib.h
*** include/c_compatibility/stdlib.h 21 Jun 2002 20:20:44 -0000 1.1
--- include/c_compatibility/stdlib.h 29 Aug 2002 06:48:23 -0000
*************** using std::system;
*** 64,67 ****
--- 64,81 ----
using std::wcstombs;
using std::wctomb;
+ #if _GLIBCPP_USE_C99
+ using __c99::lldiv_t;
+ using __c99::_Exit;
+ using __c99::abs;
+ using __c99::llabs;
+ using __c99::div;
+ using __c99::lldiv;
+ using __c99::atoll;
+ using __c99::strtof;
+ using __c99::strtoll;
+ using __c99::strtoull;
+ using __c99::strtold;
+ #endif
+
#endif
Index: include/c_compatibility/wchar.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c_compatibility/wchar.h,v
retrieving revision 1.1
diff -c -p -r1.1 wchar.h
*** include/c_compatibility/wchar.h 21 Jun 2002 20:20:44 -0000 1.1
--- include/c_compatibility/wchar.h 29 Aug 2002 06:48:23 -0000
*************** using std::mbstate_t;
*** 37,104 ****
#if _GLIBCPP_USE_WCHAR_T
using std::wint_t;
! using std::btowc;
! using std::wctob;
! using std::fgetwc;
! using std::fgetwc;
! using std::fgetws;
! using std::fputwc;
! using std::fputws;
! using std::fwide;
! using std::fwprintf;
! using std::fwscanf;
! using std::swprintf;
! using std::swscanf;
! using std::vfwprintf;
! using std::vfwscanf;
! using std::vswprintf;
! using std::vswscanf;
! using std::vwprintf;
! using std::vwscanf;
! using std::wprintf;
! using std::wscanf;
! using std::getwc;
! using std::getwchar;
! using std::mbsinit;
! using std::mbrlen;
! using std::mbrtowc;
! using std::mbsrtowcs;
! using std::wcsrtombs;
! using std::putwc;
! using std::putwchar;
! using std::ungetwc;
! using std::wcrtomb;
! using std::wcstod;
! using std::wcstof;
! using std::wcstol;
! using std::wcstoul;
! using std::wcscpy;
! using std::wcsncpy;
! using std::wcscat;
! using std::wcsncat;
! using std::wcscmp;
! using std::wcscoll;
! using std::wcsncmmp;
! using std::wcsxfrm;
! using std::wcschr;
! using std::wcscspn;
! using std::wcslen;
! using std::wcspbrk;
! using std::wcsrchr;
! using std::wcsspn;
! using std::wcsstr;
! using std::wcstok;
! using std::wmemchr;
! using std::wmemcmp;
! using std::wmemcpy;
! using std::wmemmove;
! using std::wmemset;
! using std::wcsftime;
#if _GLIBCPP_USE_C99
! using std::wcstold;
! using std::wcstoll;
! using std::wcstoull;
#endif
#endif //_GLIBCPP_USE_WCHAR_T
--- 37,104 ----
#if _GLIBCPP_USE_WCHAR_T
using std::wint_t;
! using __c99::btowc;
! using __c99::wctob;
! using __c99::fgetwc;
! using __c99::fgetwc;
! using __c99::fgetws;
! using __c99::fputwc;
! using __c99::fputws;
! using __c99::fwide;
! using __c99::fwprintf;
! using __c99::fwscanf;
! using __c99::swprintf;
! using __c99::swscanf;
! using __c99::vfwprintf;
! using __c99::vfwscanf;
! using __c99::vswprintf;
! using __c99::vswscanf;
! using __c99::vwprintf;
! using __c99::vwscanf;
! using __c99::wprintf;
! using __c99::wscanf;
! using __c99::getwc;
! using __c99::getwchar;
! using __c99::mbsinit;
! using __c99::mbrlen;
! using __c99::mbrtowc;
! using __c99::mbsrtowcs;
! using __c99::wcsrtombs;
! using __c99::putwc;
! using __c99::putwchar;
! using __c99::ungetwc;
! using __c99::wcrtomb;
! using __c99::wcstod;
! using __c99::wcstof;
! using __c99::wcstol;
! using __c99::wcstoul;
! using __c99::wcscpy;
! using __c99::wcsncpy;
! using __c99::wcscat;
! using __c99::wcsncat;
! using __c99::wcscmp;
! using __c99::wcscoll;
! using __c99::wcsncmmp;
! using __c99::wcsxfrm;
! using __c99::wcschr;
! using __c99::wcscspn;
! using __c99::wcslen;
! using __c99::wcspbrk;
! using __c99::wcsrchr;
! using __c99::wcsspn;
! using __c99::wcsstr;
! using __c99::wcstok;
! using __c99::wmemchr;
! using __c99::wmemcmp;
! using __c99::wmemcpy;
! using __c99::wmemmove;
! using __c99::wmemset;
! using __c99::wcsftime;
#if _GLIBCPP_USE_C99
! using __c99::wcstold;
! using __c99::wcstoll;
! using __c99::wcstoull;
#endif
#endif //_GLIBCPP_USE_WCHAR_T
Index: include/c_compatibility/wctype.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c_compatibility/wctype.h,v
retrieving revision 1.1
diff -c -p -r1.1 wctype.h
*** include/c_compatibility/wctype.h 21 Jun 2002 20:20:45 -0000 1.1
--- include/c_compatibility/wctype.h 29 Aug 2002 06:48:23 -0000
***************
*** 32,55 ****
#include <cwctype>
! using std::wctype_t;
! using std::wctrans_t;
! using std::iswalpha;
! using std::iswupper;
! using std::iswlower;
! using std::iswdigit;
! using std::iswxdigit;
! using std::iswalnum;
! using std::iswspace;
! using std::iswpunct;
! using std::iswprint;
! using std::iswgraph;
! using std::iswcntrl;
! using std::iswctype;
! using std::towctrans;
! using std::towlower;
! using std::towupper;
! using std::wctrans;
! using std::wctype;
#endif
--- 32,56 ----
#include <cwctype>
! using __c99::wctype_t;
! using __c99::wctrans_t;
!
! using __c99::iswalpha;
! using __c99::iswupper;
! using __c99::iswlower;
! using __c99::iswdigit;
! using __c99::iswxdigit;
! using __c99::iswalnum;
! using __c99::iswspace;
! using __c99::iswpunct;
! using __c99::iswprint;
! using __c99::iswgraph;
! using __c99::iswcntrl;
! using __c99::iswctype;
! using __c99::towctrans;
! using __c99::towlower;
! using __c99::towupper;
! using __c99::wctrans;
! using __c99::wctype;
#endif