[multiple changes]

2000-10-02  Steven King  <sxking@uswest.net>

        * mkcshadow: Fixed script to output proper include guard.
        * bits/char_traits.h: Cleaned up types in char_traits<char> functions.
        * libio/_G_config.h: Hacked to make work with shadow heraders.
        * shadow/*: Hacked to make shadow headers work.

2000-10-02  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	Self-compile with shadow headers.
	* acconfig.h (_GLIBCPP_USE_SHADOW_HEADERS): Define. Eventually,
	like _GLIBCPP_USE_NAMESPACES before it, this macro will die when
	it becomes the default way the library is built.
	* acinclude.m4 (GLIBCPP_ENABLE_SHADOW): New macro.
	* config/gnu-linux/bits/ctype_base.h (ctype_base): Use it.
	* config/gnu-linux/ctype.cc (ctype): Use it.

	* src/localename.cc (locale::_Impl::_M_replace_categories): Remove
	call to assert.
	* src/locale.cc: Explicitly cast mbstate_t to void* in calls to
	memset. This should not be necessary, but an ambiguous overload
	with it in.

	* shadow/bits/std_cwchar.h: Fix.
	* shadow/wchar.h: Fix.

	* config/gnu-linux/bits/ctype_base.h (ctype_base): Inject ctype
	enums into namespace std:: for ctype_base enum. Other OS types
	will have to do this as well.
	* config/gnu-linux/ctype.cc (ctype): Inject ctype data into
	namespace std, in particular __ctype_toupper, __ctype_tolower,
	__ctype_b.

	* shadow/iolibio.h: New file.
	* shadow/bits/wrap_iolibio.h: New file.
	* shadow/libioP.h: New file.
	* shadow/bits/wrap_libioP.h: New file.
	* shadow/bits/wrap_fcntl.h: New file.
	* shadow/fcntl.h: New file.
	* shadow/iconv.h: New file. Inject iconv names into the global
	namespace, unmangled for the moment.
	* shadow/bits/wrap_iconv.h: New file.
	* shadow/unistd.h: Remove. Useless.
	* shadow/bits/wrap_unistd.h: Remove.

	* src/Makefile.am: Take out machine-ansi.h, add fcntl.h unistd.h.
	* src/Makefile.in: Regenerate.

	* config/c_io_libio.h (_IO_codecvt): Change to normal C++ decl.

	* shadow/libio.h: Fix.
	* shadow/bits/wrap_libio.h: Fix.

	* shadow/bits/std_clocale.h: Remove typedef struct construct,
	which will not compile.
	* shadow/bits/std_ctime.h: Same.

	* shadow/pthread.h: New file. Put pthreads types and functions
	into global scope, which is probably not the correct long-term
	solution but has to be done at the moment before libio wrappers
	can even be started.
	* shadow/bits/wrap_pthread.h: New file.

	* bits/std_ios.h: Formatting tweak.
	* shadow/bits/std_cstdio.h: Format. Remove extraneous bits.

	* acinclude.m4 (GLIBCPP_CHECK_COMPILER_FEATURES): Add -Werror to
	tests for compiler features.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	* config/c_io_libio.cc: Remove fcntl.h include, as SEEK_SET
	redefined.
	* libio/libioP.h: Comment out fcntl.h include.

	* shadow/math.h: Add in float and long declarations, as per ISO C9X.

	* bits/c++config: Define _ISOC99_SOURCE.

	* acinclude.m4 (GLIBCPP_ENABLE_SHADOW): Add -fno-builtins to
	CSHADOWFLAGS, as well as _ISOC99_SOURCE.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* src/Makefile.am (CSHADOW_INCLUDES): Enable, again.
	(CSHADOW_INCLUDES): Add -I$(top_srcdir)/std before shadow include dir.
	(CXXCOMPILE): Remove $(DEFS), which searches $(top_srcdir) before
	std or shadow directories.
	(LTCXXCOMPILE): Same.
	(INCLUDES): Add $(top_builddir) before $(top_srcdir).
	(AC_CXXFLAGS): Add CSHADOWFLAGS.
	* src/Makefile.in: Regenerate.

	* src/complex.cc (FCT): Change ::name to name.
	* src/complexl.cc (FCT): Same. Use _GLIBCPP_USE_LONG_LONG here.
	* src/complexf.cc (FCT): Same.

	* src/complexf.cc: Remove FCT define, as things are properly
	overloaded in the std namespace with the shadow headers.
	* src/complexl.cc: Same.
	* src/complex.cc: Same.

From-SVN: r36707
This commit is contained in:
Benjamin Kosnik 2000-10-04 05:06:32 +00:00
parent 1792c91ce6
commit 0517cb9903
62 changed files with 3471 additions and 3497 deletions

View File

@ -1,3 +1,104 @@
2000-10-02 Steven King <sxking@uswest.net>
* mkcshadow: Fixed script to output proper include guard.
* bits/char_traits.h: Cleaned up types in char_traits<char> functions.
* libio/_G_config.h: Hacked to make work with shadow heraders.
* shadow/*: Hacked to make shadow headers work.
2000-10-02 Benjamin Kosnik <bkoz@purist.soma.redhat.com>
Self-compile with shadow headers.
* acconfig.h (_GLIBCPP_USE_SHADOW_HEADERS): Define. Eventually,
like _GLIBCPP_USE_NAMESPACES before it, this macro will die when
it becomes the default way the library is built.
* acinclude.m4 (GLIBCPP_ENABLE_SHADOW): New macro.
* config/gnu-linux/bits/ctype_base.h (ctype_base): Use it.
* config/gnu-linux/ctype.cc (ctype): Use it.
* src/localename.cc (locale::_Impl::_M_replace_categories): Remove
call to assert.
* src/locale.cc: Explicitly cast mbstate_t to void* in calls to
memset. This should not be necessary, but an ambiguous overload
with it in.
* shadow/bits/std_cwchar.h: Fix.
* shadow/wchar.h: Fix.
* config/gnu-linux/bits/ctype_base.h (ctype_base): Inject ctype
enums into namespace std:: for ctype_base enum. Other OS types
will have to do this as well.
* config/gnu-linux/ctype.cc (ctype): Inject ctype data into
namespace std, in particular __ctype_toupper, __ctype_tolower,
__ctype_b.
* shadow/iolibio.h: New file.
* shadow/bits/wrap_iolibio.h: New file.
* shadow/libioP.h: New file.
* shadow/bits/wrap_libioP.h: New file.
* shadow/bits/wrap_fcntl.h: New file.
* shadow/fcntl.h: New file.
* shadow/iconv.h: New file. Inject iconv names into the global
namespace, unmangled for the moment.
* shadow/bits/wrap_iconv.h: New file.
* shadow/unistd.h: Remove. Useless.
* shadow/bits/wrap_unistd.h: Remove.
* src/Makefile.am: Take out machine-ansi.h, add fcntl.h unistd.h.
* src/Makefile.in: Regenerate.
* config/c_io_libio.h (_IO_codecvt): Change to normal C++ decl.
* shadow/libio.h: Fix.
* shadow/bits/wrap_libio.h: Fix.
* shadow/bits/std_clocale.h: Remove typedef struct construct,
which will not compile.
* shadow/bits/std_ctime.h: Same.
* shadow/pthread.h: New file. Put pthreads types and functions
into global scope, which is probably not the correct long-term
solution but has to be done at the moment before libio wrappers
can even be started.
* shadow/bits/wrap_pthread.h: New file.
* bits/std_ios.h: Formatting tweak.
* shadow/bits/std_cstdio.h: Format. Remove extraneous bits.
* acinclude.m4 (GLIBCPP_CHECK_COMPILER_FEATURES): Add -Werror to
tests for compiler features.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* config/c_io_libio.cc: Remove fcntl.h include, as SEEK_SET
redefined.
* libio/libioP.h: Comment out fcntl.h include.
* shadow/math.h: Add in float and long declarations, as per ISO C9X.
* bits/c++config: Define _ISOC99_SOURCE.
* acinclude.m4 (GLIBCPP_ENABLE_SHADOW): Add -fno-builtins to
CSHADOWFLAGS, as well as _ISOC99_SOURCE.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* src/Makefile.am (CSHADOW_INCLUDES): Enable, again.
(CSHADOW_INCLUDES): Add -I$(top_srcdir)/std before shadow include dir.
(CXXCOMPILE): Remove $(DEFS), which searches $(top_srcdir) before
std or shadow directories.
(LTCXXCOMPILE): Same.
(INCLUDES): Add $(top_builddir) before $(top_srcdir).
(AC_CXXFLAGS): Add CSHADOWFLAGS.
* src/Makefile.in: Regenerate.
* src/complex.cc (FCT): Change ::name to name.
* src/complexl.cc (FCT): Same. Use _GLIBCPP_USE_LONG_LONG here.
* src/complexf.cc (FCT): Same.
* src/complexf.cc: Remove FCT define, as things are properly
overloaded in the std namespace with the shadow headers.
* src/complexl.cc: Same.
* src/complex.cc: Same.
2000-09-25 Phil Edwards <pme@sources.redhat.com>
* docs/documentation.html: Add link to...

View File

@ -3,6 +3,9 @@
// Include support for 'long long' and 'unsigned long long'.
#undef _GLIBCPP_USE_LONG_LONG
// Include support for shadow headers, ie --enable-cshadow-headers.
#undef _GLIBCPP_USE_SHADOW_HEADERS
// Define if the host has a type mbstate_t defined in
// wchar.h, as required by 21.1.3.1. Some systems, namely
// hppa-hp-hpux10.20 do not meet this requirement, and must be worked

View File

@ -205,7 +205,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_FEATURES, [
# Check for more sophisticated diagnostic control.
AC_MSG_CHECKING([for g++ that supports -fdiagnostics-show-location=once])
CXXFLAGS='-fdiagnostics-show-location=once'
CXXFLAGS='-Werror -fdiagnostics-show-location=once'
AC_TRY_COMPILE(, [int foo;
], [ac_gabydiags=yes], [ac_gabydiags=no])
if test "$ac_test_CXXFLAGS" = set; then
@ -221,7 +221,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_FEATURES, [
# Check for -ffunction-sections -fdata-sections
AC_MSG_CHECKING([for g++ that supports -ffunction-sections -fdata-sections])
CXXFLAGS='-ffunction-sections -fdata-sections'
CXXFLAGS='-Werror -ffunction-sections -fdata-sections'
AC_TRY_COMPILE(, [int foo;
], [ac_fdsections=yes], [ac_fdsections=no])
if test "$ac_test_CXXFLAGS" = set; then
@ -1446,10 +1446,11 @@ changequote([, ])
AC_MSG_RESULT($enable_cshadow_headers)
dnl Option parsed, now set things appropriately
dnl CSHADOWFLAGS is currently unused, but may be useful in the future.
dnl NB: these things may be duplicated in c++config.h as well.
case "$enable_cshadow_headers" in
yes)
CSHADOWFLAGS=""
CSHADOWFLAGS="-fno-builtin"
AC_DEFINE(_GLIBCPP_USE_SHADOW_HEADERS)
;;
no)
CSHADOWFLAGS=""

View File

@ -217,7 +217,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_FEATURES, [
# Check for more sophisticated diagnostic control.
AC_MSG_CHECKING([for g++ that supports -fdiagnostics-show-location=once])
CXXFLAGS='-fdiagnostics-show-location=once'
CXXFLAGS='-Werror -fdiagnostics-show-location=once'
AC_TRY_COMPILE(, [int foo;
], [ac_gabydiags=yes], [ac_gabydiags=no])
if test "$ac_test_CXXFLAGS" = set; then
@ -233,7 +233,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_FEATURES, [
# Check for -ffunction-sections -fdata-sections
AC_MSG_CHECKING([for g++ that supports -ffunction-sections -fdata-sections])
CXXFLAGS='-ffunction-sections -fdata-sections'
CXXFLAGS='-Werror -ffunction-sections -fdata-sections'
AC_TRY_COMPILE(, [int foo;
], [ac_fdsections=yes], [ac_fdsections=no])
if test "$ac_test_CXXFLAGS" = set; then
@ -1458,10 +1458,11 @@ changequote([, ])
AC_MSG_RESULT($enable_cshadow_headers)
dnl Option parsed, now set things appropriately
dnl CSHADOWFLAGS is currently unused, but may be useful in the future.
dnl NB: these things may be duplicated in c++config.h as well.
case "$enable_cshadow_headers" in
yes)
CSHADOWFLAGS=""
CSHADOWFLAGS="-fno-builtin"
AC_DEFINE(_GLIBCPP_USE_SHADOW_HEADERS)
;;
no)
CSHADOWFLAGS=""

View File

@ -33,10 +33,12 @@
// The current version of the C++ library in compressed ISO date format.
#define __GLIBCPP__ 20000911
// By enabling this, __USE_ISOC99 is also enabled, along with other
// bits like POSIX, SVID, X/Open and GNU extensions.
// By enabling this, all GNU extensions are enabled.
#define _GNU_SOURCE 1
// By enabling this, all ISO C99, ISO C9X functionality is enabled.
#define _ISOC99_SOURCE 1
// This flag controls the error handling in string, and perhaps other
// bits as time goes on: check out bits/basic_string.h for more
// info. It also helps alleviate the circular dependency between

View File

@ -176,23 +176,23 @@ namespace std {
static const char_type*
find(const char_type* __s, size_t __n, const char_type& __a)
{ return static_cast<char*>(memchr(__s, __a, __n)); }
{ return static_cast<const char_type*>(memchr(__s, __a, __n)); }
static char_type*
move(char_type* __s1, const char_type* __s2, size_t __n)
{ return static_cast<char*>(memmove(__s1, __s2, __n)); }
{ return static_cast<char_type*>(memmove(__s1, __s2, __n)); }
static char_type*
copy(char_type* __s1, const char_type* __s2, size_t __n)
{ return static_cast<char*>(memcpy(__s1, __s2, __n)); }
{ return static_cast<char_type*>(memcpy(__s1, __s2, __n)); }
static char_type*
assign(char_type* __s, size_t __n, char_type __a)
{ return static_cast<char*>(memset(__s, __a, __n)); }
{ return static_cast<char_type*>(memset(__s, __a, __n)); }
static char_type
to_char_type(const int_type& __c)
{ return static_cast<char>(__c); }
{ return static_cast<char_type>(__c); }
// To keep both the byte 0xff and the eof symbol 0xffffffff
// from ending up as 0xffffffff.

View File

@ -39,7 +39,7 @@
#include <bits/char_traits.h> // For char_traits, streamoff, streamsize, fpos
#include <bits/stl_string_fwd.h>// For string.
#include <bits/std_cstdio.h> // For SEEK_SET, SEEK_CUR, SEEK_END
# include <bits/localefwd.h> // For class locale
#include <bits/localefwd.h> // For class locale
#include <bits/ios_base.h> // For ios_base declarations.
#include <bits/std_streambuf.h>
#include <bits/basic_ios.h>

View File

@ -35,7 +35,7 @@
#define _CPP_IOSFWD 1
#include <bits/c++config.h>
#include <bits/std_cwchar.h> //For mbstate_t
#include <bits/std_cwchar.h> // For mbstate_t
namespace std {

View File

@ -6,6 +6,9 @@
// Include support for 'long long' and 'unsigned long long'.
#undef _GLIBCPP_USE_LONG_LONG
// Include support for shadow headers, ie --enable-cshadow-headers.
#undef _GLIBCPP_USE_SHADOW_HEADERS
// Define if the host has a type mbstate_t defined in
// wchar.h, as required by 21.1.3.1. Some systems, namely
// hppa-hp-hpux10.20 do not meet this requirement, and must be worked

View File

@ -33,7 +33,6 @@
#include <bits/basic_file.h>
#include <libioP.h>
#include <fcntl.h> // Solaris needs for O_* macros
namespace std {

View File

@ -57,46 +57,45 @@ namespace std {
typedef _IO_FILE __c_file_type;
typedef _IO_wide_data __c_wfile_type;
extern "C" struct _IO_codecvt __c_libio_codecvt;
extern "C" _IO_codecvt __c_libio_codecvt;
// from ios_base.h
struct __ios_flags
{
typedef short __int_type;
{
typedef short __int_type;
static const __int_type _S_boolalpha = _IO_BAD_SEEN;
static const __int_type _S_dec = _IO_DEC;
static const __int_type _S_fixed = _IO_FIXED;
static const __int_type _S_hex = _IO_HEX;
static const __int_type _S_internal = _IO_INTERNAL;
static const __int_type _S_left = _IO_LEFT;
static const __int_type _S_oct = _IO_OCT;
static const __int_type _S_right = _IO_RIGHT;
static const __int_type _S_scientific = _IO_SCIENTIFIC;
static const __int_type _S_showbase = _IO_SHOWBASE;
static const __int_type _S_showpoint = _IO_SHOWPOINT;
static const __int_type _S_showpos = _IO_SHOWPOS;
static const __int_type _S_skipws = _IO_SKIPWS;
static const __int_type _S_unitbuf = _IO_UNITBUF;
static const __int_type _S_uppercase = _IO_UPPERCASE;
static const __int_type _S_adjustfield = _IO_LEFT
| _IO_RIGHT
| _IO_INTERNAL;
static const __int_type _S_basefield = _IO_DEC | _IO_OCT | _IO_HEX;
static const __int_type _S_floatfield = _IO_SCIENTIFIC | _IO_FIXED;
static const __int_type _S_boolalpha = _IO_BAD_SEEN;
static const __int_type _S_dec = _IO_DEC;
static const __int_type _S_fixed = _IO_FIXED;
static const __int_type _S_hex = _IO_HEX;
static const __int_type _S_internal = _IO_INTERNAL;
static const __int_type _S_left = _IO_LEFT;
static const __int_type _S_oct = _IO_OCT;
static const __int_type _S_right = _IO_RIGHT;
static const __int_type _S_scientific = _IO_SCIENTIFIC;
static const __int_type _S_showbase = _IO_SHOWBASE;
static const __int_type _S_showpoint = _IO_SHOWPOINT;
static const __int_type _S_showpos = _IO_SHOWPOS;
static const __int_type _S_skipws = _IO_SKIPWS;
static const __int_type _S_unitbuf = _IO_UNITBUF;
static const __int_type _S_uppercase = _IO_UPPERCASE;
static const __int_type _S_adjustfield = _IO_LEFT | _IO_RIGHT
| _IO_INTERNAL;
static const __int_type _S_basefield = _IO_DEC | _IO_OCT | _IO_HEX;
static const __int_type _S_floatfield = _IO_SCIENTIFIC | _IO_FIXED;
// 27.4.2.1.3 Type ios_base::iostate
static const __int_type _S_badbit = _IO_BAD_SEEN;
static const __int_type _S_eofbit = _IO_EOF_SEEN;
static const __int_type _S_failbit = _IO_ERR_SEEN;
static const __int_type _S_badbit = _IO_BAD_SEEN;
static const __int_type _S_eofbit = _IO_EOF_SEEN;
static const __int_type _S_failbit = _IO_ERR_SEEN;
// 27.4.2.1.4 Type openmode
static const __int_type _S_app = _IOS_APPEND;
static const __int_type _S_ate = _IOS_ATEND;
static const __int_type _S_bin = _IOS_BIN;
static const __int_type _S_in = _IOS_INPUT;
static const __int_type _S_out = _IOS_OUTPUT;
static const __int_type _S_trunc = _IOS_TRUNC;
static const __int_type _S_app = _IOS_APPEND;
static const __int_type _S_ate = _IOS_ATEND;
static const __int_type _S_bin = _IOS_BIN;
static const __int_type _S_in = _IOS_INPUT;
static const __int_type _S_out = _IOS_OUTPUT;
static const __int_type _S_trunc = _IOS_TRUNC;
};
}

View File

@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -33,6 +33,20 @@
// Information as gleaned from /usr/include/ctype.h
#if _GLIBCPP_USE_SHADOW_HEADERS
using _C_legacy::_ISspace;
using _C_legacy::_ISprint;
using _C_legacy::_IScntrl;
using _C_legacy::_ISupper;
using _C_legacy::_ISlower;
using _C_legacy::_ISalpha;
using _C_legacy::_ISdigit;
using _C_legacy::_ISpunct;
using _C_legacy::_ISxdigit;
using _C_legacy::_ISalnum;
using _C_legacy::_ISgraph;
#endif
struct ctype_base
{
// Non-standard typedefs.

View File

@ -33,6 +33,12 @@
// Information as gleaned from /usr/include/ctype.h
#if _GLIBCPP_USE_SHADOW_HEADERS
using _C_legacy::__ctype_toupper;
using _C_legacy::__ctype_tolower;
using _C_legacy::__ctype_b;
#endif
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
: _Ctype_nois<char>(__refs), _M_del(__table != 0 && __del),
_M_toupper(__ctype_toupper), _M_tolower(__ctype_tolower),
@ -71,3 +77,12 @@

1830
libstdc++-v3/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,7 @@
2000-09-27 benjamin kosnik <bkoz@haight.constant.com>
* libioP.h: Remove fcntl.h include.
2000-08-22 Benjamin Kosnik <bkoz@gnu.org>
* iofwide.c (_IO_fwide): Simplify, as nl_langinfo is assumed.

View File

@ -170,62 +170,62 @@ CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
libio_la_LDFLAGS =
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@@GLIBCPP_NEED_LIBIO_FALSE@libio_la_OBJECTS =
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@libio_la_OBJECTS = \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@iofwide.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@iofclose.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@iofopen.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@stdio.lo
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@libio_la_OBJECTS = \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@filedoalloc.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@genops.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@fileops.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@stdfiles.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@c_codecvt.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@wfiledoalloc.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@wfileops.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@wgenops.lo
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@libio_la_OBJECTS = \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@filedoalloc.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@genops.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@fileops.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@stdfiles.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@c_codecvt.lo
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@libio_la_OBJECTS = \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@filedoalloc.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@genops.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@fileops.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@stdfiles.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@c_codecvt.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@iofwide.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@iofclose.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@iofopen.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@stdio.lo
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@@GLIBCPP_NEED_LIBIO_FALSE@libio_la_OBJECTS = \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@@GLIBCPP_NEED_LIBIO_FALSE@wfiledoalloc.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@@GLIBCPP_NEED_LIBIO_FALSE@wfileops.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@@GLIBCPP_NEED_LIBIO_FALSE@wgenops.lo
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@libio_la_OBJECTS = \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@wfiledoalloc.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@wfileops.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@wgenops.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@iofwide.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@iofclose.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@iofopen.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@stdio.lo
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@libio_la_OBJECTS = \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@filedoalloc.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@genops.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@fileops.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@stdfiles.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@c_codecvt.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@wfiledoalloc.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@wfileops.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@wgenops.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@iofwide.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@iofclose.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@iofopen.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@stdio.lo
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@libio_la_OBJECTS = \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@filedoalloc.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@genops.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@fileops.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@stdfiles.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@c_codecvt.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@wfiledoalloc.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@wfileops.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@wgenops.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofwide.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofclose.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofopen.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@stdio.lo
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@libio_la_OBJECTS =
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@libio_la_OBJECTS = \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@wfiledoalloc.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@wfileops.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@wgenops.lo
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@libio_la_OBJECTS = \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@filedoalloc.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@genops.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@fileops.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@stdfiles.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@c_codecvt.lo
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@libio_la_OBJECTS = \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofwide.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofclose.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofopen.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@stdio.lo
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@libio_la_OBJECTS = \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@filedoalloc.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@genops.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@fileops.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@stdfiles.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@c_codecvt.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofwide.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofclose.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofopen.lo \
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@stdio.lo
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@libio_la_OBJECTS = \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@wfiledoalloc.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@wfileops.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@wgenops.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofwide.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofclose.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofopen.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@stdio.lo
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@libio_la_OBJECTS = \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@filedoalloc.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@genops.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@fileops.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@stdfiles.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@c_codecvt.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@wfiledoalloc.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@wfileops.lo \
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@wgenops.lo
CFLAGS = @CFLAGS@
CCLD = $(CC)
DIST_COMMON = ChangeLog Makefile.am Makefile.in

View File

@ -19,15 +19,6 @@
#include <bits/std_cstddef.h>
/* For use as part of glibc (native) or as part of libstdc++ (maybe
not glibc) */
#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1)
# ifdef _GLIBCPP_USE_WCHAR_T
# include <bits/std_cwchar.h>
typedef mbstate_t __mbstate_t;
# endif
#endif
#ifndef _WINT_T
/* Integral type unchanged by default argument promotions that can
hold any value corresponding to members of the extended character
@ -36,9 +27,22 @@ typedef mbstate_t __mbstate_t;
# define _WINT_T
typedef unsigned int wint_t;
#endif
#define __need_mbstate_t
#include <bits/std_cwchar.h>
#define _G_size_t size_t
/* For use as part of glibc (native) or as part of libstdc++ (maybe
not glibc) */
#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1)
# ifdef _GLIBCPP_USE_WCHAR_T
typedef struct
{
int count;
wint_t value;
}__mbstate_t;
# endif
#endif
typedef size_t _G_size_t;
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
typedef struct
{

View File

@ -78,3 +78,5 @@ _IO_FILE *__old_freopen __P ((const char *, const char *, _IO_FILE *));
#ifdef __cplusplus
}
#endif

