Commit 61c71946 by Benjamin Kosnik Committed by Benjamin Kosnik

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
parent c176c051
2001-06-10 Benjamin Kosnik <bkoz@redhat.com> 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. * include/c_std/bits/std_cstdio.h: Include cstddef for size_t.
2001-06-09 Alexandre Oliva <aoliva@redhat.com> 2001-06-09 Alexandre Oliva <aoliva@redhat.com>
......
...@@ -608,7 +608,6 @@ AC_DEFUN(GLIBCPP_CHECK_STDLIB_SUPPORT, [ ...@@ -608,7 +608,6 @@ AC_DEFUN(GLIBCPP_CHECK_STDLIB_SUPPORT, [
ac_save_CXXFLAGS="$CXXFLAGS" ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS='-fno-builtins -D_GNU_SOURCE' CXXFLAGS='-fno-builtins -D_GNU_SOURCE'
AC_CHECK_FUNCS(strtof)
GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2(strtold) GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2(strtold)
AC_CHECK_FUNCS(drand48) AC_CHECK_FUNCS(drand48)
...@@ -1268,6 +1267,37 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl ...@@ -1268,6 +1267,37 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
[isunordered(0.0,0.0);],, [ac_c99_math=no]) [isunordered(0.0,0.0);],, [ac_c99_math=no])
AC_MSG_RESULT($ac_c99_math) 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. # Check for the existence in <stdlib.h> of lldiv_t, et. al.
ac_c99_stdlib=yes; ac_c99_stdlib=yes;
AC_MSG_CHECKING([for lldiv_t declaration]) AC_MSG_CHECKING([for lldiv_t declaration])
...@@ -1280,12 +1310,17 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl ...@@ -1280,12 +1310,17 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>]) AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
AC_TRY_COMPILE([#include <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]) [char* tmp; strtoll("gnu", &tmp, 10);],, [ac_c99_stdlib=no])
AC_TRY_COMPILE([#include <stdlib.h>], AC_TRY_COMPILE([#include <stdlib.h>],
[char* tmp; strtoull("gnu", &tmp, 10);],, [ac_c99_stdlib=no]) [char* tmp; strtoull("gnu", &tmp, 10);],, [ac_c99_stdlib=no])
AC_TRY_COMPILE([#include <stdlib.h>], [llabs(10);],, [ac_c99_stdlib=no]) 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>], [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>], [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 if test x"$ac_c99_lldiv_t" = x"no"; then
ac_c99_stdlib=no; ac_c99_stdlib=no;
fi; fi;
...@@ -1303,8 +1338,9 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl ...@@ -1303,8 +1338,9 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
AC_MSG_RESULT($ac_c99_wchar) AC_MSG_RESULT($ac_c99_wchar)
AC_MSG_CHECKING([for enabled ISO C99 support]) AC_MSG_CHECKING([for enabled ISO C99 support])
if test x"$ac_c99_math" = x"no" || test x"$ac_c99_wchar" = x"no" \ if test x"$ac_c99_math" = x"no" || test x"$ac_c99_stdio" = x"no" \
|| test x"$ac_c99_stdlib" = x"no"; then || test x"$ac_c99_stdlib" = x"no" \
|| test x"$ac_c99_wchar" = x"no"; then
enable_c99=no; enable_c99=no;
fi; fi;
AC_MSG_RESULT($enable_c99) AC_MSG_RESULT($enable_c99)
......
...@@ -141,6 +141,10 @@ LIB_AC_PROG_CXX ...@@ -141,6 +141,10 @@ LIB_AC_PROG_CXX
# automake happy, but we dont execute it, since we dont care about # automake happy, but we dont execute it, since we dont care about
# the result. # the result.
if false; then 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 AC_EXEEXT
fi fi
...@@ -616,7 +620,6 @@ AC_DEFUN(GLIBCPP_CHECK_STDLIB_SUPPORT, [ ...@@ -616,7 +620,6 @@ AC_DEFUN(GLIBCPP_CHECK_STDLIB_SUPPORT, [
ac_save_CXXFLAGS="$CXXFLAGS" ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS='-fno-builtins -D_GNU_SOURCE' CXXFLAGS='-fno-builtins -D_GNU_SOURCE'
AC_CHECK_FUNCS(strtof)
GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2(strtold) GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2(strtold)
AC_CHECK_FUNCS(drand48) AC_CHECK_FUNCS(drand48)
...@@ -1276,6 +1279,37 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl ...@@ -1276,6 +1279,37 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
[isunordered(0.0,0.0);],, [ac_c99_math=no]) [isunordered(0.0,0.0);],, [ac_c99_math=no])
AC_MSG_RESULT($ac_c99_math) 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. # Check for the existence in <stdlib.h> of lldiv_t, et. al.
ac_c99_stdlib=yes; ac_c99_stdlib=yes;
AC_MSG_CHECKING([for lldiv_t declaration]) AC_MSG_CHECKING([for lldiv_t declaration])
...@@ -1288,12 +1322,17 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl ...@@ -1288,12 +1322,17 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>]) AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
AC_TRY_COMPILE([#include <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]) [char* tmp; strtoll("gnu", &tmp, 10);],, [ac_c99_stdlib=no])
AC_TRY_COMPILE([#include <stdlib.h>], AC_TRY_COMPILE([#include <stdlib.h>],
[char* tmp; strtoull("gnu", &tmp, 10);],, [ac_c99_stdlib=no]) [char* tmp; strtoull("gnu", &tmp, 10);],, [ac_c99_stdlib=no])
AC_TRY_COMPILE([#include <stdlib.h>], [llabs(10);],, [ac_c99_stdlib=no]) 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>], [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>], [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 if test x"$ac_c99_lldiv_t" = x"no"; then
ac_c99_stdlib=no; ac_c99_stdlib=no;
fi; fi;
...@@ -1311,8 +1350,9 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl ...@@ -1311,8 +1350,9 @@ AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
AC_MSG_RESULT($ac_c99_wchar) AC_MSG_RESULT($ac_c99_wchar)
AC_MSG_CHECKING([for enabled ISO C99 support]) AC_MSG_CHECKING([for enabled ISO C99 support])
if test x"$ac_c99_math" = x"no" || test x"$ac_c99_wchar" = x"no" \ if test x"$ac_c99_math" = x"no" || test x"$ac_c99_stdio" = x"no" \
|| test x"$ac_c99_stdlib" = x"no"; then || test x"$ac_c99_stdlib" = x"no" \
|| test x"$ac_c99_wchar" = x"no"; then
enable_c99=no; enable_c99=no;
fi; fi;
AC_MSG_RESULT($enable_c99) AC_MSG_RESULT($enable_c99)
......
...@@ -459,9 +459,6 @@ ...@@ -459,9 +459,6 @@
/* Define if you have the sqrtl function. */ /* Define if you have the sqrtl function. */
#undef HAVE_SQRTL #undef HAVE_SQRTL
/* Define if you have the strtof function. */
#undef HAVE_STRTOF
/* Define if you have the strtold function. */ /* Define if you have the strtold function. */
#undef HAVE_STRTOLD #undef HAVE_STRTOLD
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -571,7 +571,7 @@ namespace std ...@@ -571,7 +571,7 @@ namespace std
// Stage 2: convert and store results. // Stage 2: convert and store results.
char* __sanity; char* __sanity;
errno = 0; errno = 0;
#ifdef _GLIBCPP_HAVE_STRTOF #ifdef _GLIBCPP_USE_C99
float __f = strtof(__xtrc, &__sanity); float __f = strtof(__xtrc, &__sanity);
#else #else
float __f = static_cast<float>(strtod(__xtrc, &__sanity)); float __f = static_cast<float>(strtod(__xtrc, &__sanity));
...@@ -611,7 +611,7 @@ namespace std ...@@ -611,7 +611,7 @@ namespace std
return __beg; return __beg;
} }
#if defined(_GLIBCPP_HAVE_STRTOLD) && !defined(__hpux) #if defined(_GLIBCPP_USE_C99) && !defined(__hpux)
template<typename _CharT, typename _InIter> template<typename _CharT, typename _InIter>
_InIter _InIter
num_get<_CharT, _InIter>:: num_get<_CharT, _InIter>::
......
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
#ifndef _CPP_BITS_CMATH_TCC #ifndef _CPP_BITS_CMATH_TCC
#define _CPP_BITS_CMATH_TCC 1 #define _CPP_BITS_CMATH_TCC 1
namespace std { namespace std
{
export template<typename _Tp> export template<typename _Tp>
_Tp _Tp
__cmath_power(_Tp __x, unsigned int __n) __cmath_power(_Tp __x, unsigned int __n)
......
...@@ -495,7 +495,7 @@ namespace std ...@@ -495,7 +495,7 @@ namespace std
inline long double inline long double
tanh(long double __x) { return ::tanh(static_cast<double>(__x)); } tanh(long double __x) { return ::tanh(static_cast<double>(__x)); }
#endif #endif
} // std }
#if _GLIBCPP_USE_C99 #if _GLIBCPP_USE_C99
...@@ -556,7 +556,7 @@ namespace __gnu_cxx ...@@ -556,7 +556,7 @@ namespace __gnu_cxx
int int
__capture_isunordered(_Tp __f1, _Tp __f2) __capture_isunordered(_Tp __f1, _Tp __f2)
{ return isunordered(__f1, __f2); } { return isunordered(__f1, __f2); }
} // namespace __gnu_cxx }
#endif #endif
#undef fpclassify #undef fpclassify
...@@ -651,3 +651,6 @@ namespace std ...@@ -651,3 +651,6 @@ namespace std
#endif #endif
#endif #endif
...@@ -34,106 +34,128 @@ ...@@ -34,106 +34,128 @@
#ifndef _CPP_CSTDIO #ifndef _CPP_CSTDIO
#define _CPP_CSTDIO 1 #define _CPP_CSTDIO 1
#include <bits/c++config.h>
#include <bits/std_cstddef.h> #include <bits/std_cstddef.h>
#pragma GCC system_header #pragma GCC system_header
#include_next <stdio.h> #include_next <stdio.h>
// Get rid of those macros defined in <stdio.h> in lieu of real functions. // Get rid of those macros defined in <stdio.h> in lieu of real functions.
#undef remove #undef clearerr
#undef rename
#undef tmpfile
#undef tmpnam
#undef fclose #undef fclose
#undef feof
#undef ferror
#undef fflush #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 fgetc
#undef fgetpos
#undef fgets #undef fgets
#undef fopen
#undef fprintf
#undef fputc #undef fputc
#undef fputs #undef fputs
#undef fread
#undef freopen
#undef fscanf
#undef fseek
#undef fsetpos
#undef ftell
#undef fwrite
#undef getc #undef getc
#undef getchar #undef getchar
#undef gets #undef gets
#undef perror
#undef printf
#undef putc #undef putc
#undef putchar #undef putchar
#undef puts #undef puts
#undef ungetc #undef remove
#undef fread #undef rename
#undef fwrite
#undef fgetpos
#undef fseek
#undef fsetpos
#undef ftell
#undef rewind #undef rewind
#undef clearerr #undef scanf
#undef feof #undef setbuf
#undef ferror #undef setvbuf
#undef perror #undef sprintf
#undef sscanf
#undef tmpfile
#undef tmpnam
#undef ungetc
#undef vfprintf
#undef vprintf
#undef vsprintf
namespace std namespace std
{ {
using ::FILE; using ::FILE;
using ::fpos_t; using ::fpos_t;
using ::remove; using ::clearerr;
using ::rename;
using ::tmpfile;
using ::tmpnam;
using ::fclose; using ::fclose;
using ::feof;
using ::ferror;
using ::fflush; 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 ::fgetc;
using ::fgetpos;
using ::fgets; using ::fgets;
using ::fopen;
using ::fprintf;
using ::fputc; using ::fputc;
using ::fputs; using ::fputs;
using ::fread;
using ::freopen;
using ::fscanf;
using ::fseek;
using ::fsetpos;
using ::ftell;
using ::fwrite;
using ::getc; using ::getc;
using ::getchar; using ::getchar;
using ::gets; using ::gets;
using ::perror;
using ::printf;
using ::putc; using ::putc;
using ::putchar; using ::putchar;
using ::puts; using ::puts;
using ::ungetc; using ::remove;
using ::fread; using ::rename;
using ::fwrite;
using ::fgetpos;
using ::fseek;
using ::fsetpos;
using ::ftell;
using ::rewind; using ::rewind;
using ::clearerr; using ::scanf;
using ::feof; using ::setbuf;
using ::ferror; using ::setvbuf;
using ::perror; 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 #endif
...@@ -41,92 +41,91 @@ ...@@ -41,92 +41,91 @@
#include_next <stdlib.h> #include_next <stdlib.h>
// Get rid of those macros defined in <stdlib.h> in lieu of real functions. // Get rid of those macros defined in <stdlib.h> in lieu of real functions.
#undef abort
#undef abs
#undef atexit
#undef atof #undef atof
#undef atoi #undef atoi
#undef atol #undef atol
#undef strtod #undef bsearch
#undef strtof
#undef strtol
#undef strtoul
#undef rand
#undef srand
#undef calloc #undef calloc
#undef free #undef div
#undef malloc
#undef realloc
#undef abort
#undef atexit
#undef exit #undef exit
//#undef _Exit #undef free
#undef getenv #undef getenv
#undef system
#undef bsearch
#undef qsort
#undef abs
#undef labs #undef labs
#undef llabs
#undef div
#undef ldiv #undef ldiv
#undef lldiv #undef malloc
#undef mblen #undef mblen
#undef mbtowc
#undef wctomb
#undef mbstowcs #undef mbstowcs
#undef mbtowc
#undef qsort
#undef rand
#undef realloc
#undef srand
#undef strtod
#undef strtol
#undef strtoul
#undef system
#undef wcstombs #undef wcstombs
#undef atoll #undef wctomb
#undef strtoll
#undef strtoull
#undef strtold
namespace std namespace std
{ {
using ::div_t; using ::div_t;
using ::ldiv_t; using ::ldiv_t;
using ::abort;
using ::abs;
using ::atexit;
using ::atof; using ::atof;
using ::atoi; using ::atoi;
using ::atol; using ::atol;
using ::strtod; using ::bsearch;
#if _GLIBCPP_HAVE_STRTOF
using ::strtof;
#endif
using ::strtol;
using ::strtoul;
using ::rand;
using ::srand;
using ::calloc; using ::calloc;
using ::free; using ::div;
using ::malloc;
using ::realloc;
using ::abort;
using ::atexit;
using ::exit; using ::exit;
// using ::_Exit; using ::free;
using ::getenv; using ::getenv;
using ::system;
using ::bsearch;
using ::qsort;
using ::abs;
using ::labs; using ::labs;
using ::div;
using ::ldiv; using ::ldiv;
using ::malloc;
using ::mblen; using ::mblen;
using ::mbtowc;
using ::wctomb;
using ::mbstowcs; using ::mbstowcs;
using ::mbtowc;
using ::qsort;
using ::rand;
using ::realloc;
using ::srand;
using ::strtod;
using ::strtol;
using ::strtoul;
using ::system;
using ::wcstombs; using ::wcstombs;
using ::wctomb;
inline long inline long
abs(long __i) { return labs(__i); } abs(long __i) { return labs(__i); }
inline ldiv_t inline ldiv_t
div(long __i, long __j) { return ldiv(__i, __j); } div(long __i, long __j) { return ldiv(__i, __j); }
} // namespace std }
#if _GLIBCPP_USE_C99 #if _GLIBCPP_USE_C99
#undef _Exit
#undef llabs
#undef lldiv
#undef atoll
#undef strtoll
#undef strtoull
#undef strtof
#undef strtold
namespace __gnu_cxx namespace __gnu_cxx
{ {
using ::lldiv_t; using ::lldiv_t;
using ::_Exit;
inline long long inline long long
abs(long long __x) { return __x >= 0 ? __x : -__x; } abs(long long __x) { return __x >= 0 ? __x : -__x; }
...@@ -143,27 +142,25 @@ namespace __gnu_cxx ...@@ -143,27 +142,25 @@ namespace __gnu_cxx
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
using ::atoll; using ::atoll;
using ::strtof;
using ::strtoll; using ::strtoll;
using ::strtoull; using ::strtoull;
#ifdef _GLIBCPP_HAVE_STRTOLD
using ::strtold; using ::strtold;
#endif }
} // namespace __gnu_cxx
namespace std namespace std
{ {
using __gnu_cxx::lldiv_t; using __gnu_cxx::lldiv_t;
using __gnu_cxx::_Exit;
using __gnu_cxx::abs; using __gnu_cxx::abs;
using __gnu_cxx::llabs; using __gnu_cxx::llabs;
using __gnu_cxx::div; using __gnu_cxx::div;
using __gnu_cxx::lldiv; using __gnu_cxx::lldiv;
using __gnu_cxx::atoll; using __gnu_cxx::atoll;
using __gnu_cxx::strtof;
using __gnu_cxx::strtoll; using __gnu_cxx::strtoll;
using __gnu_cxx::strtoull; using __gnu_cxx::strtoull;
#ifdef _GLIBCPP_HAVE_STRTOLD
using __gnu_cxx::strtold; using __gnu_cxx::strtold;
#endif
} }
#endif #endif
......
...@@ -112,7 +112,6 @@ namespace std ...@@ -112,7 +112,6 @@ namespace std
#undef wmemmove #undef wmemmove
#undef wmemset #undef wmemset
#undef wcsftime #undef wcsftime
#undef wcschr #undef wcschr
#undef wcspbrk #undef wcspbrk
#undef wcsrchr #undef wcsrchr
...@@ -212,6 +211,11 @@ namespace std ...@@ -212,6 +211,11 @@ namespace std
} }
#if _GLIBCPP_USE_C99 #if _GLIBCPP_USE_C99
#undef wcstold
#undef wcstoll
#undef wcstoull
namespace __gnu_cxx namespace __gnu_cxx
{ {
using ::wcstold; using ::wcstold;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment