Oh GACK! src-clean doesn't quite work that easily since cleandist rebuilds the
[unix-history] / gnu / lib / libg++ / g++-include / stdio.h
CommitLineData
32df4d03
PR
1// This may look like C code, but it is really -*- C++ -*-
2/*
3Copyright (C) 1988 Free Software Foundation
4 written by Doug Lea (dl@rocky.oswego.edu)
5
6This file is part of the GNU C++ Library. This library is free
7software; you can redistribute it and/or modify it under the terms of
8the GNU Library General Public License as published by the Free
9Software Foundation; either version 2 of the License, or (at your
10option) any later version. This library is distributed in the hope
11that it will be useful, but WITHOUT ANY WARRANTY; without even the
12implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13PURPOSE. See the GNU Library General Public License for more details.
14You should have received a copy of the GNU Library General Public
15License along with this library; if not, write to the Free Software
16Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
17*/
18
19#ifndef _stdio_h
20#ifdef __GNUG__
21#pragma interface
22#endif
23
24#ifdef __stdio_h_recursive
25#include_next <stdio.h>
26#else
27#define __stdio_h_recursive
28
29// Note: The #define _stdio_h is at the end of this file,
30// in case #include_next <stdio.h> finds an installed version of this
31// same file -- we want it to continue until it finds the C version.
32
33#include <_G_config.h>
34
35extern "C" {
36
37#undef NULL
38
39#define fdopen __hide_fdopen
40#define fopen __hide_fopen
41#define fprintf __hide_fprintf
42#define fputs __hide_fputs
43#define fread __hide_fread
44#define freopen __hide_freopen
45#define fscanf __hide_fscanf
46#define ftell __hide_ftell
47#define fwrite __hide_fwrite
48#define new __hide_new /* In case 'new' is used as a parameter name. */
49#define perror __hide_perror
50#define popen __hide_popen
51#define printf __hide_printf
52#define puts __hide_puts
53#define putw __hide_putw
54#define rewind __hide_rewind
55#define tempnam __hide_tempnam
56#define scanf __hide_scanf
57#define setbuf __hide_setbuf
58#define setbuffer __hide_setbuffer
59#define setlinebuf __hide_setlinebuf
60#define setvbuf __hide_setvbuf
61#define sprintf __hide_sprintf
62#define sscanf __hide_sscanf
63#define tempnam __hide_tempnam
64#define vfprintf __hide_vfprintf
65#define vprintf __hide_vprintf
66#define vsprintf __hide_vsprintf
67#define _flsbuf __hide__flsbuf
68
69#include_next <stdio.h>
70
71#undef fdopen
72#undef fopen
73#undef fprintf
74#undef fputs
75#undef fread
76#undef freopen
77#undef fscanf
78#undef ftell
79#undef fwrite
80#undef new
81#undef perror
82#undef popen
83#undef printf
84#undef puts
85#undef putw
86/* SCO defines remove to call unlink; that's very dangerous for us. */
87#undef remove
88#undef rewind
89#undef tempnam
90#undef scanf
91#undef setbuf
92#undef setbuffer
93#undef setlinebuf
94#undef setvbuf
95#undef sprintf
96#undef sscanf
97#undef tempnam
98#undef vprintf
99#undef vfprintf
100#undef vsprintf
101#undef _flsbuf
102
103#ifndef NULL
104#define NULL _G_NULL
105#endif
106
107#ifndef size_t
108#define size_t _G_size_t
109#endif
110}
111
112extern "C" {
113
114int fclose(FILE*);
115FILE* fdopen(int, const char*);
116int fflush(FILE*);
117int fgetc(FILE*);
118#ifndef __386BSD__
119char* fgets _G_ARGS((char*, int, FILE *));
120#else
121char* fgets _G_ARGS((char*, _G_size_t, FILE *));
122#endif
123FILE* fopen(const char*, const char*);
124int fprintf(FILE*, const char* ...);
125int fputc(int, FILE*);
126int fputs(const char*, FILE*);
127size_t fread(void*, size_t, size_t, FILE*);
128#ifdef VMS
129FILE* freopen(const char*, const char*, FILE* ...);
130#else
131FILE* freopen(const char*, const char*, FILE*);
132#endif
133int fscanf(FILE*, const char* ...);
134int fseek(FILE*, long, int);
135long ftell(FILE *);
136size_t fwrite(const void*, size_t, size_t, FILE*);
137char* gets(char*);
138int getw(FILE*);
139int pclose(FILE*);
140void perror(const char*);
141FILE* popen(const char*, const char*);
142int printf(const char* ...);
143int puts(const char*);
144int putw(int, FILE*);
145int rewind(FILE*);
146int scanf(const char* ...);
147void setbuf(FILE*, char*);
148void setbuffer(FILE*, char*, int);
149int setlinebuf(FILE*);
150int setvbuf(FILE*, char*, int, size_t);
9069df10 151int sscanf(const char*, const char* ...);
32df4d03
PR
152FILE* tmpfile();
153int ungetc(int, FILE*);
154int vfprintf _G_ARGS((FILE*, const char*, _G_va_list));
155int vprintf _G_ARGS((const char*, _G_va_list));
156_G_sprintf_return_type sprintf _G_ARGS((char*, const char* ...));
157_G_sprintf_return_type vsprintf _G_ARGS((char*, const char*, _G_va_list));
158
159extern int _filbuf _G_ARGS((FILE*));
160extern int _flsbuf _G_ARGS((unsigned, FILE*));
161
162}
163
164#ifndef L_ctermid
165#define L_ctermid 9
166#endif
167#ifndef L_cuserid
168#define L_cuserid 9
169#endif
170#ifndef P_tmpdir
171#define P_tmpdir "/tmp/"
172#endif
173#ifndef L_tmpnam
174#define L_tmpnam (sizeof(P_tmpdir) + 15)
175#endif
176
177#define _stdio_h 1
178
179#endif
180#endif // _stdio_h