View File

@ -66,8 +66,10 @@ while read header; do
// script. RTFM!
#ifndef _INCLUDED_CPP_${UPNAME}_
# define _INCLUDED_CPP_${UPNAME}_
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
# pragma GCC system_header
# include_next <${header}>
# else
@ -76,9 +78,11 @@ while read header; do
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# pragma GCC system_header
# include_next <${header}>
} // close extern "C"
} // close namespace _C_legacy::
# undef _IN_C_LEGACY_
# endif /* _IN_C_LEGACY_ */
#endif /* _INCLUDED_CPP_${UPNAME}_ */

View File

@ -29,7 +29,23 @@
// no include guard here.
# undef _SHADOW_NAME
# define _SHADOW_NAME <cassert>
# include <bits/generic_shadow.h>
# undef _SHADOW_NAME
#ifdef _IN_C_LEGACY_ /* sub-included by a C header */
// get out of the "legacy"
} // close extern "C"
} // close namespace _C_legacy::
# undef _IN_C_LEGACY_
# define _ASSERT_NEED_C_LEGACY_
#endif
#include <cassert>
// expose global C names, including non-standard ones, but shadow
// some names and types with the std:: C++ version.
#ifdef _ASSERT_NEED_C_LEGACY_
// dive back into the "swamp"
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# undef _ASSERT_NEED_C_LEGACY_
#endif /* _ASSERT_NEED_C_LEGACY_ */

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -31,13 +31,19 @@
// ISO C++ 14882: 19.2 Assertions
//
// No include guards or wrappers on this header...
//
// If <assert.h> sub-includes anything else that
// defines a global used in other headers, we are sunk.
#ifndef _CPP_CASSERT
#define _CPP_CASSERT 1
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# pragma GCC system_header
# include_next <assert.h>
}
} // namespace _C_legacy
#undef _IN_C_LEGACY_
#endif
extern "C" {
# pragma GCC system_header
# include_next <assert.h>
}

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -33,30 +33,52 @@
#ifndef _CPP_CCTYPE
#define _CPP_CCTYPE 1
namespace _C_legacy {
extern "C" {
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# pragma GCC system_header
# include_next <ctype.h>
}
}
inline int _CPP_isalnum_capture(int c) { return isalnum (c); }
inline int _CPP_isalpha_capture(int c) { return isalpha (c); }
inline int _CPP_iscntrl_capture(int c) { return iscntrl (c); }
inline int _CPP_isdigit_capture(int c) { return isdigit (c); }
inline int _CPP_isgraph_capture(int c) { return isgraph (c); }
inline int _CPP_islower_capture(int c) { return islower (c); }
inline int _CPP_isprint_capture(int c) { return isprint (c); }
inline int _CPP_ispunct_capture(int c) { return ispunct (c); }
inline int _CPP_isspace_capture(int c) { return isspace (c); }
inline int _CPP_isupper_capture(int c) { return isupper (c); }
inline int _CPP_isxdigit_capture(int c) { return isxdigit (c); }
inline int
_CPP_isalnum_capture(int c) { return isalnum(c); }
inline int _CPP_tolower_capture(int c) { return tolower (c); }
inline int _CPP_toupper_capture(int c) { return toupper (c); }
inline int
_CPP_isalpha_capture(int c) { return isalpha(c); }
namespace _C_shadow { }
} // close namespace ::_C_legacy::
inline int
_CPP_iscntrl_capture(int c) { return iscntrl(c); }
inline int
_CPP_isdigit_capture(int c) { return isdigit(c); }
inline int
_CPP_isgraph_capture(int c) { return isgraph(c); }
inline int
_CPP_islower_capture(int c) { return islower(c); }
inline int
_CPP_isprint_capture(int c) { return isprint(c); }
inline int
_CPP_ispunct_capture(int c) { return ispunct(c); }
inline int
_CPP_isspace_capture(int c) { return isspace(c); }
inline int
_CPP_isupper_capture(int c) { return isupper(c); }
inline int
_CPP_isxdigit_capture(int c) { return isxdigit(c); }
inline int
_CPP_tolower_capture(int c) { return tolower(c); }
inline int
_CPP_toupper_capture(int c) { return toupper(c); }
} // namespace _C_legacy
# undef isalnum
# undef isalpha
@ -73,71 +95,51 @@
# undef tolower
# undef toupper
#if 0 /* these might not be necessary any more. 98-09-29 */
# undef _U
# undef _L
# undef _N
# undef _S
# undef _P
# undef _C
# undef _B
# undef _X
#endif
namespace std {
inline int
isalnum(int __c) { return _C_legacy::_CPP_isalnum_capture(__c); }
namespace _C_legacy {
namespace _C_shadow {
}
}
namespace std {
inline int
isalpha(int __c) { return _C_legacy::_CPP_isalpha_capture(__c); }
inline int isalnum(int __c)
{ return ::_C_legacy::_CPP_isalnum_capture (__c); }
inline int isalpha (int __c)
{ return ::_C_legacy::_CPP_isalpha_capture (__c); }
inline int iscntrl (int __c)
{ return ::_C_legacy::_CPP_iscntrl_capture (__c); }
inline int isdigit (int __c)
{ return ::_C_legacy::_CPP_isdigit_capture (__c); }
inline int isgraph (int __c)
{ return ::_C_legacy::_CPP_isgraph_capture (__c); }
inline int islower (int __c)
{ return ::_C_legacy::_CPP_islower_capture (__c); }
inline int isprint (int __c)
{ return ::_C_legacy::_CPP_isprint_capture (__c); }
inline int ispunct (int __c)
{ return ::_C_legacy::_CPP_ispunct_capture (__c); }
inline int isspace (int __c)
{ return ::_C_legacy::_CPP_isspace_capture (__c); }
inline int isupper (int __c)
{ return ::_C_legacy::_CPP_isupper_capture (__c); }
inline int isxdigit (int __c)
{ return ::_C_legacy::_CPP_isxdigit_capture (__c); }
inline int
iscntrl(int __c) { return _C_legacy::_CPP_iscntrl_capture(__c); }
inline int tolower (int __c)
{ return ::_C_legacy::_CPP_tolower_capture (__c); }
inline int toupper (int __c)
{ return ::_C_legacy::_CPP_toupper_capture (__c); }
inline int
isdigit(int __c) { return _C_legacy::_CPP_isdigit_capture(__c); }
} // close namespace std::
inline int
isgraph(int __c) { return _C_legacy::_CPP_isgraph_capture(__c); }
inline int
islower(int __c) { return _C_legacy::_CPP_islower_capture(__c); }
inline int
isprint(int __c) { return _C_legacy::_CPP_isprint_capture(__c); }
inline int
ispunct(int __c) { return _C_legacy::_CPP_ispunct_capture(__c); }
inline int
isspace(int __c) { return _C_legacy::_CPP_isspace_capture(__c); }
inline int
isupper(int __c) { return _C_legacy::_CPP_isupper_capture(__c); }
inline int
isxdigit(int __c) { return _C_legacy::_CPP_isxdigit_capture(__c); }
inline int
tolower(int __c) { return _C_legacy::_CPP_tolower_capture(__c); }
inline int
toupper(int __c) { return _C_legacy::_CPP_toupper_capture(__c); }
} // namespace std
namespace _C_legacy {
namespace _C_shadow {
using ::std::isalnum;
using ::std::isalpha;
using ::std::iscntrl;
using ::std::isdigit;
using ::std::isgraph;
using ::std::islower;
using ::std::isprint;
using ::std::ispunct;
using ::std::isspace;
using ::std::isupper;
using ::std::isxdigit;
using ::std::tolower;
using ::std::toupper;
}
}
# undef _IN_C_LEGACY_
#endif

View File

