Support non-blocking pipe I/O in read() on native Windows.
[gnulib.git] / tests / test-stdio-c++.cc
1 /* Test of <stdio.h> substitute in C++ mode.
2    Copyright (C) 2010-2011 Free Software Foundation, Inc.
3
4    This program is free software: you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation; either version 3 of the License, or
7    (at your option) any later version.
8
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
16
17 /* Written by Bruno Haible <bruno@clisp.org>, 2010.  */
18
19 #define GNULIB_NAMESPACE gnulib
20 #include <config.h>
21
22 #include <stdio.h>
23
24 #include "signature.h"
25
26
27 #if GNULIB_TEST_DPRINTF
28 SIGNATURE_CHECK (GNULIB_NAMESPACE::dprintf, int, (int, const char *, ...));
29 #endif
30
31 #if GNULIB_TEST_FCLOSE
32 SIGNATURE_CHECK (GNULIB_NAMESPACE::fclose, int, (FILE *));
33 #endif
34
35 #if GNULIB_TEST_FFLUSH
36 SIGNATURE_CHECK (GNULIB_NAMESPACE::fflush, int, (FILE *));
37 #endif
38
39 #if GNULIB_TEST_FGETC
40 SIGNATURE_CHECK (GNULIB_NAMESPACE::fgetc, int, (FILE *));
41 #endif
42
43 #if GNULIB_TEST_FGETS
44 SIGNATURE_CHECK (GNULIB_NAMESPACE::fgets, char *, (char *, int, FILE *));
45 #endif
46
47 #if GNULIB_TEST_FOPEN
48 SIGNATURE_CHECK (GNULIB_NAMESPACE::fopen, FILE *,
49                  (const char *, const char *));
50 #endif
51
52 #if GNULIB_TEST_FPRINTF_POSIX || GNULIB_TEST_FPRINTF
53 SIGNATURE_CHECK (GNULIB_NAMESPACE::fprintf, int, (FILE *, const char *, ...));
54 #endif
55
56 #if GNULIB_TEST_FPURGE
57 SIGNATURE_CHECK (GNULIB_NAMESPACE::fpurge, int, (FILE *));
58 #endif
59
60 #if GNULIB_TEST_FPUTC
61 SIGNATURE_CHECK (GNULIB_NAMESPACE::fputc, int, (int, FILE *));
62 #endif
63
64 #if GNULIB_TEST_FPUTS
65 SIGNATURE_CHECK (GNULIB_NAMESPACE::fputs, int, (const char *, FILE *));
66 #endif
67
68 #if GNULIB_TEST_FREAD
69 SIGNATURE_CHECK (GNULIB_NAMESPACE::fread, size_t,
70                  (void *, size_t, size_t, FILE *));
71 #endif
72
73 #if GNULIB_TEST_FREOPEN
74 SIGNATURE_CHECK (GNULIB_NAMESPACE::freopen, FILE *,
75                  (const char *, const char *, FILE *));
76 #endif
77
78 #if GNULIB_TEST_FSCANF
79 SIGNATURE_CHECK (GNULIB_NAMESPACE::fscanf, int, (FILE *, const char *, ...));
80 #endif
81
82 #if GNULIB_TEST_FSEEK
83 SIGNATURE_CHECK (GNULIB_NAMESPACE::fseek, int, (FILE *, long, int));
84 #endif
85
86 #if GNULIB_TEST_FSEEKO
87 SIGNATURE_CHECK (GNULIB_NAMESPACE::fseeko, int, (FILE *, off_t, int));
88 #endif
89
90 #if GNULIB_TEST_FTELL
91 SIGNATURE_CHECK (GNULIB_NAMESPACE::ftell, long, (FILE *));
92 #endif
93
94 #if GNULIB_TEST_FTELLO
95 SIGNATURE_CHECK (GNULIB_NAMESPACE::ftello, off_t, (FILE *));
96 #endif
97
98 #if GNULIB_TEST_FWRITE
99 SIGNATURE_CHECK (GNULIB_NAMESPACE::fwrite, size_t,
100                  (const void *, size_t, size_t, FILE *));
101 #endif
102
103 #if GNULIB_TEST_GETC
104 SIGNATURE_CHECK (GNULIB_NAMESPACE::getc, int, (FILE *));
105 #endif
106
107 #if GNULIB_TEST_GETCHAR
108 SIGNATURE_CHECK (GNULIB_NAMESPACE::getchar, int, (void));
109 #endif
110
111 #if GNULIB_TEST_GETDELIM
112 SIGNATURE_CHECK (GNULIB_NAMESPACE::getdelim, ssize_t,
113                  (char **, size_t *, int, FILE *));
114 #endif
115
116 #if GNULIB_TEST_GETLINE
117 SIGNATURE_CHECK (GNULIB_NAMESPACE::getline, ssize_t,
118                  (char **, size_t *, FILE *));
119 #endif
120
121 #if GNULIB_TEST_GETS
122 SIGNATURE_CHECK (GNULIB_NAMESPACE::gets, char *, (char *));
123 #endif
124
125 #if GNULIB_TEST_OBSTACK_PRINTF || GNULIB_TEST_OBSTACK_PRINTF_POSIX
126 SIGNATURE_CHECK (GNULIB_NAMESPACE::obstack_printf, int,
127                  (struct obstack *, const char *, ...));
128 SIGNATURE_CHECK (GNULIB_NAMESPACE::obstack_vprintf, int,
129                  (struct obstack *, const char *, va_list));
130 #endif
131
132 //SIGNATURE_CHECK (GNULIB_NAMESPACE::pclose, int, (FILE *));
133
134 #if GNULIB_TEST_PERROR
135 SIGNATURE_CHECK (GNULIB_NAMESPACE::perror, void, (const char *));
136 #endif
137
138 #if GNULIB_TEST_POPEN
139 SIGNATURE_CHECK (GNULIB_NAMESPACE::popen, FILE *,
140                  (const char *, const char *));
141 #endif
142
143 #if GNULIB_TEST_PRINTF_POSIX || GNULIB_TEST_PRINTF
144 SIGNATURE_CHECK (GNULIB_NAMESPACE::printf, int, (const char *, ...));
145 #endif
146
147 #if GNULIB_TEST_PUTC
148 SIGNATURE_CHECK (GNULIB_NAMESPACE::putc, int, (int, FILE *));
149 #endif
150
151 #if GNULIB_TEST_PUTCHAR
152 SIGNATURE_CHECK (GNULIB_NAMESPACE::putchar, int, (int));
153 #endif
154
155 #if GNULIB_TEST_PUTS
156 SIGNATURE_CHECK (GNULIB_NAMESPACE::puts, int, (const char *));
157 #endif
158
159 #if GNULIB_TEST_REMOVE
160 SIGNATURE_CHECK (GNULIB_NAMESPACE::remove, int, (const char *));
161 #endif
162
163 #if GNULIB_TEST_RENAME
164 SIGNATURE_CHECK (GNULIB_NAMESPACE::rename, int, (const char *, const char *));
165 #endif
166
167 #if GNULIB_TEST_RENAMEAT
168 SIGNATURE_CHECK (GNULIB_NAMESPACE::renameat, int,
169                  (int, char const *, int, char const *));
170 #endif
171
172 #if GNULIB_TEST_SCANF
173 SIGNATURE_CHECK (GNULIB_NAMESPACE::scanf, int, (const char *, ...));
174 #endif
175
176 #if GNULIB_TEST_SNPRINTF
177 SIGNATURE_CHECK (GNULIB_NAMESPACE::snprintf, int,
178                  (char *, size_t, const char *, ...));
179 #endif
180
181 #if GNULIB_TEST_SPRINTF_POSIX
182 SIGNATURE_CHECK (GNULIB_NAMESPACE::sprintf, int, (char *, const char *, ...));
183 #endif
184
185 #if GNULIB_TEST_TMPFILE
186 SIGNATURE_CHECK (GNULIB_NAMESPACE::tmpfile, FILE *, (void));
187 #endif
188
189 #if GNULIB_TEST_VASPRINTF
190 SIGNATURE_CHECK (GNULIB_NAMESPACE::asprintf, int,
191                  (char **, const char *, ...));
192 SIGNATURE_CHECK (GNULIB_NAMESPACE::vasprintf, int,
193                  (char **, const char *, va_list));
194 #endif
195
196 #if GNULIB_TEST_VDPRINTF
197 SIGNATURE_CHECK (GNULIB_NAMESPACE::vdprintf, int,
198                  (int, const char *, va_list));
199 #endif
200
201 #if GNULIB_TEST_VFPRINTF_POSIX || GNULIB_TEST_VFPRINTF
202 SIGNATURE_CHECK (GNULIB_NAMESPACE::vfprintf, int,
203                  (FILE *, const char *, va_list));
204 #endif
205
206 #if GNULIB_TEST_VFSCANF
207 SIGNATURE_CHECK (GNULIB_NAMESPACE::vfscanf, int,
208                  (FILE *, const char *, va_list));
209 #endif
210
211 #if GNULIB_TEST_VPRINTF_POSIX || GNULIB_TEST_VPRINTF
212 SIGNATURE_CHECK (GNULIB_NAMESPACE::vprintf, int, (const char *, va_list));
213 #endif
214
215 #if GNULIB_TEST_VSCANF
216 SIGNATURE_CHECK (GNULIB_NAMESPACE::vscanf, int, (const char *, va_list));
217 #endif
218
219 #if GNULIB_TEST_VSNPRINTF
220 SIGNATURE_CHECK (GNULIB_NAMESPACE::vsnprintf, int,
221                  (char *, size_t, const char *, va_list));
222 #endif
223
224 #if GNULIB_TEST_VSPRINTF_POSIX
225 SIGNATURE_CHECK (GNULIB_NAMESPACE::vsprintf, int,
226                  (char *, const char *, va_list));
227 #endif
228
229
230 int
231 main ()
232 {
233 }