aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/c_std/bits/std_cstdio.h
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/c_std/bits/std_cstdio.h')
-rw-r--r--libstdc++-v3/include/c_std/bits/std_cstdio.h182
1 files changed, 94 insertions, 88 deletions
diff --git a/libstdc++-v3/include/c_std/bits/std_cstdio.h b/libstdc++-v3/include/c_std/bits/std_cstdio.h
index ba731a6af28..03d82214934 100644
--- a/libstdc++-v3/include/c_std/bits/std_cstdio.h
+++ b/libstdc++-v3/include/c_std/bits/std_cstdio.h
@@ -31,125 +31,131 @@
// ISO C++ 14882: 27.8.2 C Library files
//
-// Note: This is not a conforming implementation.
-
#ifndef _CPP_CSTDIO
#define _CPP_CSTDIO 1
#include <bits/c++config.h>
-#include <bits/std_cstdarg.h>
#include <bits/std_cstddef.h>
#pragma GCC system_header
-#include <stdio.h>
+#include_next <stdio.h>
// Get rid of those macros defined in <stdio.h> in lieu of real functions.
-#undef remove
-#undef rename
-#undef tmpfile
-#undef tmpnam
+#undef clearerr
#undef fclose
+#undef feof
+#undef ferror
#undef fflush
-#undef fopen
-#undef freopen
-#undef setbuf
-#undef setvbuf
-#undef fprintf
-#undef fscanf
-#undef printf
-#undef scanf
-#undef snprintf
-#undef sprintf
-#undef sscanf
-#undef vfprintf
-#undef vfscanf
-#undef vprintf
-#undef vscanf
-#undef vsnprintf
-#undef vsprintf
-#undef vsscanf
#undef fgetc
+#undef fgetpos
#undef fgets
+#undef fopen
+#undef fprintf
#undef fputc
#undef fputs
+#undef fread
+#undef freopen
+#undef fscanf
+#undef fseek
+#undef fsetpos
+#undef ftell
+#undef fwrite
#undef getc
#undef getchar
#undef gets
+#undef perror
+#undef printf
#undef putc
#undef putchar
#undef puts
-#undef ungetc
-#undef fread
-#undef fwrite
-#undef fgetpos
-#undef fseek
-#undef fsetpos
-#undef ftell
+#undef remove
+#undef rename
#undef rewind
-#undef clearerr
-#undef feof
-#undef ferror
-#undef perror
+#undef scanf
+#undef setbuf
+#undef setvbuf
+#undef sprintf
+#undef sscanf
+#undef tmpfile
+#undef tmpnam
+#undef ungetc
+#undef vfprintf
+#undef vprintf
+#undef vsprintf
namespace std
{
using ::FILE;
using ::fpos_t;
- extern "C" int remove(const char*);
- extern "C" int rename(const char*, const char*);
- extern "C" FILE* tmpfile(void);
- extern "C" char* tmpnam(char*);
- extern "C" int fclose(FILE*);
- extern "C" int fflush(FILE*);
- extern "C" FILE* fopen(const char*, const char*);
- extern "C" FILE* freopen(const char*, const char*, FILE*);
- extern "C" void setbuf(FILE*, char*);
- extern "C" int setvbuf(FILE*, char*, int, size_t);
- extern "C" int fprintf(FILE*, const char*, ...);
- extern "C" int fscanf(FILE*, const char*, ...);
- extern "C" int printf(const char*, ...);
- extern "C" int scanf(const char*, ...);
- extern "C" int snprintf(char *, size_t, const char*, ...);
- extern "C" int sprintf(char *, const char*, ...);
- extern "C" int sscanf(const char*, const char*, ...);
- extern "C" int vfprintf(FILE*, const char*, va_list);
- extern "C" int vfscanf(FILE*, const char*, va_list);
- extern "C" int vprintf(const char*, va_list);
- extern "C" int vscanf(const char*, va_list);
- extern "C" int vsnprintf(char*, size_t, const char*, va_list);
- extern "C" int vsprintf(char*, const char*, va_list);
- extern "C" int vsscanf(const char*, const char*, va_list);
- extern "C" int fgetc(FILE *);
- extern "C" char *fgets(char*, int, FILE*);
- extern "C" int fputc(int, FILE*);
- extern "C" int fputs(const char*, FILE*);
- extern "C" int getc(FILE*);
- extern "C" int getchar(void);
- extern "C" char *gets(char*);
- extern "C" int putc(int, FILE*);
- extern "C" int putchar(int);
- extern "C" int puts(const char*);
- extern "C" int ungetc(int, FILE*);
- extern "C" size_t fread(void*, size_t, size_t, FILE*);
- extern "C" size_t fwrite(const void*, size_t, size_t, FILE*);
- extern "C" int fgetpos(FILE*, fpos_t*);
- extern "C" int fseek(FILE*, long int, int);
- extern "C" int fsetpos(FILE*, const fpos_t*);
- extern "C" long int ftell(FILE*);
- extern "C" void rewind(FILE*);
- extern "C" void clearerr(FILE*);
- extern "C" int feof(FILE*);
- extern "C" int ferror(FILE*);
- extern "C" void perror(const char*);
+ using ::clearerr;
+ using ::fclose;
+ using ::feof;
+ using ::ferror;
+ using ::fflush;
+ using ::fgetc;
+ using ::fgetpos;
+ using ::fgets;
+ using ::fopen;
+ using ::fprintf;
+ using ::fputc;
+ using ::fputs;
+ using ::fread;
+ using ::freopen;
+ using ::fscanf;
+ using ::fseek;
+ using ::fsetpos;
+ using ::ftell;
+ using ::fwrite;
+ using ::getc;
+ using ::getchar;
+ using ::gets;
+ using ::perror;
+ using ::printf;
+ using ::putc;
+ using ::putchar;
+ using ::puts;
+ using ::remove;
+ using ::rename;
+ using ::rewind;
+ using ::scanf;
+ using ::setbuf;
+ using ::setvbuf;
+ using ::sprintf;
+ using ::sscanf;
+ using ::tmpfile;
+ using ::tmpnam;
+ using ::ungetc;
+ using ::vfprintf;
+ using ::vprintf;
+ using ::vsprintf;
}
-#endif
-
-
-
-
+#if _GLIBCPP_USE_C99
+#undef snprintf
+#undef vfscanf
+#undef vscanf
+#undef vsnprintf
+#undef vsscanf
+namespace __gnu_cxx
+{
+ using ::snprintf;
+ using ::vfscanf;
+ using ::vscanf;
+ using ::vsnprintf;
+ using ::vsscanf;
+}
+namespace std
+{
+ using __gnu_cxx::snprintf;
+ using __gnu_cxx::vfscanf;
+ using __gnu_cxx::vscanf;
+ using __gnu_cxx::vsnprintf;
+ using __gnu_cxx::vsscanf;
+}
+#endif
+#endif