@ -1,7 +1,6 @@
// -*- C++ -*- header wrapper.
//// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -34,33 +33,24 @@
#ifndef _CPP_CERRNO
#define _CPP_CERRNO 1
namespace _C_legacy {
extern "C" {
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# pragma GCC system_header
# include_next <errno.h>
}
}
int& _CPP_errno_capture() { return errno; }
// inline int&
// _CPP_errno_capture() { return errno; }
namespace _C_shadow { }
} // close namespace ::_C_legacy::
} // namespace _C_legacy::
# undef errno
# define errno ::_C_legacy::_CPP_errno_capture()
// # undef EDOM
// # undef ERANGE
//# define errno _C_legacy::_CPP_errno_capture()
namespace _C_legacy {
namespace _C_shadow {
}
}
namespace std {
} // close namespace std::
namespace _C_legacy {
namespace _C_shadow {
}
}
namespace std {
using _C_legacy::errno;
}
# undef _IN_C_LEGACY_

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -34,152 +34,21 @@
#ifndef _CPP_CFLOAT
#define _CPP_CFLOAT 1
#if 0 /* 1998-09-29 */
# ifdef __GLIBC__
// For GNU libc we must also include this one:
# include <fenv.h>
# endif
#endif
namespace _C_legacy {
extern "C" {
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# pragma GCC system_header
# include_next <float.h>
}
inline int _CPP_FLT_ROUNDS_capture() { return FLT_ROUNDS; }
// FLT_RADIX is OK as-is.
// const int _CPP_FLT_RADIX_capture() { return FLT_RADIX; }
inline int _CPP_FLT_MANT_DIG_capture() { return FLT_MANT_DIG; }
inline int _CPP_DBL_MANT_DIG_capture() { return DBL_MANT_DIG; }
inline int _CPP_LDBL_MANT_DIG_capture() { return LDBL_MANT_DIG; }
inline int _CPP_FLT_DIG_capture() { return FLT_DIG; }
inline int _CPP_DBL_DIG_capture() { return DBL_DIG; }
inline int _CPP_LDBL_DIG_capture() { return LDBL_DIG; }
inline int _CPP_FLT_MIN_EXP_capture() { return FLT_MIN_EXP; }
inline int _CPP_DBL_MIN_EXP_capture() { return DBL_MIN_EXP; }
inline int _CPP_LDBL_MIN_EXP_capture() { return LDBL_MIN_EXP; }
inline int _CPP_FLT_MIN_10_EXP_capture() { return FLT_MIN_10_EXP; }
inline int _CPP_DBL_MIN_10_EXP_capture() { return DBL_MIN_10_EXP; }
inline int _CPP_LDBL_MIN_10_EXP_capture() { return LDBL_MIN_10_EXP; }
inline int _CPP_FLT_MAX_EXP_capture() { return FLT_MAX_EXP; }
inline int _CPP_DBL_MAX_EXP_capture() { return DBL_MAX_EXP; }
inline int _CPP_LDBL_MAX_EXP_capture() { return LDBL_MAX_EXP; }
inline int _CPP_FLT_MAX_10_EXP_capture() { return FLT_MAX_10_EXP; }
inline int _CPP_DBL_MAX_10_EXP_capture() { return DBL_MAX_10_EXP; }
inline int _CPP_LDBL_MAX_10_EXP_capture() { return LDBL_MAX_10_EXP; }
inline float _CPP_FLT_MAX_capture() { return FLT_MAX; }
inline double _CPP_DBL_MAX_capture() { return DBL_MAX; }
inline long double _CPP_LDBL_MAX_capture() { return LDBL_MAX; }
inline float _CPP_FLT_EPSILON_capture() { return FLT_EPSILON; }
inline double _CPP_DBL_EPSILON_capture() { return DBL_EPSILON; }
inline long double _CPP_LDBL_EPSILON_capture() { return LDBL_EPSILON; }
inline float _CPP_FLT_MIN_capture() { return FLT_MIN; }
inline double _CPP_DBL_MIN_capture() { return DBL_MIN; }
inline long double _CPP_LDBL_MIN_capture() { return LDBL_MIN; }
namespace _C_shadow { }
} // close namespace ::_C_legacy::
# undef FLT_ROUNDS
# define FLT_ROUNDS ::_C_legacy::_CPP_FLT_ROUNDS_capture()
// # undef FLT_RADIX // OK as-is.
# undef FLT_MANT_DIG
# define FLT_MANT_DIG ::_C_legacy::_CPP_FLT_MANT_DIG_capture()
# undef DBL_MANT_DIG
# define DBL_MANT_DIG ::_C_legacy::_CPP_DBL_MANT_DIG_capture()
# undef LDBL_MANT_DIG
# define LDBL_MANT_DIG ::_C_legacy::_CPP_LDBL_MANT_DIG_capture()
# undef FLT_DIG
# define FLT_DIG ::_C_legacy::_CPP_FLT_DIG_capture()
# undef DBL_DIG
# define DBL_DIG ::_C_legacy::_CPP_DBL_DIG_capture()
# undef LDBL_DIG
# define LDBL_DIG ::_C_legacy::_CPP_LDBL_DIG_capture()
# undef FLT_MIN_MIN_DIG
# define FLT_MIN_MIN_DIG ::_C_legacy::_CPP_FLT_MIN_MIN_DIG_capture()
# undef DBL_MIN_MIN_DIG
# define DBL_MIN_MIN_DIG ::_C_legacy::_CPP_DBL_MIN_MIN_DIG_capture()
# undef LDBL_MIN_MIN_DIG
# define LDBL_MIN_MIN_DIG ::_C_legacy::_CPP_LDBL_MIN_MIN_DIG_capture()
# undef FLT_MIN_EXP
# define FLT_MIN_EXP ::_C_legacy::_CPP_FLT_MIN_EXP_capture()
# undef DBL_MIN_EXP
# define DBL_MIN_EXP ::_C_legacy::_CPP_DBL_MIN_EXP_capture()
# undef LDBL_MIN_EXP
# define LDBL_MIN_EXP ::_C_legacy::_CPP_LDBL_MIN_EXP_capture()
# undef FLT_MIN_10_EXP
# define FLT_MIN_10_EXP ::_C_legacy::_CPP_FLT_MIN_10_EXP_capture()
# undef DBL_MIN_10_EXP
# define DBL_MIN_10_EXP _::_C_legacy::CPP_DBL_MIN_10_EXP_capture()
# undef LDBL_MIN_10_EXP
# define LDBL_MIN_10_EXP ::_C_legacy::_CPP_LDBL_MIN_10_EXP_capture()
# undef FLT_MAX_EXP
# define FLT_MAX_EXP ::_C_legacy::_CPP_FLT_MAX_EXP_capture()
# undef DBL_MAX_EXP
# define DBL_MAX_EXP ::_C_legacy::_CPP_DBL_MAX_EXP_capture()
# undef LDBL_MAX_EXP
# define LDBL_MAX_EXP ::_C_legacy::_CPP_LDBL_MAX_EXP_capture()
# undef FLT_MAX_10_EXP
# define FLT_MAX_10_EXP ::_C_legacy::_CPP_FLT_MAX_10_EXP_capture()
# undef DBL_MAX_10_EXP
# define DBL_MAX_10_EXP ::_C_legacy::_CPP_DBL_MAX_10_EXP_capture()
# undef LDBL_MAX_10_EXP
# define LDBL_MAX_10_EXP ::_C_legacy::_CPP_LDBL_MAX_10_EXP_capture()
# undef FLT_MAX
# define FLT_MAX ::_C_legacy::_CPP_FLT_MAX_capture()
# undef DBL_MAX
# define DBL_MAX ::_C_legacy::_CPP_DBL_MAX_capture()
# undef LDBL_MAX
# define LDBL_MAX ::_C_legacy::_CPP_LDBL_MAX_capture()
# undef FLT_EPSILON
# define FLT_EPSILON ::_C_legacy::_CPP_FLT_EPSILON_capture()
# undef DBL_EPSILON
# define DBL_EPSILON ::_C_legacy::_CPP_DBL_EPSILON_capture()
# undef LDBL_EPSILON
# define LDBL_EPSILON ::_C_legacy::_CPP_LDBL_EPSILON_capture()
# undef FLT_MIN
# define FLT_MIN ::_C_legacy::_CPP_FLT_MIN_capture()
# undef DBL_MIN
# define DBL_MIN ::_C_legacy::_CPP_DBL_MIN_capture()
# undef LDBL_MIN
# define LDBL_MIN ::_C_legacy::_CPP_LDBL_MIN_capture()
namespace _C_legacy {
namespace _C_shadow {
}
}
namespace std {
} // close namespace std::
namespace _C_legacy {
namespace _C_shadow {
}
}
} // namespace _C_legacy
# undef _IN_C_LEGACY_
#endif

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -32,33 +32,26 @@
//
#ifndef _CPP_CLIMITS
#define _CPP_CLIMTIS 1
#define _CPP_CLIMTIS 1
namespace _C_legacy {
extern "C" {
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# pragma GCC system_header
# include_next <limits.h>
}
namespace _C_shadow { }
} // close namespace ::_C_legacy::
// Note: there is not much for this wrapper to do besides hiding
// vendor-extension names and (perhaps) replacing one or other
// macro with a larger value.
// #undef MB_LEN_MAX
// #define MB_LEN_MAX 16 /* or something */
namespace std {
} // close namespace std::
namespace _C_legacy {
namespace _C_shadow {
}
}
} // namespace _C_legacy
# undef _IN_C_LEGACY_
#endif

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -34,76 +34,37 @@
#ifndef _CPP_CLOCALE
#define _CPP_CLOCALE 1
# include <bits/std_cstddef.h> /* pick up NULL */
# include <bits/std_cstddef.h>
namespace _C_legacy {
extern "C" {
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# pragma GCC system_header
# include_next <locale.h>
}
}
typedef struct lconv _CPP_lconv_capture;
const int _CPP_LC_ALL_capture = LC_ALL;
const int _CPP_LC_COLLATE_capture = LC_COLLATE;
const int _CPP_LC_CTYPE_capture = LC_CTYPE;
const int _CPP_LC_MONETARY_capture = LC_MONETARY;
const int _CPP_LC_NUMERIC_capture = LC_NUMERIC;
const int _CPP_LC_TIME_capture = LC_TIME;
#if 0 /* XXX need proper macro guard for this common extension. */
const int _CPP_LC_MESSAGES_capture = LC_MESSAGES;
#endif
namespace _C_shadow { }
} // close namespace ::_C_legacy::
// # undef NULL
// # define NULL 0 /* handled in <cstddef> */
# undef LC_ALL
# define LC_ALL ::_C_legacy::_CPP_LC_ALL_capture
# undef LC_COLLATE
# define LC_COLLATE ::_C_legacy::_CPP_LC_COLLATE_capture
# undef LC_CTYPE
# define LC_CTYPE ::_C_legacy::_CPP_LC_CTYPE_capture
# undef LC_MONETARY
# define LC_MONETARY ::_C_legacy::_CPP_LC_MONETARY_capture
# undef LC_NUMERIC
# define LC_NUMERIC ::_C_legacy::_CPP_LC_NUMERIC_capture
# undef LC_TIME
# define LC_TIME ::_C_legacy::_CPP_LC_TIME_capture
#if 0 /* XXX need proper macro guard for this common extension. */
# undef LC_MESSAGES
# define LC_MESSAGES ::_C_legacy::_CPP_LC_MESSAGES_capture
#endif
typedef lconv _CPP_lconv_capture;
} // namespace _C_legacy
# undef lconv
# undef setlocale
# undef localeconv
namespace _C_legacy {
namespace _C_shadow {
}
}
namespace std {
namespace std {
// Adopt C names into std::
struct lconv : _C_legacy::_CPP_lconv_capture { };
// Adopt C names into std::
using ::_C_legacy::setlocale;
using _C_legacy::setlocale;
// note: still a POD type:
struct lconv : ::_C_legacy::_CPP_lconv_capture { };
inline lconv* localeconv()
{ return reinterpret_cast<lconv*>(::_C_legacy::localeconv()); }
} // close namespace std::
namespace _C_legacy {
namespace _C_shadow {
using ::std::lconv;
using ::std::localeconv;
}
}
inline lconv*
localeconv() { return reinterpret_cast<lconv*>(_C_legacy::localeconv()); }
} // namespace std
# undef _IN_C_LEGACY_
#endif /* _CPP_CLOCALE */
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -34,42 +34,30 @@
#ifndef _CPP_CSETJMP
#define _CPP_CSETJMP 1
namespace _C_legacy {
extern "C" {
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# pragma GCC system_header
# include_next <setjmp.h>
}
typedef jmp_buf _CPP_jmp_buf_capture;
inline int _CPP_setjmp_capture(jmp_buf __jb) { return setjmp(__jb); }
namespace _C_shadow { }
} // close namespace ::_C_legacy::
}
inline int
_CPP_setjmp_capture(jmp_buf __jb) { return setjmp(__jb); }
} // namespace _C_legacy
# undef jmp_buf
# undef setjmp
# define setjmp(__jb) ::_C_legacy::_CPP_setjmp_capture(__jb)
# undef longjmp
namespace _C_legacy {
namespace _C_shadow {
typedef ::_C_legacy::_CPP_jmp_buf_capture jmp_buf;
}
}
namespace std {
// Adopt C names into std::
using ::_C_legacy::_C_shadow::jmp_buf;
using ::_C_legacy::longjmp;
} // close namespace std::
namespace std {
// Adopt C names into std::
using _C_legacy::jmp_buf;
using _C_legacy::longjmp;
} // namespace std
namespace _C_legacy {
namespace _C_shadow {
}
}
# undef _IN_C_LEGACY_
#endif

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -34,78 +34,34 @@
#ifndef _CPP_CSIGNAL
#define _CPP_CSIGNAL 1
namespace _C_legacy {
extern "C" {
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
// XXX
# undef __need_sig_atomic_t
# undef __need_sigset_t
# pragma GCC system_header
# include_next <signal.h>
typedef void (*_CPP_CSIGFUN_capture)(int); // a C function pointer
typedef sig_atomic_t _CPP_sig_atomic_t_capture;
const _CPP_CSIGFUN_capture _CPP_SIG_DFL_capture = SIG_DFL;
const _CPP_CSIGFUN_capture _CPP_SIG_ERR_capture = SIG_ERR;
const _CPP_CSIGFUN_capture _CPP_SIG_IGN_capture = SIG_IGN;
}
const int _CPP_SIGABRT_capture = SIGABRT;
const int _CPP_SIGFPE_capture = SIGFPE;
const int _CPP_SIGILL_capture = SIGILL;
const int _CPP_SIGINT_capture = SIGINT;
const int _CPP_SIGSEGV_capture = SIGSEGV;
const int _CPP_SIGTERM_capture = SIGTERM;
namespace _C_shadow { }
} // close namespace ::_C_legacy::
}
} // namespace _C_legacy
# undef sig_atomic_t
# undef raise
# undef signal
# undef SIG_DFL
# define SIG_DFL \
reinterpret_cast<void (*)(int)>(::_C_legacy::_CPP_SIG_DFL_capture)
# undef SIG_ERR
# define SIG_ERR \
reinterpret_cast<void (*)(int)>(::_C_legacy::_CPP_SIG_ERR_capture)
# undef SIG_IGN
# define SIG_IGN \
reinterpret_cast<void (*)(int)>(::_C_legacy::_CPP_SIG_IGN_capture)
# undef SIGABRT
# define SIGABRT ::_C_legacy::_CPP_SIGABRT_capture
# undef SIGFPE
# define SIGFPE ::_C_legacy::_CPP_SIGFPE_capture
# undef SIGILL
# define SIGILL ::_C_legacy::_CPP_SIGILL_capture
# undef SIGINT
# define SIGINT ::_C_legacy::_CPP_SIGINT_capture
# undef SIGSEGV
# define SIGSEGV ::_C_legacy::_CPP_SIGSEGV_capture
# undef SIGTERM
# define SIGTERM ::_C_legacy::_CPP_SIGTERM_capture
namespace _C_legacy {
namespace _C_shadow {
typedef ::_C_legacy::_CPP_sig_atomic_t_capture sig_atomic_t;
}
}
namespace std {
// Adopt C names into std::
using ::_C_legacy::_C_shadow::sig_atomic_t;
using ::_C_legacy::raise;
inline void (*signal(int __sig, void (* __fun)(int)))(int)
{ return reinterpret_cast<void (*)(int)>(
::_C_legacy::signal(__sig,
reinterpret_cast< ::_C_legacy::_CPP_CSIGFUN_capture>(__fun)));
}
} // close namespace std::
namespace std {
// Adopt C names into std::
using _C_legacy::sig_atomic_t;
using _C_legacy::raise;
using _C_legacy::signal;
} // namespace std
namespace _C_legacy {
namespace _C_shadow {
using ::std::signal;
}
}
# undef _IN_C_LEGACY_
#endif

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -34,65 +34,19 @@
#ifndef _CPP_CSTDARG
#define _CPP_CSTDARG 1
namespace _C_legacy {
extern "C" {
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# pragma GCC system_header
# include_next <stdarg.h>
}
typedef va_list _CPP_va_list_capture;
# ifdef __GNUC__
# elif
template <class T>
inline void _CPP_va_start_capture(va_list& __val, T& __v)
{ va_start(__val, __v); }
template <class T>
inline void _CPP_va_arg_capture(va_list& __val, T& __arg)
{ va_start(__val, __arg); }
template <class T>
inline T& _CPP_va_arg_capture(va_list& __val)
{ return va_arg(__val, T); }
template <class T>
inline void _CPP_va_end(va_list& __val)
{ va_end(__val); }
# endif
// typedef size_t _CPP_size_t_capture; // handled in <cstddef>
namespace _C_shadow { }
} // close namespace ::_C_legacy::
# ifdef __GNUC__
# undef va_list
using _C_legacy::__gnuc_va_list;
# elif /* probably must be tailored for each compiler, as above. */
# undef va_list
# undef va_start
# define va_start(a,b) ::_C_legacy::_CPP_va_start_capture(a,b)
# undef va_arg
# define va_arg(a,b) ::_C_legacy::_CPP_va_arg_capture<b>(a)
# undef va_end
# define va_end(a) ::_C_legacy::_CPP_va_end_capture(a)
# endif
namespace _C_legacy {
namespace _C_shadow {
typedef ::_C_legacy::_CPP_va_list_capture va_list;
}
}
namespace std {
using ::_C_legacy::_C_shadow::va_list;
} // close namespace std::
namespace _C_legacy {
namespace _C_shadow {
}
}
} // namespace _C_legacy
# undef va_list
namespace std {
using _C_legacy::va_list;
} // namespace std
# undef _IN_C_LEGACY_

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -34,45 +34,27 @@
#ifndef _CPP_CSTDDEF
#define _CPP_CSTDDEF 1
namespace _C_legacy {
extern "C" {
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# pragma GCC system_header
# include_next <stddef.h>
}
typedef ptrdiff_t _CPP_ptrdiff_t_capture;
typedef size_t _CPP_size_t_capture;
namespace _C_shadow { }
} // close namespace ::_C_legacy::
}
} // namespace _C_legacy
# undef ptrdiff_t
# undef size_t
# undef wchar_t
# undef NULL
# define NULL 0
// # undef offsetof
namespace _C_legacy {
namespace _C_shadow {
typedef ::_C_legacy::_CPP_ptrdiff_t_capture ptrdiff_t;
typedef ::_C_legacy::_CPP_size_t_capture size_t;
}
}
namespace std {
// Adopt C names into std::
using ::_C_legacy::_C_shadow::ptrdiff_t;
using ::_C_legacy::_C_shadow::size_t;
} // close namespace std::
namespace std {
using _C_legacy::ptrdiff_t;
using _C_legacy::size_t;
} // namespace std
namespace _C_legacy {
namespace _C_shadow {
}
}
# undef _IN_C_LEGACY_
#endif

View File

