1227825Stheraven// -*- C++ -*- 2227825Stheraven//===---------------------------- cstdio ----------------------------------===// 3227825Stheraven// 4227825Stheraven// The LLVM Compiler Infrastructure 5227825Stheraven// 6227825Stheraven// This file is dual licensed under the MIT and the University of Illinois Open 7227825Stheraven// Source Licenses. See LICENSE.TXT for details. 8227825Stheraven// 9227825Stheraven//===----------------------------------------------------------------------===// 10227825Stheraven 11227825Stheraven#ifndef _LIBCPP_CSTDIO 12227825Stheraven#define _LIBCPP_CSTDIO 13227825Stheraven 14227825Stheraven/* 15227825Stheraven cstdio synopsis 16227825Stheraven 17227825StheravenMacros: 18227825Stheraven 19227825Stheraven BUFSIZ 20227825Stheraven EOF 21227825Stheraven FILENAME_MAX 22227825Stheraven FOPEN_MAX 23227825Stheraven L_tmpnam 24227825Stheraven NULL 25227825Stheraven SEEK_CUR 26227825Stheraven SEEK_END 27227825Stheraven SEEK_SET 28227825Stheraven TMP_MAX 29227825Stheraven _IOFBF 30227825Stheraven _IOLBF 31227825Stheraven _IONBF 32227825Stheraven stderr 33227825Stheraven stdin 34227825Stheraven stdout 35227825Stheraven 36227825Stheravennamespace std 37227825Stheraven{ 38227825Stheraven 39227825StheravenTypes: 40227825Stheraven 41227825StheravenFILE 42227825Stheravenfpos_t 43227825Stheravensize_t 44227825Stheraven 45227825Stheravenint remove(const char* filename); 46227825Stheravenint rename(const char* old, const char* new); 47227825StheravenFILE* tmpfile(void); 48227825Stheravenchar* tmpnam(char* s); 49227825Stheravenint fclose(FILE* stream); 50227825Stheravenint fflush(FILE* stream); 51227825StheravenFILE* fopen(const char* restrict filename, const char* restrict mode); 52227825StheravenFILE* freopen(const char* restrict filename, const char * restrict mode, 53227825Stheraven FILE * restrict stream); 54227825Stheravenvoid setbuf(FILE* restrict stream, char* restrict buf); 55227825Stheravenint setvbuf(FILE* restrict stream, char* restrict buf, int mode, size_t size); 56227825Stheravenint fprintf(FILE* restrict stream, const char* restrict format, ...); 57227825Stheravenint fscanf(FILE* restrict stream, const char * restrict format, ...); 58227825Stheravenint printf(const char* restrict format, ...); 59227825Stheravenint scanf(const char* restrict format, ...); 60227825Stheravenint snprintf(char* restrict s, size_t n, const char* restrict format, ...); // C99 61227825Stheravenint sprintf(char* restrict s, const char* restrict format, ...); 62227825Stheravenint sscanf(const char* restrict s, const char* restrict format, ...); 63227825Stheravenint vfprintf(FILE* restrict stream, const char* restrict format, va_list arg); 64227825Stheravenint vfscanf(FILE* restrict stream, const char* restrict format, va_list arg); // C99 65227825Stheravenint vprintf(const char* restrict format, va_list arg); 66227825Stheravenint vscanf(const char* restrict format, va_list arg); // C99 67227825Stheravenint vsnprintf(char* restrict s, size_t n, const char* restrict format, // C99 68227825Stheraven va_list arg); 69227825Stheravenint vsprintf(char* restrict s, const char* restrict format, va_list arg); 70227825Stheravenint vsscanf(const char* restrict s, const char* restrict format, va_list arg); // C99 71227825Stheravenint fgetc(FILE* stream); 72227825Stheravenchar* fgets(char* restrict s, int n, FILE* restrict stream); 73227825Stheravenint fputc(int c, FILE* stream); 74227825Stheravenint fputs(const char* restrict s, FILE* restrict stream); 75227825Stheravenint getc(FILE* stream); 76227825Stheravenint getchar(void); 77261272Sdimchar* gets(char* s); // removed in C++14 78227825Stheravenint putc(int c, FILE* stream); 79227825Stheravenint putchar(int c); 80227825Stheravenint puts(const char* s); 81227825Stheravenint ungetc(int c, FILE* stream); 82227825Stheravensize_t fread(void* restrict ptr, size_t size, size_t nmemb, 83227825Stheraven FILE* restrict stream); 84227825Stheravensize_t fwrite(const void* restrict ptr, size_t size, size_t nmemb, 85227825Stheraven FILE* restrict stream); 86227825Stheravenint fgetpos(FILE* restrict stream, fpos_t* restrict pos); 87227825Stheravenint fseek(FILE* stream, long offset, int whence); 88227825Stheravenint fsetpos(FILE*stream, const fpos_t* pos); 89227825Stheravenlong ftell(FILE* stream); 90227825Stheravenvoid rewind(FILE* stream); 91227825Stheravenvoid clearerr(FILE* stream); 92227825Stheravenint feof(FILE* stream); 93227825Stheravenint ferror(FILE* stream); 94227825Stheravenvoid perror(const char* s); 95227825Stheraven 96227825Stheraven} // std 97227825Stheraven*/ 98227825Stheraven 99227825Stheraven#include <__config> 100227825Stheraven#include <stdio.h> 101227825Stheraven 102227825Stheraven#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 103227825Stheraven#pragma GCC system_header 104227825Stheraven#endif 105227825Stheraven 106227825Stheraven_LIBCPP_BEGIN_NAMESPACE_STD 107227825Stheraven 108227825Stheravenusing ::FILE; 109227825Stheravenusing ::fpos_t; 110227825Stheravenusing ::size_t; 111227825Stheraven 112227825Stheravenusing ::fclose; 113227825Stheravenusing ::fflush; 114227825Stheravenusing ::setbuf; 115227825Stheravenusing ::setvbuf; 116227825Stheravenusing ::fprintf; 117227825Stheravenusing ::fscanf; 118227825Stheravenusing ::snprintf; 119227825Stheravenusing ::sprintf; 120227825Stheravenusing ::sscanf; 121261272Sdim#ifndef _LIBCPP_MSVCRT 122227825Stheravenusing ::vfprintf; 123227825Stheravenusing ::vfscanf; 124227825Stheravenusing ::vsscanf; 125261272Sdim#endif // _LIBCPP_MSVCRT 126227825Stheravenusing ::vsnprintf; 127227825Stheravenusing ::vsprintf; 128227825Stheravenusing ::fgetc; 129227825Stheravenusing ::fgets; 130227825Stheravenusing ::fputc; 131227825Stheravenusing ::fputs; 132227825Stheravenusing ::getc; 133227825Stheravenusing ::putc; 134227825Stheravenusing ::ungetc; 135227825Stheravenusing ::fread; 136227825Stheravenusing ::fwrite; 137227825Stheravenusing ::fgetpos; 138227825Stheravenusing ::fseek; 139227825Stheravenusing ::fsetpos; 140227825Stheravenusing ::ftell; 141227825Stheravenusing ::rewind; 142227825Stheravenusing ::clearerr; 143227825Stheravenusing ::feof; 144227825Stheravenusing ::ferror; 145227825Stheravenusing ::perror; 146227825Stheraven 147288943Sdim#ifndef _LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE 148288943Sdimusing ::fopen; 149288943Sdimusing ::freopen; 150288943Sdimusing ::remove; 151288943Sdimusing ::rename; 152288943Sdimusing ::tmpfile; 153288943Sdimusing ::tmpnam; 154288943Sdim#endif 155288943Sdim 156288943Sdim#ifndef _LIBCPP_HAS_NO_STDIN 157288943Sdimusing ::getchar; 158288943Sdim#if _LIBCPP_STD_VER <= 11 159288943Sdimusing ::gets; 160288943Sdim#endif 161288943Sdimusing ::scanf; 162288943Sdimusing ::vscanf; 163288943Sdim#endif 164288943Sdim 165288943Sdim#ifndef _LIBCPP_HAS_NO_STDOUT 166288943Sdimusing ::printf; 167288943Sdimusing ::putchar; 168288943Sdimusing ::puts; 169288943Sdimusing ::vprintf; 170288943Sdim#endif 171288943Sdim 172227825Stheraven_LIBCPP_END_NAMESPACE_STD 173227825Stheraven 174227825Stheraven#endif // _LIBCPP_CSTDIO 175