summaryrefslogtreecommitdiffstats
path: root/contrib/libstdc++/include/c_std/std_cstdio.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libstdc++/include/c_std/std_cstdio.h')
-rw-r--r--contrib/libstdc++/include/c_std/std_cstdio.h60
1 files changed, 33 insertions, 27 deletions
diff --git a/contrib/libstdc++/include/c_std/std_cstdio.h b/contrib/libstdc++/include/c_std/std_cstdio.h
index f31e58e..3935ef4 100644
--- a/contrib/libstdc++/include/c_std/std_cstdio.h
+++ b/contrib/libstdc++/include/c_std/std_cstdio.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, 2004, 2005
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -16,7 +16,7 @@
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
@@ -28,19 +28,20 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-//
-// ISO C++ 14882: 27.8.2 C Library files
-//
-
-/** @file cstdio
+/** @file include/cstdio
* This is a Standard C++ Library file. You should @c #include this file
* in your programs, rather than any of the "*.h" implementation files.
*
* This is the C++ version of the Standard C Library header @c stdio.h,
* and its contents are (mostly) the same as that header, but are all
- * contained in the namespace @c std.
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
*/
+//
+// ISO C++ 14882: 27.8.2 C Library files
+//
+
#ifndef _GLIBCXX_CSTDIO
#define _GLIBCXX_CSTDIO 1
@@ -94,8 +95,8 @@
#undef vprintf
#undef vsprintf
-namespace std
-{
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
using ::FILE;
using ::fpos_t;
@@ -140,7 +141,8 @@ namespace std
using ::vfprintf;
using ::vprintf;
using ::vsprintf;
-}
+
+_GLIBCXX_END_NAMESPACE
#if _GLIBCXX_USE_C99
@@ -150,19 +152,20 @@ namespace std
#undef vsnprintf
#undef vsscanf
-namespace __gnu_cxx
-{
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
#if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
extern "C" int
- (snprintf)(char * restrict, size_t, const char * restrict, ...);
+ (snprintf)(char * restrict, size_t, const char * restrict, ...);
extern "C" int
- (vfscanf)(FILE * restrict, const char * restrict, __gnuc_va_list);
+ (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);
+ (vsnprintf)(char * restrict, size_t, const char * restrict, __gnuc_va_list);
extern "C" int
- (vsscanf)(const char * restrict, const char * restrict, __gnuc_va_list);
+ (vsscanf)(const char * restrict, const char * restrict, __gnuc_va_list);
#endif
+
#if !_GLIBCXX_USE_C99_DYNAMIC
using ::snprintf;
using ::vfscanf;
@@ -170,16 +173,19 @@ namespace __gnu_cxx
using ::vsnprintf;
using ::vsscanf;
#endif
-}
-
-namespace std
-{
- using __gnu_cxx::snprintf;
- using __gnu_cxx::vfscanf;
- using __gnu_cxx::vscanf;
- using __gnu_cxx::vsnprintf;
- using __gnu_cxx::vsscanf;
-}
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::__gnu_cxx::snprintf;
+ using ::__gnu_cxx::vfscanf;
+ using ::__gnu_cxx::vscanf;
+ using ::__gnu_cxx::vsnprintf;
+ using ::__gnu_cxx::vsscanf;
+
+_GLIBCXX_END_NAMESPACE
+
#endif
#endif
OpenPOWER on IntegriCloud