@ -1,5 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -30,85 +31,51 @@
// ISO C++ 14882: 27.8.2 C Library files
//
// XXX problems? Uses size_t, va_list in interfaces.
// Maybe <stdio.h> needs a size_t macro defined. Maybe it
// clobbers va_list.
//
// Also,
// uses va_start, va_end in implementation of vfprintf and
// vfscanf. Maybe those shouldn't be inline.
#ifndef _CPP_CSTDIO
#define _CPP_CSTDIO 1
# include <bits/std_cstddef.h> /* pick up size_t, NULL */
# include <bits/std_cstdarg.h> /* pick up va_list, va_start, va_end */
# include <bits/std_cstddef.h>
# include <bits/std_cstdarg.h>
namespace _C_legacy {
extern "C" {
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# undef __need_FILE
# pragma GCC system_header
# include_next <stdio.h>
}
// size_t handled in <cstddef>
typedef FILE _CPP_FILE_capture;
typedef fpos_t _CPP_fpos_t_capture;
// NULL done in <stddef.h>
const int _CPP_IOFBF_capture = _IOFBF;
const int _CPP_IOLBF_capture = _IOLBF;
const int _CPP_IONBF_capture = _IONBF;
const int _CPP_BUFSIZ_capture = BUFSIZ;
const int _CPP_EOF_capture = EOF;
const int _CPP_FOPEN_MAX_capture = FOPEN_MAX;
const int _CPP_FILENAME_MAX_capture = FILENAME_MAX;
const int _CPP_L_tmpnam_capture = L_tmpnam;
const int _CPP_SEEK_CUR_capture = SEEK_CUR;
const int _CPP_SEEK_END_capture = SEEK_END;
const int _CPP_SEEK_SET_capture = SEEK_SET;
const int _CPP_TMP_MAX_capture = TMP_MAX;
}
inline FILE* _CPP_stderr_capture() { return stderr; }
inline FILE* _CPP_stdin_capture() { return stdin; }
inline FILE* _CPP_stdout_capture() { return stdout; }
typedef FILE _CPP_FILE_capture;
typedef fpos_t _CPP_fpos_t_capture;
inline int _CPP_getc_capture(FILE* __f) { return getc(__f); }
inline int _CPP_getchar_capture() { return getchar(); }
inline int _CPP_putc_capture(int __c, FILE* __f) { return putc(__c, __f); }
inline int _CPP_putchar_capture(int __c) { return putchar(__c); }
inline int _CPP_feof_capture(FILE* __f) { return feof(__f); }
inline FILE*
_CPP_stderr_capture() { return stderr; }
namespace _C_shadow {
}
inline FILE*
_CPP_stdin_capture() { return stdin; }
} // close namespace ::_C_legacy::
inline FILE*
_CPP_stdout_capture() { return stdout; }
inline int
_CPP_getc_capture(FILE* __f) { return getc(__f); }
inline int
_CPP_getchar_capture() { return getchar(); }
inline int
_CPP_putc_capture(int __c, FILE* __f) { return putc(__c, __f); }
inline int
_CPP_putchar_capture(int __c) { return putchar(__c); }
inline int
_CPP_feof_capture(FILE* __f) { return feof(__f); }
} // namespace _C_legacy
// # undef size_t /* handled in <cstddef> */
# undef FILE
# undef fpos_t
# undef _IOFBF
# define _IOFBF ::_C_legacy::_CPP__IOFBF_capture
# undef _IOLBF
# define _IOLBF ::_C_legacy::_CPP__IOLBF_capture
# undef _IONBF
# define _IONBF ::_C_legacy::_CPP__IONBF_capture
# undef BUFSIZ
# define BUFSIZ ::_C_legacy::_CPP_BUFSIZ_capture
# undef EOF
# define EOF ::_C_legacy::_CPP_EOF_capture
# undef FOPEN_MAX
# define FOPEN_MAX ::_C_legacy::_CPP_FOPEN_MAX_capture
# undef FILENAME_MAX
# define FILENAME_MAX ::_C_legacy::_CPP_FILENAME_MAX_capture
# undef L_tmpnam
# define L_tmpnam ::_C_legacy::_CPP_L_tmpnam_capture
# undef SEEK_CUR
# define SEEK_CUR ::_C_legacy::_CPP_SEEK_CUR_capture
# undef SEEK_END
# define SEEK_END ::_C_legacy::_CPP_SEEK_END_capture
# undef SEEK_SET
# define SEEK_SET ::_C_legacy::_CPP_SEEK_SET_capture
# undef TMP_MAX
# define TMP_MAX ::_C_legacy::_CPP_TMP_MAX_capture
# undef remove
# undef rename
@ -151,217 +118,165 @@
# undef feof
# undef ferror
# undef perror
namespace _C_legacy {
namespace _C_shadow {
}
}
namespace std {
// Adopt C names into std::
struct FILE : ::_C_legacy::_CPP_FILE_capture { };
struct fpos_t { ::_C_legacy::_CPP_fpos_t_capture _M_dummy; };
inline FILE* _CPP_stderr()
{ return reinterpret_cast<FILE*>( ::_C_legacy::_CPP_stderr_capture() ); }
inline FILE* _CPP_stdin()
{ return reinterpret_cast<FILE*>( ::_C_legacy::_CPP_stdin_capture() ); }
inline FILE* _CPP_stdout()
{ return reinterpret_cast<FILE*>( ::_C_legacy::_CPP_stdout_capture() ); }
using ::_C_legacy::remove;
using ::_C_legacy::rename;
inline FILE*
tmpfile() { return reinterpret_cast<FILE*>(::_C_legacy::tmpfile()); }
using ::_C_legacy::tmpnam;
inline int
fclose(FILE* __f) { return ::_C_legacy::fclose(__f); }
inline int
fflush(FILE* __f) { return ::_C_legacy::fflush(__f); }
inline FILE*
fopen(char const* __name, char const* __mode)
{ return reinterpret_cast<FILE*>(::_C_legacy::fopen(__name,__mode)); }
inline FILE*
freopen(char const* __name, char const* __mode, FILE* __f)
{ return reinterpret_cast<FILE*>(
::_C_legacy::freopen(__name,__mode,__f)); }
inline void
setbuf(FILE* __f, char* __buf)
{ return ::_C_legacy::setbuf(__f, __buf); }
inline int
setvbuf(FILE* __f, char* __buf, int __mode, size_t __size)
{ return ::_C_legacy::setvbuf(__f, __buf, __mode, __size); }
inline int
fprintf(FILE* __f, char const* __fmt, ...)
{ va_list __v; va_start(__v,__fmt);
int __i = ::_C_legacy::vfprintf(__f, __fmt, __v); va_end(__v);
return __i; }
inline int
fscanf(FILE* __f, char const* __fmt, ...)
{ va_list __v; va_start(__v,__fmt);
int __i = ::_C_legacy::vfscanf(__f, __fmt, __v); va_end(__v);
return __i; }
using ::_C_legacy::printf;
using ::_C_legacy::scanf;
using ::_C_legacy::sprintf;
using ::_C_legacy::sscanf;
// using ::_C_legacy::vfprintf;
inline int
vfprintf(FILE* __f, char const* __fmt, va_list __v)
{ return ::_C_legacy::vfprintf(__f, __fmt, __v); }
inline int
vprintf(char const* __fmt, va_list __v)
{ return ::_C_legacy::vprintf(__fmt, __v); }
inline int
vsprintf(char* __buf, char const* __fmt, va_list __v)
{ return ::_C_legacy::vsprintf(__buf, __fmt, __v); }
inline int
fgetc(FILE* __f) { return ::_C_legacy::fgetc(__f); }
// using ::_C_legacy::fgets;
inline char*
fgets(char* __buf, int __n, FILE* __f)
{ return ::_C_legacy::fgets(__buf, __n, __f); }
inline int
fputc(int __c, FILE* __f) { return ::_C_legacy::fputc(__c, __f); }
inline int
fputs(char const* __s, FILE* __f)
{ return ::_C_legacy::fputs(__s, __f); }
inline int
getc(FILE* __f) { return ::_C_legacy::_CPP_getc_capture(__f); }
inline int
getchar() { return ::_C_legacy::_CPP_getchar_capture(); }
using ::_C_legacy::gets;
inline int
putc(int __c, FILE* __f)
{ return ::_C_legacy::_CPP_putc_capture(__c, __f); }
inline int
putchar(int __c) { return ::_C_legacy::_CPP_putchar_capture(__c); }
using ::_C_legacy::puts;
// using ::_C_legacy::ungetc;
inline int
ungetc(int __c, FILE* __f) { return ::_C_legacy::ungetc(__c, __f); }
inline size_t
fread(void* __p, size_t __z, size_t __n, FILE* __f)
{ return ::_C_legacy::fread(__p,__z,__n,__f); }
inline size_t
fwrite(void const* __p, size_t __z, size_t __n, FILE* __f)
{ return ::_C_legacy::fwrite(__p,__z,__n,__f); }
inline int
fgetpos(FILE* __f, fpos_t* __pos)
{ return ::_C_legacy::fgetpos(__f,&__pos->_M_dummy); }
inline int
fseek(FILE* __f, long __off, int __how)
{ return ::_C_legacy::fseek(__f,__off,__how); }
inline int
fsetpos(FILE* __f, fpos_t const* __pos)
{ return ::_C_legacy::fsetpos(__f,&__pos->_M_dummy); }
inline long
ftell(FILE* __f) { return ::_C_legacy::ftell(__f); }
inline void
rewind(FILE* __f) { return ::_C_legacy::rewind(__f); }
inline void
clearerr(FILE* __f) { return ::_C_legacy::clearerr(__f); }
inline int
feof(FILE* __f) { return ::_C_legacy::_CPP_feof_capture(__f); }
inline int
ferror(FILE* __f) { return ::_C_legacy::ferror(__f); }
using ::_C_legacy::perror;
} // close namespace std::
# undef stderr
# define stderr ::std::_CPP_stderr()
# define stderr std::_CPP_stderr()
# undef stdin
# define stdin ::std::_CPP_stdin()
# define stdin std::_CPP_stdin()
# undef stdout
# define stdout ::std::_CPP_stdout()
# define stdout std::_CPP_stdout()
namespace _C_legacy {
namespace _C_shadow {
using ::std::FILE;
using ::std::fpos_t;
namespace std {
struct FILE : _C_legacy::_CPP_FILE_capture { };
struct fpos_t { _C_legacy::_CPP_fpos_t_capture _M_dummy; };
// using ::std::remove;
// using ::std::rename;
using ::std::tmpfile;
// using ::std::tmpnam;
using ::std::fclose;
using ::std::fflush;
using ::std::fopen;
using ::std::freopen;
using ::std::setbuf;
using ::std::setvbuf;
using ::std::fprintf;
using ::std::fscanf;
// using ::std::printf;
// using ::std::scanf;
// using ::std::sprintf;
// using ::std::sscanf;
using ::std::vfprintf;
using ::std::vprintf;
using ::std::vsprintf;
using ::std::fgetc;
using ::std::fgets;
using ::std::fputc;
using ::std::fputs;
using ::std::getc;
using ::std::getchar;
// using ::std::gets;
using ::std::putc;
using ::std::putchar;
// using ::std::puts;
using ::std::ungetc;
using ::std::fread;
using ::std::fwrite;
using ::std::fgetpos;
using ::std::fseek;
using ::std::fsetpos;
using ::std::ftell;
using ::std::rewind;
using ::std::clearerr;
using ::std::feof;
using ::std::ferror;
// using ::std::perror;
}
using _C_legacy::remove;
using _C_legacy::rename;
using _C_legacy::tmpnam;
using _C_legacy::printf;
using _C_legacy::scanf;
using _C_legacy::sprintf;
using _C_legacy::sscanf;
using _C_legacy::gets;
using _C_legacy::perror;
inline FILE*
_CPP_stderr()
{ return reinterpret_cast<FILE*>(_C_legacy::_CPP_stderr_capture() ); }
inline FILE*
_CPP_stdin()
{ return reinterpret_cast<FILE*>(_C_legacy::_CPP_stdin_capture() ); }
inline FILE*
_CPP_stdout()
{ return reinterpret_cast<FILE*>(_C_legacy::_CPP_stdout_capture() ); }
inline FILE*
tmpfile() { return reinterpret_cast<FILE*>(_C_legacy::tmpfile()); }
inline int
fclose(FILE* __f) { return _C_legacy::fclose(__f); }
inline int
fflush(FILE* __f) { return _C_legacy::fflush(__f); }
inline FILE*
fopen(char const* __name, char const* __mode)
{ return reinterpret_cast<FILE*>(_C_legacy::fopen(__name,__mode)); }
inline FILE*
freopen(char const* __name, char const* __mode, FILE* __f)
{ return reinterpret_cast<FILE*>(_C_legacy::freopen(__name,__mode,__f)); }
inline void
setbuf(FILE* __f, char* __buf)
{ return _C_legacy::setbuf(__f, __buf); }
inline int
setvbuf(FILE* __f, char* __buf, int __mode, size_t __size)
{ return _C_legacy::setvbuf(__f, __buf, __mode, __size); }
inline int
fprintf(FILE* __f, char const* __fmt, ...)
{
va_list __v;
va_start(__v,__fmt);
int __i = _C_legacy::vfprintf(__f, __fmt, __v);
va_end(__v);
return __i;
}
inline int
fscanf(FILE* __f, char const* __fmt, ...)
{
va_list __v;
va_start(__v,__fmt);
int __i = _C_legacy::vfscanf(__f, __fmt, __v);
va_end(__v);
return __i;
}
inline int
vfprintf(FILE* __f, char const* __fmt, va_list __v)
{ return _C_legacy::vfprintf(__f, __fmt, __v); }
inline int
vprintf(char const* __fmt, va_list __v)
{ return _C_legacy::vprintf(__fmt, __v); }
inline int
vsprintf(char* __buf, char const* __fmt, va_list __v)
{ return _C_legacy::vsprintf(__buf, __fmt, __v); }
inline int
fgetc(FILE* __f) { return _C_legacy::fgetc(__f); }
inline char*
fgets(char* __buf, int __n, FILE* __f)
{ return _C_legacy::fgets(__buf, __n, __f); }
inline int
fputc(int __c, FILE* __f) { return _C_legacy::fputc(__c, __f); }
inline int
fputs(char const* __s, FILE* __f)
{ return _C_legacy::fputs(__s, __f); }
inline int
getc(FILE* __f) { return _C_legacy::_CPP_getc_capture(__f); }
inline int
getchar() { return _C_legacy::_CPP_getchar_capture(); }
inline int
putc(int __c, FILE* __f)
{ return _C_legacy::_CPP_putc_capture(__c, __f); }
inline int
putchar(int __c) { return _C_legacy::_CPP_putchar_capture(__c); }
using _C_legacy::puts;
inline int
ungetc(int __c, FILE* __f) { return _C_legacy::ungetc(__c, __f); }
inline size_t
fread(void* __p, size_t __z, size_t __n, FILE* __f)
{ return _C_legacy::fread(__p,__z,__n,__f); }
inline size_t
fwrite(void const* __p, size_t __z, size_t __n, FILE* __f)
{ return _C_legacy::fwrite(__p,__z,__n,__f); }
inline int
fgetpos(FILE* __f, fpos_t* __pos)
{ return _C_legacy::fgetpos(__f,&__pos->_M_dummy); }
inline int
fseek(FILE* __f, long __off, int __how)
{ return _C_legacy::fseek(__f,__off,__how); }
inline int
fsetpos(FILE* __f, fpos_t const* __pos)
{ return _C_legacy::fsetpos(__f,&__pos->_M_dummy); }
inline long
ftell(FILE* __f) { return _C_legacy::ftell(__f); }
inline void
rewind(FILE* __f) { return _C_legacy::rewind(__f); }
inline void
clearerr(FILE* __f) { return _C_legacy::clearerr(__f); }
inline int
feof(FILE* __f) { return _C_legacy::_CPP_feof_capture(__f); }
inline int
ferror(FILE* __f) { return _C_legacy::ferror(__f); }
} // namespace std
# undef _IN_C_LEGACY_
#endif

View File

@ -38,7 +38,8 @@
#ifndef _CPP_CSTDLIB
#define _CPP_CSTDLIB 1
# include <bits/std_cstddef.h> /* pick up NULL, size_t */
# include <bits/c++config.h>
# include <bits/std_cstddef.h>
namespace _C_legacy {
extern "C" {
@ -47,36 +48,20 @@ namespace _C_legacy {
# include_next <stdlib.h>
typedef int (*_C_cmp_fun_ptr)(const void*, const void*); // C fn ptr
}
const int _CPP_EXIT_SUCCESS_capture = int(EXIT_SUCCESS);
const int _CPP_EXIT_FAILURE_capture = int(EXIT_FAILURE);
const int _CPP_RAND_MAX_capture = int(RAND_MAX);
inline int _CPP_MB_CUR_MAX_capture() { return int(MB_CUR_MAX); }
// typedef size_t _CPP_size_t_capture;
// typedef wchar_t _CPP_wchar_t_capture;
typedef div_t _CPP_div_t_capture;
typedef ldiv_t _CPP_ldiv_t_capture;
namespace _C_shadow {
}
} // namespace _C_legacy::
# if _GLIBCPP_HAVE_LLDIV_T
typedef lldiv_t _CPP_lldiv_t_capture;
# endif
} // namespace _C_legacy
# undef size_t
# undef wchar_t
# undef div_t
# undef ldiv_t
// <cstddef>
// # undef NULL
// # define NULL 0
# undef EXIT_SUCCESS
# define EXIT_SUCCESS (::_C_legacy::_CPP_EXIT_SUCCESS_capture)
# undef EXIT_FAILURE
# define EXIT_FAILURE (::_C_legacy::_CPP_EXIT_FAILURE_capture)
# undef RAND_MAX
# define RAND_MAX (::_C_legacy::_CPP_RAND_MAX_capture)
# undef MB_CUR_MAX
# define MB_CUR_MAX (::_C_legacy::_CPP_MB_CUR_MAX_capture())
# undef atof
# undef atoi
# undef atol
@ -110,134 +95,95 @@ namespace _C_legacy {
# undef mbstowcs
# undef wcstombs
namespace _C_legacy {
namespace _C_shadow {
// these come from <cstddef>
// typedef ::_C_legacy::_CPP_size_t_capture size_t;
// typedef ::_C_legacy::_CPP_wchar_t_capture wchar_t;
}
}
namespace std {
namespace std {
struct div_t : _C_legacy::_CPP_div_t_capture { };
struct ldiv_t : _C_legacy::_CPP_ldiv_t_capture { };
// Adopt C names into std::
// using ::_C_legacy::_C_shadow::size_t;
// using ::_C_legacy::_C_shadow::wchar_t;
typedef ::_C_legacy::_CPP_div_t_capture _CPP_div_t;
struct div_t : _CPP_div_t {};
typedef ::_C_legacy::_CPP_ldiv_t_capture _CPP_ldiv_t;
struct ldiv_t : _CPP_ldiv_t {};
// note: div_t and ldiv_t are still POD types
// EXIT_SUCCESS, EXIT_FAILURE, RAND_MAX, MB_CUR_MAX, NULL
using ::_C_legacy::atof;
using ::_C_legacy::atoi;
using ::_C_legacy::atol;
using ::_C_legacy::strtod;
using ::_C_legacy::strtol;
using ::_C_legacy::strtoul;
using ::_C_legacy::rand;
using ::_C_legacy::srand;
using ::_C_legacy::calloc;
using ::_C_legacy::free;
using ::_C_legacy::malloc;
using ::_C_legacy::realloc;
void abort(); // XXX must define this correctly for C++.
#define _FUN_OVERLOAD_BUG
// extern "C" funs declared void f(int (*)()) overload OK with C++ funs,
// but not if declared void f(int (*)(void)).
#if !defined(__GNUC__) || !defined(_FUN_OVERLOAD_BUG)
using ::_C_legacy::atexit; // XXX must redefine this one!
#endif
int atexit(void (*)()); // XXX must define this.
// More precisely, we need an extern "C" atexit() that
// implements the correct semantics, but hides the link-name
// atexit found in the C library, and a C++ atexit too. If
// C and C++ calling conventions differ, each pointer must
// be marked to be called using the proper convention.
void exit(int __i) // XXX must define correctly for C++, like atexit().
{ ::_C_legacy::exit(__i); }
using ::_C_legacy::getenv;
using ::_C_legacy::system;
// XXX note that the raw conversion between C and C++ function
// pointers may not be portable to some targets; those targets need
// a forwarding function.
#if !defined(__GNUC__) || !defined(_FUN_OVERLOAD_BUG)
using ::_C_legacy::bsearch; // overload
#endif
inline void* bsearch(const void* __key, const void* __base, size_t __n,
size_t __size, int (*__cmp)(const void*, const void*))
{ return ::_C_legacy::bsearch(__key,__base,__n,__size,
reinterpret_cast< ::_C_legacy::_C_cmp_fun_ptr>(__cmp)); } // XXX
#if !defined(__GNUC__) || !defined(_FUN_OVERLOAD_BUG)
using ::_C_legacy::qsort; // overload
#endif
inline void qsort(void* __base, size_t __n, size_t __size,
int (*__cmp)(const void*, const void*))
{ return ::_C_legacy::qsort(__base,__n,__size,
reinterpret_cast< ::_C_legacy::_C_cmp_fun_ptr>(__cmp)); } // XXX
inline int abs(int __x)
{ return __x >= 0 ? __x : -__x; }
inline div_t div(int __n, int __d)
{ div_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
inline long labs(long __x)
{ return __x >= 0 ? __x : -__x; }
inline long abs(long __x)
{ return __x >= 0 ? __x : -__x; }
inline ldiv_t ldiv(long __n, long __d)
{ ldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
inline ldiv_t div(long __n, long __d)
{ ldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
#ifdef _GLIBCPP_USE_LONG_LONG
inline long long llabs(long long __x)
{ return __x >= 0 ? __x : -__x; }
inline long long abs(long long __x)
{ return __x >= 0 ? __x : -__x; }
inline lldiv_t lldiv(long long __n, long long __d)
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
inline lldiv_t div(long long __n, long long __d)
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
# ifdef _GLIBCPP_HAVE_LLDIV_T
struct lldiv_t : _C_legacy::_CPP_lldiv_t_captur { };
# else
struct lldiv_t
{
long long quot;
long long rem;
};
# endif
#endif
using ::_C_legacy::mblen;
using ::_C_legacy::mbtowc;;
using ::_C_legacy::wctomb;
using ::_C_legacy::mbstowcs;
using ::_C_legacy::wcstombs;
using _C_legacy::atof;
using _C_legacy::atoi;
using _C_legacy::atol;
using _C_legacy::strtod;
using _C_legacy::strtol;
using _C_legacy::strtoul;
using _C_legacy::rand;
using _C_legacy::srand;
using _C_legacy::calloc;
using _C_legacy::free;
using _C_legacy::malloc;
using _C_legacy::realloc;
} // close namespace std::
using _C_legacy::abort;
using _C_legacy::atexit;
using _C_legacy::exit;
using _C_legacy::bsearch;
using _C_legacy::qsort;
using _C_legacy::getenv;
using _C_legacy::system;
using _C_legacy::mbtowc;
using _C_legacy::wctomb;
using _C_legacy::mbstowcs;
using _C_legacy::wcstombs;
#ifdef _GLIBCPP_USE_LONG_LONG
using _C_legacy::strtoll;
using _C_legacy::strtoull;
using _C_legacy::strtof;
using _C_legacy::strtold;
#endif
using _C_legacy::mblen;
inline int
abs(int __x) { return __x >= 0 ? __x : -__x; }
inline div_t
div(int __n, int __d)
{ div_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
inline long
labs(long __x) { return __x >= 0 ? __x : -__x; }
inline long
abs(long __x) { return __x >= 0 ? __x : -__x; }
inline ldiv_t
ldiv(long __n, long __d)
{ ldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
inline ldiv_t
div(long __n, long __d)
{ ldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
#ifdef _GLIBCPP_USE_LONG_LONG
inline long long
llabs(long long __x) { return __x >= 0 ? __x : -__x; }
inline long long
abs(long long __x) { return __x >= 0 ? __x : -__x; }
inline lldiv_t
lldiv(long long __n, long long __d)
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
inline lldiv_t
div(long long __n, long long __d)
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
#endif
} // namespace std
namespace _C_legacy {
namespace _C_shadow {
using ::std::div_t;
using ::std::ldiv_t;
using ::std::abort;
using ::std::atexit;
using ::std::exit;
using ::std::bsearch;
using ::std::qsort;
using ::std::abs;
using ::std::div;
using ::std::labs;
using ::std::ldiv;
#ifdef _GLIBCPP_USE_LONG_LONG
using ::std::llabs;
using ::std::lldiv;
#endif
}
}
# undef _IN_C_LEGACY_
#endif

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -33,77 +33,112 @@
#ifndef _CPP_CSTRING
#define _CPP_CSTRING 1
# if defined __GLIBC__ && __GLIBC__ >= 2
// We must not see the optimized string functions GNU libc defines.
# define __NO_STRING_INLINES
# endif
# include <bits/std_cstddef.h> /* pick up size_t, NULL */
# include <bits/std_cstddef.h>
namespace _C_legacy {
extern "C" {
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# pragma GCC system_header
# include_next <string.h>
}
}
// size_t
// NULL
// We do inline captures of most of these in case they
// have been optimized with macros.
inline void*
_CPP_memcpy_capture(void* __s1, void const* __s2, size_t __n)
{ return memcpy(__s1, __s2, __n); }
// We do inline captures of most of these in case they
// have been optimized with macros.
inline void*
_CPP_memmove_capture(void* __s1, void const* __s2, size_t __n)
{ return memmove(__s1, __s2, __n); }
inline void* _CPP_memcpy_capture(void* __s1, void const* __s2, size_t __n)
{ return memcpy(__s1,__s2,__n); }
inline void* _CPP_memmove_capture(void* __s1, void const* __s2, size_t __n)
{ return memmove(__s1,__s2,__n); }
inline void* _CPP_strcpy_capture(char* __s1, char const* __s2)
{ return strcpy(__s1,__s2); }
inline char* _CPP_strncpy_capture(char* __s1, char const* __s2, size_t __n)
{ return strncpy(__s1,__s2,__n); }
inline char* _CPP_strcat_capture(char* __s1, char const* __s2)
{ return strcat(__s1,__s2); }
inline char* _CPP_strncat_capture(char* __s1, char const* __s2, size_t __n)
{ return strncat(__s1,__s2,__n); }
inline int _CPP_memcmp_capture(void const* __s1,
void const* __s2, size_t __n)
{ return memcmp(__s1,__s2,__n); }
inline int _CPP_strcmp_capture(char const* __s1, char const* __s2)
{ return strcmp(__s1,__s2); }
inline int _CPP_strcoll_capture(char const* __s1, char const* __s2)
{ return strcoll(__s1,__s2); }
inline int _CPP_strncmp_capture(char const* __s1,
char const* __s2, size_t __n)
{ return strncmp(__s1,__s2,__n); }
inline size_t _CPP_strxfrm_capture(char* __b, char const* __s, size_t __n)
{ return strxfrm(__b,__s,__n); }
inline void* _CPP_memchr_capture(void const* __s1, int __c, size_t __n)
{ return memchr(__s1,__c,__n); }
inline char* _CPP_strchr_capture(char const* __s1, int __c)
{ return strchr(__s1,__c); }
inline size_t _CPP_strcspn_capture(char const* __s1, char const* __s2)
{ return strcspn(__s1,__s2); }
inline char* _CPP_strpbrk_capture(char const* __s1, char const* __s2)
{ return strpbrk(__s1,__s2); }
inline char* _CPP_strrchr_capture(char const* __s1, int __c)
{ return strrchr(__s1,__c); }
inline size_t _CPP_strspn_capture(char const* __s1, char const* __s2)
{ return strspn(__s1,__s2); }
inline char* _CPP_strstr_capture(char const* __s1, char const* __s2)
{ return strstr(__s1,__s2); }
inline char* _CPP_strtok_capture(char* __s1, char const* __s2)
{ return strtok(__s1,__s2); }
inline void* _CPP_memset_capture(void* __s, int __c, size_t __n)
{ return memset(__s,__c,__n); }
// inline char* _CPP_strerror_capture(int __num)
// { return strerror(__num); }
inline size_t _CPP_strlen_capture(char const* __s)
{ return strlen(__s); }
inline void*
_CPP_strcpy_capture(char* __s1, char const* __s2)
{ return strcpy(__s1, __s2); }
namespace _C_shadow { }
} // close namespace ::_C_legacy::
inline char*
_CPP_strncpy_capture(char* __s1, char const* __s2, size_t __n)
{ return strncpy(__s1, __s2, __n); }
inline char*
_CPP_strcat_capture(char* __s1, char const* __s2)
{ return strcat(__s1, __s2); }
inline char*
_CPP_strncat_capture(char* __s1, char const* __s2, size_t __n)
{ return strncat(__s1, __s2, __n); }
inline int
_CPP_memcmp_capture(void const* __s1, void const* __s2, size_t __n)
{ return memcmp(__s1, __s2, __n); }
inline int
_CPP_strcmp_capture(char const* __s1, char const* __s2)
{ return strcmp(__s1, __s2); }
inline int
_CPP_strcoll_capture(char const* __s1, char const* __s2)
{ return strcoll(__s1, __s2); }
inline int
_CPP_strncmp_capture(char const* __s1, char const* __s2, size_t __n)
{ return strncmp(__s1, __s2, __n); }
inline size_t
_CPP_strxfrm_capture(char* __b, char const* __s, size_t __n)
{ return strxfrm(__b, __s, __n); }
inline void*
_CPP_memchr_capture(void const* __s1, int __c, size_t __n)
{ return memchr(__s1, __c, __n); }
inline char*
_CPP_strchr_capture(char const* __s1, int __c)
{ return strchr(__s1, __c); }
inline size_t
_CPP_strcspn_capture(char const* __s1, char const* __s2)
{ return strcspn(__s1, __s2); }
inline char*
_CPP_strpbrk_capture(char const* __s1, char const* __s2)
{ return strpbrk(__s1, __s2); }
inline char*
_CPP_strrchr_capture(char const* __s1, int __c)
{ return strrchr(__s1, __c); }
inline size_t
_CPP_strspn_capture(char const* __s1, char const* __s2)
{ return strspn(__s1, __s2); }
inline char*
_CPP_strstr_capture(char const* __s1, char const* __s2)
{ return strstr(__s1, __s2); }
inline char*
_CPP_strtok_capture(char* __s1, char const* __s2)
{ return strtok(__s1, __s2); }
inline void*
_CPP_memset_capture(void* __s, int __c, size_t __n)
{ return memset(__s, __c, __n); }
// inline char*
// _CPP_strerror_capture(int __num)
// { return strerror(__num); }
inline size_t
_CPP_strlen_capture(char const* __s)
{ return strlen(__s); }
} // namespace _C_legacy
// size_t, NULL
# undef memcpy
# undef memmove
# undef strcpy
@ -127,110 +162,116 @@
# undef strerror
# undef strlen
namespace _C_legacy {
namespace _C_shadow {
}
}
namespace std {
namespace std {
// Redefine most of these inline. Note that the
// C++ definition differs from C in some cases.
inline void*
memcpy(void* __s1, void const* __s2, size_t __n)
{ return _C_legacy::_CPP_memcpy_capture(__s1, __s2, __n); }
// Redefine most of these inline. Note that the
// C++ definition differs from C in some cases.
inline void*
memmove(void* __s1, void const* __s2, size_t __n)
{ return _C_legacy::_CPP_memmove_capture(__s1, __s2, __n); }
inline void* memcpy(void* __s1, void const* __s2, size_t __n)
{ return ::_C_legacy::_CPP_memcpy_capture(__s1,__s2,__n); }
inline void* memmove(void* __s1, void const* __s2, size_t __n)
{ return ::_C_legacy::_CPP_memmove_capture(__s1,__s2,__n); }
inline void* strcpy(char* __s1, char const* __s2)
{ return ::_C_legacy::_CPP_strcpy_capture(__s1,__s2); }
inline char* strncpy(char* __s1, char const* __s2, size_t __n)
{ return ::_C_legacy::_CPP_strncpy_capture(__s1,__s2,__n); }
inline char* strcat(char* __s1, char const* __s2)
{ return ::_C_legacy::_CPP_strcat_capture(__s1,__s2); }
inline char* strncat(char* __s1, char const* __s2, size_t __n)
{ return ::_C_legacy::_CPP_strncat_capture(__s1,__s2,__n); }
inline int memcmp(void const* __s1,
void const* __s2, size_t __n)
{ return ::_C_legacy::_CPP_memcmp_capture(__s1,__s2,__n); }
inline int strcmp(char const* __s1, char const* __s2)
{ return ::_C_legacy::_CPP_strcmp_capture(__s1,__s2); }
inline int strcoll(char const* __s1, char const* __s2)
{ return ::_C_legacy::_CPP_strcoll_capture(__s1,__s2); }
inline int strncmp(char const* __s1,
char const* __s2, size_t __n)
{ return ::_C_legacy::_CPP_strncmp_capture(__s1,__s2,__n); }
inline size_t strxfrm(char* __b, char const* __s, size_t __n)
{ return ::_C_legacy::_CPP_strxfrm_capture(__b,__s,__n); }
inline void*
strcpy(char* __s1, char const* __s2)
{ return _C_legacy::_CPP_strcpy_capture(__s1, __s2); }
inline void const* memchr(void const* __s1, int __c, size_t __n)
{ return ::_C_legacy::_CPP_memchr_capture(__s1,__c,__n); }
inline void* memchr( void* __s1, int __c, size_t __n)
{ return ::_C_legacy::_CPP_memchr_capture(__s1,__c,__n); }
inline char*
strncpy(char* __s1, char const* __s2, size_t __n)
{ return _C_legacy::_CPP_strncpy_capture(__s1, __s2, __n); }
inline char const* strchr(char const* __s1, int __c)
{ return ::_C_legacy::_CPP_strchr_capture(__s1,__c); }
inline char* strchr( char* __s1, int __c)
{ return ::_C_legacy::_CPP_strchr_capture(__s1,__c); }
inline char*
strcat(char* __s1, char const* __s2)
{ return _C_legacy::_CPP_strcat_capture(__s1, __s2); }
inline size_t strcspn(char const* __s1, char const* __s2)
{ return ::_C_legacy::_CPP_strcspn_capture(__s1,__s2); }
inline char*
strncat(char* __s1, char const* __s2, size_t __n)
{ return _C_legacy::_CPP_strncat_capture(__s1, __s2, __n); }
inline char const* strpbrk(char const* __s1, char const* __s2)
{ return ::_C_legacy::_CPP_strpbrk_capture(__s1,__s2); }
inline char* strpbrk( char* __s1, char const* __s2)
{ return ::_C_legacy::_CPP_strpbrk_capture(__s1,__s2); }
inline int
memcmp(void const* __s1, void const* __s2, size_t __n)
{ return _C_legacy::_CPP_memcmp_capture(__s1, __s2, __n); }
inline char const* strrchr(char const* __s1, int __c)
{ return ::_C_legacy::_CPP_strrchr_capture(__s1,__c); }
inline char* strrchr( char* __s1, int __c)
{ return ::_C_legacy::_CPP_strrchr_capture(__s1,__c); }
inline int
strcmp(char const* __s1, char const* __s2)
{ return _C_legacy::_CPP_strcmp_capture(__s1, __s2); }
inline size_t strspn(char const* __s1, char const* __s2)
{ return ::_C_legacy::_CPP_strspn_capture(__s1,__s2); }
inline int
strcoll(char const* __s1, char const* __s2)
{ return _C_legacy::_CPP_strcoll_capture(__s1, __s2); }
inline char const* strstr(char const* __s1, char const* __s2)
{ return ::_C_legacy::_CPP_strstr_capture(__s1,__s2); }
inline char* strstr( char* __s1, char const* __s2)
{ return ::_C_legacy::_CPP_strstr_capture(__s1,__s2); }
inline int
strncmp(char const* __s1, char const* __s2, size_t __n)
{ return _C_legacy::_CPP_strncmp_capture(__s1, __s2, __n); }
inline char* strtok(char* __s1, char const* __s2)
{ return ::_C_legacy::_CPP_strtok_capture(__s1,__s2); }
inline void* memset(void* __s, int __c, size_t __n)
{ return ::_C_legacy::_CPP_memset_capture(__s,__c,__n); }
inline size_t
strxfrm(char* __b, char const* __s, size_t __n)
{ return _C_legacy::_CPP_strxfrm_capture(__b, __s, __n); }
using ::_C_legacy::strerror;
inline void
const* memchr(void const* __s1, int __c, size_t __n)
{ return _C_legacy::_CPP_memchr_capture(__s1, __c, __n); }
inline size_t strlen(char const* __s)
{ return ::_C_legacy::_CPP_strlen_capture(__s); }
inline void*
memchr(void* __s1, int __c, size_t __n)
{ return _C_legacy::_CPP_memchr_capture(__s1, __c, __n); }
} // close namespace std::
namespace _C_legacy {
namespace _C_shadow {
// adopt names back into C
using ::std::memcpy;
using ::std::memmove;
using ::std::strcpy;
using ::std::strncpy;
using ::std::strcat;
using ::std::strncat;
using ::std::memcmp;
using ::std::strcmp;
using ::std::strcoll;
using ::std::strncmp;
using ::std::strxfrm;
using ::std::memchr;
using ::std::strchr;
using ::std::strcspn;
using ::std::strpbrk;
using ::std::strrchr;
using ::std::strspn;
using ::std::strstr;
using ::std::strtok;
using ::std::memset;
// using ::std::strerror;
using ::std::strlen;
}
}
inline char const*
strchr(char const* __s1, int __c)
{ return _C_legacy::_CPP_strchr_capture(__s1, __c); }
inline char*
strchr(char* __s1, int __c)
{ return _C_legacy::_CPP_strchr_capture(__s1, __c); }
inline size_t
strcspn(char const* __s1, char const* __s2)
{ return _C_legacy::_CPP_strcspn_capture(__s1, __s2); }
inline char const*
strpbrk(char const* __s1, char const* __s2)
{ return _C_legacy::_CPP_strpbrk_capture(__s1, __s2); }
inline char*
strpbrk(char* __s1, char const* __s2)
{ return _C_legacy::_CPP_strpbrk_capture(__s1, __s2); }
inline char const*
strrchr(char const* __s1, int __c)
{ return _C_legacy::_CPP_strrchr_capture(__s1, __c); }
inline char*
strrchr(char* __s1, int __c)
{ return _C_legacy::_CPP_strrchr_capture(__s1, __c); }
inline size_t
strspn(char const* __s1, char const* __s2)
{ return _C_legacy::_CPP_strspn_capture(__s1, __s2); }
inline char const*
strstr(char const* __s1, char const* __s2)
{ return _C_legacy::_CPP_strstr_capture(__s1, __s2); }
inline char*
strstr(char* __s1, char const* __s2)
{ return _C_legacy::_CPP_strstr_capture(__s1, __s2); }
inline char*
strtok(char* __s1, char const* __s2)
{ return _C_legacy::_CPP_strtok_capture(__s1, __s2); }
inline void*
memset(void* __s, int __c, size_t __n)
{ return _C_legacy::_CPP_memset_capture(__s, __c, __n); }
using _C_legacy::strerror;
inline size_t
strlen(char const* __s)
{ return _C_legacy::_CPP_strlen_capture(__s); }
} // namespace std
# undef _IN_C_LEGACY_

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -34,30 +34,28 @@
#ifndef _CPP_CTIME
#define _CPP_CTIME 1
# include <bits/std_cstddef.h> /* pick up size_t, NULL */
# include <bits/std_cstddef.h>
namespace _C_legacy {
extern "C" {
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# pragma GCC system_header
// XXX
// glibc 2.1.x time.h is on crack
# undef __need_time_t
# undef __need_clock_t
# undef __need_timespec
# include_next <time.h>
}
inline clock_t _CPP_CLOCKS_PER_SEC_capture()
{ return CLOCKS_PER_SEC; }
// typedef size_t _CPP_size_t_capture; // handled in <cstddef>
typedef clock_t _CPP_clock_t_capture;
typedef time_t _CPP_time_t_capture;
typedef struct tm _CPP_tm_capture;
}
namespace _C_shadow { }
} // close namespace ::_C_legacy::
typedef clock_t _CPP_clock_t_capture;
typedef time_t _CPP_time_t_capture;
typedef tm _CPP_tm_capture;
// # undef NULL
// # define NULL 0 /* handled in <cstddef> */
# undef CLOCKS_PER_SEC
# define CLOCKS_PER_SEC (::_C_legacy::_CPP_CLOCKS_PER_SEC_capture())
} // namespace _C_legacy
# undef size_t /* handled in <cstddef> */
# undef clock_t
# undef time_t
# undef tm
@ -71,57 +69,38 @@
# undef localtime
# undef strftime
namespace _C_legacy {
namespace _C_shadow {
// typedef ::_C_legacy::_CPP_size_t_capture size_t;
typedef ::_C_legacy::_CPP_clock_t_capture clock_t;
typedef ::_C_legacy::_CPP_time_t_capture time_t;
}
}
namespace std {
namespace std {
// Adopt C names into std::
// using ::_C_legacy::_C_shadow::size_t;
using ::_C_legacy::_C_shadow::clock_t;
using ::_C_legacy::_C_shadow::time_t;
// Adopt C names into std::
typedef _C_legacy::_CPP_clock_t_capture clock_t;
typedef _C_legacy::_CPP_time_t_capture time_t;
struct tm : _C_legacy::_CPP_tm_capture { };
// note: still a POD type:
struct tm : ::_C_legacy::_CPP_tm_capture { };
using _C_legacy::clock;
using _C_legacy::difftime;
using _C_legacy::mktime;
using _C_legacy::time;
using _C_legacy::ctime;
using ::_C_legacy::clock;
using ::_C_legacy::difftime;
using ::_C_legacy::mktime;
using ::_C_legacy::time;
inline char*
asctime(const tm* __t)
{ return _C_legacy::asctime(static_cast<_C_legacy::_CPP_tm_capture const*>(__t)); }
inline char* asctime(const tm* __tp)
{ return ::_C_legacy::asctime(
static_cast< ::_C_legacy::_CPP_tm_capture const*>(__tp)); }
inline tm*
gmtime(time_t const* __tp)
{ return reinterpret_cast<tm*>(_C_legacy::gmtime(__tp)); }
using ::_C_legacy::ctime;
inline tm*
localtime(const time_t* __tp)
{ return reinterpret_cast<tm*>(_C_legacy::localtime(__tp)); }
inline size_t
strftime(char* __buf, size_t __maxsz, char const* __fmt, tm const* __tp)
{ return _C_legacy::strftime(__buf, __maxsz, __fmt,
static_cast<_C_legacy::_CPP_tm_capture const*>(__tp)); }
inline tm* gmtime(time_t const* __tp)
{ return reinterpret_cast<tm*>(::_C_legacy::gmtime(__tp)); }
inline tm* localtime(const time_t* __tp)
{ return reinterpret_cast<tm*>(::_C_legacy::localtime(__tp)); }
inline size_t strftime(char* __buf, size_t __maxsz,
char const* __fmt, tm const* __tp)
{ return ::_C_legacy::strftime(__buf, __maxsz, __fmt,
static_cast< ::_C_legacy::_CPP_tm_capture const*>(__tp)); }
} // close namespace std::
} // namespace std
namespace _C_legacy {
namespace _C_shadow {
using ::std::tm;
using ::std::asctime;
using ::std::gmtime;
using ::std::localtime;
using ::std::strftime;
}
}
# undef _IN_C_LEGACY_
#endif

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -30,252 +30,252 @@
//
// ISO C++ 14882: 21
// XXX: this file still needs hackery for system version dependencies
#ifndef _CPP_CWCHAR
# define _CPP_CWCHAR 1
# include <bits/std_cstddef.h> /* size_t, NULL */
# include <bits/std_cstdio.h> /* FILE */
# include <bits/std_ctime.h> /* struct tm */
# include <bits/std_cstring.h> /* memset */
# include <bits/std_cstdio.h>
namespace _C_legacy {
extern "C" {
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# pragma GCC system_header
# include_next <wchar.h>
}
// NULL, size_t handled in <cstddef>
}
// wchar_t
typedef wint_t _CPP_wint_t_capture;
typedef mbstate_t _CPP_mbstate_t_capture;
const wint_t _CPP_WEOF_capture = (wint_t)(WEOF);
typedef wchar_t _CPP_wchar_t_capture;
typedef wint_t _CPP_wint_t_capture;
typedef mbstate_t _CPP_mbstate_t_capture;
#if 0 /* XXX glibc-2.0 does not implement these. */
inline wint_t _CPP_getwc_capture(FILE* __f)
{ return getwc(__f); }
inline wint_t _CPP_getwchar_capture()
{ return getwchar(); }
inline wint_t _CPP_putwc_capture(wint_t __c, FILE* __f)
{ return putwc(__c,__f); }
inline wint_t _CPP_putwchar_capture(wint_t __c)
{ return putwchar(__c); }
#if 0
// XXX
inline int
fwprintf(FILE* __stream, const wchar_t* __format, ...);
inline int
fwscanf(FILE* __stream, const wchar_t* __format, ...);
inline int
vfwprintf(FILE* __stream, const wchar_t* __format, va_list __arg);
inline int
vfwscanf(FILE* __stream, const wchar_t* __format, va_list __arg);
inline wint_t
_CPP_fgetwc_capture(FILE* __stream)
{ return fgetwc(__stream); }
inline wchar_t*
_CPP_fgetws_capture(wchar_t* __s, int __n, FILE* __stream)
{ return fgetws(__s, __n, __stream); }
inline wint_t
_CPP_fputwc_capture(wchar_t __c, FILE* __stream)
{ return fputwc(__c, __stream); }
inline int
_CPP_fputws_capture(const wchar_t* __s, FILE* __stream)
{ return fputws(__s, __stream); }
inline int
_CPP_fwide_capture(FILE* __stream, int __mode)
{ return fwide(__stream, __mode); }
inline wint_t
_CPP_fgetwc_capture(FILE* __stream)
{ return fgetwc(__stream); }
inline wint_t
_CPP_putwc_capture(wchar_t __c, FILE* __stream)
{ return putwc(__c, __stream); }
inline wint_t
_CPP_ungetwc_capture(wint_t __c, FILE* __stream)
{ return ungetwc(__c, __stream); }
#endif
} // namespace _C_legacy
namespace _C_shadow { }
} // close namespace ::_C_legacy::
// # undef size_t /* handled in <cstddef> */
# undef wchar_t
# undef wint_t
# undef mbstate_t
# undef WEOF
# define WEOF ::_C_legacy::_CPP_WEOF_capture
// the following are not in glibc-2.0
# undef fwprintf
# undef fwscanf
# undef swprintf
# undef swscanf
# undef vfwprintf
# undef vfwscanf
# undef vswprintf
# undef vswscanf
# undef vwprintf
# undef vwscanf
# undef wprintf
# undef wscanf
# undef fgetwc
# undef fgetws
# undef fputwc
# undef fputws
# undef ungetwc
# undef fwide
# undef getwc
# undef getwchar
# undef putwc
# undef putwchar
# undef wprintf
# undef wsprintf
# undef wvsprintf
# undef wfsprintf
# undef wscanf
# undef wsscanf
# undef wvsscanf
# undef wfscanf
// XXX etc.
# undef ungetwc
# undef wcstod
# undef wcstof
# undef wcstold
# undef wcstol
# undef wcstoll
# undef wcstoul
# undef wcstoull
# undef wcscpy
# undef wcsncpy
# undef wcscat
# undef wcscmp
# undef wcsncat
# undef wcsmp
# undef wcscoll
# undef wcsncmp
# undef wcsxfrm
# undef wcsdup
# undef wcschr
# undef wcscspn
# undef wcslen
# undef wcspbrk
# undef wcsrchr
# undef wcsspn
# undef wcsstr
# undef wcstok
# undef wcslen
# undef wmemchr
# undef wmemcmp
# undef wmemcpy
# undef wmemmove
# undef wmemset
# undef wcsftime
# undef btowc
# undef wctob
# undef mbsinit
# undef mbrlen
# undef mbrtowc
# undef wcrtomb
# undef mbrlen
# undef mbsrtowcs
# undef wcsrtombs
#ifdef __USE_GNU
# undef mbsnrtowcs
# undef mbsnrtombs
# undef wcwidth
# undef wcswidth
# undef wcscmpy
#endif
# undef wcstod
# undef wcstol
# undef wcstoul
# undef wcsncat
# undef wcsncmp
# undef wcsncpy
# undef wcsrchr
# undef wcsspn
// XXX a bunch more names are required under C89 Amendment 1,
// but they are not uniformly implemented.
namespace std {
// XXX the following are not supposed to be defined in <wchar.h>,
// but Sun does anyway.
# undef iswalpha
# undef iswupper
# undef iswlower
# undef iswdigit
# undef iswxdigit
# undef iswalnum
# undef iswspace
# undef iswpunct
# undef iswprint
# undef iswgraph
# undef iswcntrl
# undef iswctype
# undef towlower
# undef towupper
# undef wctype_t
# undef wctype
# undef wcspbrk
# undef wcswcs
typedef _C_legacy::_CPP_wchar_t_capture wchar_t;
typedef _C_legacy::_CPP_wint_t_capture wint_t;
typedef _C_legacy::_CPP_mbstate_t_capture mbstate_t;
namespace _C_legacy {
namespace _C_shadow {
typedef ::_C_legacy::_CPP_wint_t_capture wint_t;
// typedef ::_C_legacy::_CPP_wctype_t_capture wctype_t;
}
}
namespace std {
// using ::_C_legacy::wchar_t;
using ::_C_legacy::_C_shadow::wint_t;
// using ::_C_legacy::WEOF;
// XXX this might better be replaced with one unrelated to the C mbstate_t.
struct mbstate_t {
_C_legacy::_CPP_mbstate_t_capture _M_dum;
mbstate_t() { std::memset(&_M_dum,0,sizeof(_M_dum)); }
};
#if 0 /* glibc-2.0 does not implement these. */
inline wint_t fgetwc(FILE* __f)
{ return ::_C_legacy::fgetwc(__f); }
inline wchar_t* fgetws(wchar_t* __s, int __n, FILE* __f)
{ return ::_C_legacy::fgetws(__s,__n,__f); }
inline wint_t fputwc(wint_t __c, FILE* __f)
{ return ::_C_legacy::fputwc(__c,__f); }
inline int fputws(const wchar_t* __s, FILE* __f)
{ return ::_C_legacy::fputws(__s,__f); }
inline wint_t ungetwc(wint_t __c, FILE* __f)
{ return ::_C_legacy::ungetwc(__c,__f); }
inline wint_t getwc(FILE* __f)
{ return ::_C_legacy::_CPP_getwc_capture(__f); }
inline wint_t getwchar()
{ return ::_C_legacy::_CPP_getwchar_capture(); }
inline wint_t putwc(wint_t __c, FILE* __f)
{ return ::_C_legacy::_CPP_putwc_capture(__c,__f); }
inline wint_t putwchar(wint_t __c)
{ return ::_C_legacy::_CPP_putwchar_capture(__c); }
// similarly wprintf etc.
#if 0
using _C_legacy::swprintf;
using _C_legacy::swscanf;
using _C_legacy::vswprintf;
using _C_legacy::vswscanf;
using _C_legacy::vwprintf;
using _C_legacy::vwscanf;
using _C_legacy::wprintf;
using _C_legacy::wscanf;
using _C_legacy::getwchar;
using _C_legacy::putwchar;
#endif
using ::_C_legacy::wcscpy;
using ::_C_legacy::wcscat;
using ::_C_legacy::wcscmp;
using ::_C_legacy::wcscoll;
using ::_C_legacy::wcsxfrm;
using ::_C_legacy::wcschr;
using ::_C_legacy::wcscspn;
using ::_C_legacy::wcspbrk;
using ::_C_legacy::wcstok;
using ::_C_legacy::wcslen;
#ifndef __sun
#ifdef __USE_GNU
using ::_C_legacy::wcsdup;
#endif
using ::_C_legacy::wcsstr;
using ::_C_legacy::wmemchr;
using ::_C_legacy::wmemcmp;
using ::_C_legacy::wmemcpy;
using ::_C_legacy::wmemmove;
using ::_C_legacy::wmemset;
using ::_C_legacy::btowc;
using ::_C_legacy::wctob;
using ::_C_legacy::mbsinit;
using ::_C_legacy::mbrtowc;
using ::_C_legacy::wcrtomb;
using ::_C_legacy::mbrlen;
#endif
#ifdef __USE_GNU
using ::_C_legacy::mbsrtowcs;
using ::_C_legacy::wcsrtombs;
using ::_C_legacy::mbsnrtowcs;
using ::_C_legacy::mbsnrtombs;
using ::_C_legacy::wcscmpy
using ::_C_legacy::wcwidth;
using ::_C_legacy::wcswidth;
#endif
using ::_C_legacy::wcstod;
using ::_C_legacy::wcstol;
using ::_C_legacy::wcstoul;
using ::_C_legacy::wcsncat;
using ::_C_legacy::wcsncmp;
using ::_C_legacy::wcsncpy;
using ::_C_legacy::wcsrchr;
using ::_C_legacy::wcsspn;
// using ::_C_legacy::wcswcs;
using _C_legacy::wcstod;
using _C_legacy::wcstof;
using _C_legacy::wcstold;
using _C_legacy::wcstol;
using _C_legacy::wcstoll;
using _C_legacy::wcstoul;
using _C_legacy::wcstoull;
using _C_legacy::wcscpy;
using _C_legacy::wcsncpy;
using _C_legacy::wcscat;
using _C_legacy::wcsncat;
#if 0 /* not implemented in glibc-2 */
inline size_t wcsftime(wchar_t* __s, size_t __n,
char const* __fmt, struct tm const* __tmb)
{ return ::_C_legacy::wcsftime(__s,__n,__fmt,__tmb); }
using ::_C_legacy::wctype;
#if 0
using _C_legacy::wcsmp;
#endif
}
using _C_legacy::wcscoll;
using _C_legacy::wcsncmp;
using _C_legacy::wcsxfrm;
using _C_legacy::wcschr;
using _C_legacy::wcscspn;
using _C_legacy::wcslen;
using _C_legacy::wcspbrk;
using _C_legacy::wcsrchr;
using _C_legacy::wcsspn;
using _C_legacy::wcsstr;
using _C_legacy::wcstok;
using _C_legacy::wmemchr;
using _C_legacy::wmemcmp;
using _C_legacy::wmemcpy;
using _C_legacy::wmemmove;
using _C_legacy::wmemset;
#if 0
using _C_legacy::wcsftime;
#endif
using _C_legacy::btowc;
using _C_legacy::wctob;
using _C_legacy::mbsinit;
using _C_legacy::mbrlen;
using _C_legacy::mbrtowc;
using _C_legacy::wcrtomb;
using _C_legacy::mbsrtowcs;
using _C_legacy::wcsrtombs;
#if 0
// XXX
inline int
fwprintf(FILE* __stream, const wchar_t* __format, ...);
inline int
fwscanf(FILE* __stream, const wchar_t* __format, ...);
inline int
vfwprintf(FILE* __stream, const wchar_t* __format, va_list __arg);
inline int
vfwscanf(FILE* __stream, const wchar_t* __format, va_list __arg);
inline wint_t
fgetwc(FILE* __stream)
{ return _C_legacy::_CPP_fgetwc_capture(__stream); }
inline wchar_t*
fgetws(wchar_t* __s, int __n, FILE* __stream)
{ return _C_legacy::_CPP_fgetws_capture(__s, __n, __stream); }
inline wint_t
fputwc(wchar_t __c, FILE* __stream)
{ return _C_legacy::_CPP_fputwc_capture(__c, __stream); }
inline int
fputws(const wchar_t* __s, FILE* __stream)
{ return _C_legacy::_CPP_fputws_capture(__s, __stream); }
inline int
fwide(FILE* __stream, int __mode)
{ return _C_legacy::_CPP_fwide_capture(__stream, __mode); }
inline wint_t
getwc(FILE* __stream)
{ return _C_legacy::_CPP_getwc_capture(__stream); }
inline wint_t
putwc(wchar_t __c, FILE* __stream)
{ return _C_legacy::_CPP_putwc_capture(__c, __stream); }
namespace _C_legacy {
namespace _C_shadow {
#if 0 /* XXX glibc-2.0 does not implement these. */
using ::std::fgetwc;
using ::std::fgetws;
using ::std::fputwc;
using ::std::fputws;
using ::std::ungetwc;
using ::std::getwc;
using ::std::getwchar;
using ::std::putwc;
using ::std::putwchar;
using ::std::wcsftime;
// XXX also wprintf etc.
inline wint_t
ungetwc(wint_t __c, FILE* __stream)
{ return _C_legacy::_CPP_ungetwc_capture(__c, __stream); }
#endif
}
}
}
# undef _IN_C_LEGACY_
#endif

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -28,36 +28,25 @@
// the GNU General Public License.
//
// ISO C++ 14882: ???
// ISO C++ 14882:
//
// XXX this is not complete
#ifndef _CPP_CWCTYPE
#define _CPP_CWCTYPE 1
# include <bits/std_cwchar.h> /* pick up wint_t, WEOF */
# include <bits/std_cwchar.h>
namespace _C_legacy {
extern "C" {
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# pragma GCC system_header
# include_next <wctype.h>
}
typedef wctype_t _CPP_wctype_t_capture;
typedef wctrans_t _CPP_wctrans_t_capture;
}
} // namespace _C_legacy
// XXX probably should capture defs of the "is" functions.
namespace _C_shadow { }
} // close namespace ::_C_legacy::
# undef size_t /* handled in <cstddef> */
# undef wchar_t
# undef wint_t
# undef wctype_t
# undef wctrans_t
// # undef WEOF
# undef iswalpha
# undef iswupper
# undef iswlower
@ -70,49 +59,71 @@
# undef iswgraph
# undef iswcntrl
# undef iswctype
# undef towctrans
# undef towlower
# undef towupper
# undef wctrans
# undef wctype
// SunOS macros
# undef iswascii
# undef iscodeset0
# undef iscodeset1
# undef iscodeset2
# undef iscodeset3
namespace std {
using _C_legacy::wctype_t;
using _C_legacy::wctrans_t;
namespace _C_legacy {
namespace _C_shadow {
typedef ::_C_legacy::_CPP_wctype_t_capture wctype_t;
typedef ::_C_legacy::_CPP_wctrans_t_capture wctrans_t;
}
}
namespace std {
using ::_C_legacy::_C_shadow::wctype_t;
using ::_C_legacy::_C_shadow::wctrans_t;
inline int
iswalpha(wint_t __wc) { return _C_legacy::iswalpha(__wc); }
// XXX probably should capture these to inlines.
using ::_C_legacy::iswalpha;
using ::_C_legacy::iswupper;
using ::_C_legacy::iswlower;
using ::_C_legacy::iswdigit;
using ::_C_legacy::iswxdigit;
using ::_C_legacy::iswalnum;
using ::_C_legacy::iswspace;
using ::_C_legacy::iswpunct;
using ::_C_legacy::iswprint;
using ::_C_legacy::iswgraph;
using ::_C_legacy::iswcntrl;
using ::_C_legacy::iswctype;
using ::_C_legacy::towlower;
using ::_C_legacy::towupper;
inline int
iswupper(wint_t __wc) { return _C_legacy::iswupper(__wc); }
} // close namespace std::
inline int
iswlower(wint_t __wc) { return _C_legacy::iswlower(__wc); }
inline int
iswdigit(wint_t __wc) { return _C_legacy::iswdigit(__wc); }
inline int
iswxdigit(wint_t __wc) { return _C_legacy::iswxdigit(__wc); }
inline int
iswalnum(wint_t __wc) { return _C_legacy::iswalnum(__wc); }
inline int
iswspace(wint_t __wc) { return _C_legacy::iswspace(__wc); }
inline int
iswpunct(wint_t __wc) { return _C_legacy::iswpunct(__wc); }
inline int
iswprint(wint_t __wc) { return _C_legacy::iswprint(__wc); }
inline int
iswgraph(wint_t __wc) { return _C_legacy::iswgraph(__wc); }
inline int
iswcntrl(wint_t __wc) { return _C_legacy::iswcntrl(__wc); }
inline int
towlower(wint_t __wc) { return _C_legacy::towlower(__wc); }
inline int
towupper(wint_t __wc) { return _C_legacy::towupper(__wc); }
inline int
iswctype(wint_t __wc, wctype_t __desc)
{ return _C_legacy::iswctype(__wc, __desc); }
inline wint_t
towctrans(wint_t __wc, wctrans_t __desc)
{ return _C_legacy::towctrans (__wc, __desc); }
namespace _C_legacy {
namespace _C_shadow {
}
}
inline wctrans_t
wctrans(const char *__property) { return _C_legacy::wctrans(__property); }
inline wctype_t
wctype(char const* __property) { return _C_legacy::wctype(__property); }
} // namespace std
# undef _IN_C_LEGACY_
#endif

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -28,42 +28,21 @@
// the GNU General Public License.
//
// ISO C++ 14882: 20.5 Date and time
// ISO C++ 14882: 20.5 Extensions
//
// XXX incomplete
#ifndef _CPP_WRAP_LIBIO_H
#define _CPP_WRAP_LIBIO_H 1
namespace _C_legacy {
extern "C" {
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# pragma GCC system_header
# include_next <libio.h>
}
namespace _C_shadow { }
} // close namespace ::_C_legacy::
// # undef that
namespace _C_legacy {
namespace _C_shadow {
// typedef stuff
}
}
namespace std {
} // namespace _C_legacy
// using ::_C_legacy::stuff
} // close namespace std::
namespace _C_legacy {
namespace _C_shadow {
// using ::std::stuff
}
}
// NB: Don't bring elements from this non-standard header into namespace std.
# undef _IN_C_LEGACY_

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -28,28 +28,41 @@
// the GNU General Public License.
#ifndef _INCLUDED_CPP_CTYPE_H_
# undef _SHADOW_NAME
# define _SHADOW_NAME <cctype>
# include <bits/generic_shadow.h>
# undef _SHADOW_NAME
# ifndef _IN_C_LEGACY_
using ::std::isalnum;
using ::std::isalpha;
using ::std::iscntrl;
using ::std::isdigit;
using ::std::isgraph;
using ::std::islower;
using ::std::isprint;
using ::std::ispunct;
using ::std::isspace;
using ::std::isupper;
using ::std::isxdigit;
using ::std::tolower;
using ::std::toupper;
# define _INCLUDED_CPP_CTYPE_H_ 1
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
// get out of the "legacy"
#error ctype.h
} // close extern "C"
} // close namespace _C_legacy::
# undef _IN_C_LEGACY_
# define _CTYPE_NEED_C_LEGACY_
# endif
# include <cctype>
// Expose global C names, including non-standard ones, but shadow
// some names and types with the std:: C++ version.
using std::isalnum;
using std::isalpha;
using std::iscntrl;
using std::isdigit;
using std::isgraph;
using std::islower;
using std::isprint;
using std::ispunct;
using std::isspace;
using std::isupper;
using std::isxdigit;
using std::tolower;
using std::toupper;
# ifdef _CTYPE_NEED_C_LEGACY_
// dive back into the "swamp"
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# undef _CTYPE_NEED_C_LEGACY_
# endif /* _CTYPE_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_CTYPE_H_ */

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -30,8 +30,26 @@
#ifndef _INCLUDED_CPP_ERRNO_H_
# define _INCLUDED_CPP_ERRNO_H_ 1
# undef _SHADOW_NAME
# define _SHADOW_NAME <cerrno>
# include <bits/generic_shadow.h>
# undef _SHADOW_NAME
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
// get out of the "legacy"
} // close extern "C"
} // close namespace _C_legacy::
# undef _IN_C_LEGACY_
# define _ERRNO_NEED_C_LEGACY_
# endif
# include <cerrno>
// Expose global C names, including non-standard ones, but shadow
// some names and types with the std:: C++ version.
using std::errno;
# ifdef _ERRNO_NEED_C_LEGACY_
// dive back into the "swamp"
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# undef _ERRNO_NEED_C_LEGACY_
# endif /* _ERRNO_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_ERRNO_H_ */

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -28,11 +28,27 @@
// the GNU General Public License.
#ifndef _INCLUDED_CPP_FLOAT_H_
# define _INCLUDED_CPP_FLOAT_H_ 1
# undef _SHADOW_NAME
# define _SHADOW_NAME <cfloat>
# include <bits/generic_shadow.h>
# undef _SHADOW_NAME
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
// get out of the "legacy"
} // close extern "C"
} // close namespace _C_legacy::
# undef _IN_C_LEGACY_
# define _FLOAT_NEED_C_LEGACY_
# endif
# include <cfloat>
// Expose global C names, including non-standard ones, but shadow
// some names and types with the std:: C++ version.
# ifdef _FLOAT_NEED_C_LEGACY_
// dive back into the "swamp"
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# undef _FLOAT_NEED_C_LEGACY_
# endif /* _FLOAT_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_FLOAT_H_ */

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// 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
@ -29,16 +29,53 @@
#ifndef _INCLUDED_CPP_LIBIO_H_
# undef _SHADOW_NAME
# define _SHADOW_NAME <bits/wrap_libio.h>
# include <bits/generic_shadow.h>
# undef _SHADOW_NAME
# ifndef _IN_C_LEGACY_
// using ::std::stuff
# define _INCLUDED_CPP_LIBIO_H_ 1
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
// get out of the "legacy"
} // close extern "C"
} // close namespace _C_legacy::
# undef _IN_C_LEGACY_
# define _LIBIO_NEED_C_LEGACY_
# endif
# include <bits/wrap_libio.h>
// Expose global C names, including non-standard ones, but shadow
// some names and types with the std:: C++ version.
// NB: Cannot use typedefs here to inject the names as the "C" headers
// often include typedefs that include the keyword 'struct'
using _C_legacy::_IO_pos_t;
using _C_legacy::_IO_fpos_t;
using _C_legacy::_IO_fpos64_t;
using _C_legacy::_IO_size_t;
using _C_legacy::_IO_ssize_t;
using _C_legacy::_IO_off_t;
using _C_legacy::_IO_off64_t;
using _C_legacy::_IO_pid_t;
using _C_legacy::_IO_uid_t;
using _C_legacy::_IO_iconv_t;
using _C_legacy::_IO_va_list;
using _C_legacy::_IO_wint_t;
using _C_legacy::_IO_lock_t;
using _C_legacy::_IO_marker;
using _C_legacy::_IO_codecvt;
using _C_legacy::_IO_wide_data;
using _C_legacy::_IO_FILE;
using _C_legacy::_IO_cookie_io_functions_t;
using _C_legacy::_IO_cookie_file;
# ifdef _LIBIO_NEED_C_LEGACY_
// dive back into the "swamp"
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# undef _LIBIO_NEED_C_LEGACY_
# endif /* _LIBIO_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_LIBIO_H_ */

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -28,11 +28,27 @@
// the GNU General Public License.
#ifndef _INCLUDED_CPP_LIMITS_H_
# define _INCLUDED_CPP_LIMITS_H_ 1
# undef _SHADOW_NAME
# define _SHADOW_NAME <climits>
# include <bits/generic_shadow.h>
# undef _SHADOW_NAME
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
// get out of the "legacy"
} // close extern "C"
} // close namespace _C_legacy::
# undef _IN_C_LEGACY_
# define _LIMITS_NEED_C_LEGACY_
# endif
# include <climits>
// Expose global C names, including non-standard ones, but shadow
// some names and types with the std:: C++ version.
# ifdef _LIMITS_NEED_C_LEGACY_
// dive back into the "swamp"
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# undef _LIMITS_NEED_C_LEGACY_
# endif /* _LIMITS_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_LIMITS_H_ */

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -28,18 +28,30 @@
// the GNU General Public License.
#ifndef _INCLUDED_CPP_LOCALE_H_
# undef _SHADOW_NAME
# define _SHADOW_NAME <clocale>
# include <bits/generic_shadow.h>
# undef _SHADOW_NAME
# ifndef _IN_C_LEGACY_
using ::std::lconv;
using ::std::setlocale;
using ::std::localeconv;
# define _INCLUDED_CPP_LOCALE_H_ 1
# endif
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
// get out of the "legacy"
} // close extern "C"
} // close namespace _C_legacy::
# undef _IN_C_LEGACY_
# define _LOCALE_NEED_C_LEGACY_
#endif
# include <clocale>
// Expose global C names, including non-standard ones, but shadow
// some names and types with the std:: C++ version.
using std::lconv;
using std::setlocale;
using std::localeconv;
# ifdef _LOCALE_NEED_C_LEGACY_
// dive back into the "swamp"
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# undef _LOCALE_NEED_C_LEGACY_
# endif /* _LOCALE_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_LOCALE_H_ */

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -29,35 +29,103 @@
#ifndef _INCLUDED_CPP_MATH_H_
# undef _SHADOW_NAME
# define _SHADOW_NAME <cmath>
# include <bits/generic_shadow.h>
# undef _SHADOW_NAME
# ifndef _IN_C_LEGACY_
using ::std::acos;
using ::std::asin;
using ::std::atan;
using ::std::atan2;
using ::std::cos;
using ::std::sin;
using ::std::tan;
using ::std::cosh;
using ::std::sinh;
using ::std::tanh;
using ::std::exp;
using ::std::frexp;
using ::std::ldexp;
using ::std::log;
using ::std::log10;
using ::std::modf;
using ::std::pow;
using ::std::sqrt;
using ::std::ceil;
using ::std::fabs;
using ::std::floor;
using ::std::fmod;
# define _INCLUDED_CPP_MATH_H_ 1
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
// get out of the "legacy"
} // close extern "C"
} // close namespace _C_legacy::
# undef _IN_C_LEGACY_
# define _MATH_NEED_C_LEGACY_
# endif
# include <cmath>
// Expose global C names, including non-standard ones, but shadow
// some names and types with the std:: C++ version.
using std::abs;
using std::acos;
using std::asin;
using std::atan;
using std::atan2;
using std::cos;
using std::sin;
using std::tan;
using std::cosh;
using std::sinh;
using std::tanh;
using std::exp;
using std::frexp;
using std::ldexp;
using std::log;
using std::log10;
using std::modf;
using std::pow;
using std::sqrt;
using std::ceil;
using std::fabs;
using std::floor;
using std::fmod;
// From ISO/IEC 9899:1999
using std::absf;
using std::acosf;
using std::asinf;
using std::atanf;
using std::atan2f;
using std::cosf;
using std::sinf;
using std::tanf;
using std::coshf;
using std::sinhf;
using std::tanhf;
using std::expf;
using std::frexpf;
using std::ldexpf;
using std::logf;
using std::log10f;
using std::modff;
using std::powf;
using std::sqrtf;
using std::ceilf;
using std::fabsf;
using std::floorf;
using std::fmodf;
// From ISO/IEC 9899:1999
using std::absl;
using std::acosl;
using std::asinl;
using std::atanl;
using std::atan2l;
using std::cosl;
using std::sinl;
using std::tanl;
using std::coshl;
using std::sinhl;
using std::tanhl;
using std::expl;
using std::frexpl;
using std::ldexpl;
using std::logl;
using std::log10l;
using std::modfl;
using std::powl;
using std::sqrtl;
using std::ceill;
using std::fabsl;
using std::floorl;
using std::fmodl;
# ifdef _MATH_NEED_C_LEGACY_
// dive back into the "swamp"
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# undef _MATH_NEED_C_LEGACY_
# endif /* _MATH_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_MATH_H_ */

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -28,17 +28,29 @@
// the GNU General Public License.
#ifndef _INCLUDED_CPP_SETJMP_H_
# undef _SHADOW_NAME
# define _SHADOW_NAME <csetjmp>
# include <bits/generic_shadow.h>
# undef _SHADOW_NAME
# ifndef _IN_C_LEGACY_
using ::std::jmp_buf;
using ::std::longjmp;
# define _INCLUDED_CPP_SETJMP_H_ 1
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
// get out of the "legacy"
} // close extern "C"
} // close namespace _C_legacy::
# undef _IN_C_LEGACY_
# define _SETJMP_NEED_C_LEGACY_
# endif
# include <csetjmp>
// Expose global C names, including non-standard ones, but shadow
// some names and types with the std:: C++ version.
using std::jmp_buf;
using std::longjmp;
# ifdef _SETJMP_NEED_C_LEGACY_
// dive back into the "swamp"
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# undef _SETJMP_NEED_C_LEGACY_
# endif /* _SETJMP_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_SETJMP_H_ */

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -28,18 +28,31 @@
// the GNU General Public License.
#ifndef _INCLUDED_CPP_SIGNAL_H_
# undef _SHADOW_NAME
# define _SHADOW_NAME <csignal>
# include <bits/generic_shadow.h>
# undef _SHADOW_NAME
# ifndef _IN_C_LEGACY_
using ::std::sig_atomic_t;
using ::std::raise;
using ::std::signal;
# define _INCLUDED_CPP_SIGNAL_H_ 1
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
// get out of the "legacy"
} // close extern "C"
} // close namespace _C_legacy::
# undef _IN_C_LEGACY_
# define _SIGNAL_NEED_C_LEGACY_
# endif
# include <csignal>
// Expose global C names, including non-standard ones, but shadow
// some names and types with the std:: C++ version.
using std::sig_atomic_t;
using std::raise;
using std::signal;
# ifdef _SIGNAL_NEED_C_LEGACY_
// dive back into the "swamp"
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# undef _SIGNAL_NEED_C_LEGACY_
# endif /* _SIGNAL_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_SIGNAL_H_ */

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -29,14 +29,27 @@
#ifndef _INCLUDED_CPP_STDARG_H_
# undef _SHADOW_NAME
# define _SHADOW_NAME <cstdarg>
# include <bits/generic_shadow.h>
# undef _SHADOW_NAME
# ifndef _IN_C_LEGACY_
using ::std::va_list;
# define _INCLUDED_CPP_STDARG_H_ 1
#ifdef _IN_C_LEGACY_ /* sub-included by a C header */
// get out of the "legacy"
} // close extern "C"
} // close namespace _C_legacy::
# undef _IN_C_LEGACY_
# define _STDARG_NEED_C_LEGACY_
# endif
# include <cstdarg>
// Expose global C names, including non-standard ones, but shadow
// some names and types with the std:: C++ version.
using std::va_list;
# ifdef _STDARG_NEED_C_LEGACY_
// dive back into the "swamp"
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# undef _STDARG_NEED_C_LEGACY_
# endif /* _STDARG_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_STDARG_H_ */

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -29,23 +29,32 @@
#ifndef _INCLUDED_CPP_STDDEF_H_
// turn off glibc weirdness. other libs have similar foolishness.
#undef __need_wchar_t
#undef __need_size_t
#undef __need_ptrdiff_t
#undef __need_NULL
#undef __need_wint_t
# undef _SHADOW_NAME
# define _SHADOW_NAME <cstddef>
# include <bits/generic_shadow.h>
# undef _SHADOW_NAME
# ifndef _IN_C_LEGACY_
using ::std::ptrdiff_t;
using ::std::size_t;
# define _INCLUDED_CPP_STDDEF_H_ 1
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
// get out of the "legacy"
} // close extern "C"
} // close namespace _C_legacy::
# undef _IN_C_LEGACY_
# define _STDDEF_NEED_C_LEGACY_
# endif
# include <cstddef>
// Expose global C names, including non-standard ones, but shadow
// some names and types with the std:: C++ version.
using std::ptrdiff_t;
using std::size_t;
# ifdef _STDDEF_NEED_C_LEGACY_
// dive back into the "swamp"
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# undef _STDDEF_NEED_C_LEGACY_
# endif /* _STDDEF_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_STDDEF_H_ */

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -27,58 +27,71 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#ifndef _INCLUDED_CPP_STDIO_H_
# undef _SHADOW_NAME
# define _SHADOW_NAME <cstdio>
# include <bits/generic_shadow.h>
# undef _SHADOW_NAME
# ifndef _IN_C_LEGACY_
using ::std::size_t;
using ::std::fpos_t;
using ::std::remove;
using ::std::rename;
using ::std::tmpfile;
using ::std::tmpnam;
using ::std::fclose;
using ::std::fflush;
using ::std::fopen;
using ::std::freopen;
using ::std::setbuf;
using ::std::setvbuf;
using ::std::fprintf;
using ::std::fscanf;
using ::std::printf;
using ::std::scanf;
using ::std::sprintf;
using ::std::sscanf;
using ::std::vfprintf;
using ::std::vprintf;
using ::std::vsprintf;
using ::std::fgetc;
using ::std::fgets;
using ::std::fputc;
using ::std::fputs;
using ::std::getc;
using ::std::getchar;
using ::std::gets;
using ::std::putc;
using ::std::putchar;
using ::std::puts;
using ::std::ungetc;
using ::std::fread;
using ::std::fwrite;
using ::std::fgetpos;
using ::std::fseek;
using ::std::fsetpos;
using ::std::ftell;
using ::std::rewind;
using ::std::clearerr;
using ::std::feof;
using ::std::ferror;
using ::std::perror;
# define _INCLUDED_CPP_STDIO_H_ 1
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
// get out of the "legacy"
} // close extern "C"
} // close namespace _C_legacy::
# undef _IN_C_LEGACY_
# define _STDIO_NEED_C_LEGACY_
# endif
# include <cstdio>
// Expose global C names, including non-standard ones, but shadow
// some names and types with the std:: C++ version.
using std::FILE;
using std::fpos_t;
using std::remove;
using std::rename;
using std::tmpfile;
using std::tmpnam;
using std::fclose;
using std::fflush;
using std::fopen;
using std::freopen;
using std::setbuf;
using std::setvbuf;
using std::fprintf;
using std::fscanf;
using std::printf;
using std::scanf;
using std::sprintf;
using std::sscanf;
using std::vfprintf;
using std::vprintf;
using std::vsprintf;
using std::fgetc;
using std::fgets;
using std::fputc;
using std::fputs;
using std::getc;
using std::getchar;
using std::gets;
using std::putc;
using std::putchar;
using std::puts;
using std::ungetc;
using std::fread;
using std::fwrite;
using std::fgetpos;
using std::fseek;
using std::fsetpos;
using std::ftell;
using std::rewind;
using std::clearerr;
using std::feof;
using std::ferror;
using std::perror;
# ifdef _STDIO_NEED_C_LEGACY_
// dive back into the "swamp"
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# undef _STDIO_NEED_C_LEGACY_
# endif /* _STDIO_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_STDIO_H_ */

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -29,44 +29,67 @@
#ifndef _INCLUDED_CPP_STDLIB_H_
# undef _SHADOW_NAME
# define _SHADOW_NAME <cstdlib>
# include <bits/generic_shadow.h>
# undef _SHADOW_NAME
# ifndef _IN_C_LEGACY_
using ::std::size_t;
using ::std::div_t;
using ::std::ldiv_t;
using ::std::atof;
using ::std::atoi;
using ::std::atol;
using ::std::strtod;
using ::std::strtol;
using ::std::strtoul;
using ::std::rand;
using ::std::srand;
using ::std::calloc;
using ::std::free;
using ::std::malloc;
using ::std::realloc;
using ::std::abort;
using ::std::atexit;
using ::std::exit;
using ::std::getenv;
using ::std::system;
using ::std::bsearch;
using ::std::qsort;
using ::std::abs;
using ::std::div;
using ::std::labs;
using ::std::ldiv;
using ::std::mblen;
using ::std::mbtowc;
using ::std::wctomb;
using ::std::mbstowcs;
using ::std::wcstombs;
# define _INCLUDED_CPP_STDLIB_H_ 1
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
// get out of the "legacy"
} // close extern "C"
} // close namespace _C_legacy::
# undef _IN_C_LEGACY_
# define _STDLIB_NEED_C_LEGACY_
# endif
# include <cstdlib>
// Expose global C names, including non-standard ones, but shadow
// some names and types with the std:: C++ version.
using std::div_t;
using std::ldiv_t;
#ifdef _GLIBCPP_USE_LONG_LONG
using std::lldiv_t;
#endif
using std::abort;
using std::abs;
using std::atexit;
using std::atof;
using std::atoi;
using std::atol;
using std::bsearch;
using std::calloc;
using std::div;
using std::exit;
using std::free;
using std::getenv;
using std::labs;
using std::ldiv;
using std::malloc;
using std::mblen;
using std::mbstowcs;
using std::mbtowc;
using std::qsort;
using std::rand;
using std::realloc;
using std::srand;
using std::strtod;
using std::strtol;
using std::strtoul;
using std::system;
using std::wcstombs;
using std::wctomb;
#ifdef _GLIBCPP_USE_LONG_LONG
using std::strtoll;
using std::strtoull;
using std::strtof;
using std::strtold;
#endif
# ifdef _STDLIB_NEED_C_LEGACY_
// dive back into the "swamp"
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# undef _STDLIB_NEED_C_LEGACY_
# endif /* _STDLIB_NEED_C__LEGACY_ */
#endif /* _INCLUDED_CPP_STDLIB_H_ */

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -29,35 +29,48 @@
#ifndef _INCLUDED_CPP_STRING_H_
# undef _SHADOW_NAME
# define _SHADOW_NAME <cstring>
# include <bits/generic_shadow.h>
# undef _SHADOW_NAME
# ifndef _IN_C_LEGACY_
using ::std::memcpy;
using ::std::memmove;
using ::std::strcpy;
using ::std::strncpy;
using ::std::strcat;
using ::std::strncat;
using ::std::memcmp;
using ::std::strcmp;
using ::std::strcoll;
using ::std::strncmp;
using ::std::strxfrm;
using ::std::memchr;
using ::std::strchr;
using ::std::strcspn;
using ::std::strpbrk;
using ::std::strrchr;
using ::std::strspn;
using ::std::strstr;
using ::std::strtok;
using ::std::memset;
using ::std::strerror;
using ::std::strlen;
# define _INCLUDED_CPP_STRING_H_ 1
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
// get out of the "legacy"
} // close extern "C"
} // close namespace _C_legacy::
# undef _IN_C_LEGACY_
# define _STRING_NEED_C_LEGACY_
# endif
# include <cstring>
// Expose global C names, including non-standard ones, but shadow
// some names and types with the std:: C++ version.
using std::memcpy;
using std::memmove;
using std::strcpy;
using std::strncpy;
using std::strcat;
using std::strncat;
using std::memcmp;
using std::strcmp;
using std::strcoll;
using std::strncmp;
using std::strxfrm;
using std::memchr;
using std::strchr;
using std::strcspn;
using std::strpbrk;
using std::strrchr;
using std::strspn;
using std::strstr;
using std::strtok;
using std::memset;
using std::strerror;
using std::strlen;
# ifdef _STRING_NEED_C_LEGACY_
// dive back into the "swamp"
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# undef _STRING_NEED_C_LEGACY_
# endif /* _STRING_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_STRING_H_ */

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -29,32 +29,39 @@
#ifndef _INCLUDED_CPP_TIME_H_
// turn off glibc-2.0 weirdness. Other systems define similar foolishness
#undef __need_time_t
#undef __need_clock_t
#undef __need_timespec
# undef _SHADOW_NAME
# define _SHADOW_NAME <ctime>
# include <bits/generic_shadow.h>
# undef _SHADOW_NAME
# ifndef _IN_C_LEGACY_
using ::std::size_t; /* handled in <cstddef> */
using ::std::clock_t;
using ::std::time_t;
using ::std::tm;
using ::std::clock;
using ::std::difftime;
using ::std::mktime;
using ::std::time;
using ::std::asctime;
using ::std::ctime;
using ::std::gmtime;
using ::std::localtime;
using ::std::strftime;
# define _INCLUDED_CPP_TIME_H_ 1
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
// get out of the "legacy"
} // close extern "C"
} // close namespace _C_legacy::
# undef _IN_C_LEGACY_
# define _TIME_NEED_C_LEGACY_
# endif
# include <ctime>
// Expose global C names, including non-standard ones, but shadow
// some names and types with the std:: C++ version.
using std::clock_t;
using std::time_t;
using std::tm;
using std::clock;
using std::difftime;
using std::mktime;
using std::time;
using std::asctime;
using std::ctime;
using std::gmtime;
using std::localtime;
using std::strftime;
# ifdef _TIME_NEED_C_LEGACY_
// dive back into the "swamp"
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# undef _TIME_NEED_C_LEGACY_
# endif /* _TIME_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_TIME_H_ */

