mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-26 21:33:59 +08:00
[multiple changes]
2000-10-30 Benjamin Kosnik <bkoz@redhat.com> * src/complex_io.cc : Remove ancient defines. * config/os/gnu-linux/bits/os_defines.h: Add defines. * libsupc++/tinfo2.cc: Change to cstddef. * include/bits/codecvt.h: Add include of c++config.h, so that __USE_GNU gets defined. (Important for alpha.) * include/c/bits/std_cwctype.h: Same. * include/c/bits/std_ctime.h: And here. * include/c/bits/std_cstdarg.h: Same. * include/c/bits/std_csignal.h: Same. * include/c/bits/std_csetjmp.h: Same. * include/c/bits/std_clocale.h: Same. * include/c/bits/std_climits.h: Touch. * include/c/bits/std_cfloat.h: Same. * include/c/bits/std_cerrno.h: Same. * include/c/bits/std_cwchar.h: Same. * include/c/bits/std_cassert.h: Same. * include/c/bits/std_cctype.h: Same. * include/c/bits/std_cstddef.h: And here. * include/c/bits/std_cstdlib.h: And here. * include/c/bits/std_cstdio.h: Same. * include/c/bits/std_cstring.h: Add names to namespace std::. * include/bits/c++config (_GNU_SOURCE): Move linux-specific macros from here... (_ISOC99_SOURCE): And this one.... * config/os/gnu-linux/bits/os_defines.h: ...to here. * include/bits/codecvt.h (codecvt<_InternT, _ExternT, __enc_traits>::do_in): Don't cast to const, this is a bug in glibc prior to 2.2. (codecvt<_InternT, _ExternT, __enc_traits>::do_out): Same. * include/c/bits/std_cwchar.h: Add using declarations for mbstate_t. 2000-10-30 Steven King <sxking@uswest.net> * include/bits/codecvt.h: Add cast. * include/c_std/stdio.h: Re-add printf using declaration. * include/c_std/bits/std_cstdio.h: Same * testsuite/22_locale/codecvt_wchar_t_char.cc: Fixup testsuite. * testsuite/22_locale/ctor_copy_dtor.cc: Same. * testsuite/22_locale/facet.cc: Same. * testsuite/22_locale/global_templates.cc: Same. * testsuite/22_locale/operators.cc: Same. * testsuite/22_locale/static_members.cc: Same. * testsuite/26_numerics/c_math.cc: Same. * testsuite/26_numerics/complex_inserters_extractors.cc: Same. * testsuite/27_io/fpos.cc: Same. * testsuite/27_io/istream_extractor_arith.cc: Same. * testsuite/27_io/istream_unformatted.cc: Same. * testsuite/27_io/ostream_inserter_arith.cc: Same. * testsuite/27_io/streambuf.cc: Same. From-SVN: r37149
This commit is contained in:
parent
a5c3cccda4
commit
4bc950092b
@ -1,3 +1,59 @@
|
||||
2000-10-30 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* src/complex_io.cc : Remove ancient defines.
|
||||
* config/os/gnu-linux/bits/os_defines.h: Add defines.
|
||||
* libsupc++/tinfo2.cc: Change to cstddef.
|
||||
|
||||
* include/bits/codecvt.h: Add include of c++config.h, so that
|
||||
__USE_GNU gets defined. (Important for alpha.)
|
||||
|
||||
* include/c/bits/std_cwctype.h: Same.
|
||||
* include/c/bits/std_ctime.h: And here.
|
||||
* include/c/bits/std_cstdarg.h: Same.
|
||||
* include/c/bits/std_csignal.h: Same.
|
||||
* include/c/bits/std_csetjmp.h: Same.
|
||||
* include/c/bits/std_clocale.h: Same.
|
||||
* include/c/bits/std_climits.h: Touch.
|
||||
* include/c/bits/std_cfloat.h: Same.
|
||||
* include/c/bits/std_cerrno.h: Same.
|
||||
* include/c/bits/std_cwchar.h: Same.
|
||||
* include/c/bits/std_cassert.h: Same.
|
||||
* include/c/bits/std_cctype.h: Same.
|
||||
* include/c/bits/std_cstddef.h: And here.
|
||||
* include/c/bits/std_cstdlib.h: And here.
|
||||
* include/c/bits/std_cstdio.h: Same.
|
||||
* include/c/bits/std_cstring.h: Add names to namespace std::.
|
||||
|
||||
* include/bits/c++config (_GNU_SOURCE): Move linux-specific macros
|
||||
from here...
|
||||
(_ISOC99_SOURCE): And this one....
|
||||
* config/os/gnu-linux/bits/os_defines.h: ...to here.
|
||||
|
||||
* include/bits/codecvt.h (codecvt<_InternT, _ExternT,
|
||||
__enc_traits>::do_in): Don't cast to const, this is a bug in glibc
|
||||
prior to 2.2.
|
||||
(codecvt<_InternT, _ExternT, __enc_traits>::do_out): Same.
|
||||
* include/c/bits/std_cwchar.h: Add using declarations for mbstate_t.
|
||||
|
||||
2000-10-30 Steven King <sxking@uswest.net>
|
||||
|
||||
* include/bits/codecvt.h: Add cast.
|
||||
* include/c_std/stdio.h: Re-add printf using declaration.
|
||||
* include/c_std/bits/std_cstdio.h: Same
|
||||
* testsuite/22_locale/codecvt_wchar_t_char.cc: Fixup testsuite.
|
||||
* testsuite/22_locale/ctor_copy_dtor.cc: Same.
|
||||
* testsuite/22_locale/facet.cc: Same.
|
||||
* testsuite/22_locale/global_templates.cc: Same.
|
||||
* testsuite/22_locale/operators.cc: Same.
|
||||
* testsuite/22_locale/static_members.cc: Same.
|
||||
* testsuite/26_numerics/c_math.cc: Same.
|
||||
* testsuite/26_numerics/complex_inserters_extractors.cc: Same.
|
||||
* testsuite/27_io/fpos.cc: Same.
|
||||
* testsuite/27_io/istream_extractor_arith.cc: Same.
|
||||
* testsuite/27_io/istream_unformatted.cc: Same.
|
||||
* testsuite/27_io/ostream_inserter_arith.cc: Same.
|
||||
* testsuite/27_io/streambuf.cc: Same.
|
||||
|
||||
2000-10-30 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* acinclude.m4 (GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT): Check
|
||||
|
@ -31,11 +31,22 @@
|
||||
#ifndef _GLIBCPP_OS_DEFINES
|
||||
# define _GLIBCPP_OS_DEFINES
|
||||
|
||||
// By enabling this, all GNU extensions are enabled.
|
||||
#define _GNU_SOURCE 1
|
||||
|
||||
/* System-specific #define, typedefs, corrections, etc, go here. This
|
||||
file will come before all others. */
|
||||
// By enabling this, all ISO C99, ISO C9X functionality is enabled.
|
||||
#define _ISOC99_SOURCE 1
|
||||
|
||||
// This keeps isanum, et al from being propagated as macros.
|
||||
#define __NO_CTYPE 1
|
||||
|
||||
# if defined __GLIBC__ && __GLIBC__ >= 2
|
||||
// We must not see the optimized string functions GNU libc defines.
|
||||
# define __NO_STRING_INLINES
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -36,12 +36,6 @@
|
||||
// The current version of the C++ library in compressed ISO date format.
|
||||
#define __GLIBCPP__ 20000911
|
||||
|
||||
// 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
|
||||
|
@ -38,6 +38,7 @@
|
||||
#ifndef _CPP_BITS_CODECVT_H
|
||||
#define _CPP_BITS_CODECVT_H 1
|
||||
|
||||
#include <bits/c++config.h>
|
||||
#ifdef _GLIBCPP_USE_WCHAR_T
|
||||
#include <iconv.h> // For iconv, iconv_t
|
||||
#include <langinfo.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*- forwarding header.
|
||||
|
||||
// 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
|
||||
@ -35,5 +35,15 @@
|
||||
|
||||
// No include guards on this header...
|
||||
|
||||
# pragma GCC system_header
|
||||
# include_next <assert.h>
|
||||
#pragma GCC system_header
|
||||
#include_next <assert.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -31,172 +31,35 @@
|
||||
// ISO C++ 14882: <ccytpe>
|
||||
//
|
||||
|
||||
// Note: This is not a conforming implementation.
|
||||
|
||||
#ifndef _CPP_CCTYPE
|
||||
#define _CPP_CCTYPE 1
|
||||
|
||||
// This keeps isanum, et al from being propagated as macros.
|
||||
#if __linux__
|
||||
#define __NO_CTYPE 1
|
||||
#endif
|
||||
#include <bits/c++config.h>
|
||||
|
||||
# pragma GCC system_header
|
||||
# include_next <ctype.h>
|
||||
#pragma GCC system_header
|
||||
#include_next <ctype.h>
|
||||
|
||||
// Sequester the C non-inline implementations in the _C_Swamp::
|
||||
// namespace, and provide C++ inlines for them in the std:: namespace
|
||||
// where they belong.
|
||||
|
||||
namespace std
|
||||
namespace std
|
||||
{
|
||||
// NB: If not using namespaces, can't have any of these definitions,
|
||||
// as they will duplicate what's in the global namespace.
|
||||
extern "C" int isalnum(int __c);
|
||||
extern "C" int isalpha(int __c);
|
||||
extern "C" int isblank(int __c);
|
||||
extern "C" int iscntrl(int __c);
|
||||
extern "C" int isdigit(int __c);
|
||||
extern "C" int isgraph(int __c);
|
||||
extern "C" int islower(int __c);
|
||||
extern "C" int isprint(int __c);
|
||||
extern "C" int ispunct(int __c);
|
||||
extern "C" int isspace(int __c);
|
||||
extern "C" int isupper(int __c);
|
||||
extern "C" int isxdigit(int __c);
|
||||
extern "C" int tolower(int __c);
|
||||
extern "C" int toupper(int __c);
|
||||
}
|
||||
|
||||
#ifdef toupper
|
||||
inline int
|
||||
_S_toupper_helper(int __c) { return toupper(__c); }
|
||||
# undef toupper
|
||||
inline int
|
||||
toupper(int __c) { return _S_toupper_helper(__c); }
|
||||
#else
|
||||
inline int
|
||||
toupper(int __c) { return ::toupper(__c); }
|
||||
#endif
|
||||
|
||||
#ifdef tolower
|
||||
inline int
|
||||
_S_tolower_helper(int __c) { return tolower(__c); }
|
||||
# undef tolower
|
||||
inline int
|
||||
tolower(int __c) { return _S_tolower_helper(__c); }
|
||||
#else
|
||||
inline int
|
||||
tolower(int __c) { return ::tolower(__c); }
|
||||
#endif
|
||||
|
||||
#ifdef isspace
|
||||
inline int
|
||||
_S_isspace_helper(int __c) { return isspace(__c); }
|
||||
# undef isspace
|
||||
inline int
|
||||
isspace(int __c) { return _S_isspace_helper(__c); }
|
||||
#else
|
||||
inline int
|
||||
isspace(int __c) { return ::isspace(__c); }
|
||||
#endif
|
||||
|
||||
#ifdef isprint
|
||||
inline int
|
||||
_S_isprint_helper(int __c) { return isprint(__c); }
|
||||
# undef isprint
|
||||
inline int
|
||||
isprint(int __c) { return _S_isprint_helper(__c); }
|
||||
#else
|
||||
inline int
|
||||
isprint(int __c) { return ::isprint(__c); }
|
||||
#endif
|
||||
|
||||
#ifdef iscntrl
|
||||
inline int
|
||||
_S_iscntrl_helper(int __c) { return iscntrl(__c); }
|
||||
# undef iscntrl
|
||||
inline int
|
||||
iscntrl(int __c) { return _S_iscntrl_helper(__c); }
|
||||
#else
|
||||
inline int
|
||||
iscntrl(int __c) { return ::iscntrl(__c); }
|
||||
#endif
|
||||
|
||||
#ifdef isupper
|
||||
inline int
|
||||
_S_isupper_helper(int __c) { return isupper(__c); }
|
||||
# undef isupper
|
||||
inline int
|
||||
isupper(int __c) { return _S_isupper_helper(__c); }
|
||||
#else
|
||||
inline int
|
||||
isupper(int __c) { return ::isupper(__c); }
|
||||
#endif
|
||||
|
||||
#ifdef islower
|
||||
inline int
|
||||
_S_islower_helper(int __c) { return islower(__c); }
|
||||
# undef islower
|
||||
inline int
|
||||
islower(int __c) { return _S_islower_helper(__c); }
|
||||
#else
|
||||
inline int
|
||||
islower(int __c) { return ::islower(__c); }
|
||||
#endif
|
||||
|
||||
#ifdef isalpha
|
||||
inline int
|
||||
_S_isalpha_helper(int __c) { return isalpha(__c); }
|
||||
# undef isalpha
|
||||
inline int
|
||||
isalpha(int __c) { return _S_isalpha_helper(__c); }
|
||||
#else
|
||||
inline int
|
||||
isalpha(int __c) { return ::isalpha(__c); }
|
||||
#endif
|
||||
|
||||
#ifdef isdigit
|
||||
inline int
|
||||
_S_isdigit_helper(int __c) { return isdigit(__c); }
|
||||
# undef isdigit
|
||||
inline int
|
||||
isdigit(int __c) { return _S_isdigit_helper(__c); }
|
||||
#else
|
||||
inline int
|
||||
isdigit(int __c) { return ::isdigit(__c); }
|
||||
#endif
|
||||
|
||||
#ifdef ispunct
|
||||
inline int
|
||||
_S_ispunct_helper(int __c) { return ispunct(__c); }
|
||||
# undef ispunct
|
||||
inline int
|
||||
ispunct(int __c) { return _S_ispunct_helper(__c); }
|
||||
#else
|
||||
inline int
|
||||
ispunct(int __c) { return ::ispunct(__c); }
|
||||
#endif
|
||||
|
||||
#ifdef isxdigit
|
||||
inline int
|
||||
_S_isxdigit_helper(int __c) { return isxdigit(__c); }
|
||||
# undef isxdigit
|
||||
inline int
|
||||
isxdigit(int __c) { return _S_isxdigit_helper(__c); }
|
||||
#else
|
||||
inline int
|
||||
isxdigit(int __c) { return ::isxdigit(__c); }
|
||||
#endif
|
||||
|
||||
#ifdef isalnum
|
||||
inline int
|
||||
_S_isalnum_helper(int __c) { return isalnum(__c); }
|
||||
# undef isalnum
|
||||
inline int
|
||||
isalnum(int __c) { return _S_isalnum_helper(__c); }
|
||||
#else
|
||||
inline int
|
||||
isalnum(int __c) { return ::isalnum(__c); }
|
||||
#endif
|
||||
|
||||
#ifdef isgraph
|
||||
inline int
|
||||
_S_isgraph_helper(int __c) { return isgraph(__c); }
|
||||
# undef isgraph
|
||||
inline int
|
||||
isgraph(int __c) { return _S_isgraph_helper(__c); }
|
||||
#else
|
||||
inline int
|
||||
isgraph(int __c) { return ::isgraph(__c); }
|
||||
#endif
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif // _CPP_CCTYPE
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
@ -31,10 +31,21 @@
|
||||
// ISO C++ 14882: 19.3 Error numbers
|
||||
//
|
||||
|
||||
// Note: this is not a conforming implementation.
|
||||
// Note: This is not a conforming implementation.
|
||||
|
||||
#ifndef _CPP_CERRNO
|
||||
#define _CPP_CERRNO 1
|
||||
# pragma GCC system_header
|
||||
# include_next <errno.h>
|
||||
|
||||
#pragma GCC system_header
|
||||
#include_next <errno.h>
|
||||
|
||||
namespace std
|
||||
{
|
||||
extern "C" int errno;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*- forwarding header.
|
||||
|
||||
// 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,17 +31,13 @@
|
||||
// ISO C++ 14882: 18.2.2 Implementation properties: C library
|
||||
//
|
||||
|
||||
// Note: this is not a conforming implementation.
|
||||
// Note: This is not a conforming implementation.
|
||||
|
||||
#ifndef _CPP_CFLOAT
|
||||
#define _CPP_CFLOAT 1
|
||||
# pragma GCC system_header
|
||||
# include_next <float.h>
|
||||
|
||||
#if 0
|
||||
# ifdef __GLIBC__
|
||||
// For GNU libc we must also include this one:
|
||||
# include <fenv.h>
|
||||
# endif
|
||||
#endif
|
||||
#pragma GCC system_header
|
||||
#include_next <float.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -35,8 +35,13 @@
|
||||
|
||||
#ifndef _CPP_CLIMITS
|
||||
#define _CPP_CLIMITS 1
|
||||
# pragma GCC system_header
|
||||
# include_next <limits.h>
|
||||
|
||||
#pragma GCC system_header
|
||||
#include_next <limits.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*- forwarding header.
|
||||
|
||||
// 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,11 +31,22 @@
|
||||
// ISO C++ 14882: 18.2.2 Implementation properties: C library
|
||||
//
|
||||
|
||||
// Note: this is not a conforming implementation.
|
||||
// Note: This is not a conforming implementation.
|
||||
|
||||
#ifndef _CPP_CLOCALE
|
||||
#define _CPP_CLOCALE 1
|
||||
# pragma GCC system_header
|
||||
# include_next <locale.h>
|
||||
#define _CPP_CLOCALE 1
|
||||
|
||||
#pragma GCC system_header
|
||||
#include_next <locale.h>
|
||||
|
||||
namespace std
|
||||
{
|
||||
using ::lconv;
|
||||
extern "C" char* setlocale(int, const char*);
|
||||
extern "C" struct lconv* localeconv(void);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
@ -31,23 +31,24 @@
|
||||
// ISO C++ 14882: 26.5 C library
|
||||
//
|
||||
|
||||
// Note: this is not a conforming implementation.
|
||||
// Note: This is not a conforming implementation.
|
||||
|
||||
#ifndef _CPP_CMATH
|
||||
#define _CPP_CMATH 1
|
||||
# pragma GCC system_header
|
||||
# include_next <math.h>
|
||||
# include_next <stdlib.h>
|
||||
|
||||
# include <bits/c++config.h>
|
||||
|
||||
namespace std {
|
||||
|
||||
inline int
|
||||
abs(int i) { return i > 0 ? i : -i; }
|
||||
#include <bits/c++config.h>
|
||||
#include <bits/std_cstdlib.h>
|
||||
|
||||
#pragma GCC system_header
|
||||
#include_next <math.h>
|
||||
|
||||
namespace std
|
||||
{
|
||||
inline long
|
||||
abs(long i) { return i > 0 ? i : -i; }
|
||||
abs(long __i) { return ::labs(__i); }
|
||||
|
||||
inline ldiv_t
|
||||
div(long __i, long __j) { return ::ldiv(__i, __j); }
|
||||
|
||||
#if _GLIBCPP_HAVE___BUILTIN_FABSF
|
||||
inline float
|
||||
@ -212,7 +213,8 @@ namespace std {
|
||||
{ return ::pow(static_cast<double>(__x), static_cast<double>(__y)); }
|
||||
#endif
|
||||
|
||||
float pow(float, int);
|
||||
float
|
||||
pow(float, int);
|
||||
|
||||
#if _GLIBCPP_HAVE___BUILTIN_SINF
|
||||
inline float
|
||||
@ -310,12 +312,10 @@ namespace std {
|
||||
|
||||
extern "C" double modf(double __x, double* __iptr);
|
||||
|
||||
#if 0
|
||||
extern "C" double pow(double __x, double __y);
|
||||
|
||||
extern "C" double pow(double, int);
|
||||
#endif
|
||||
using ::pow;
|
||||
double
|
||||
pow(double __x, int __i);
|
||||
|
||||
#if _GLIBCPP_HAVE___BUILTIN_SIN
|
||||
inline double
|
||||
@ -552,7 +552,10 @@ namespace std {
|
||||
#endif
|
||||
} // std
|
||||
|
||||
#endif // _CPP_CMATH
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*- forwarding header.
|
||||
|
||||
// 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,10 +31,18 @@
|
||||
// ISO C++ 14882: 20.4.6 C library
|
||||
//
|
||||
|
||||
// Note: this is not a conforming implementation.
|
||||
// Note: This is not a conforming implementation.
|
||||
|
||||
#ifndef _CPP_CSETJMP
|
||||
#define _CPP_CSETJMP 1
|
||||
# pragma GCC system_header
|
||||
# include_next <setjmp.h>
|
||||
|
||||
#pragma GCC system_header
|
||||
#include_next <setjmp.h>
|
||||
|
||||
namespace std
|
||||
{
|
||||
using ::jmp_buf;
|
||||
extern "C" void longjmp(jmp_buf, int);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*- forwarding header.
|
||||
|
||||
// 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,10 +31,19 @@
|
||||
// ISO C++ 14882: 20.4.6 C library
|
||||
//
|
||||
|
||||
// Note: this is not a conforming implementation.
|
||||
// Note: This is not a conforming implementation.
|
||||
|
||||
#ifndef _CPP_CSIGNAL
|
||||
#define _CPP_CSIGNAL 1
|
||||
# pragma GCC system_header
|
||||
# include_next <signal.h>
|
||||
|
||||
#pragma GCC system_header
|
||||
#include_next <signal.h>
|
||||
|
||||
namespace std
|
||||
{
|
||||
using ::sig_atomic_t;
|
||||
extern "C" void (*signal(int, void (*__func)(int)))(int);
|
||||
extern "C" int raise(int);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*- forwarding header.
|
||||
|
||||
// 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,10 +31,17 @@
|
||||
// ISO C++ 14882: 20.4.6 C library
|
||||
//
|
||||
|
||||
// Note: this is not a conforming implementation.
|
||||
// Note: This is not a conforming implementation.
|
||||
|
||||
#ifndef _CPP_CSTDARG
|
||||
#define _CPP_CSTDARG 1
|
||||
# pragma GCC system_header
|
||||
# include_next <stdarg.h>
|
||||
|
||||
#pragma GCC system_header
|
||||
#include_next <stdarg.h>
|
||||
|
||||
namespace std
|
||||
{
|
||||
using ::va_list;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*- forwarding header.
|
||||
|
||||
// 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,17 +31,18 @@
|
||||
// ISO C++ 14882: 18.1 Types
|
||||
//
|
||||
|
||||
// Note: this is not a conforming implementation.
|
||||
// Note: This is not a conforming implementation.
|
||||
|
||||
#ifndef _CPP_CSTDDEF
|
||||
#define _CPP_CSTDDEF 1
|
||||
# pragma GCC system_header
|
||||
# include_next <stddef.h>
|
||||
#endif
|
||||
|
||||
namespace std {
|
||||
using ::size_t;
|
||||
#pragma GCC system_header
|
||||
#include_next <stddef.h>
|
||||
|
||||
namespace std
|
||||
{
|
||||
using ::ptrdiff_t;
|
||||
} // namespace std
|
||||
|
||||
using ::size_t;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*- forwarding header.
|
||||
|
||||
// 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,24 +31,68 @@
|
||||
// ISO C++ 14882: 27.8.2 C Library files
|
||||
//
|
||||
|
||||
// Note: this is not a conforming implementation.
|
||||
// Note: This is not a conforming implementation.
|
||||
|
||||
#ifndef _CPP_CSTDIO
|
||||
#define _CPP_CSTDIO 1
|
||||
# pragma GCC system_header
|
||||
# include_next <stdio.h>
|
||||
|
||||
#ifndef SEEK_CUR
|
||||
#define SEEK_CUR 1
|
||||
#endif
|
||||
#include <bits/std_cstdarg.h>
|
||||
|
||||
#ifndef SEEK_END
|
||||
#define SEEK_END 2
|
||||
#endif
|
||||
#pragma GCC system_header
|
||||
#include_next <stdio.h>
|
||||
|
||||
#ifndef SEEK_SET
|
||||
#define SEEK_SET 4
|
||||
#endif
|
||||
namespace std
|
||||
{
|
||||
using ::FILE;
|
||||
using ::fpos_t;
|
||||
|
||||
extern "C" int remove(const char*);
|
||||
extern "C" int rename(const char*, const char*);
|
||||
extern "C" FILE* tmpfile(void);
|
||||
extern "C" char* tmpnam(char*);
|
||||
extern "C" int fclose(FILE*);
|
||||
extern "C" int fflush(FILE*);
|
||||
extern "C" FILE* fopen(const char*, const char*);
|
||||
extern "C" FILE* freopen(const char*, const char*, FILE*);
|
||||
extern "C" void setbuf(FILE*, char*);
|
||||
extern "C" int setvbuf(FILE*, char*, int, size_t);
|
||||
extern "C" int fprintf(FILE*, const char*, ...);
|
||||
extern "C" int fscanf(FILE*, const char*, ...);
|
||||
extern "C" int printf(const char*, ...);
|
||||
extern "C" int scanf(const char*, ...);
|
||||
extern "C" int snprintf(char *, size_t, const char*, ...);
|
||||
extern "C" int sprintf(char *, const char*, ...);
|
||||
extern "C" int sscanf(const char*, const char*, ...);
|
||||
extern "C" int vfprintf(FILE*, const char*, va_list);
|
||||
extern "C" int vfscanf(FILE*, const char*, va_list);
|
||||
extern "C" int vprintf(const char*, va_list);
|
||||
extern "C" int vscanf(const char*, va_list);
|
||||
extern "C" int vsnprintf(char*, size_t, const char*, va_list);
|
||||
extern "C" int vsprintf(char*, const char*, va_list);
|
||||
extern "C" int vsscanf(const char*, const char*, va_list);
|
||||
extern "C" int fgetc(FILE *);
|
||||
extern "C" char *fgets(char*, int, FILE*);
|
||||
extern "C" int fputc(int, FILE*);
|
||||
extern "C" int fputs(const char*, FILE*);
|
||||
extern "C" int getc(FILE*);
|
||||
extern "C" int getchar(void);
|
||||
extern "C" char *gets(char*);
|
||||
extern "C" int putc(int, FILE*);
|
||||
extern "C" int putchar(int);
|
||||
extern "C" int puts(const char*);
|
||||
extern "C" int ungetc(int, FILE*);
|
||||
extern "C" size_t fread(void*, size_t, size_t, FILE*);
|
||||
extern "C" size_t fwrite(const void*, size_t, size_t, FILE*);
|
||||
extern "C" int fgetpos(FILE*, fpos_t*);
|
||||
extern "C" int fseek(FILE*, long int, int);
|
||||
extern "C" int fsetpos(FILE*, const fpos_t*);
|
||||
extern "C" long int ftell(FILE*);
|
||||
extern "C" void rewind(FILE*);
|
||||
extern "C" void clearerr(FILE*);
|
||||
extern "C" int feof(FILE*);
|
||||
extern "C" int ferror(FILE*);
|
||||
extern "C" void perror(const char*);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*- forwarding header.
|
||||
|
||||
// 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,20 +31,92 @@
|
||||
// ISO C++ 14882: 20.4.6 C library
|
||||
//
|
||||
|
||||
// Note: this is not a conforming implementation.
|
||||
// Note: This is not a conforming implementation.
|
||||
|
||||
#ifndef _CPP_CSTDLIB
|
||||
#define _CPP_CSTDLIB 1
|
||||
|
||||
// This keeps isanum, et al from being propagated as macros.
|
||||
#if __linux__
|
||||
#define __USE_ISOC9X 1
|
||||
#include <bits/c++config.h>
|
||||
|
||||
#pragma GCC system_header
|
||||
#include_next <stdlib.h>
|
||||
|
||||
namespace std
|
||||
{
|
||||
using ::div_t;
|
||||
using ::ldiv_t;
|
||||
|
||||
#ifdef _GLIBCPP_USE_LONG_LONG
|
||||
# ifdef _GLIBCPP_HAVE_LLDIV_T
|
||||
using ::lldiv_t;
|
||||
# else
|
||||
struct lldiv_t
|
||||
{
|
||||
long long quot;
|
||||
long long rem;
|
||||
};
|
||||
# endif
|
||||
#endif
|
||||
|
||||
extern "C" double atof(const char*);
|
||||
extern "C" int atoi(const char*);
|
||||
extern "C" long int atol(const char*);
|
||||
extern "C" double strtod(const char*, char**);
|
||||
extern "C" float strtof(const char*, char**);
|
||||
extern "C" long int strtol(const char*, char**, int);
|
||||
extern "C" unsigned long int strtoul(const char*, char**, int);
|
||||
extern "C" int rand(void);
|
||||
extern "C" void srand(unsigned int);
|
||||
extern "C" void* calloc(size_t, size_t);
|
||||
extern "C" void free(void*);
|
||||
extern "C" void* malloc(size_t);
|
||||
extern "C" void* realloc(void*, size_t);
|
||||
extern "C" void abort(void);
|
||||
extern "C" int atexit(void (*func)(void));
|
||||
extern "C" void exit(int);
|
||||
extern "C" void _Exit(int);
|
||||
extern "C" char*getenv(const char*);
|
||||
extern "C" int system(const char*);
|
||||
extern "C" void* bsearch(const void*, const void*, size_t, size_t,
|
||||
int (*comp)(const void *, const void *));
|
||||
extern "C" void qsort(void*, size_t, size_t,
|
||||
int (*comp)(const void *, const void *));
|
||||
extern "C" int abs(int);
|
||||
extern "C" long int labs(long int);
|
||||
extern "C" div_t div(int, int);
|
||||
extern "C" ldiv_t ldiv(long int, long int);
|
||||
extern "C" int mblen(const char*, size_t);
|
||||
extern "C" int mbtowc(wchar_t*, const char*, size_t);
|
||||
extern "C" int wctomb(char*, wchar_t);
|
||||
extern "C" size_t mbstowcs(wchar_t*, const char*, size_t);
|
||||
extern "C" size_t wcstombs(char*, const wchar_t*, size_t);
|
||||
|
||||
#ifdef _GLIBCPP_USE_LONG_LONG
|
||||
inline long long
|
||||
abs(long long __x) { return __x >= 0 ? __x : -__x; }
|
||||
|
||||
inline long long
|
||||
llabs(long long __x) { return __x >= 0 ? __x : -__x; }
|
||||
|
||||
inline lldiv_t
|
||||
div(long long __n, long long __d)
|
||||
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
|
||||
|
||||
inline lldiv_t
|
||||
lldiv(long long __n, long long __d)
|
||||
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
|
||||
|
||||
extern "C" long long int atoll(const char*);
|
||||
extern "C" long long int strtoll(const char*, char**, int);
|
||||
extern "C" unsigned long long int strtoull(const char*, char**, int);
|
||||
#endif
|
||||
|
||||
# pragma GCC system_header
|
||||
# include_next <stdlib.h>
|
||||
#ifdef _GLIBCPP_HAVE_STRTOLD
|
||||
extern "C" long double strtold(const char*, char**);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // _CPP_CSTDLIB
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*- forwarding header.
|
||||
|
||||
// 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,14 +31,43 @@
|
||||
// ISO C++ 14882: 20.4.6 C library
|
||||
//
|
||||
|
||||
// Note: this is not a conforming implementation.
|
||||
// Note: This is not a conforming implementation.
|
||||
|
||||
#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
|
||||
# pragma GCC system_header
|
||||
# include_next <string.h>
|
||||
|
||||
#include <bits/c++config.h>
|
||||
|
||||
#pragma GCC system_header
|
||||
#include_next <string.h>
|
||||
|
||||
namespace std
|
||||
{
|
||||
extern "C" void* memcpy(void*, const void*, size_t);
|
||||
extern "C" void* memmove(void*, const void*, size_t);
|
||||
extern "C" char* strcpy(char*, const char*);
|
||||
extern "C" char* strncpy(char*, const char*, size_t);
|
||||
extern "C" char* strcat(char*, const char*);
|
||||
extern "C" char* strncat(char*, const char*, size_t);
|
||||
extern "C" int memcmp(const void*, const void*, size_t);
|
||||
extern "C" int strcmp(const char*, const char*);
|
||||
extern "C" int strcoll(const char*, const char*);
|
||||
extern "C" int strncmp(const char*, const char*, size_t);
|
||||
extern "C" size_t strxfrm(char*, const char*, size_t);
|
||||
extern "C" void* memchr(const void*, int, size_t);
|
||||
extern "C" char* strchr(const char*, int);
|
||||
extern "C" size_t strcspn(const char*, const char*);
|
||||
extern "C" char* strpbrk(const char*, const char*);
|
||||
extern "C" char* strrchr(const char*, int);
|
||||
extern "C" size_t strspn(const char*, const char*);
|
||||
extern "C" char* strstr(const char*, const char*);
|
||||
extern "C" char* strtok(char*, const char*);
|
||||
extern "C" void* memset(void*, int, size_t);
|
||||
extern "C" char* strerror(int);
|
||||
extern "C" size_t strlen(const char*);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*- forwarding header.
|
||||
|
||||
// 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,10 +31,29 @@
|
||||
// ISO C++ 14882: 20.5 Date and time
|
||||
//
|
||||
|
||||
// Note: this is not a conforming implementation.
|
||||
// Note: This is not a conforming implementation.
|
||||
|
||||
#ifndef _CPP_CTIME
|
||||
#define _CPP_CTIME 1
|
||||
# pragma GCC system_header
|
||||
# include_next <time.h>
|
||||
|
||||
#pragma GCC system_header
|
||||
#include_next <time.h>
|
||||
|
||||
namespace std
|
||||
{
|
||||
using ::clock_t;
|
||||
using ::time_t;
|
||||
using ::tm;
|
||||
|
||||
extern "C" clock_t clock(void);
|
||||
extern "C" double difftime(time_t, time_t);
|
||||
extern "C" time_t mktime(struct tm*);
|
||||
extern "C" time_t time(time_t*);
|
||||
extern "C" char* asctime(const struct tm*);
|
||||
extern "C" char* ctime(const time_t*);
|
||||
extern "C" struct tm* gmtime(const time_t*);
|
||||
extern "C" struct tm* localtime(const time_t*);
|
||||
extern "C" size_t strftime(char*, size_t, const char*, const struct tm*);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -31,31 +31,107 @@
|
||||
// ISO C++ 14882: ???
|
||||
//
|
||||
|
||||
// Note: this is not a conforming implementation.
|
||||
// Note: This is not a conforming implementation.
|
||||
|
||||
#ifndef _CPP_CWCHAR
|
||||
#define _CPP_CWCHAR 1
|
||||
|
||||
#include <bits/c++config.h>
|
||||
#include <bits/std_cstdio.h>
|
||||
#include <bits/std_cstdarg.h>
|
||||
|
||||
#if _GLIBCPP_USE_WCHAR_T
|
||||
# pragma GCC system_header
|
||||
# include_next <wchar.h>
|
||||
#pragma GCC system_header
|
||||
#include_next <wchar.h>
|
||||
|
||||
namespace std
|
||||
{
|
||||
using ::wint_t;
|
||||
using ::mbstate_t;
|
||||
|
||||
extern "C" wint_t btowc(int);
|
||||
extern "C" int wctob(wint_t);
|
||||
extern "C" wint_t fgetwc(FILE*);
|
||||
extern "C" wchar_t* fgetws(wchar_t*, int, FILE*);
|
||||
extern "C" wint_t fputwc(wchar_t, FILE*);
|
||||
extern "C" int fputws(const wchar_t*, FILE*);
|
||||
extern "C" int fwide(FILE*, int);
|
||||
extern "C" int fwprintf(FILE*, const wchar_t*, ...);
|
||||
extern "C" int fwscanf(FILE*, const wchar_t*, ...);
|
||||
extern "C" int swprintf(wchar_t*, size_t, const wchar_t*, ...);
|
||||
extern "C" int swscanf(const wchar_t*, const wchar_t*, ...);
|
||||
extern "C" int vfwprintf(FILE*, const wchar_t*, va_list);
|
||||
extern "C" int vfwscanf(FILE*, const wchar_t*, va_list);
|
||||
extern "C" int vswprintf(wchar_t*, size_t, const wchar_t*, va_list);
|
||||
extern "C" int vswscanf(const wchar_t*, const wchar_t*, va_list);
|
||||
extern "C" int vwprintf(const wchar_t*, va_list);
|
||||
extern "C" int vwscanf(const wchar_t*, va_list);
|
||||
extern "C" int wprintf(const wchar_t*, ...);
|
||||
extern "C" int wscanf(const wchar_t*, ...);
|
||||
extern "C" wint_t getwc(FILE* stream);
|
||||
extern "C" wint_t getwchar(void);
|
||||
extern "C" int mbsinit(const mbstate_t*);
|
||||
extern "C" size_t mbrlen(const char*, size_t, mbstate_t*);
|
||||
extern "C" size_t mbrtowc(wchar_t*, const char*, size_t, mbstate_t*);
|
||||
extern "C" size_t mbsrtowcs(wchar_t*, const char**, size_t, mbstate_t*);
|
||||
extern "C" size_t wcsrtombs(char*, const wchar_t **, size_t, mbstate_t*);
|
||||
extern "C" wint_t putwc(wchar_t, FILE*);
|
||||
extern "C" wint_t putwchar(wchar_t);
|
||||
extern "C" wint_t ungetwc(wint_t, FILE*);
|
||||
extern "C" size_t wcrtomb(char*, wchar_t, mbstate_t*);
|
||||
extern "C" double wcstod(const wchar_t*, wchar_t**);
|
||||
extern "C" float wcstof(const wchar_t*, wchar_t**);
|
||||
extern "C" long int wcstol(const wchar_t*, wchar_t**, int);
|
||||
extern "C" unsigned long int wcstoul(const wchar_t*, wchar_t**, int);
|
||||
extern "C" wchar_t* wcscpy(wchar_t* s1, const wchar_t*);
|
||||
extern "C" wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t);
|
||||
extern "C" wchar_t* wcscat(wchar_t*, const wchar_t*);
|
||||
extern "C" wchar_t* wcsncat(wchar_t*, const wchar_t*, size_t);
|
||||
extern "C" int wcscmp(const wchar_t*, const wchar_t*);
|
||||
extern "C" int wcscoll(const wchar_t*, const wchar_t*);
|
||||
extern "C" int wcsncmp(const wchar_t*, const wchar_t*, size_t);
|
||||
extern "C" size_t wcsxfrm(wchar_t*, const wchar_t*, size_t);
|
||||
extern "C" wchar_t* wcschr(const wchar_t*, wchar_t);
|
||||
extern "C" size_t wcscspn(const wchar_t*, const wchar_t*);
|
||||
extern "C" size_t wcslen(const wchar_t*);
|
||||
extern "C" wchar_t* wcspbrk(const wchar_t*, const wchar_t*);
|
||||
extern "C" wchar_t* wcsrchr(const wchar_t*, wchar_t);
|
||||
extern "C" size_t wcsspn(const wchar_t*, const wchar_t*);
|
||||
extern "C" wchar_t* wcsstr(const wchar_t*, const wchar_t*);
|
||||
extern "C" wchar_t* wcstok(wchar_t*, const wchar_t*, wchar_t**);
|
||||
extern "C" wchar_t* wmemchr(const wchar_t*, wchar_t, size_t);
|
||||
extern "C" int wmemcmp(const wchar_t*, const wchar_t*, size_t);
|
||||
//extern "C" int wmemcmp(wchar_t*, const wchar_t*, size_t);
|
||||
extern "C" wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t);
|
||||
extern "C" wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t);
|
||||
extern "C" wchar_t* wmemset(wchar_t*, wchar_t, size_t);
|
||||
extern "C" size_t wcsftime(wchar_t*, size_t, const wchar_t*, const struct tm*);
|
||||
|
||||
#if 0
|
||||
// Full C9X listing
|
||||
extern "C" long double wcstold(const wchar_t*, wchar_t**);
|
||||
extern "C" long long int wcstoll(const wchar_t*, wchar_t**, int);
|
||||
extern "C" unsigned long long int wcstoull(const wchar_t*, wchar_t**, int);
|
||||
#endif
|
||||
}
|
||||
|
||||
#else
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
typedef struct
|
||||
{
|
||||
int __fill[6];
|
||||
} mbstate_t;
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
namespace std
|
||||
{
|
||||
using ::mbstate_t;
|
||||
}
|
||||
#endif //_GLIBCPP_USE_WCHAR_T
|
||||
|
||||
#endif // _CPP_CWCHAR
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
@ -31,126 +31,40 @@
|
||||
// ISO C++ 14882: <cwctype>
|
||||
//
|
||||
|
||||
// Note: This is not a conforming implementation.
|
||||
|
||||
#ifndef _CPP_CWCTYPE
|
||||
#define _CPP_CWCTYPE 1
|
||||
|
||||
# pragma GCC system_header
|
||||
# include_next <wctype.h>
|
||||
#pragma GCC system_header
|
||||
#include_next <wctype.h>
|
||||
|
||||
// Sequester the C non-inline implementations in the _C_Swamp::
|
||||
// namespace, and provide C++ inlines for them in the std:: namespace
|
||||
// where they belong.
|
||||
|
||||
namespace std
|
||||
namespace std
|
||||
{
|
||||
using ::wctype_t;
|
||||
using ::wctrans_t;
|
||||
|
||||
#ifdef towupper
|
||||
inline wint_t
|
||||
_S_towupper_helper(wint_t __wc) { return towupper(__wc); }
|
||||
# undef towupper
|
||||
inline wint_t
|
||||
towupper(wint_t __wc) { return _S_towupper_helper(__wc); }
|
||||
#endif
|
||||
extern "C" int iswalnum(wint_t);
|
||||
extern "C" int iswalpha(wint_t);
|
||||
extern "C" int iswblank(wint_t);
|
||||
extern "C" int iswcntrl(wint_t);
|
||||
extern "C" int iswdigit(wint_t);
|
||||
extern "C" int iswgraph(wint_t);
|
||||
extern "C" int iswlower(wint_t);
|
||||
extern "C" int iswprint(wint_t);
|
||||
extern "C" int iswpunct(wint_t);
|
||||
extern "C" int iswspace(wint_t);
|
||||
extern "C" int iswupper(wint_t);
|
||||
extern "C" int iswxdigit(wint_t);
|
||||
extern "C" int iswctype(wint_t, wctype_t);
|
||||
extern "C" wctype_t wctype(const char *);
|
||||
extern "C" wint_t towlower(wint_t);
|
||||
extern "C" wint_t towupper(wint_t);
|
||||
extern "C" wint_t towctrans(wint_t, wctrans_t);
|
||||
extern "C" wctrans_t wctrans(const char*);
|
||||
}
|
||||
|
||||
#ifdef towlower
|
||||
inline wint_t
|
||||
_S_towlower_helper(wint_t __wc) { return towlower(__wc); }
|
||||
# undef towlower
|
||||
inline wint_t
|
||||
towlower(wint_t __wc) { return _S_towlower_helper(__wc); }
|
||||
#endif
|
||||
|
||||
#ifdef iswspace
|
||||
inline int
|
||||
_S_iswspace_helper(wint_t __wc) { return iswspace(__wc); }
|
||||
# undef iswspace
|
||||
inline int
|
||||
iswspace(wint_t __wc) { return _S_iswspace_helper(__wc); }
|
||||
#endif
|
||||
|
||||
#ifdef iswprint
|
||||
inline int
|
||||
_S_iswprint_helper(wint_t __wc) { return iswprint(__wc); }
|
||||
# undef iswprint
|
||||
inline int
|
||||
iswprint(wint_t __wc) { return _S_iswprint_helper(__wc); }
|
||||
#endif
|
||||
|
||||
#ifdef iswcntrl
|
||||
inline int
|
||||
_S_iswcntrl_helper(wint_t __wc) { return iswcntrl(__wc); }
|
||||
# undef iswcntrl
|
||||
inline int
|
||||
iswcntrl(wint_t __wc) { return _S_iswcntrl_helper(__wc); }
|
||||
#endif
|
||||
|
||||
#ifdef iswupper
|
||||
inline int
|
||||
_S_iswupper_helper(wint_t __wc) { return iswupper(__wc); }
|
||||
# undef iswupper
|
||||
inline int
|
||||
iswupper(wint_t __wc) { return _S_iswupper_helper(__wc); }
|
||||
#endif
|
||||
|
||||
#ifdef iswlower
|
||||
inline int
|
||||
_S_iswlower_helper(wint_t __wc) { return iswlower(__wc); }
|
||||
# undef iswlower
|
||||
inline int
|
||||
iswlower(wint_t __wc) { return _S_iswlower_helper(__wc); }
|
||||
#endif
|
||||
|
||||
#ifdef iswalpha
|
||||
inline int
|
||||
_S_iswalpha_helper(wint_t __wc) { return iswalpha(__wc); }
|
||||
# undef iswalpha
|
||||
inline int
|
||||
iswalpha(wint_t __wc) { return _S_iswalpha_helper(__wc); }
|
||||
#endif
|
||||
|
||||
#ifdef iswdigit
|
||||
inline int
|
||||
_S_iswdigit_helper(wint_t __wc) { return iswdigit(__wc); }
|
||||
# undef iswdigit
|
||||
inline int
|
||||
iswdigit(wint_t __wc) { return _S_iswdigit_helper(__wc); }
|
||||
#endif
|
||||
|
||||
#ifdef iswpunct
|
||||
inline int
|
||||
_S_iswpunct_helper(wint_t __wc) { return iswpunct(__wc); }
|
||||
# undef iswpunct
|
||||
inline int
|
||||
iswpunct(wint_t __wc) { return _S_iswpunct_helper(__wc); }
|
||||
#endif
|
||||
|
||||
#ifdef iswxdigit
|
||||
inline int
|
||||
_S_iswxdigit_helper (wint_t __wc) { return iswxdigit(__wc); }
|
||||
# undef iswxdigit
|
||||
inline int
|
||||
iswxdigit(wint_t __wc) { return _S_iswxdigit_helper(__wc); }
|
||||
#endif
|
||||
|
||||
#ifdef iswalnum
|
||||
inline int
|
||||
_S_iswalnum_helper(wint_t __wc) { return iswalnum(__wc); }
|
||||
# undef iswalnum
|
||||
inline int
|
||||
iswalnum(wint_t __wc) { return _S_iswalnum_helper(__wc); }
|
||||
#endif
|
||||
|
||||
#ifdef iswgraph
|
||||
inline int
|
||||
_S_iswgraph_helper(wint_t __wc) { return iswgraph(__wc); }
|
||||
# undef iswgraph
|
||||
inline int
|
||||
iswgraph(wint_t __wc) { return _S_iswgraph_helper(__wc); }
|
||||
#endif
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif // _CPP_CWCTYPE
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
@ -133,7 +133,7 @@ namespace std {
|
||||
using _C_legacy::remove;
|
||||
using _C_legacy::rename;
|
||||
using _C_legacy::tmpnam;
|
||||
// using _C_legacy::printf;
|
||||
using _C_legacy::printf;
|
||||
using _C_legacy::scanf;
|
||||
using _C_legacy::sprintf;
|
||||
using _C_legacy::sscanf;
|
||||
|
@ -57,7 +57,7 @@
|
||||
using std::setvbuf;
|
||||
using std::fprintf;
|
||||
using std::fscanf;
|
||||
// using std::printf;
|
||||
using std::printf;
|
||||
using std::scanf;
|
||||
using std::sprintf;
|
||||
using std::sscanf;
|
||||
|
@ -27,7 +27,7 @@
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
#include <stddef.h>
|
||||
#include <cstddef>
|
||||
#include "tinfo.h"
|
||||
#include "new" // for placement new
|
||||
|
||||
|
@ -57,12 +57,12 @@ fi
|
||||
top_srcdir=@top_srcdir@
|
||||
C_DIR="`basename @C_INCLUDE_DIR@`"
|
||||
if [ $WHICH != "1" ]; then
|
||||
INC_PATH="@CSHADOW_FLAGS@ -I$BUILD_DIR/include -I$BUILD_DIR/libio \
|
||||
INC_PATH="-nostdinc++ @CSHADOW_FLAGS@ -I$BUILD_DIR/include \
|
||||
-I$SRC_DIR/include/std -I$SRC_DIR/include/$C_DIR \
|
||||
-I$SRC_DIR/include -I$SRC_DIR/libsupc++ -I$SRC_DIR/libio \
|
||||
-I$SRC_DIR/testsuite"
|
||||
elif [ $WHICH -eq 1 ]; then
|
||||
INC_PATH="-I$SRC_DIR/testsuite"
|
||||
INC_PATH="-nostdinc++ -I$SRC_DIR/testsuite"
|
||||
fi
|
||||
|
||||
if [ $WHICH -eq 2 ]; then
|
||||
|
@ -32,7 +32,6 @@
|
||||
#include <bits/std_ostream.h>
|
||||
#include <bits/std_sstream.h>
|
||||
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
@ -82,9 +81,7 @@ namespace std
|
||||
{
|
||||
basic_ostringstream<_CharT, _Traits> __s;
|
||||
__s.flags(__os.flags());
|
||||
#ifdef _G_HAVE_LOCALE
|
||||
__s.imbue(__os.getloc());
|
||||
#endif
|
||||
__s.precision (__os.precision());
|
||||
__s << '(' << __x.real() << "," << __x.imag() << ')' << ends;
|
||||
return __os << __s.str();
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
// 22.2.1.5 - Template class codecvt [lib.locale.codecvt]
|
||||
|
||||
#include <cwchar> // for mbstate_t
|
||||
#include <locale>
|
||||
#include <debug_assert.h>
|
||||
|
||||
@ -34,8 +35,8 @@
|
||||
// w_codecvt::state_type state01 = {0, 0};
|
||||
// .. except Ulrich says: Use memset. Always use memset. Feel the force...
|
||||
void
|
||||
zero_state(mbstate_t& state)
|
||||
{ memset(&state, 0, sizeof(mbstate_t)); }
|
||||
zero_state(std::mbstate_t& state)
|
||||
{ std::memset(&state, 0, sizeof(std::mbstate_t)); }
|
||||
|
||||
// Required instantiation
|
||||
// codecvt<wchar_t, char, mbstate_t>
|
||||
|
@ -20,14 +20,15 @@
|
||||
|
||||
// 22.1.1.2 locale constructors and destructors [lib.locale.cons]
|
||||
|
||||
#include <cwchar> // for mbstate_t
|
||||
#include <locale>
|
||||
#include <stdexcept>
|
||||
#include <debug_assert.h>
|
||||
|
||||
typedef std::codecvt<char, char, mbstate_t> c_codecvt;
|
||||
typedef std::codecvt_byname<char, char, mbstate_t> c_codecvt_byname;
|
||||
typedef std::codecvt<wchar_t, char, mbstate_t> w_codecvt;
|
||||
typedef std::codecvt_byname<wchar_t, char, mbstate_t> w_codecvt_byname;
|
||||
typedef std::codecvt<char, char, std::mbstate_t> c_codecvt;
|
||||
typedef std::codecvt_byname<char, char, std::mbstate_t> c_codecvt_byname;
|
||||
typedef std::codecvt<wchar_t, char, std::mbstate_t> w_codecvt;
|
||||
typedef std::codecvt_byname<wchar_t, char, std::mbstate_t> w_codecvt_byname;
|
||||
|
||||
class gnu_codecvt: public c_codecvt { };
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
// 22.1.1.1.2 - class locale::facet [lib.locale.facet]
|
||||
|
||||
#include <cwchar> // for mbstate_t
|
||||
#include <locale>
|
||||
#include <iterator>
|
||||
#include <debug_assert.h>
|
||||
@ -30,7 +31,7 @@ typedef std::ostreambuf_iterator<char> output_iterator;
|
||||
|
||||
class gnu_collate: public std::collate<char> { };
|
||||
class gnu_ctype: public std::ctype<char> { };
|
||||
class gnu_codecvt: public std::codecvt<char, char, mbstate_t> { };
|
||||
class gnu_codecvt: public std::codecvt<char, char, std::mbstate_t> { };
|
||||
class gnu_moneypunct: public std::moneypunct<char> { };
|
||||
class gnu_moneypunct_true: public std::moneypunct<char, true> { };
|
||||
class gnu_money_get: public std::money_get<char> { };
|
||||
|
@ -20,10 +20,11 @@
|
||||
|
||||
// 22.1.2 locale globals [lib.locale.global.templates]
|
||||
|
||||
#include <cwchar> // for mbstate_t
|
||||
#include <locale>
|
||||
#include <debug_assert.h>
|
||||
|
||||
typedef std::codecvt<char, char, mbstate_t> ccodecvt;
|
||||
typedef std::codecvt<char, char, std::mbstate_t> ccodecvt;
|
||||
|
||||
class gnu_codecvt: public ccodecvt { };
|
||||
|
||||
|
@ -20,10 +20,11 @@
|
||||
|
||||
// 22.1.1.4 locale operators [lib.locale.operators]
|
||||
|
||||
#include <cwchar> // for mbstate_t
|
||||
#include <locale>
|
||||
#include <debug_assert.h>
|
||||
|
||||
typedef std::codecvt<char, char, mbstate_t> ccodecvt;
|
||||
typedef std::codecvt<char, char, std::mbstate_t> ccodecvt;
|
||||
class gnu_codecvt: public ccodecvt { };
|
||||
|
||||
void test01()
|
||||
|
@ -20,10 +20,11 @@
|
||||
|
||||
// 22.1.1.5 locale static members [lib.locale.statics]
|
||||
|
||||
#include <cwchar> // for mbstate_t
|
||||
#include <locale>
|
||||
#include <debug_assert.h>
|
||||
|
||||
typedef std::codecvt<char, char, mbstate_t> ccodecvt;
|
||||
typedef std::codecvt<char, char, std::mbstate_t> ccodecvt;
|
||||
class gnu_codecvt: public ccodecvt { };
|
||||
|
||||
void test01()
|
||||
|
@ -36,7 +36,7 @@ test01()
|
||||
int
|
||||
test02()
|
||||
{
|
||||
sin(static_cast<float>(0));
|
||||
std::sin(static_cast<float>(0));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ test02()
|
||||
int
|
||||
test03()
|
||||
{
|
||||
double powtest = pow(2., 0);
|
||||
double powtest = std::pow(2., 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ template<typename R>
|
||||
inline bool flteq(R x, R y)
|
||||
{
|
||||
if (x == R(0)) return y == R(0);
|
||||
else return fabs(x-y) < 1e-6*fabs(x);
|
||||
else return std::fabs(x-y) < 1e-6*std::fabs(x);
|
||||
}
|
||||
|
||||
template<typename R>
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
// 27.4.3 template class fpos
|
||||
|
||||
#include <cwchar> // for mbstate_t
|
||||
#include <ios>
|
||||
#include <debug_assert.h>
|
||||
|
||||
@ -36,7 +37,7 @@ void test01()
|
||||
{
|
||||
bool test = true;
|
||||
|
||||
typedef mbstate_t state_type;
|
||||
typedef std::mbstate_t state_type;
|
||||
state_type state01;
|
||||
state_type state02;
|
||||
|
||||
@ -72,7 +73,7 @@ void test02()
|
||||
{
|
||||
bool test = true;
|
||||
|
||||
typedef mbstate_t state_type;
|
||||
typedef std::mbstate_t state_type;
|
||||
state_type state01;
|
||||
state_type state02;
|
||||
|
||||
@ -132,7 +133,7 @@ void test03()
|
||||
{
|
||||
bool test = true;
|
||||
|
||||
typedef mbstate_t state_type;
|
||||
typedef std::mbstate_t state_type;
|
||||
state_type state01;
|
||||
state_type state02;
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
// 27.6.1.2.2 arithmetic extractors
|
||||
|
||||
#include <cstdio> // for printf
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
@ -105,9 +106,9 @@ bool test01() {
|
||||
VERIFY( f1 == 1.5 );
|
||||
|
||||
is_04 >> std::hex >> i1;
|
||||
printf ("%d %d %d\n", i1, i1 == 0x123, test);
|
||||
std::printf ("%d %d %d\n", i1, i1 == 0x123, test);
|
||||
VERIFY( i1 == 0x123 );
|
||||
printf ("%d %d %d\n", i1, i1 == 0x123, test);
|
||||
std::printf ("%d %d %d\n", i1, i1 == 0x123, test);
|
||||
|
||||
// test void pointers
|
||||
int i = 55;
|
||||
@ -116,7 +117,7 @@ bool test01() {
|
||||
|
||||
ss_01 << po;
|
||||
ss_01 >> pi;
|
||||
printf ("%x %x\n", pi, po);
|
||||
std::printf ("%x %x\n", pi, po);
|
||||
VERIFY( po == pi );
|
||||
|
||||
#ifdef DEBUG_ASSERT
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
// 27.6.1.3 unformatted input functions
|
||||
|
||||
#include <cstring> // for strncmp,...
|
||||
#include <istream>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
@ -56,7 +57,7 @@ test01()
|
||||
is_04.read(carray, 9);
|
||||
state2 = is_04.rdstate();
|
||||
VERIFY( state1 == state2 );
|
||||
VERIFY( !strncmp(carray, "soul eyes", 9) );
|
||||
VERIFY( !std::strncmp(carray, "soul eyes", 9) );
|
||||
VERIFY( is_04.peek() == ':' );
|
||||
|
||||
state1 = is_03.rdstate();
|
||||
@ -65,7 +66,7 @@ test01()
|
||||
VERIFY( state1 != state2 );
|
||||
VERIFY( static_cast<bool>(state2 & stateeof) );
|
||||
VERIFY( static_cast<bool>(state2 & statefail) );
|
||||
VERIFY( !strncmp(carray, "soul eyes: john coltrane quartet", 35) );
|
||||
VERIFY( !std::strncmp(carray, "soul eyes: john coltrane quartet", 35) );
|
||||
|
||||
|
||||
// istream& ignore(streamsize n = 1, int_type delim = traits::eof())
|
||||
@ -377,7 +378,7 @@ aaaaaaaaaaaaaa
|
||||
char tmp[it];
|
||||
std::stringbuf sb(charray, std::ios_base::in);
|
||||
std::istream ifs(&sb);
|
||||
std::streamsize blen = strlen(charray);
|
||||
std::streamsize blen = std::strlen(charray);
|
||||
VERIFY(ifs);
|
||||
while(ifs.getline(tmp, it) || ifs.gcount())
|
||||
{
|
||||
@ -401,7 +402,7 @@ aaaaaaaaaaaaaa
|
||||
// or
|
||||
// -> n - 1 characters are stored
|
||||
ifs.clear(ifs.rdstate() & ~std::ios::failbit);
|
||||
VERIFY((ifs.gcount() == 0) || (strlen(tmp) == it - 1));
|
||||
VERIFY((ifs.gcount() == 0) || (std::strlen(tmp) == it - 1));
|
||||
VERIFY(ifs);
|
||||
continue;
|
||||
}
|
||||
@ -411,7 +412,7 @@ aaaaaaaaaaaaaa
|
||||
//
|
||||
// -> strlen(__s) < n - 1
|
||||
// -> delimiter was seen -> gcount() > strlen(__s)
|
||||
VERIFY(ifs.gcount() == strlen(tmp) + 1);
|
||||
VERIFY(ifs.gcount() == std::strlen(tmp) + 1);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,7 @@
|
||||
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
// USA.
|
||||
|
||||
#include <cstdio> // for sprintf
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <locale>
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
// 27.5.2 template class basic_streambuf
|
||||
|
||||
#include <cstring> // for memset, memcmp
|
||||
#include <streambuf>
|
||||
#include <ostream>
|
||||
#include <debug_assert.h>
|
||||
@ -131,9 +132,9 @@ void test01()
|
||||
|
||||
// sputn/xsputn
|
||||
char* lit02 = "isotope 217: the unstable molecule on thrill jockey";
|
||||
int i02 = strlen(lit02);
|
||||
int i02 = std::strlen(lit02);
|
||||
char carray[i02 + 1];
|
||||
memset(carray, 0, i02 + 1);
|
||||
std::memset(carray, 0, i02 + 1);
|
||||
|
||||
buf01.pub_setp(carray, (carray + i02));
|
||||
buf01.sputn(lit02, 0);
|
||||
@ -144,9 +145,9 @@ void test01()
|
||||
VERIFY( lit02[1] == 's' );
|
||||
VERIFY( carray[1] == 0 );
|
||||
buf01.sputn(lit02 + 1, 10);
|
||||
VERIFY( memcmp(lit02, carray, 10) == 0 );
|
||||
VERIFY( std::memcmp(lit02, carray, 10) == 0 );
|
||||
buf01.sputn(lit02 + 11, 20);
|
||||
VERIFY( memcmp(lit02, carray, 30) == 0 );
|
||||
VERIFY( std::memcmp(lit02, carray, 30) == 0 );
|
||||
|
||||
#ifdef DEBUG_ASSERT
|
||||
assert(test);
|
||||
@ -172,7 +173,7 @@ void test02()
|
||||
// 27.5.2.2.5 Put area
|
||||
size_t i01 = traits_type::length(lit01);
|
||||
char carray01[i01];
|
||||
memset(carray01, 0, i01);
|
||||
std::memset(carray01, 0, i01);
|
||||
|
||||
buf01.pub_setg(lit01, lit01, lit01 + i01);
|
||||
buf01.sgetn(carray01, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user