summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/include/c_std
diff options
context:
space:
mode:
authorljrittle <ljrittle@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-18 09:53:58 +0000
committerljrittle <ljrittle@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-18 09:53:58 +0000
commit8fb55fe1967b15e53bfc4e6369bfeceddf897fe1 (patch)
tree0c5238f50226beeb4ebca7e5a0120a5db7fac2b9 /libstdc++-v3/include/c_std
parent139d24614be9da2ad300a6b06aec882d2cb7cf50 (diff)
downloadppe42-gcc-8fb55fe1967b15e53bfc4e6369bfeceddf897fe1.tar.gz
ppe42-gcc-8fb55fe1967b15e53bfc4e6369bfeceddf897fe1.zip
* docs/html/17_intro/porting.texi (_GLIBCPP_USE_C99_CHECK): New macro.
(_GLIBCPP_USE_C99_DYNAMIC): New macro. (_GLIBCPP_USE_C99_LONG_LONG_CHECK): New macro. (_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC): New macro. * config/os/bsd/freebsd/os_defines.h (_GLIBCPP_USE_C99_CHECK): New macro. (_GLIBCPP_USE_C99_DYNAMIC): New macro. (_GLIBCPP_USE_C99_LONG_LONG_CHECK): New macro. (_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC): New macro. * include/c_std/std_cstdlib.h: Use new macros. * include/c_std/std_cstdio.h: Use new macros. * include/c_std/std_cwchar.h: Use new macros. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65778 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/c_std')
-rw-r--r--libstdc++-v3/include/c_std/std_cstdio.h15
-rw-r--r--libstdc++-v3/include/c_std/std_cstdlib.h26
-rw-r--r--libstdc++-v3/include/c_std/std_cwchar.h16
3 files changed, 53 insertions, 4 deletions
diff --git a/libstdc++-v3/include/c_std/std_cstdio.h b/libstdc++-v3/include/c_std/std_cstdio.h
index 6fb8c79fb3d..3b4a6856739 100644
--- a/libstdc++-v3/include/c_std/std_cstdio.h
+++ b/libstdc++-v3/include/c_std/std_cstdio.h
@@ -1,6 +1,6 @@
// -*- C++ -*- forwarding header.
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -152,11 +152,24 @@ namespace std
namespace __gnu_cxx
{
+#if _GLIBCPP_USE_C99_CHECK || _GLIBCPP_USE_C99_DYNAMIC
+ extern "C" int
+ (snprintf)(char * restrict, size_t, const char * restrict, ...);
+ extern "C" int
+ (vfscanf)(FILE * restrict, const char * restrict, __gnuc_va_list);
+ extern "C" int (vscanf)(const char * restrict, __gnuc_va_list);
+ extern "C" int
+ (vsnprintf)(char * restrict, size_t, const char * restrict, __gnuc_va_list);
+ extern "C" int
+ (vsscanf)(const char * restrict, const char * restrict, __gnuc_va_list);
+#endif
+#if !_GLIBCPP_USE_C99_DYNAMIC
using ::snprintf;
using ::vfscanf;
using ::vscanf;
using ::vsnprintf;
using ::vsscanf;
+#endif
}
namespace std
diff --git a/libstdc++-v3/include/c_std/std_cstdlib.h b/libstdc++-v3/include/c_std/std_cstdlib.h
index 70fc8d3452e..e1436be1d7a 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
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -135,8 +135,15 @@ namespace std
namespace __gnu_cxx
{
+#if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC
using ::lldiv_t;
+#endif
+#if _GLIBCPP_USE_C99_CHECK || _GLIBCPP_USE_C99_DYNAMIC
+ extern "C" void (_Exit)(int);
+#endif
+#if !_GLIBCPP_USE_C99_DYNAMIC
using ::_Exit;
+#endif
inline long long
abs(long long __x) { return __x >= 0 ? __x : -__x; }
@@ -144,6 +151,7 @@ namespace __gnu_cxx
inline long long
llabs(long long __x) { return __x >= 0 ? __x : -__x; }
+#if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC
inline lldiv_t
div(long long __n, long long __d)
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
@@ -151,22 +159,36 @@ namespace __gnu_cxx
inline lldiv_t
lldiv(long long __n, long long __d)
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
+#endif
+#if _GLIBCPP_USE_C99_LONG_LONG_CHECK || _GLIBCPP_USE_C99_LONG_LONG_DYNAMIC
+ extern "C" long long int (atoll)(const char *);
+ extern "C" long long int
+ (strtoll)(const char * restrict, char ** restrict, int);
+ extern "C" unsigned long long int
+ (strtoull)(const char * restrict, char ** restrict, int);
+#endif
+#if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC
using ::atoll;
- using ::strtof;
using ::strtoll;
using ::strtoull;
+#endif
+ using ::strtof;
using ::strtold;
}
namespace std
{
+#if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC
using __gnu_cxx::lldiv_t;
+#endif
using __gnu_cxx::_Exit;
using __gnu_cxx::abs;
using __gnu_cxx::llabs;
+#if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC
using __gnu_cxx::div;
using __gnu_cxx::lldiv;
+#endif
using __gnu_cxx::atoll;
using __gnu_cxx::strtof;
using __gnu_cxx::strtoll;
diff --git a/libstdc++-v3/include/c_std/std_cwchar.h b/libstdc++-v3/include/c_std/std_cwchar.h
index f67f00610f5..8b33c52282f 100644
--- a/libstdc++-v3/include/c_std/std_cwchar.h
+++ b/libstdc++-v3/include/c_std/std_cwchar.h
@@ -1,6 +1,6 @@
// -*- C++ -*- forwarding header.
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -225,9 +225,23 @@ namespace std
namespace __gnu_cxx
{
+#if _GLIBCPP_USE_C99_CHECK || _GLIBCPP_USE_C99_DYNAMIC
+ extern "C" long double
+ (wcstold)(const wchar_t * restrict, wchar_t ** restrict);
+#endif
+#if !_GLIBCPP_USE_C99_DYNAMIC
using ::wcstold;
+#endif
+#if _GLIBCPP_USE_C99_LONG_LONG_CHECK || _GLIBCPP_USE_C99_LONG_LONG_DYNAMIC
+ extern "C" long long int
+ (wcstoll)(const wchar_t * restrict, wchar_t ** restrict, int);
+ extern "C" unsigned long long int
+ (wcstoull)(const wchar_t * restrict, wchar_t ** restrict, int);
+#endif
+#if !_GLIBCPP_USE_C99_LONG_LONG_DYNAMIC
using ::wcstoll;
using ::wcstoull;
+#endif
}
namespace std
OpenPOWER on IntegriCloud