acinclude.m4 (GLIBCPP_ENABLE_C99): Add stdio.h checking.
2001-06-10 Benjamin Kosnik <bkoz@redhat.com> * acinclude.m4 (GLIBCPP_ENABLE_C99): Add stdio.h checking. Add checking for strtof, _Exit in stdlib.h * aclocal.m4: Regenerate. * configure.in: Regenerate. * include/c_std/bits/std_cstdio.h: Alphabetize lists. (snprintf): Put C99 functions into __gnu_cxx namespace. (vfscanf): Same. (vscanf): Same. (vsnprintf): Same. (vsscanf): Same. * include/c_std/bits/std_cstdlib.h: Alphabetize lists. Put undefs for C99 functions within _GLIBCPP_USE_C99 guard. (_Exit): Same. (strtof): Same. (strtold): Same. * include/bits/locale_facets.tcc: Check if C99 is enabled. * include/c_std/bits/std_cwchar.h (__gnu_cxx): Put undefs within C99 guard. * include/c_std/bits/cmath.tcc: Formatting tweak. * include/c_std/bits/std_cmath.h: Same. From-SVN: r43161
This commit is contained in:
parent
c176c051f8
commit
61c7194612
11 changed files with 1264 additions and 1044 deletions
|
@ -1,3 +1,26 @@
|
|||
2001-06-10 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* acinclude.m4 (GLIBCPP_ENABLE_C99): Add stdio.h checking.
|
||||
Add checking for strtof, _Exit in stdlib.h
|
||||
* aclocal.m4: Regenerate.
|
||||
* configure.in: Regenerate.
|
||||
* include/c_std/bits/std_cstdio.h: Alphabetize lists.
|
||||
(snprintf): Put C99 functions into __gnu_cxx namespace.
|
||||
(vfscanf): Same.
|
||||
(vscanf): Same.
|
||||
(vsnprintf): Same.
|
||||
(vsscanf): Same.
|
||||
* include/c_std/bits/std_cstdlib.h: Alphabetize lists. Put undefs
|
||||
for C99 functions within _GLIBCPP_USE_C99 guard.
|
||||
(_Exit): Same.
|
||||
(strtof): Same.
|
||||
(strtold): Same.
|
||||
* include/bits/locale_facets.tcc: Check if C99 is enabled.
|
||||
* include/c_std/bits/std_cwchar.h (__gnu_cxx): Put undefs within
|
||||
C99 guard.
|
||||
* include/c_std/bits/cmath.tcc: Formatting tweak.
|
||||
* include/c_std/bits/std_cmath.h: Same.
|
||||
|
||||
2001-06-10 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* include/c_std/bits/std_cstdio.h: Include cstddef for size_t.
|
||||
|
|
|
@ -608,7 +608,6 @@ AC_DEFUN(GLIBCPP_CHECK_STDLIB_SUPPORT, [
|
|||
ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS='-fno-builtins -D_GNU_SOURCE'
|
||||
|
||||
AC_CHECK_FUNCS(strtof)
|
||||
GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2(strtold)
|
||||
AC_CHECK_FUNCS(drand48)
|
||||
|
||||
|
@ -1268,6 +1267,37 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
|
|||
[isunordered(0.0,0.0);],, [ac_c99_math=no])
|
||||
AC_MSG_RESULT($ac_c99_math)
|
||||
|
||||
# Check for the existence in <stdio.h> of vscanf, et. al.
|
||||
ac_c99_stdio=yes;
|
||||
AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
|
||||
AC_TRY_COMPILE([#include <stdio.h>],
|
||||
[snprintf("12", 0, "%i");],, [ac_c99_stdio=no])
|
||||
AC_TRY_COMPILE([#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
void foo(char* fmt, ...)
|
||||
{va_list args; va_start(args, fmt);
|
||||
vfscanf(stderr, "%i", args);}],
|
||||
[],, [ac_c99_stdio=no])
|
||||
AC_TRY_COMPILE([#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
void foo(char* fmt, ...)
|
||||
{va_list args; va_start(args, fmt);
|
||||
vscanf("%i", args);}],
|
||||
[],, [ac_c99_stdio=no])
|
||||
AC_TRY_COMPILE([#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
void foo(char* fmt, ...)
|
||||
{va_list args; va_start(args, fmt);
|
||||
vsnprintf(fmt, 0, "%i", args);}],
|
||||
[],, [ac_c99_stdio=no])
|
||||
AC_TRY_COMPILE([#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
void foo(char* fmt, ...)
|
||||
{va_list args; va_start(args, fmt);
|
||||
vsscanf(fmt, "%i", args);}],
|
||||
[],, [ac_c99_stdio=no])
|
||||
AC_MSG_RESULT($ac_c99_stdio)
|
||||
|
||||
# Check for the existence in <stdlib.h> of lldiv_t, et. al.
|
||||
ac_c99_stdlib=yes;
|
||||
AC_MSG_CHECKING([for lldiv_t declaration])
|
||||
|
@ -1279,6 +1309,10 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
|
|||
AC_MSG_RESULT($ac_c99_lldiv_t)
|
||||
|
||||
AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
|
||||
AC_TRY_COMPILE([#include <stdlib.h>],
|
||||
[char* tmp; strtof("gnu", &tmp);],, [ac_c99_stdlib=no])
|
||||
AC_TRY_COMPILE([#include <stdlib.h>],
|
||||
[char* tmp; strtold("gnu", &tmp);],, [ac_c99_stdlib=no])
|
||||
AC_TRY_COMPILE([#include <stdlib.h>],
|
||||
[char* tmp; strtoll("gnu", &tmp, 10);],, [ac_c99_stdlib=no])
|
||||
AC_TRY_COMPILE([#include <stdlib.h>],
|
||||
|
@ -1286,6 +1320,7 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
|
|||
AC_TRY_COMPILE([#include <stdlib.h>], [llabs(10);],, [ac_c99_stdlib=no])
|
||||
AC_TRY_COMPILE([#include <stdlib.h>], [lldiv(10,1);],, [ac_c99_stdlib=no])
|
||||
AC_TRY_COMPILE([#include <stdlib.h>], [atoll("10");],, [ac_c99_stdlib=no])
|
||||
AC_TRY_COMPILE([#include <stdlib.h>], [_Exit(0);],, [ac_c99_stdlib=no])
|
||||
if test x"$ac_c99_lldiv_t" = x"no"; then
|
||||
ac_c99_stdlib=no;
|
||||
fi;
|
||||
|
@ -1303,8 +1338,9 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
|
|||
AC_MSG_RESULT($ac_c99_wchar)
|
||||
|
||||
AC_MSG_CHECKING([for enabled ISO C99 support])
|
||||
if test x"$ac_c99_math" = x"no" || test x"$ac_c99_wchar" = x"no" \
|
||||
|| test x"$ac_c99_stdlib" = x"no"; then
|
||||
if test x"$ac_c99_math" = x"no" || test x"$ac_c99_stdio" = x"no" \
|
||||
|| test x"$ac_c99_stdlib" = x"no" \
|
||||
|| test x"$ac_c99_wchar" = x"no"; then
|
||||
enable_c99=no;
|
||||
fi;
|
||||
AC_MSG_RESULT($enable_c99)
|
||||
|
|
46
libstdc++-v3/aclocal.m4
vendored
46
libstdc++-v3/aclocal.m4
vendored
|
@ -141,6 +141,10 @@ LIB_AC_PROG_CXX
|
|||
# automake happy, but we dont execute it, since we dont care about
|
||||
# the result.
|
||||
if false; then
|
||||
# autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
|
||||
# to nothing, so nothing would remain between `then' and `fi' if it
|
||||
# were not for the `:' below.
|
||||
:
|
||||
AC_EXEEXT
|
||||
fi
|
||||
|
||||
|
@ -616,7 +620,6 @@ AC_DEFUN(GLIBCPP_CHECK_STDLIB_SUPPORT, [
|
|||
ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS='-fno-builtins -D_GNU_SOURCE'
|
||||
|
||||
AC_CHECK_FUNCS(strtof)
|
||||
GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2(strtold)
|
||||
AC_CHECK_FUNCS(drand48)
|
||||
|
||||
|
@ -1276,6 +1279,37 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
|
|||
[isunordered(0.0,0.0);],, [ac_c99_math=no])
|
||||
AC_MSG_RESULT($ac_c99_math)
|
||||
|
||||
# Check for the existence in <stdio.h> of vscanf, et. al.
|
||||
ac_c99_stdio=yes;
|
||||
AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
|
||||
AC_TRY_COMPILE([#include <stdio.h>],
|
||||
[snprintf("12", 0, "%i");],, [ac_c99_stdio=no])
|
||||
AC_TRY_COMPILE([#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
void foo(char* fmt, ...)
|
||||
{va_list args; va_start(args, fmt);
|
||||
vfscanf(stderr, "%i", args);}],
|
||||
[],, [ac_c99_stdio=no])
|
||||
AC_TRY_COMPILE([#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
void foo(char* fmt, ...)
|
||||
{va_list args; va_start(args, fmt);
|
||||
vscanf("%i", args);}],
|
||||
[],, [ac_c99_stdio=no])
|
||||
AC_TRY_COMPILE([#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
void foo(char* fmt, ...)
|
||||
{va_list args; va_start(args, fmt);
|
||||
vsnprintf(fmt, 0, "%i", args);}],
|
||||
[],, [ac_c99_stdio=no])
|
||||
AC_TRY_COMPILE([#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
void foo(char* fmt, ...)
|
||||
{va_list args; va_start(args, fmt);
|
||||
vsscanf(fmt, "%i", args);}],
|
||||
[],, [ac_c99_stdio=no])
|
||||
AC_MSG_RESULT($ac_c99_stdio)
|
||||
|
||||
# Check for the existence in <stdlib.h> of lldiv_t, et. al.
|
||||
ac_c99_stdlib=yes;
|
||||
AC_MSG_CHECKING([for lldiv_t declaration])
|
||||
|
@ -1287,6 +1321,10 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
|
|||
AC_MSG_RESULT($ac_c99_lldiv_t)
|
||||
|
||||
AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
|
||||
AC_TRY_COMPILE([#include <stdlib.h>],
|
||||
[char* tmp; strtof("gnu", &tmp);],, [ac_c99_stdlib=no])
|
||||
AC_TRY_COMPILE([#include <stdlib.h>],
|
||||
[char* tmp; strtold("gnu", &tmp);],, [ac_c99_stdlib=no])
|
||||
AC_TRY_COMPILE([#include <stdlib.h>],
|
||||
[char* tmp; strtoll("gnu", &tmp, 10);],, [ac_c99_stdlib=no])
|
||||
AC_TRY_COMPILE([#include <stdlib.h>],
|
||||
|
@ -1294,6 +1332,7 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
|
|||
AC_TRY_COMPILE([#include <stdlib.h>], [llabs(10);],, [ac_c99_stdlib=no])
|
||||
AC_TRY_COMPILE([#include <stdlib.h>], [lldiv(10,1);],, [ac_c99_stdlib=no])
|
||||
AC_TRY_COMPILE([#include <stdlib.h>], [atoll("10");],, [ac_c99_stdlib=no])
|
||||
AC_TRY_COMPILE([#include <stdlib.h>], [_Exit(0);],, [ac_c99_stdlib=no])
|
||||
if test x"$ac_c99_lldiv_t" = x"no"; then
|
||||
ac_c99_stdlib=no;
|
||||
fi;
|
||||
|
@ -1311,8 +1350,9 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
|
|||
AC_MSG_RESULT($ac_c99_wchar)
|
||||
|
||||
AC_MSG_CHECKING([for enabled ISO C99 support])
|
||||
if test x"$ac_c99_math" = x"no" || test x"$ac_c99_wchar" = x"no" \
|
||||
|| test x"$ac_c99_stdlib" = x"no"; then
|
||||
if test x"$ac_c99_math" = x"no" || test x"$ac_c99_stdio" = x"no" \
|
||||
|| test x"$ac_c99_stdlib" = x"no" \
|
||||
|| test x"$ac_c99_wchar" = x"no"; then
|
||||
enable_c99=no;
|
||||
fi;
|
||||
AC_MSG_RESULT($enable_c99)
|
||||
|
|
|
@ -459,9 +459,6 @@
|
|||
/* Define if you have the sqrtl function. */
|
||||
#undef HAVE_SQRTL
|
||||
|
||||
/* Define if you have the strtof function. */
|
||||
#undef HAVE_STRTOF
|
||||
|
||||
/* Define if you have the strtold function. */
|
||||
#undef HAVE_STRTOLD
|
||||
|
||||
|
|
1905
libstdc++-v3/configure
vendored
1905
libstdc++-v3/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -571,7 +571,7 @@ namespace std
|
|||
// Stage 2: convert and store results.
|
||||
char* __sanity;
|
||||
errno = 0;
|
||||
#ifdef _GLIBCPP_HAVE_STRTOF
|
||||
#ifdef _GLIBCPP_USE_C99
|
||||
float __f = strtof(__xtrc, &__sanity);
|
||||
#else
|
||||
float __f = static_cast<float>(strtod(__xtrc, &__sanity));
|
||||
|
@ -611,7 +611,7 @@ namespace std
|
|||
return __beg;
|
||||
}
|
||||
|
||||
#if defined(_GLIBCPP_HAVE_STRTOLD) && !defined(__hpux)
|
||||
#if defined(_GLIBCPP_USE_C99) && !defined(__hpux)
|
||||
template<typename _CharT, typename _InIter>
|
||||
_InIter
|
||||
num_get<_CharT, _InIter>::
|
||||
|
|
|
@ -32,7 +32,8 @@
|
|||
#ifndef _CPP_BITS_CMATH_TCC
|
||||
#define _CPP_BITS_CMATH_TCC 1
|
||||
|
||||
namespace std {
|
||||
namespace std
|
||||
{
|
||||
export template<typename _Tp>
|
||||
_Tp
|
||||
__cmath_power(_Tp __x, unsigned int __n)
|
||||
|
|
|
@ -495,7 +495,7 @@ namespace std
|
|||
inline long double
|
||||
tanh(long double __x) { return ::tanh(static_cast<double>(__x)); }
|
||||
#endif
|
||||
} // std
|
||||
}
|
||||
|
||||
|
||||
#if _GLIBCPP_USE_C99
|
||||
|
@ -556,7 +556,7 @@ namespace __gnu_cxx
|
|||
int
|
||||
__capture_isunordered(_Tp __f1, _Tp __f2)
|
||||
{ return isunordered(__f1, __f2); }
|
||||
} // namespace __gnu_cxx
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef fpclassify
|
||||
|
@ -651,3 +651,6 @@ namespace std
|
|||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -34,106 +34,128 @@
|
|||
#ifndef _CPP_CSTDIO
|
||||
#define _CPP_CSTDIO 1
|
||||
|
||||
#include <bits/c++config.h>
|
||||
#include <bits/std_cstddef.h>
|
||||
|
||||
#pragma GCC system_header
|
||||
#include_next <stdio.h>
|
||||
|
||||
// Get rid of those macros defined in <stdio.h> in lieu of real functions.
|
||||
#undef remove
|
||||
#undef rename
|
||||
#undef tmpfile
|
||||
#undef tmpnam
|
||||
#undef clearerr
|
||||
#undef fclose
|
||||
#undef feof
|
||||
#undef ferror
|
||||
#undef fflush
|
||||
#undef fopen
|
||||
#undef freopen
|
||||
#undef setbuf
|
||||
#undef setvbuf
|
||||
#undef fprintf
|
||||
#undef fscanf
|
||||
#undef printf
|
||||
#undef scanf
|
||||
#undef sprintf
|
||||
#undef sscanf
|
||||
#undef vfprintf
|
||||
#undef vfscanf
|
||||
#undef vprintf
|
||||
#undef vscanf
|
||||
#undef vsprintf
|
||||
#undef vsscanf
|
||||
#undef fgetc
|
||||
#undef fgetpos
|
||||
#undef fgets
|
||||
#undef fopen
|
||||
#undef fprintf
|
||||
#undef fputc
|
||||
#undef fputs
|
||||
#undef getc
|
||||
#undef getchar
|
||||
#undef gets
|
||||
#undef putc
|
||||
#undef putchar
|
||||
#undef puts
|
||||
#undef ungetc
|
||||
#undef fread
|
||||
#undef fwrite
|
||||
#undef fgetpos
|
||||
#undef freopen
|
||||
#undef fscanf
|
||||
#undef fseek
|
||||
#undef fsetpos
|
||||
#undef ftell
|
||||
#undef rewind
|
||||
#undef clearerr
|
||||
#undef feof
|
||||
#undef ferror
|
||||
#undef fwrite
|
||||
#undef getc
|
||||
#undef getchar
|
||||
#undef gets
|
||||
#undef perror
|
||||
#undef printf
|
||||
#undef putc
|
||||
#undef putchar
|
||||
#undef puts
|
||||
#undef remove
|
||||
#undef rename
|
||||
#undef rewind
|
||||
#undef scanf
|
||||
#undef setbuf
|
||||
#undef setvbuf
|
||||
#undef sprintf
|
||||
#undef sscanf
|
||||
#undef tmpfile
|
||||
#undef tmpnam
|
||||
#undef ungetc
|
||||
#undef vfprintf
|
||||
#undef vprintf
|
||||
#undef vsprintf
|
||||
|
||||
namespace std
|
||||
{
|
||||
using ::FILE;
|
||||
using ::fpos_t;
|
||||
|
||||
using ::remove;
|
||||
using ::rename;
|
||||
using ::tmpfile;
|
||||
using ::tmpnam;
|
||||
using ::clearerr;
|
||||
using ::fclose;
|
||||
using ::feof;
|
||||
using ::ferror;
|
||||
using ::fflush;
|
||||
using ::fopen;
|
||||
using ::freopen;
|
||||
using ::setbuf;
|
||||
using ::setvbuf;
|
||||
using ::fprintf;
|
||||
using ::fscanf;
|
||||
using ::printf;
|
||||
using ::scanf;
|
||||
using ::sprintf;
|
||||
using ::sscanf;
|
||||
using ::vfprintf;
|
||||
using ::vfscanf;
|
||||
using ::vprintf;
|
||||
using ::vscanf;
|
||||
using ::vsprintf;
|
||||
using ::vsscanf;
|
||||
using ::fgetc;
|
||||
using ::fgetpos;
|
||||
using ::fgets;
|
||||
using ::fopen;
|
||||
using ::fprintf;
|
||||
using ::fputc;
|
||||
using ::fputs;
|
||||
using ::getc;
|
||||
using ::getchar;
|
||||
using ::gets;
|
||||
using ::putc;
|
||||
using ::putchar;
|
||||
using ::puts;
|
||||
using ::ungetc;
|
||||
using ::fread;
|
||||
using ::fwrite;
|
||||
using ::fgetpos;
|
||||
using ::freopen;
|
||||
using ::fscanf;
|
||||
using ::fseek;
|
||||
using ::fsetpos;
|
||||
using ::ftell;
|
||||
using ::rewind;
|
||||
using ::clearerr;
|
||||
using ::feof;
|
||||
using ::ferror;
|
||||
using ::fwrite;
|
||||
using ::getc;
|
||||
using ::getchar;
|
||||
using ::gets;
|
||||
using ::perror;
|
||||
using ::printf;
|
||||
using ::putc;
|
||||
using ::putchar;
|
||||
using ::puts;
|
||||
using ::remove;
|
||||
using ::rename;
|
||||
using ::rewind;
|
||||
using ::scanf;
|
||||
using ::setbuf;
|
||||
using ::setvbuf;
|
||||
using ::sprintf;
|
||||
using ::sscanf;
|
||||
using ::tmpfile;
|
||||
using ::tmpnam;
|
||||
using ::ungetc;
|
||||
using ::vfprintf;
|
||||
using ::vprintf;
|
||||
using ::vsprintf;
|
||||
}
|
||||
|
||||
#if _GLIBCPP_USE_C99
|
||||
|
||||
#undef snprintf
|
||||
#undef vfscanf
|
||||
#undef vscanf
|
||||
#undef vsnprintf
|
||||
#undef vsscanf
|
||||
|
||||
namespace __gnu_cxx
|
||||
{
|
||||
using ::snprintf;
|
||||
using ::vfscanf;
|
||||
using ::vscanf;
|
||||
using ::vsnprintf;
|
||||
using ::vsscanf;
|
||||
}
|
||||
|
||||
namespace std
|
||||
{
|
||||
using __gnu_cxx::snprintf;
|
||||
using __gnu_cxx::vfscanf;
|
||||
using __gnu_cxx::vscanf;
|
||||
using __gnu_cxx::vsnprintf;
|
||||
using __gnu_cxx::vsscanf;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -41,92 +41,91 @@
|
|||
#include_next <stdlib.h>
|
||||
|
||||
// Get rid of those macros defined in <stdlib.h> in lieu of real functions.
|
||||
#undef abort
|
||||
#undef abs
|
||||
#undef atexit
|
||||
#undef atof
|
||||
#undef atoi
|
||||
#undef atol
|
||||
#undef bsearch
|
||||
#undef calloc
|
||||
#undef div
|
||||
#undef exit
|
||||
#undef free
|
||||
#undef getenv
|
||||
#undef labs
|
||||
#undef ldiv
|
||||
#undef malloc
|
||||
#undef mblen
|
||||
#undef mbstowcs
|
||||
#undef mbtowc
|
||||
#undef qsort
|
||||
#undef rand
|
||||
#undef realloc
|
||||
#undef srand
|
||||
#undef strtod
|
||||
#undef strtof
|
||||
#undef strtol
|
||||
#undef strtoul
|
||||
#undef rand
|
||||
#undef srand
|
||||
#undef calloc
|
||||
#undef free
|
||||
#undef malloc
|
||||
#undef realloc
|
||||
#undef abort
|
||||
#undef atexit
|
||||
#undef exit
|
||||
//#undef _Exit
|
||||
#undef getenv
|
||||
#undef system
|
||||
#undef bsearch
|
||||
#undef qsort
|
||||
#undef abs
|
||||
#undef labs
|
||||
#undef llabs
|
||||
#undef div
|
||||
#undef ldiv
|
||||
#undef lldiv
|
||||
#undef mblen
|
||||
#undef mbtowc
|
||||
#undef wctomb
|
||||
#undef mbstowcs
|
||||
#undef wcstombs
|
||||
#undef atoll
|
||||
#undef strtoll
|
||||
#undef strtoull
|
||||
#undef strtold
|
||||
#undef wctomb
|
||||
|
||||
namespace std
|
||||
{
|
||||
using ::div_t;
|
||||
using ::ldiv_t;
|
||||
|
||||
using ::abort;
|
||||
using ::abs;
|
||||
using ::atexit;
|
||||
using ::atof;
|
||||
using ::atoi;
|
||||
using ::atol;
|
||||
using ::bsearch;
|
||||
using ::calloc;
|
||||
using ::div;
|
||||
using ::exit;
|
||||
using ::free;
|
||||
using ::getenv;
|
||||
using ::labs;
|
||||
using ::ldiv;
|
||||
using ::malloc;
|
||||
using ::mblen;
|
||||
using ::mbstowcs;
|
||||
using ::mbtowc;
|
||||
using ::qsort;
|
||||
using ::rand;
|
||||
using ::realloc;
|
||||
using ::srand;
|
||||
using ::strtod;
|
||||
#if _GLIBCPP_HAVE_STRTOF
|
||||
using ::strtof;
|
||||
#endif
|
||||
using ::strtol;
|
||||
using ::strtoul;
|
||||
using ::rand;
|
||||
using ::srand;
|
||||
using ::calloc;
|
||||
using ::free;
|
||||
using ::malloc;
|
||||
using ::realloc;
|
||||
using ::abort;
|
||||
using ::atexit;
|
||||
using ::exit;
|
||||
// using ::_Exit;
|
||||
using ::getenv;
|
||||
using ::system;
|
||||
using ::bsearch;
|
||||
using ::qsort;
|
||||
using ::abs;
|
||||
using ::labs;
|
||||
using ::div;
|
||||
using ::ldiv;
|
||||
using ::mblen;
|
||||
using ::mbtowc;
|
||||
using ::wctomb;
|
||||
using ::mbstowcs;
|
||||
using ::wcstombs;
|
||||
using ::wctomb;
|
||||
|
||||
inline long
|
||||
abs(long __i) { return labs(__i); }
|
||||
|
||||
inline ldiv_t
|
||||
div(long __i, long __j) { return ldiv(__i, __j); }
|
||||
} // namespace std
|
||||
}
|
||||
|
||||
#if _GLIBCPP_USE_C99
|
||||
|
||||
#undef _Exit
|
||||
#undef llabs
|
||||
#undef lldiv
|
||||
#undef atoll
|
||||
#undef strtoll
|
||||
#undef strtoull
|
||||
#undef strtof
|
||||
#undef strtold
|
||||
|
||||
namespace __gnu_cxx
|
||||
{
|
||||
using ::lldiv_t;
|
||||
using ::_Exit;
|
||||
|
||||
inline long long
|
||||
abs(long long __x) { return __x >= 0 ? __x : -__x; }
|
||||
|
@ -143,27 +142,25 @@ namespace __gnu_cxx
|
|||
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
|
||||
|
||||
using ::atoll;
|
||||
using ::strtof;
|
||||
using ::strtoll;
|
||||
using ::strtoull;
|
||||
|
||||
#ifdef _GLIBCPP_HAVE_STRTOLD
|
||||
using ::strtold;
|
||||
#endif
|
||||
} // namespace __gnu_cxx
|
||||
}
|
||||
|
||||
namespace std
|
||||
{
|
||||
using __gnu_cxx::lldiv_t;
|
||||
using __gnu_cxx::_Exit;
|
||||
using __gnu_cxx::abs;
|
||||
using __gnu_cxx::llabs;
|
||||
using __gnu_cxx::div;
|
||||
using __gnu_cxx::lldiv;
|
||||
using __gnu_cxx::atoll;
|
||||
using __gnu_cxx::strtof;
|
||||
using __gnu_cxx::strtoll;
|
||||
using __gnu_cxx::strtoull;
|
||||
#ifdef _GLIBCPP_HAVE_STRTOLD
|
||||
using __gnu_cxx::strtold;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -112,7 +112,6 @@ namespace std
|
|||
#undef wmemmove
|
||||
#undef wmemset
|
||||
#undef wcsftime
|
||||
|
||||
#undef wcschr
|
||||
#undef wcspbrk
|
||||
#undef wcsrchr
|
||||
|
@ -212,6 +211,11 @@ namespace std
|
|||
}
|
||||
|
||||
#if _GLIBCPP_USE_C99
|
||||
|
||||
#undef wcstold
|
||||
#undef wcstoll
|
||||
#undef wcstoull
|
||||
|
||||
namespace __gnu_cxx
|
||||
{
|
||||
using ::wcstold;
|
||||
|
|
Loading…
Add table
Reference in a new issue