View File

@ -1,6 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -29,83 +29,103 @@
#ifndef _INCLUDED_CPP_WCHAR_H_
# undef _SHADOW_NAME
# define _SHADOW_NAME <cwchar>
# include <bits/generic_shadow.h>
# undef _SHADOW_NAME
# ifndef _IN_C_LEGACY_
using ::std::size_t; /* handled in <cstddef> */
using ::std::wint_t;
using ::std::mbstate_t;
# if 0 /* glibc-2.0 doesn't define these */
using ::std::fgetwc;
using ::std::fgetws;
using ::std::fputwc;
using ::std::fputws;
using ::std::ungetwc;
using ::std::getwc;
using ::std::getwchar;
using ::std::putwc;
using ::std::putwchar;
using ::std::wprintf;
using ::std::wsprintf;
using ::std::wvsprintf;
using ::std::wfsprintf;
using ::std::wscanf;
using ::std::wsscanf;
using ::std::wvsscanf;
using ::std::wfscanf;
// XXX etc.
using ::std::wcsftime;
# endif
using ::std::wcscpy;
using ::std::wcscat;
using ::std::wcscmp;
using ::std::wcscoll;
using ::std::wcsxfrm;
# ifdef __USE_GNU
using ::std::wcsdup;
# endif
using ::std::wcschr;
using ::std::wcscspn;
using ::std::wcspbrk;
using ::std::wcsstr;
using ::std::wcstok;
using ::std::wcslen;
# ifndef __sun
using ::std::wmemchr;
using ::std::wmemcmp;
using ::std::wmemcpy;
using ::std::wmemmove;
using ::std::wmemset;
using ::std::btowc;
using ::std::wctob;
using ::std::mbsinit;
using ::std::mbrtowc;
using ::std::wcrtomb;
using ::std::mbrlen;
# endif
# ifdef __USE_GNU
using ::std::mbsrtowcs;
using ::std::wcsrtombs;
using ::std::mbsnrtowcs;
using ::std::mbsnrtombs;
using ::std::wcwidth;
using ::std::wcswidth;
using ::std::wcscmpy;
# endif
using ::std::wcstod;
using ::std::wcstol;
using ::std::wcstoul;
using ::std::wcsncat;
using ::std::wcsncmp;
using ::std::wcsncpy;
using ::std::wcsrchr;
using ::std::wcsspn;
# define _INCLUDED_CPP_WCHAR_H_ 1
# endif /* _IN_C_LEGACY_ */
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
// get out of the "legacy"
} // close extern "C"
} // close namespace _C_legacy::
# undef _IN_C_LEGACY_ /* sub-included by a C header */
# define _WCHAR_NEED_C_LEGACY_
# endif
# include <cwchar>
// Expose global C names, including non-standard ones, but shadow
// some names and types with the std:: C++ version.
using std::wchar_t;
using std::wint_t;
using std::mbstate_t;
#if 0
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::fgetwc;
using std::fgetws;
using std::fputwc;
using std::fputws;
using std::fwide;
using std::getwc;
using std::getwchar;
using std::putwc;
using std::putwchar;
using std::ungetwc;
#endif
using std::wcstod;
using std::wcstof;
using std::wcstold;
using std::wcstol;
using std::wcstoll;
using std::wcstoul;
using std::wcstoull;
using std::wcscpy;
using std::wcsncpy;
using std::wcscat;
using std::wcsncat;
#if 0
using std::wcsmp;
#endif
using std::wcscoll;
using std::wcsncmp;
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;
#if 0
using std::wcsftime;
#endif
using std::btowc;
using std::wctob;
using std::mbsinit;
using std::mbrlen;
using std::mbrtowc;
using std::wcrtomb;
using std::mbsrtowcs;
using std::wcsrtombs;
# ifdef _WCHAR_NEED_C_LEGACY_
// dive back into the "swamp"
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# undef _WCHAR_NEED_C_LEGACY_
# endif /* _WCHAR_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_WCHAR_H_ */

