diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-26 15:46:48 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-26 15:46:48 +0000 |
commit | 4520d22181acbae2e9c990a1a14389b1048bff45 (patch) | |
tree | 7a5f4909b67f08a378aa148f04d96411c09a0e3a /libstdc++-v3/include/c_std | |
parent | 19ad94ad4104ca13b9801858d88028aea1a92100 (diff) | |
download | ppe42-gcc-4520d22181acbae2e9c990a1a14389b1048bff45.tar.gz ppe42-gcc-4520d22181acbae2e9c990a1a14389b1048bff45.zip |
2005-05-26 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/13943
* include/c_std/std_cstdlib.h: Do not open code llabs and lldiv,
available when _GLIBCXX_USE_C99 is defined.
* testsuite/26_numerics/cstdlib/13943.cc: New.
* acinclude.m4 ([GLIBCXX_ENABLE_C99]): For completeness, check
also strtoll and strtoull for ac_c99_stdlib.
* configure: Regenerate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100205 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/c_std')
-rw-r--r-- | libstdc++-v3/include/c_std/std_cstdlib.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/libstdc++-v3/include/c_std/std_cstdlib.h b/libstdc++-v3/include/c_std/std_cstdlib.h index 3fde655621a..cf91f27b2d3 100644 --- a/libstdc++-v3/include/c_std/std_cstdlib.h +++ b/libstdc++-v3/include/c_std/std_cstdlib.h @@ -1,6 +1,6 @@ // -*- C++ -*- forwarding header. -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -168,17 +168,14 @@ namespace __gnu_cxx inline long long abs(long long __x) { return __x >= 0 ? __x : -__x; } - inline long long - llabs(long long __x) { return __x >= 0 ? __x : -__x; } - #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC + using ::llabs; + 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; } + using ::lldiv; #endif #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC @@ -204,8 +201,8 @@ namespace std #endif using __gnu_cxx::_Exit; using __gnu_cxx::abs; - using __gnu_cxx::llabs; #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC + using __gnu_cxx::llabs; using __gnu_cxx::div; using __gnu_cxx::lldiv; #endif |