197403Sobrien// -*- C++ -*- forwarding header. 297403Sobrien 3169691Skan// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 497403Sobrien// Free Software Foundation, Inc. 597403Sobrien// 697403Sobrien// This file is part of the GNU ISO C++ Library. This library is free 797403Sobrien// software; you can redistribute it and/or modify it under the 897403Sobrien// terms of the GNU General Public License as published by the 997403Sobrien// Free Software Foundation; either version 2, or (at your option) 1097403Sobrien// any later version. 1197403Sobrien 1297403Sobrien// This library is distributed in the hope that it will be useful, 1397403Sobrien// but WITHOUT ANY WARRANTY; without even the implied warranty of 1497403Sobrien// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1597403Sobrien// GNU General Public License for more details. 1697403Sobrien 1797403Sobrien// You should have received a copy of the GNU General Public License along 1897403Sobrien// with this library; see the file COPYING. If not, write to the Free 19169691Skan// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 2097403Sobrien// USA. 2197403Sobrien 2297403Sobrien// As a special exception, you may use this file as part of a free software 2397403Sobrien// library without restriction. Specifically, if other files instantiate 2497403Sobrien// templates or use macros or inline functions from this file, or you compile 2597403Sobrien// this file and link it with other files to produce an executable, this 2697403Sobrien// file does not by itself cause the resulting executable to be covered by 2797403Sobrien// the GNU General Public License. This exception does not however 2897403Sobrien// invalidate any other reasons why the executable file might be covered by 2997403Sobrien// the GNU General Public License. 3097403Sobrien 31169691Skan/** @file include/cstdio 3297403Sobrien * This is a Standard C++ Library file. You should @c #include this file 3397403Sobrien * in your programs, rather than any of the "*.h" implementation files. 3497403Sobrien * 3597403Sobrien * This is the C++ version of the Standard C Library header @c stdio.h, 3697403Sobrien * and its contents are (mostly) the same as that header, but are all 37169691Skan * contained in the namespace @c std (except for names which are defined 38169691Skan * as macros in C). 3997403Sobrien */ 4097403Sobrien 41169691Skan// 42169691Skan// ISO C++ 14882: 27.8.2 C Library files 43169691Skan// 44169691Skan 45132720Skan#ifndef _GLIBCXX_CSTDIO 46132720Skan#define _GLIBCXX_CSTDIO 1 4797403Sobrien 4897403Sobrien#pragma GCC system_header 4997403Sobrien 5097403Sobrien#include <bits/c++config.h> 5197403Sobrien#include <cstddef> 5297403Sobrien 5397403Sobrien#include <stdio.h> 5497403Sobrien 5597403Sobrien// Get rid of those macros defined in <stdio.h> in lieu of real functions. 5697403Sobrien#undef clearerr 5797403Sobrien#undef fclose 5897403Sobrien#undef feof 5997403Sobrien#undef ferror 6097403Sobrien#undef fflush 6197403Sobrien#undef fgetc 6297403Sobrien#undef fgetpos 6397403Sobrien#undef fgets 6497403Sobrien#undef fopen 6597403Sobrien#undef fprintf 6697403Sobrien#undef fputc 6797403Sobrien#undef fputs 6897403Sobrien#undef fread 6997403Sobrien#undef freopen 7097403Sobrien#undef fscanf 7197403Sobrien#undef fseek 7297403Sobrien#undef fsetpos 7397403Sobrien#undef ftell 7497403Sobrien#undef fwrite 7597403Sobrien#undef getc 7697403Sobrien#undef getchar 7797403Sobrien#undef gets 7897403Sobrien#undef perror 7997403Sobrien#undef printf 8097403Sobrien#undef putc 8197403Sobrien#undef putchar 8297403Sobrien#undef puts 8397403Sobrien#undef remove 8497403Sobrien#undef rename 8597403Sobrien#undef rewind 8697403Sobrien#undef scanf 8797403Sobrien#undef setbuf 8897403Sobrien#undef setvbuf 8997403Sobrien#undef sprintf 9097403Sobrien#undef sscanf 9197403Sobrien#undef tmpfile 9297403Sobrien#undef tmpnam 9397403Sobrien#undef ungetc 9497403Sobrien#undef vfprintf 9597403Sobrien#undef vprintf 9697403Sobrien#undef vsprintf 9797403Sobrien 98169691Skan_GLIBCXX_BEGIN_NAMESPACE(std) 99169691Skan 10097403Sobrien using ::FILE; 10197403Sobrien using ::fpos_t; 10297403Sobrien 10397403Sobrien using ::clearerr; 10497403Sobrien using ::fclose; 10597403Sobrien using ::feof; 10697403Sobrien using ::ferror; 10797403Sobrien using ::fflush; 10897403Sobrien using ::fgetc; 10997403Sobrien using ::fgetpos; 11097403Sobrien using ::fgets; 11197403Sobrien using ::fopen; 11297403Sobrien using ::fprintf; 11397403Sobrien using ::fputc; 11497403Sobrien using ::fputs; 11597403Sobrien using ::fread; 11697403Sobrien using ::freopen; 11797403Sobrien using ::fscanf; 11897403Sobrien using ::fseek; 11997403Sobrien using ::fsetpos; 12097403Sobrien using ::ftell; 12197403Sobrien using ::fwrite; 12297403Sobrien using ::getc; 12397403Sobrien using ::getchar; 12497403Sobrien using ::gets; 12597403Sobrien using ::perror; 12697403Sobrien using ::printf; 12797403Sobrien using ::putc; 12897403Sobrien using ::putchar; 12997403Sobrien using ::puts; 13097403Sobrien using ::remove; 13197403Sobrien using ::rename; 13297403Sobrien using ::rewind; 13397403Sobrien using ::scanf; 13497403Sobrien using ::setbuf; 13597403Sobrien using ::setvbuf; 13697403Sobrien using ::sprintf; 13797403Sobrien using ::sscanf; 13897403Sobrien using ::tmpfile; 13997403Sobrien using ::tmpnam; 14097403Sobrien using ::ungetc; 14197403Sobrien using ::vfprintf; 14297403Sobrien using ::vprintf; 14397403Sobrien using ::vsprintf; 14497403Sobrien 145169691Skan_GLIBCXX_END_NAMESPACE 146169691Skan 147132720Skan#if _GLIBCXX_USE_C99 14897403Sobrien 14997403Sobrien#undef snprintf 15097403Sobrien#undef vfscanf 15197403Sobrien#undef vscanf 15297403Sobrien#undef vsnprintf 15397403Sobrien#undef vsscanf 15497403Sobrien 155169691Skan_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) 156169691Skan 157132720Skan#if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC 158117397Skan extern "C" int 159169691Skan (snprintf)(char * restrict, size_t, const char * restrict, ...); 160117397Skan extern "C" int 161169691Skan (vfscanf)(FILE * restrict, const char * restrict, __gnuc_va_list); 162117397Skan extern "C" int (vscanf)(const char * restrict, __gnuc_va_list); 163117397Skan extern "C" int 164169691Skan (vsnprintf)(char * restrict, size_t, const char * restrict, __gnuc_va_list); 165117397Skan extern "C" int 166169691Skan (vsscanf)(const char * restrict, const char * restrict, __gnuc_va_list); 167117397Skan#endif 168169691Skan 169132720Skan#if !_GLIBCXX_USE_C99_DYNAMIC 17097403Sobrien using ::snprintf; 17197403Sobrien using ::vfscanf; 17297403Sobrien using ::vscanf; 17397403Sobrien using ::vsnprintf; 17497403Sobrien using ::vsscanf; 175117397Skan#endif 17697403Sobrien 177169691Skan_GLIBCXX_END_NAMESPACE 178169691Skan 179169691Skan_GLIBCXX_BEGIN_NAMESPACE(std) 180169691Skan 181169691Skan using ::__gnu_cxx::snprintf; 182169691Skan using ::__gnu_cxx::vfscanf; 183169691Skan using ::__gnu_cxx::vscanf; 184169691Skan using ::__gnu_cxx::vsnprintf; 185169691Skan using ::__gnu_cxx::vsscanf; 186169691Skan 187169691Skan_GLIBCXX_END_NAMESPACE 188169691Skan 189132720Skan#endif 19097403Sobrien 19197403Sobrien#endif 192