View File

@ -1,7 +1,6 @@
// -*- C++ -*- header wrapper.
// Copyright (C) 1997-1999 Free Software Foundation, Inc.
// Copyright (C) 1997-1999, 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
@ -28,32 +27,48 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#ifndef _INCLUDED_CPP_CWCTYPE_H_
# undef _SHADOW_NAME
# define _SHADOW_NAME <cwctype>
# include <bits/generic_shadow.h>
# undef _SHADOW_NAME
# ifndef _IN_C_LEGACY_
using ::std::size_t;
using ::std::wint_t;
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::towlower;
using ::std::towupper;
#ifndef _INCLUDED_CPP_CWCTYPE_H_
# define _INCLUDED_CPP_CWCTYPE_H_ 1
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
// get out of the "legacy"
} // close extern "C"
} // close namespace _C_legacy::
# undef _IN_C_LEGACY_
# define _CWCHAR_NEED_C_LEGACY_
# endif
# include <cwctype>
// Expose global C names, including non-standard ones, but shadow
// some names and types with the std:: C++ version.
using std::wint_t;
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;
# ifdef _CWCHAR_NEED_C_LEGACY_
// dive back into the "swamp"
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
# undef _CWCHAR_NEED_C_LEGACY_
# endif /* _CWCHAR_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_CWCTYPE_H_ */

