diff options
Diffstat (limited to 'libstdc++-v3/config/locale/generic/c_locale.h')
-rw-r--r-- | libstdc++-v3/config/locale/generic/c_locale.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libstdc++-v3/config/locale/generic/c_locale.h b/libstdc++-v3/config/locale/generic/c_locale.h index 9627d8646af..ccc1f2503e0 100644 --- a/libstdc++-v3/config/locale/generic/c_locale.h +++ b/libstdc++-v3/config/locale/generic/c_locale.h @@ -1,6 +1,6 @@ // Wrapper for underlying C-language localization -*- C++ -*- -// Copyright (C) 2001, 2002 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003 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 @@ -33,6 +33,11 @@ // Written by Benjamin Kosnik <bkoz@redhat.com> +#ifndef _CPP_BITS_C_LOCALE_H +#define _CPP_BITS_C_LOCALE_H 1 + +#pragma GCC system_header + #include <clocale> #define _GLIBCPP_NUM_CATEGORIES 0 @@ -41,6 +46,10 @@ namespace std { typedef int* __c_locale; + // Convert numeric value of type _Tv to string and return length of + // string. If snprintf is available use it, otherwise fall back to + // the unsafe sprintf which, in general, can be dangerous and should + // be avoided. template<typename _Tv> int __convert_from_v(char* __out, const int __size, const char* __fmt, @@ -69,3 +78,5 @@ namespace std return __ret; } } + +#endif |