aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/config/locale/gnu/c_locale.h
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/config/locale/gnu/c_locale.h')
-rw-r--r--libstdc++-v3/config/locale/gnu/c_locale.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/libstdc++-v3/config/locale/gnu/c_locale.h b/libstdc++-v3/config/locale/gnu/c_locale.h
index 130b843d7f9..37df3fa3a3a 100644
--- a/libstdc++-v3/config/locale/gnu/c_locale.h
+++ b/libstdc++-v3/config/locale/gnu/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>
#include <langinfo.h> // For codecvt
#include <iconv.h> // For codecvt using iconv, iconv_t
@@ -53,6 +58,10 @@ namespace std
{
typedef __locale_t __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,
@@ -92,3 +101,5 @@ namespace std
return __ret;
}
}
+
+#endif