View File

@ -21,7 +21,7 @@
## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA.
## $Id: Makefile.am,v 1.29 2000/08/22 17:22:38 bkoz Exp $
## $Id: Makefile.am,v 1.30 2000/09/14 19:44:03 bkoz Exp $
AUTOMAKE_OPTIONS = 1.3 gnits
MAINT_CHARSET = latin1
@ -48,7 +48,7 @@ EXTRA_LTLIBRARIES = libinst-string.la libinst-wstring.la
# NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
AC_CXXFLAGS = \
$(WERROR) @WFMT_FLAGS@ @CPU_FLAGS@ @EXTRA_CXX_FLAGS@ \
@SECTION_FLAGS@ @DEBUG_FLAGS@
@SECTION_FLAGS@ @CSHADOWFLAGS@ @DEBUG_FLAGS@
# Need to manually set this option because AC_CXXFLAGS has to be at
# the end of the compile line so that -O2 can be overridden as the
@ -70,9 +70,10 @@ LIBIO_INCLUDES = -I$(top_srcdir)/libio
endif
if GLIBCPP_USE_CSHADOW
CSHADOW_INCLUDES =
#CSHADOW_INCLUDES = \
# @CSHADOWFLAGS@ -I$(top_srcdir)/shadow -I$(top_builddir)/cshadow
# -I$(top_srcdir)/std -I$(top_srcdir)/shadow -I$(top_builddir)/cshadow
CSHADOW_INCLUDES = \
-I$(top_srcdir)/std -I$(top_srcdir)/shadow
else
CSHADOW_INCLUDES =
endif
@ -82,17 +83,20 @@ CONFIG_INCLUDES = \
-I$(top_srcdir)/@ctype_include_dir@
INCLUDES = \
-D_GNU_SOURCE -nostdinc++ $(CSHADOW_INCLUDES) -I$(top_srcdir) \
$(LIBIO_INCLUDES) $(CONFIG_INCLUDES) $(TOPLEVEL_INCLUDES)
-D_GNU_SOURCE -D_ISOC99_SOURCE -nostdinc++ $(CSHADOW_INCLUDES) \
-I$(top_builddir) -I$(top_srcdir) \
$(CONFIG_INCLUDES) $(LIBIO_INCLUDES) $(TOPLEVEL_INCLUDES)
# Need to explicitly set this so that AM_CXXFLAGS is last. (That way,
# Need to explicitly set this so that AM_CXXFLAGS is last. In
# addition, we don't use $(DEFS), which tries to set $(top_srcdir) as
# an include diretory, which screws up shadow headers. (That way,
# things like -O2 passed down from the toplevel can be overridden by
# --enable-debug.)
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
CXXCOMPILE = $(CXX) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(CXXFLAGS) $(AM_CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) \
LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
# We have a problem when building the shared libstdc++ object if the
@ -246,7 +250,7 @@ $(libstdc___la_OBJECTS): $(CSHADOW_H)
$(top_builddir)/stamp-cshadow: $(top_srcdir)/mkinclosure \
$(top_srcdir)/mkcshadow
$(top_srcdir)/mkinclosure \
"-I $(top_builddir)/../../gcc/include -I /usr/include -G machine/ansi.h" | $(top_srcdir)/mkcshadow;
"-I $(top_builddir)/../../gcc/include -I /usr/include -G fcntl.h unistd.h" | $(top_srcdir)/mkcshadow;
rm -f $(top_builddir)/stamp-cshadow
echo "done" > $(top_builddir)/stamp-cshadow

