1 /* Test of <stdio.h> substitute in C++ mode.
2 Copyright (C) 2010-2011 Free Software Foundation, Inc.
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.
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.
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/>. */
17 /* Written by Bruno Haible <bruno@clisp.org>, 2010. */
19 #define GNULIB_NAMESPACE gnulib
24 #include "signature.h"
27 #if GNULIB_TEST_DPRINTF
28 SIGNATURE_CHECK (GNULIB_NAMESPACE::dprintf, int, (int, const char *, ...));
31 #if GNULIB_TEST_FCLOSE
32 SIGNATURE_CHECK (GNULIB_NAMESPACE::fclose, int, (FILE *));
35 #if GNULIB_TEST_FDOPEN
36 SIGNATURE_CHECK (GNULIB_NAMESPACE::fdopen, FILE *, (int, const char *));
39 #if GNULIB_TEST_FFLUSH
40 SIGNATURE_CHECK (GNULIB_NAMESPACE::fflush, int, (FILE *));
44 SIGNATURE_CHECK (GNULIB_NAMESPACE::fgetc, int, (FILE *));
48 SIGNATURE_CHECK (GNULIB_NAMESPACE::fgets, char *, (char *, int, FILE *));
52 SIGNATURE_CHECK (GNULIB_NAMESPACE::fopen, FILE *,
53 (const char *, const char *));
56 #if GNULIB_TEST_FPRINTF_POSIX || GNULIB_TEST_FPRINTF
57 SIGNATURE_CHECK (GNULIB_NAMESPACE::fprintf, int, (FILE *, const char *, ...));
60 #if GNULIB_TEST_FPURGE
61 SIGNATURE_CHECK (GNULIB_NAMESPACE::fpurge, int, (FILE *));
65 SIGNATURE_CHECK (GNULIB_NAMESPACE::fputc, int, (int, FILE *));
69 SIGNATURE_CHECK (GNULIB_NAMESPACE::fputs, int, (const char *, FILE *));
73 SIGNATURE_CHECK (GNULIB_NAMESPACE::fread, size_t,
74 (void *, size_t, size_t, FILE *));
77 #if GNULIB_TEST_FREOPEN
78 SIGNATURE_CHECK (GNULIB_NAMESPACE::freopen, FILE *,
79 (const char *, const char *, FILE *));
82 #if GNULIB_TEST_FSCANF
83 SIGNATURE_CHECK (GNULIB_NAMESPACE::fscanf, int, (FILE *, const char *, ...));
87 SIGNATURE_CHECK (GNULIB_NAMESPACE::fseek, int, (FILE *, long, int));
90 #if GNULIB_TEST_FSEEKO
91 SIGNATURE_CHECK (GNULIB_NAMESPACE::fseeko, int, (FILE *, off_t, int));
95 SIGNATURE_CHECK (GNULIB_NAMESPACE::ftell, long, (FILE *));
98 #if GNULIB_TEST_FTELLO
99 SIGNATURE_CHECK (GNULIB_NAMESPACE::ftello, off_t, (FILE *));
102 #if GNULIB_TEST_FWRITE
103 SIGNATURE_CHECK (GNULIB_NAMESPACE::fwrite, size_t,
104 (const void *, size_t, size_t, FILE *));
108 SIGNATURE_CHECK (GNULIB_NAMESPACE::getc, int, (FILE *));
111 #if GNULIB_TEST_GETCHAR
112 SIGNATURE_CHECK (GNULIB_NAMESPACE::getchar, int, (void));
115 #if GNULIB_TEST_GETDELIM
116 SIGNATURE_CHECK (GNULIB_NAMESPACE::getdelim, ssize_t,
117 (char **, size_t *, int, FILE *));
120 #if GNULIB_TEST_GETLINE
121 SIGNATURE_CHECK (GNULIB_NAMESPACE::getline, ssize_t,
122 (char **, size_t *, FILE *));
126 SIGNATURE_CHECK (GNULIB_NAMESPACE::gets, char *, (char *));
129 #if GNULIB_TEST_OBSTACK_PRINTF || GNULIB_TEST_OBSTACK_PRINTF_POSIX
130 SIGNATURE_CHECK (GNULIB_NAMESPACE::obstack_printf, int,
131 (struct obstack *, const char *, ...));
132 SIGNATURE_CHECK (GNULIB_NAMESPACE::obstack_vprintf, int,
133 (struct obstack *, const char *, va_list));
136 //SIGNATURE_CHECK (GNULIB_NAMESPACE::pclose, int, (FILE *));
138 #if GNULIB_TEST_PERROR
139 SIGNATURE_CHECK (GNULIB_NAMESPACE::perror, void, (const char *));
142 #if GNULIB_TEST_POPEN
143 SIGNATURE_CHECK (GNULIB_NAMESPACE::popen, FILE *,
144 (const char *, const char *));
147 #if GNULIB_TEST_PRINTF_POSIX || GNULIB_TEST_PRINTF
148 SIGNATURE_CHECK (GNULIB_NAMESPACE::printf, int, (const char *, ...));
152 SIGNATURE_CHECK (GNULIB_NAMESPACE::putc, int, (int, FILE *));
155 #if GNULIB_TEST_PUTCHAR
156 SIGNATURE_CHECK (GNULIB_NAMESPACE::putchar, int, (int));
160 SIGNATURE_CHECK (GNULIB_NAMESPACE::puts, int, (const char *));
163 #if GNULIB_TEST_REMOVE
164 SIGNATURE_CHECK (GNULIB_NAMESPACE::remove, int, (const char *));
167 #if GNULIB_TEST_RENAME
168 SIGNATURE_CHECK (GNULIB_NAMESPACE::rename, int, (const char *, const char *));
171 #if GNULIB_TEST_RENAMEAT
172 SIGNATURE_CHECK (GNULIB_NAMESPACE::renameat, int,
173 (int, char const *, int, char const *));
176 #if GNULIB_TEST_SCANF
177 SIGNATURE_CHECK (GNULIB_NAMESPACE::scanf, int, (const char *, ...));
180 #if GNULIB_TEST_SNPRINTF
181 SIGNATURE_CHECK (GNULIB_NAMESPACE::snprintf, int,
182 (char *, size_t, const char *, ...));
185 #if GNULIB_TEST_SPRINTF_POSIX
186 SIGNATURE_CHECK (GNULIB_NAMESPACE::sprintf, int, (char *, const char *, ...));
189 #if GNULIB_TEST_TMPFILE
190 SIGNATURE_CHECK (GNULIB_NAMESPACE::tmpfile, FILE *, (void));
193 #if GNULIB_TEST_VASPRINTF
194 SIGNATURE_CHECK (GNULIB_NAMESPACE::asprintf, int,
195 (char **, const char *, ...));
196 SIGNATURE_CHECK (GNULIB_NAMESPACE::vasprintf, int,
197 (char **, const char *, va_list));
200 #if GNULIB_TEST_VDPRINTF
201 SIGNATURE_CHECK (GNULIB_NAMESPACE::vdprintf, int,
202 (int, const char *, va_list));
205 #if GNULIB_TEST_VFPRINTF_POSIX || GNULIB_TEST_VFPRINTF
206 SIGNATURE_CHECK (GNULIB_NAMESPACE::vfprintf, int,
207 (FILE *, const char *, va_list));
210 #if GNULIB_TEST_VFSCANF
211 SIGNATURE_CHECK (GNULIB_NAMESPACE::vfscanf, int,
212 (FILE *, const char *, va_list));
215 #if GNULIB_TEST_VPRINTF_POSIX || GNULIB_TEST_VPRINTF
216 SIGNATURE_CHECK (GNULIB_NAMESPACE::vprintf, int, (const char *, va_list));
219 #if GNULIB_TEST_VSCANF
220 SIGNATURE_CHECK (GNULIB_NAMESPACE::vscanf, int, (const char *, va_list));
223 #if GNULIB_TEST_VSNPRINTF
224 SIGNATURE_CHECK (GNULIB_NAMESPACE::vsnprintf, int,
225 (char *, size_t, const char *, va_list));
228 #if GNULIB_TEST_VSPRINTF_POSIX
229 SIGNATURE_CHECK (GNULIB_NAMESPACE::vsprintf, int,
230 (char *, const char *, va_list));