View File

@ -124,7 +124,7 @@ EXTRA_LTLIBRARIES = libinst-string.la libinst-wstring.la
# These bits are all figured out from configure. Look in acinclude.m4
# or configure.in to see how they are set.
# NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
AC_CXXFLAGS = $(WERROR) @WFMT_FLAGS@ @CPU_FLAGS@ @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @DEBUG_FLAGS@
AC_CXXFLAGS = $(WERROR) @WFMT_FLAGS@ @CPU_FLAGS@ @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @CSHADOWFLAGS@ @DEBUG_FLAGS@
# Need to manually set this option because AC_CXXFLAGS has to be at
@ -137,24 +137,24 @@ AM_CXXFLAGS = -fno-implicit-templates $(OPTIMIZE_CXXFLAGS) -Wall -Wno-format
TOPLEVEL_INCLUDES = -I$(includedir)
@GLIBCPP_NEED_LIBIO_TRUE@LIBIO_INCLUDES = -I$(top_builddir)/libio -I$(top_srcdir)/libio
@GLIBCPP_NEED_LIBIO_FALSE@LIBIO_INCLUDES = -I$(top_srcdir)/libio
#CSHADOW_INCLUDES = \
# @CSHADOWFLAGS@ -I$(top_srcdir)/shadow -I$(top_builddir)/cshadow
@GLIBCPP_USE_CSHADOW_TRUE@CSHADOW_INCLUDES =
@GLIBCPP_USE_CSHADOW_TRUE@CSHADOW_INCLUDES = -I$(top_srcdir)/std -I$(top_srcdir)/shadow
@GLIBCPP_USE_CSHADOW_FALSE@CSHADOW_INCLUDES =
CONFIG_INCLUDES = -I$(top_srcdir)/@cpu_include_dir@ -I$(top_srcdir)/@ctype_include_dir@
INCLUDES = -D_GNU_SOURCE -nostdinc++ $(CSHADOW_INCLUDES) -I$(top_srcdir) $(LIBIO_INCLUDES) $(CONFIG_INCLUDES) $(TOPLEVEL_INCLUDES)
INCLUDES = -D_GNU_SOURCE -D_ISOC99_SOURCE -nostdinc++ $(CSHADOW_INCLUDES) -I$(top_builddir) -I$(top_srcdir) $(CONFIG_INCLUDES) $(LIBIO_INCLUDES) $(TOPLEVEL_INCLUDES)
# Need to explicitly set this so that AM_CXXFLAGS is last. (That way,
# Need to explicitly set this so that AM_CXXFLAGS is last. In
# addition, we don't use $(DEFS), which tries to set $(top_srcdir) as
# an include diretory, which screws up shadow headers. (That way,
# things like -O2 passed down from the toplevel can be overridden by
# --enable-debug.)
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
CXXCOMPILE = $(CXX) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
# We have a problem when building the shared libstdc++ object if the
@ -457,7 +457,7 @@ $(libstdc___la_OBJECTS): $(CSHADOW_H)
$(top_builddir)/stamp-cshadow: $(top_srcdir)/mkinclosure \
$(top_srcdir)/mkcshadow
$(top_srcdir)/mkinclosure \
"-I $(top_builddir)/../../gcc/include -I /usr/include -G machine/ansi.h" | $(top_srcdir)/mkcshadow;
"-I $(top_builddir)/../../gcc/include -I /usr/include -G fcntl.h unistd.h" | $(top_srcdir)/mkcshadow;
rm -f $(top_builddir)/stamp-cshadow
echo "done" > $(top_builddir)/stamp-cshadow

View File

@ -36,239 +36,115 @@
#ifndef FLT
# define FLT double
# define FCT(name) ::name
#endif
// This file often breaks due to compiler bugs. May need to put in guards, ie:
// #if defined(_GLIBCPP_BUGGY_FLOAT_COMPLEX)
// and
// #if defined(_GLIBCPP_FLOAT_SPECIALIZATION)
namespace std
{
template<>
FLT
abs(const complex<FLT>& __x)
{ return FCT(cabs)(__x._M_value); }
template<>
FLT
abs(const complex<FLT>& __x)
{ return cabs(__x._M_value); }
template<>
FLT
arg(const complex<FLT>& __x)
{ return FCT(carg)(__x._M_value); }
template<>
FLT
arg(const complex<FLT>& __x)
{ return carg(__x._M_value); }
template<>
complex<FLT>
polar(const FLT& __rho, const FLT& __theta)
{
#if defined _G_HAVE_SINCOS && !defined __osf__
// Although sincos does exist on OSF3.2 and OSF4.0 we cannot use it
// since the necessary types are not defined in the headers.
FLT __sinx, __cosx;
FCT(sincos)(__theta, &__sinx, &__cosx);
return complex<FLT>(__rho * __cosx, __rho * __sinx);
template<>
complex<FLT>
polar(const FLT& __rho, const FLT& __theta)
{
#if 0
// XXX
// defined(_GLIBCPP_HAVE_SINCOS) && !defined(__osf__)
// Although sincos does exist on OSF3.2 and OSF4.0 we cannot use it
// since the necessary types are not defined in the headers.
FLT __sinx, __cosx;
sincos(__theta, &__sinx, &__cosx);
return complex<FLT>(__rho * __cosx, __rho * __sinx);
#else
#if defined(_GLIBCPP_BUGGY_FLOAT_COMPLEX) \
&& defined(_GLIBCPP_FLOAT_SPECIALIZATION)
complex<FLT> __tmpf(__rho * FCT(cos)(__theta),
__rho * FCT(sin)(__theta));
return __tmpf;
#else
return complex<FLT>(__rho * FCT(cos)(__theta),
__rho * FCT(sin)(__theta));
return complex<FLT>(__rho * cos(__theta), __rho * sin(__theta));
#endif
#endif
}
}
template<>
complex<FLT>
cos(const complex<FLT>& __x)
#if defined(_GLIBCPP_BUGGY_FLOAT_COMPLEX) \
&& defined(_GLIBCPP_FLOAT_SPECIALIZATION)
{
complex<FLT> __tmpf(FCT(ccos)(__x._M_value));
return __tmpf;
}
#else
{ return complex<FLT>(FCT(ccos)(__x._M_value)); }
#endif
template<>
complex<FLT>
cos(const complex<FLT>& __x)
{ return complex<FLT>(ccos(__x._M_value)); }
template<>
complex<FLT>
cosh(const complex<FLT>& __x)
#if defined(_GLIBCPP_BUGGY_FLOAT_COMPLEX) \
&& defined(_GLIBCPP_FLOAT_SPECIALIZATION)
{
complex<FLT> __tmpf(FCT(ccosh)(__x._M_value));
return __tmpf;
}
#else
{ return complex<FLT>(FCT(ccosh)(__x._M_value)); }
#endif
template<>
complex<FLT>
cosh(const complex<FLT>& __x)
{ return complex<FLT>(ccosh(__x._M_value)); }
template<>
complex<FLT>
exp(const complex<FLT>& __x)
#if defined(_GLIBCPP_BUGGY_FLOAT_COMPLEX) \
&& defined(_GLIBCPP_FLOAT_SPECIALIZATION)
{
complex<FLT> __tmpf(FCT(cexp)(__x._M_value));
return __tmpf;
}
#else
{ return complex<FLT>(FCT(cexp)(__x._M_value)); }
#endif
template<>
complex<FLT>
exp(const complex<FLT>& __x)
{ return complex<FLT>(cexp(__x._M_value)); }
template<>
complex<FLT>
log(const complex<FLT>& __x)
#if defined(_GLIBCPP_BUGGY_FLOAT_COMPLEX) \
&& defined(_GLIBCPP_FLOAT_SPECIALIZATION)
{
complex<FLT> __tmpf(FCT(c_log)(__x._M_value));
return __tmpf;
}
#else
{ return complex<FLT>(FCT(c_log)(__x._M_value)); }
#endif
template<>
complex<FLT>
log(const complex<FLT>& __x)
{ return complex<FLT>(c_log(__x._M_value)); }
template<>
complex<FLT>
log10(const complex<FLT>& __x)
#if defined(_GLIBCPP_BUGGY_FLOAT_COMPLEX) \
&& defined(_GLIBCPP_FLOAT_SPECIALIZATION)
{
complex<FLT> __tmpf(FCT(clog10)(__x._M_value));
return __tmpf;
}
#else
{ return complex<FLT>(FCT(clog10)(__x._M_value)); }
#endif
template<>
complex<FLT>
log10(const complex<FLT>& __x)
{ return complex<FLT>(clog10(__x._M_value)); }
template<>
complex<FLT>
pow(const complex<FLT>& __x, int __n)
{ return complex<FLT>(cexp(__n * c_log(__x._M_value))); }
template<>
complex<FLT>
pow(const complex<FLT>& __x, int __n)
#if defined(_GLIBCPP_BUGGY_FLOAT_COMPLEX) \
&& defined(_GLIBCPP_FLOAT_SPECIALIZATION)
{
complex<FLT> __tmpf(FCT(cexp) (__n * FCT(c_log)(__x._M_value)));
return __tmpf;
}
#else
{ return complex<FLT>(FCT(cexp) (__n * FCT(c_log)(__x._M_value))); }
#endif
template<>
complex<FLT>
pow(const complex<FLT>& __x, const FLT& __y)
{ return complex<FLT>(cexp(__y * c_log(__x._M_value))); }
template<>
complex<FLT>
pow(const complex<FLT>& __x, const complex<FLT>& __y)
{ return complex<FLT>(cpow(__x._M_value, __y._M_value)); }
template<>
complex<FLT>
pow(const complex<FLT>& __x, const FLT& __y)
#if defined(_GLIBCPP_BUGGY_FLOAT_COMPLEX) \
&& defined(_GLIBCPP_FLOAT_SPECIALIZATION)
{
complex<FLT> __tmpf(FCT(cexp) (__y * FCT(c_log)(__x._M_value)));
return __tmpf;
}
#else
{ return complex<FLT>(FCT(cexp) (__y * FCT(c_log)(__x._M_value))); }
#endif
template<>
complex<FLT>
pow(const FLT& __x, const complex<FLT>& __y)
{ return complex<FLT>(cexp(__y._M_value * log(__x))); }
template<>
complex<FLT>
pow(const complex<FLT>& __x, const complex<FLT>& __y)
#if defined(_GLIBCPP_BUGGY_FLOAT_COMPLEX) \
&& defined(_GLIBCPP_FLOAT_SPECIALIZATION)
{
complex<FLT> __tmpf(FCT(cpow)(__x._M_value, __y._M_value));
return __tmpf;
}
#else
{ return complex<FLT>(FCT(cpow)(__x._M_value, __y._M_value)); }
#endif
template<>
complex<FLT>
sin(const complex<FLT>& __x)
{ return complex<FLT>(csin(__x._M_value)); }
template<>
complex<FLT>
pow(const FLT& __x, const complex<FLT>& __y)
#if defined(_GLIBCPP_BUGGY_FLOAT_COMPLEX) \
&& defined(_GLIBCPP_FLOAT_SPECIALIZATION)
{
complex<FLT> __tmpf(FCT(cexp)(__y._M_value * FCT(log)(__x)));
return __tmpf;
}
#else
{ return complex<FLT>(FCT(cexp)(__y._M_value * FCT(log)(__x))); }
#endif
template<>
complex<FLT>
sin(const complex<FLT>& __x)
#if defined(_GLIBCPP_BUGGY_FLOAT_COMPLEX) \
&& defined(_GLIBCPP_FLOAT_SPECIALIZATION)
{
complex<FLT> __tmpf(FCT(csin)(__x._M_value));
return __tmpf;
}
#else
{ return complex<FLT>(FCT(csin)(__x._M_value)); }
#endif
template<>
complex<FLT>
sinh(const complex<FLT>& __x)
#if defined(_GLIBCPP_BUGGY_FLOAT_COMPLEX) \
&& defined(_GLIBCPP_FLOAT_SPECIALIZATION)
{
complex<FLT> __tmpf(FCT(csinh)(__x._M_value));
return __tmpf;
}
#else
{ return complex<FLT>(FCT(csinh)(__x._M_value)); }
#endif
template<>
complex<FLT>
sqrt(const complex<FLT>& __x)
#if defined(_GLIBCPP_BUGGY_FLOAT_COMPLEX) \
&& defined(_GLIBCPP_FLOAT_SPECIALIZATION)
{
complex<FLT> __tmpf(FCT(csqrt)(__x._M_value));
return __tmpf;
}
#else
{ return complex<FLT>(FCT(csqrt)(__x._M_value)); }
#endif
template<>
complex<FLT>
tan(const complex<FLT>& __x)
#if defined(_GLIBCPP_BUGGY_FLOAT_COMPLEX) \
&& defined(_GLIBCPP_FLOAT_SPECIALIZATION)
{
complex<FLT> __tmpf(FCT(ctan)(__x._M_value));
return __tmpf;
}
#else
{ return complex<FLT>(FCT(ctan)(__x._M_value)); }
#endif
template<>
complex<FLT>
tanh(const complex<FLT>& __x)
#if defined(_GLIBCPP_BUGGY_FLOAT_COMPLEX) \
&& defined(_GLIBCPP_FLOAT_SPECIALIZATION)
{
complex<FLT> __tmpf(FCT(ctanh)(__x._M_value));
return __tmpf;
}
#else
{ return complex<FLT>(FCT(ctanh)(__x._M_value)); }
#endif
template<>
complex<FLT>
sinh(const complex<FLT>& __x)
{ return complex<FLT>(csinh(__x._M_value)); }
template<>
complex<FLT>
sqrt(const complex<FLT>& __x)
{ return complex<FLT>(csqrt(__x._M_value)); }
template<>
complex<FLT>
tan(const complex<FLT>& __x)
{ return complex<FLT>(ctan(__x._M_value)); }
template<>
complex<FLT>
tanh(const complex<FLT>& __x)
{ return complex<FLT>(ctanh(__x._M_value)); }
} // namespace std

View File

@ -1,5 +1,4 @@
#define FLT float
#define FCT(name) ::name##f
// Used in complex.cc to work around GCC's buggy __complex__ float support.
#define _GLIBCPP_FLOAT_SPECIALIZATION 1
#include "complex.cc"

View File

@ -1,8 +1,7 @@
#include <bits/c++config.h>
#ifdef _GLIBCPP_HAVE_SINL
#ifdef _GLIBCPP_USE_LONG_LONG
/* We compile these functions only when we have the long double functions
available. */
#define FLT long double
#define FCT(name) ::name##l
#include "complex.cc"
#endif

View File

@ -38,7 +38,7 @@
#include <bits/std_vector.h>
#include <bits/std_memory.h> // for auto_ptr
#ifdef _GLIBCPP_USE_WCHAR_T
#include <bits/std_cwctype.h> // for towupper, etc.
# include <bits/std_cwctype.h> // for towupper, etc.
#endif
namespace std {
@ -952,7 +952,7 @@ namespace std {
do_widen(const char* __low, const char* __high, wchar_t* __dest) const
{
mbstate_t __state;
memset(&__state, 0, sizeof(mbstate_t));
memset(static_cast<void*>(&__state), 0, sizeof(mbstate_t));
mbsrtowcs(__dest, &__low, __high - __low, &__state);
return __high;
}
@ -971,7 +971,7 @@ namespace std {
char* __dest) const
{
mbstate_t __state;
memset(&__state, 0, sizeof(mbstate_t));
memset(static_cast<void*>(&__state), 0, sizeof(mbstate_t));
size_t __len = __high - __low;
size_t __conv = wcsrtombs(__dest, &__low, __len, &__state);
if (__conv == __len)

View File

@ -29,7 +29,6 @@
#include <bits/std_clocale.h>
#include <bits/std_locale.h>
#include <bits/std_cstring.h>
#include <bits/std_cassert.h>
#include <bits/std_vector.h>
#include <bits/std_stdexcept.h>
@ -167,8 +166,6 @@ namespace std {
locale::_Impl::
_M_replace_categories(const _Impl* __other, category __cat)
{
assert((__cat & locale::all) && !(__cat & ~locale::all));
unsigned int __mask = locale::all & -static_cast<unsigned int>(locale::all);
for (unsigned int __ix = 0; (-__mask & __cat) != 0; ++__ix, (__mask <<= 1))
{