00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #if __GNUC__ >= 3
00022 @PRAGMA_SYSTEM_HEADER@
00023 #endif
00024 @PRAGMA_COLUMNS@
00025
00026 #if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H
00027
00028
00029
00030
00031
00032
00033
00034
00035 #@INCLUDE_NEXT@ @NEXT_STDIO_H@
00036
00037 #else
00038
00039
00040 #ifndef _GL_STDIO_H
00041
00042 #define _GL_ALREADY_INCLUDING_STDIO_H
00043
00044
00045 #@INCLUDE_NEXT@ @NEXT_STDIO_H@
00046
00047 #undef _GL_ALREADY_INCLUDING_STDIO_H
00048
00049 #ifndef _GL_STDIO_H
00050 #define _GL_STDIO_H
00051
00052
00053 #include <stdarg.h>
00054
00055 #include <stddef.h>
00056
00057
00058
00059 #include <sys/types.h>
00060
00061 #ifndef __attribute__
00062
00063
00064
00065
00066
00067
00068 # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
00069 # define __attribute__(Spec)
00070 # endif
00071 #endif
00072
00073
00074
00075 #if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \
00076 && ! defined __GLIBC__
00077 # include <unistd.h>
00078 #endif
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088 #define _GL_STDIO_STRINGIZE(token) #token
00089 #define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token)
00090
00091
00092 #if @GNULIB_DPRINTF@
00093 # if @REPLACE_DPRINTF@
00094 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00095 # define dprintf rpl_dprintf
00096 # endif
00097 _GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *format, ...)
00098 __attribute__ ((__format__ (__printf__, 2, 3)))
00099 _GL_ARG_NONNULL ((2)));
00100 _GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *format, ...));
00101 # else
00102 # if !@HAVE_DPRINTF@
00103 _GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *format, ...)
00104 __attribute__ ((__format__ (__printf__, 2, 3)))
00105 _GL_ARG_NONNULL ((2)));
00106 # endif
00107 _GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *format, ...));
00108 # endif
00109 _GL_CXXALIASWARN (dprintf);
00110 #elif defined GNULIB_POSIXCHECK
00111 # undef dprintf
00112 # if HAVE_RAW_DECL_DPRINTF
00113 _GL_WARN_ON_USE (dprintf, "dprintf is unportable - "
00114 "use gnulib module dprintf for portability");
00115 # endif
00116 #endif
00117
00118 #if @GNULIB_FCLOSE@
00119
00120 # if @REPLACE_FCLOSE@
00121 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00122 # define fclose rpl_fclose
00123 # endif
00124 _GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
00125 _GL_CXXALIAS_RPL (fclose, int, (FILE *stream));
00126 # else
00127 _GL_CXXALIAS_SYS (fclose, int, (FILE *stream));
00128 # endif
00129 _GL_CXXALIASWARN (fclose);
00130 #elif defined GNULIB_POSIXCHECK
00131 # undef fclose
00132
00133 _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - "
00134 "use gnulib module fclose for portable POSIX compliance");
00135 #endif
00136
00137 #if @GNULIB_FFLUSH@
00138
00139
00140
00141
00142
00143
00144 # if @REPLACE_FFLUSH@
00145 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00146 # define fflush rpl_fflush
00147 # endif
00148 _GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream));
00149 _GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream));
00150 # else
00151 _GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream));
00152 # endif
00153 _GL_CXXALIASWARN (fflush);
00154 #elif defined GNULIB_POSIXCHECK
00155 # undef fflush
00156
00157 _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - "
00158 "use gnulib module fflush for portable POSIX compliance");
00159 #endif
00160
00161
00162
00163
00164 #undef gets
00165 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
00166
00167 #if @GNULIB_FOPEN@
00168 # if @REPLACE_FOPEN@
00169 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00170 # undef fopen
00171 # define fopen rpl_fopen
00172 # endif
00173 _GL_FUNCDECL_RPL (fopen, FILE *, (const char *filename, const char *mode)
00174 _GL_ARG_NONNULL ((1, 2)));
00175 _GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode));
00176 # else
00177 _GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode));
00178 # endif
00179 _GL_CXXALIASWARN (fopen);
00180 #elif defined GNULIB_POSIXCHECK
00181 # undef fopen
00182
00183 _GL_WARN_ON_USE (fopen, "fopen on Win32 platforms is not POSIX compatible - "
00184 "use gnulib module fopen for portability");
00185 #endif
00186
00187 #if @GNULIB_FPRINTF_POSIX@ || @GNULIB_FPRINTF@
00188 # if (@GNULIB_FPRINTF_POSIX@ && @REPLACE_FPRINTF@) \
00189 || (@GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
00190 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00191 # define fprintf rpl_fprintf
00192 # endif
00193 # define GNULIB_overrides_fprintf 1
00194 _GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...)
00195 __attribute__ ((__format__ (__printf__, 2, 3)))
00196 _GL_ARG_NONNULL ((1, 2)));
00197 _GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...));
00198 # else
00199 _GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...));
00200 # endif
00201 _GL_CXXALIASWARN (fprintf);
00202 #endif
00203 #if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
00204 # if !GNULIB_overrides_fprintf
00205 # undef fprintf
00206 # endif
00207
00208 _GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - "
00209 "use gnulib module fprintf-posix for portable "
00210 "POSIX compliance");
00211 #endif
00212
00213 #if @GNULIB_FPURGE@
00214
00215
00216
00217
00218
00219
00220 # if @REPLACE_FPURGE@
00221 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00222 # define fpurge rpl_fpurge
00223 # endif
00224 _GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1)));
00225 _GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream));
00226 # else
00227 # if !@HAVE_DECL_FPURGE@
00228 _GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1)));
00229 # endif
00230 _GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream));
00231 # endif
00232 _GL_CXXALIASWARN (fpurge);
00233 #elif defined GNULIB_POSIXCHECK
00234 # undef fpurge
00235 # if HAVE_RAW_DECL_FPURGE
00236 _GL_WARN_ON_USE (fpurge, "fpurge is not always present - "
00237 "use gnulib module fpurge for portability");
00238 # endif
00239 #endif
00240
00241 #if @GNULIB_FPUTC@
00242 # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
00243 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00244 # undef fputc
00245 # define fputc rpl_fputc
00246 # endif
00247 _GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2)));
00248 _GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream));
00249 # else
00250 _GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream));
00251 # endif
00252 _GL_CXXALIASWARN (fputc);
00253 #endif
00254
00255 #if @GNULIB_FPUTS@
00256 # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
00257 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00258 # undef fputs
00259 # define fputs rpl_fputs
00260 # endif
00261 _GL_FUNCDECL_RPL (fputs, int, (const char *string, FILE *stream)
00262 _GL_ARG_NONNULL ((1, 2)));
00263 _GL_CXXALIAS_RPL (fputs, int, (const char *string, FILE *stream));
00264 # else
00265 _GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream));
00266 # endif
00267 _GL_CXXALIASWARN (fputs);
00268 #endif
00269
00270 #if @GNULIB_FREOPEN@
00271 # if @REPLACE_FREOPEN@
00272 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00273 # undef freopen
00274 # define freopen rpl_freopen
00275 # endif
00276 _GL_FUNCDECL_RPL (freopen, FILE *,
00277 (const char *filename, const char *mode, FILE *stream)
00278 _GL_ARG_NONNULL ((2, 3)));
00279 _GL_CXXALIAS_RPL (freopen, FILE *,
00280 (const char *filename, const char *mode, FILE *stream));
00281 # else
00282 _GL_CXXALIAS_SYS (freopen, FILE *,
00283 (const char *filename, const char *mode, FILE *stream));
00284 # endif
00285 _GL_CXXALIASWARN (freopen);
00286 #elif defined GNULIB_POSIXCHECK
00287 # undef freopen
00288
00289 _GL_WARN_ON_USE (freopen,
00290 "freopen on Win32 platforms is not POSIX compatible - "
00291 "use gnulib module freopen for portability");
00292 #endif
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326 #if @GNULIB_FSEEK@
00327 # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES
00328 # define _GL_FSEEK_WARN
00329 # undef fseek
00330 # endif
00331 # if @REPLACE_FSEEK@
00332 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00333 # undef fseek
00334 # define fseek rpl_fseek
00335 # endif
00336 _GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence)
00337 _GL_ARG_NONNULL ((1)));
00338 _GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence));
00339 # else
00340 _GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence));
00341 # endif
00342 _GL_CXXALIASWARN (fseek);
00343 #endif
00344
00345 #if @GNULIB_FSEEKO@
00346 # if !@GNULIB_FSEEK@ && !defined _GL_NO_LARGE_FILES
00347 # define _GL_FSEEK_WARN
00348 # undef fseek
00349 # endif
00350 # if @REPLACE_FSEEKO@
00351
00352
00353 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00354 # undef fseeko
00355 # define fseeko rpl_fseeko
00356 # endif
00357 _GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)
00358 _GL_ARG_NONNULL ((1)));
00359 _GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence));
00360 # else
00361 # if ! @HAVE_DECL_FSEEKO@
00362 _GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)
00363 _GL_ARG_NONNULL ((1)));
00364 # endif
00365 _GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence));
00366 # endif
00367 _GL_CXXALIASWARN (fseeko);
00368 # if (@REPLACE_FSEEKO@ || !@HAVE_FSEEKO@) && !@GNULIB_FSEEK@
00369
00370
00371
00372 # if !GNULIB_defined_fseek_function
00373 # undef fseek
00374 # define fseek rpl_fseek
00375 static inline int _GL_ARG_NONNULL ((1))
00376 rpl_fseek (FILE *fp, long offset, int whence)
00377 {
00378 # if @REPLACE_FSEEKO@
00379 return rpl_fseeko (fp, offset, whence);
00380 # else
00381 return fseeko (fp, offset, whence);
00382 # endif
00383 }
00384 # define GNULIB_defined_fseek_function 1
00385 # endif
00386 # endif
00387 #elif defined GNULIB_POSIXCHECK
00388 # define _GL_FSEEK_WARN
00389 # undef fseek
00390 # undef fseeko
00391 # if HAVE_RAW_DECL_FSEEKO
00392 _GL_WARN_ON_USE (fseeko, "fseeko is unportable - "
00393 "use gnulib module fseeko for portability");
00394 # endif
00395 #endif
00396
00397 #ifdef _GL_FSEEK_WARN
00398 # undef _GL_FSEEK_WARN
00399
00400
00401 _GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB "
00402 "on 32-bit platforms - "
00403 "use fseeko function for handling of large files");
00404 #endif
00405
00406
00407
00408
00409 #if @GNULIB_FTELL@
00410 # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES
00411 # define _GL_FTELL_WARN
00412 # undef ftell
00413 # endif
00414 # if @REPLACE_FTELL@
00415 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00416 # undef ftell
00417 # define ftell rpl_ftell
00418 # endif
00419 _GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1)));
00420 _GL_CXXALIAS_RPL (ftell, long, (FILE *fp));
00421 # else
00422 _GL_CXXALIAS_SYS (ftell, long, (FILE *fp));
00423 # endif
00424 _GL_CXXALIASWARN (ftell);
00425 #endif
00426
00427 #if @GNULIB_FTELLO@
00428 # if !@GNULIB_FTELL@ && !defined _GL_NO_LARGE_FILES
00429 # define _GL_FTELL_WARN
00430 # undef ftell
00431 # endif
00432 # if @REPLACE_FTELLO@
00433 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00434 # undef ftello
00435 # define ftello rpl_ftello
00436 # endif
00437 _GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1)));
00438 _GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp));
00439 # else
00440 # if ! @HAVE_DECL_FTELLO@
00441 _GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1)));
00442 # endif
00443 _GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp));
00444 # endif
00445 _GL_CXXALIASWARN (ftello);
00446 # if (@REPLACE_FTELLO@ || !@HAVE_FTELLO@) && !@GNULIB_FTELL@
00447
00448
00449
00450 # if !GNULIB_defined_ftell_function
00451 # undef ftell
00452 # define ftell rpl_ftell
00453 static inline long _GL_ARG_NONNULL ((1))
00454 rpl_ftell (FILE *f)
00455 {
00456 # if @REPLACE_FTELLO@
00457 return rpl_ftello (f);
00458 # else
00459 return ftello (f);
00460 # endif
00461 }
00462 # define GNULIB_defined_ftell_function 1
00463 # endif
00464 # endif
00465 #elif defined GNULIB_POSIXCHECK
00466 # define _GL_FTELL_WARN
00467 # undef ftell
00468 # undef ftello
00469 # if HAVE_RAW_DECL_FTELLO
00470 _GL_WARN_ON_USE (ftello, "ftello is unportable - "
00471 "use gnulib module ftello for portability");
00472 # endif
00473 #endif
00474
00475 #ifdef _GL_FTELL_WARN
00476 # undef _GL_FTELL_WARN
00477
00478
00479 _GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB "
00480 "on 32-bit platforms - "
00481 "use ftello function for handling of large files");
00482 #endif
00483
00484
00485 #if @GNULIB_FWRITE@
00486 # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
00487 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00488 # undef fwrite
00489 # define fwrite rpl_fwrite
00490 # endif
00491 _GL_FUNCDECL_RPL (fwrite, size_t,
00492 (const void *ptr, size_t s, size_t n, FILE *stream)
00493 _GL_ARG_NONNULL ((1, 4)));
00494 _GL_CXXALIAS_RPL (fwrite, size_t,
00495 (const void *ptr, size_t s, size_t n, FILE *stream));
00496 # else
00497 _GL_CXXALIAS_SYS (fwrite, size_t,
00498 (const void *ptr, size_t s, size_t n, FILE *stream));
00499 # endif
00500 _GL_CXXALIASWARN (fwrite);
00501 #endif
00502
00503 #if @GNULIB_GETDELIM@
00504
00505
00506
00507
00508
00509
00510 # if @REPLACE_GETDELIM@
00511 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00512 # undef getdelim
00513 # define getdelim rpl_getdelim
00514 # endif
00515 _GL_FUNCDECL_RPL (getdelim, ssize_t,
00516 (char **lineptr, size_t *linesize, int delimiter,
00517 FILE *stream)
00518 _GL_ARG_NONNULL ((1, 2, 4)));
00519 _GL_CXXALIAS_RPL (getdelim, ssize_t,
00520 (char **lineptr, size_t *linesize, int delimiter,
00521 FILE *stream));
00522 # else
00523 # if !@HAVE_DECL_GETDELIM@
00524 _GL_FUNCDECL_SYS (getdelim, ssize_t,
00525 (char **lineptr, size_t *linesize, int delimiter,
00526 FILE *stream)
00527 _GL_ARG_NONNULL ((1, 2, 4)));
00528 # endif
00529 _GL_CXXALIAS_SYS (getdelim, ssize_t,
00530 (char **lineptr, size_t *linesize, int delimiter,
00531 FILE *stream));
00532 # endif
00533 _GL_CXXALIASWARN (getdelim);
00534 #elif defined GNULIB_POSIXCHECK
00535 # undef getdelim
00536 # if HAVE_RAW_DECL_GETDELIM
00537 _GL_WARN_ON_USE (getdelim, "getdelim is unportable - "
00538 "use gnulib module getdelim for portability");
00539 # endif
00540 #endif
00541
00542 #if @GNULIB_GETLINE@
00543
00544
00545
00546
00547
00548
00549 # if @REPLACE_GETLINE@
00550 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00551 # undef getline
00552 # define getline rpl_getline
00553 # endif
00554 _GL_FUNCDECL_RPL (getline, ssize_t,
00555 (char **lineptr, size_t *linesize, FILE *stream)
00556 _GL_ARG_NONNULL ((1, 2, 3)));
00557 _GL_CXXALIAS_RPL (getline, ssize_t,
00558 (char **lineptr, size_t *linesize, FILE *stream));
00559 # else
00560 # if !@HAVE_DECL_GETLINE@
00561 _GL_FUNCDECL_SYS (getline, ssize_t,
00562 (char **lineptr, size_t *linesize, FILE *stream)
00563 _GL_ARG_NONNULL ((1, 2, 3)));
00564 # endif
00565 _GL_CXXALIAS_SYS (getline, ssize_t,
00566 (char **lineptr, size_t *linesize, FILE *stream));
00567 # endif
00568 # if @HAVE_DECL_GETLINE@
00569 _GL_CXXALIASWARN (getline);
00570 # endif
00571 #elif defined GNULIB_POSIXCHECK
00572 # undef getline
00573 # if HAVE_RAW_DECL_GETLINE
00574 _GL_WARN_ON_USE (getline, "getline is unportable - "
00575 "use gnulib module getline for portability");
00576 # endif
00577 #endif
00578
00579 #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
00580 struct obstack;
00581
00582
00583
00584
00585
00586 # if @REPLACE_OBSTACK_PRINTF@
00587 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00588 # define obstack_printf rpl_obstack_printf
00589 # endif
00590 _GL_FUNCDECL_RPL (obstack_printf, int,
00591 (struct obstack *obs, const char *format, ...)
00592 __attribute__ ((__format__ (__printf__, 2, 3)))
00593 _GL_ARG_NONNULL ((1, 2)));
00594 _GL_CXXALIAS_RPL (obstack_printf, int,
00595 (struct obstack *obs, const char *format, ...));
00596 # else
00597 # if !@HAVE_DECL_OBSTACK_PRINTF@
00598 _GL_FUNCDECL_SYS (obstack_printf, int,
00599 (struct obstack *obs, const char *format, ...)
00600 __attribute__ ((__format__ (__printf__, 2, 3)))
00601 _GL_ARG_NONNULL ((1, 2)));
00602 # endif
00603 _GL_CXXALIAS_SYS (obstack_printf, int,
00604 (struct obstack *obs, const char *format, ...));
00605 # endif
00606 _GL_CXXALIASWARN (obstack_printf);
00607 # if @REPLACE_OBSTACK_PRINTF@
00608 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00609 # define obstack_vprintf rpl_obstack_vprintf
00610 # endif
00611 _GL_FUNCDECL_RPL (obstack_vprintf, int,
00612 (struct obstack *obs, const char *format, va_list args)
00613 __attribute__ ((__format__ (__printf__, 2, 0)))
00614 _GL_ARG_NONNULL ((1, 2)));
00615 _GL_CXXALIAS_RPL (obstack_vprintf, int,
00616 (struct obstack *obs, const char *format, va_list args));
00617 # else
00618 # if !@HAVE_DECL_OBSTACK_PRINTF@
00619 _GL_FUNCDECL_SYS (obstack_vprintf, int,
00620 (struct obstack *obs, const char *format, va_list args)
00621 __attribute__ ((__format__ (__printf__, 2, 0)))
00622 _GL_ARG_NONNULL ((1, 2)));
00623 # endif
00624 _GL_CXXALIAS_SYS (obstack_vprintf, int,
00625 (struct obstack *obs, const char *format, va_list args));
00626 # endif
00627 _GL_CXXALIASWARN (obstack_vprintf);
00628 #endif
00629
00630 #if @GNULIB_PERROR@
00631
00632
00633
00634 # if @REPLACE_PERROR@
00635 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00636 # define perror rpl_perror
00637 # endif
00638 _GL_FUNCDECL_RPL (perror, void, (const char *string));
00639 _GL_CXXALIAS_RPL (perror, void, (const char *string));
00640 # else
00641 _GL_CXXALIAS_SYS (perror, void, (const char *string));
00642 # endif
00643 _GL_CXXALIASWARN (perror);
00644 #elif defined GNULIB_POSIXCHECK
00645 # undef perror
00646
00647 _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - "
00648 "use gnulib module perror for portability");
00649 #endif
00650
00651 #if @GNULIB_POPEN@
00652 # if @REPLACE_POPEN@
00653 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00654 # undef popen
00655 # define popen rpl_popen
00656 # endif
00657 _GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode)
00658 _GL_ARG_NONNULL ((1, 2)));
00659 _GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode));
00660 # else
00661 _GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode));
00662 # endif
00663 _GL_CXXALIASWARN (popen);
00664 #elif defined GNULIB_POSIXCHECK
00665 # undef popen
00666 # if HAVE_RAW_DECL_POPEN
00667 _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - "
00668 "use gnulib module popen or pipe for more portability");
00669 # endif
00670 #endif
00671
00672 #if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@
00673 # if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \
00674 || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
00675 # if defined __GNUC__
00676 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00677
00678 # define printf __printf__
00679 # endif
00680 _GL_FUNCDECL_RPL_1 (__printf__, int,
00681 (const char *format, ...)
00682 __asm__ (@ASM_SYMBOL_PREFIX@
00683 _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf))
00684 __attribute__ ((__format__ (__printf__, 1, 2)))
00685 _GL_ARG_NONNULL ((1)));
00686 _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...));
00687 # else
00688 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00689 # define printf rpl_printf
00690 # endif
00691 _GL_FUNCDECL_RPL (printf, int,
00692 (const char *format, ...)
00693 __attribute__ ((__format__ (__printf__, 1, 2)))
00694 _GL_ARG_NONNULL ((1)));
00695 _GL_CXXALIAS_RPL (printf, int, (const char *format, ...));
00696 # endif
00697 # define GNULIB_overrides_printf 1
00698 # else
00699 _GL_CXXALIAS_SYS (printf, int, (const char *format, ...));
00700 # endif
00701 _GL_CXXALIASWARN (printf);
00702 #endif
00703 #if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK
00704 # if !GNULIB_overrides_printf
00705 # undef printf
00706 # endif
00707
00708 _GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - "
00709 "use gnulib module printf-posix for portable "
00710 "POSIX compliance");
00711 #endif
00712
00713 #if @GNULIB_PUTC@
00714 # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
00715 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00716 # undef putc
00717 # define putc rpl_fputc
00718 # endif
00719 _GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2)));
00720 _GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream));
00721 # else
00722 _GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream));
00723 # endif
00724 _GL_CXXALIASWARN (putc);
00725 #endif
00726
00727 #if @GNULIB_PUTCHAR@
00728 # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
00729 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00730 # undef putchar
00731 # define putchar rpl_putchar
00732 # endif
00733 _GL_FUNCDECL_RPL (putchar, int, (int c));
00734 _GL_CXXALIAS_RPL (putchar, int, (int c));
00735 # else
00736 _GL_CXXALIAS_SYS (putchar, int, (int c));
00737 # endif
00738 _GL_CXXALIASWARN (putchar);
00739 #endif
00740
00741 #if @GNULIB_PUTS@
00742 # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
00743 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00744 # undef puts
00745 # define puts rpl_puts
00746 # endif
00747 _GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1)));
00748 _GL_CXXALIAS_RPL (puts, int, (const char *string));
00749 # else
00750 _GL_CXXALIAS_SYS (puts, int, (const char *string));
00751 # endif
00752 _GL_CXXALIASWARN (puts);
00753 #endif
00754
00755 #if @GNULIB_REMOVE@
00756 # if @REPLACE_REMOVE@
00757 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00758 # undef remove
00759 # define remove rpl_remove
00760 # endif
00761 _GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1)));
00762 _GL_CXXALIAS_RPL (remove, int, (const char *name));
00763 # else
00764 _GL_CXXALIAS_SYS (remove, int, (const char *name));
00765 # endif
00766 _GL_CXXALIASWARN (remove);
00767 #elif defined GNULIB_POSIXCHECK
00768 # undef remove
00769
00770 _GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - "
00771 "use gnulib module remove for more portability");
00772 #endif
00773
00774 #if @GNULIB_RENAME@
00775 # if @REPLACE_RENAME@
00776 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00777 # undef rename
00778 # define rename rpl_rename
00779 # endif
00780 _GL_FUNCDECL_RPL (rename, int,
00781 (const char *old_filename, const char *new_filename)
00782 _GL_ARG_NONNULL ((1, 2)));
00783 _GL_CXXALIAS_RPL (rename, int,
00784 (const char *old_filename, const char *new_filename));
00785 # else
00786 _GL_CXXALIAS_SYS (rename, int,
00787 (const char *old_filename, const char *new_filename));
00788 # endif
00789 _GL_CXXALIASWARN (rename);
00790 #elif defined GNULIB_POSIXCHECK
00791 # undef rename
00792
00793 _GL_WARN_ON_USE (rename, "rename is buggy on some platforms - "
00794 "use gnulib module rename for more portability");
00795 #endif
00796
00797 #if @GNULIB_RENAMEAT@
00798 # if @REPLACE_RENAMEAT@
00799 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00800 # undef renameat
00801 # define renameat rpl_renameat
00802 # endif
00803 _GL_FUNCDECL_RPL (renameat, int,
00804 (int fd1, char const *file1, int fd2, char const *file2)
00805 _GL_ARG_NONNULL ((2, 4)));
00806 _GL_CXXALIAS_RPL (renameat, int,
00807 (int fd1, char const *file1, int fd2, char const *file2));
00808 # else
00809 # if !@HAVE_RENAMEAT@
00810 _GL_FUNCDECL_SYS (renameat, int,
00811 (int fd1, char const *file1, int fd2, char const *file2)
00812 _GL_ARG_NONNULL ((2, 4)));
00813 # endif
00814 _GL_CXXALIAS_SYS (renameat, int,
00815 (int fd1, char const *file1, int fd2, char const *file2));
00816 # endif
00817 _GL_CXXALIASWARN (renameat);
00818 #elif defined GNULIB_POSIXCHECK
00819 # undef renameat
00820 # if HAVE_RAW_DECL_RENAMEAT
00821 _GL_WARN_ON_USE (renameat, "renameat is not portable - "
00822 "use gnulib module renameat for portability");
00823 # endif
00824 #endif
00825
00826 #if @GNULIB_SNPRINTF@
00827 # if @REPLACE_SNPRINTF@
00828 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00829 # define snprintf rpl_snprintf
00830 # endif
00831 _GL_FUNCDECL_RPL (snprintf, int,
00832 (char *str, size_t size, const char *format, ...)
00833 __attribute__ ((__format__ (__printf__, 3, 4)))
00834 _GL_ARG_NONNULL ((3)));
00835 _GL_CXXALIAS_RPL (snprintf, int,
00836 (char *str, size_t size, const char *format, ...));
00837 # else
00838 # if !@HAVE_DECL_SNPRINTF@
00839 _GL_FUNCDECL_SYS (snprintf, int,
00840 (char *str, size_t size, const char *format, ...)
00841 __attribute__ ((__format__ (__printf__, 3, 4)))
00842 _GL_ARG_NONNULL ((3)));
00843 # endif
00844 _GL_CXXALIAS_SYS (snprintf, int,
00845 (char *str, size_t size, const char *format, ...));
00846 # endif
00847 _GL_CXXALIASWARN (snprintf);
00848 #elif defined GNULIB_POSIXCHECK
00849 # undef snprintf
00850 # if HAVE_RAW_DECL_SNPRINTF
00851 _GL_WARN_ON_USE (snprintf, "snprintf is unportable - "
00852 "use gnulib module snprintf for portability");
00853 # endif
00854 #endif
00855
00856
00857
00858
00859
00860
00861
00862
00863
00864
00865 #if @GNULIB_SPRINTF_POSIX@
00866 # if @REPLACE_SPRINTF@
00867 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00868 # define sprintf rpl_sprintf
00869 # endif
00870 _GL_FUNCDECL_RPL (sprintf, int, (char *str, const char *format, ...)
00871 __attribute__ ((__format__ (__printf__, 2, 3)))
00872 _GL_ARG_NONNULL ((1, 2)));
00873 _GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...));
00874 # else
00875 _GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...));
00876 # endif
00877 _GL_CXXALIASWARN (sprintf);
00878 #elif defined GNULIB_POSIXCHECK
00879 # undef sprintf
00880
00881 _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - "
00882 "use gnulib module sprintf-posix for portable "
00883 "POSIX compliance");
00884 #endif
00885
00886 #if @GNULIB_TMPFILE@
00887 # if @REPLACE_TMPFILE@
00888 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00889 # define tmpfile rpl_tmpfile
00890 # endif
00891 _GL_FUNCDECL_RPL (tmpfile, FILE *, (void));
00892 _GL_CXXALIAS_RPL (tmpfile, FILE *, (void));
00893 # else
00894 _GL_CXXALIAS_SYS (tmpfile, FILE *, (void));
00895 # endif
00896 _GL_CXXALIASWARN (tmpfile);
00897 #elif defined GNULIB_POSIXCHECK
00898 # undef tmpfile
00899 # if HAVE_RAW_DECL_TMPFILE
00900 _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - "
00901 "use gnulib module tmpfile for portability");
00902 # endif
00903 #endif
00904
00905 #if @GNULIB_VASPRINTF@
00906
00907
00908
00909
00910 # if @REPLACE_VASPRINTF@
00911 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00912 # define asprintf rpl_asprintf
00913 # endif
00914 _GL_FUNCDECL_RPL (asprintf, int,
00915 (char **result, const char *format, ...)
00916 __attribute__ ((__format__ (__printf__, 2, 3)))
00917 _GL_ARG_NONNULL ((1, 2)));
00918 _GL_CXXALIAS_RPL (asprintf, int,
00919 (char **result, const char *format, ...));
00920 # else
00921 # if !@HAVE_VASPRINTF@
00922 _GL_FUNCDECL_SYS (asprintf, int,
00923 (char **result, const char *format, ...)
00924 __attribute__ ((__format__ (__printf__, 2, 3)))
00925 _GL_ARG_NONNULL ((1, 2)));
00926 # endif
00927 _GL_CXXALIAS_SYS (asprintf, int,
00928 (char **result, const char *format, ...));
00929 # endif
00930 _GL_CXXALIASWARN (asprintf);
00931 # if @REPLACE_VASPRINTF@
00932 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00933 # define vasprintf rpl_vasprintf
00934 # endif
00935 _GL_FUNCDECL_RPL (vasprintf, int,
00936 (char **result, const char *format, va_list args)
00937 __attribute__ ((__format__ (__printf__, 2, 0)))
00938 _GL_ARG_NONNULL ((1, 2)));
00939 _GL_CXXALIAS_RPL (vasprintf, int,
00940 (char **result, const char *format, va_list args));
00941 # else
00942 # if !@HAVE_VASPRINTF@
00943 _GL_FUNCDECL_SYS (vasprintf, int,
00944 (char **result, const char *format, va_list args)
00945 __attribute__ ((__format__ (__printf__, 2, 0)))
00946 _GL_ARG_NONNULL ((1, 2)));
00947 # endif
00948 _GL_CXXALIAS_SYS (vasprintf, int,
00949 (char **result, const char *format, va_list args));
00950 # endif
00951 _GL_CXXALIASWARN (vasprintf);
00952 #endif
00953
00954 #if @GNULIB_VDPRINTF@
00955 # if @REPLACE_VDPRINTF@
00956 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00957 # define vdprintf rpl_vdprintf
00958 # endif
00959 _GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *format, va_list args)
00960 __attribute__ ((__format__ (__printf__, 2, 0)))
00961 _GL_ARG_NONNULL ((2)));
00962 _GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *format, va_list args));
00963 # else
00964 # if !@HAVE_VDPRINTF@
00965 _GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args)
00966 __attribute__ ((__format__ (__printf__, 2, 0)))
00967 _GL_ARG_NONNULL ((2)));
00968 # endif
00969
00970
00971 _GL_CXXALIAS_SYS_CAST (vdprintf, int,
00972 (int fd, const char *format, va_list args));
00973 # endif
00974 _GL_CXXALIASWARN (vdprintf);
00975 #elif defined GNULIB_POSIXCHECK
00976 # undef vdprintf
00977 # if HAVE_RAW_DECL_VDPRINTF
00978 _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - "
00979 "use gnulib module vdprintf for portability");
00980 # endif
00981 #endif
00982
00983 #if @GNULIB_VFPRINTF_POSIX@ || @GNULIB_VFPRINTF@
00984 # if (@GNULIB_VFPRINTF_POSIX@ && @REPLACE_VFPRINTF@) \
00985 || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
00986 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00987 # define vfprintf rpl_vfprintf
00988 # endif
00989 # define GNULIB_overrides_vfprintf 1
00990 _GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)
00991 __attribute__ ((__format__ (__printf__, 2, 0)))
00992 _GL_ARG_NONNULL ((1, 2)));
00993 _GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args));
00994 # else
00995
00996
00997
00998 _GL_CXXALIAS_SYS_CAST (vfprintf, int,
00999 (FILE *fp, const char *format, va_list args));
01000 # endif
01001 _GL_CXXALIASWARN (vfprintf);
01002 #endif
01003 #if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
01004 # if !GNULIB_overrides_vfprintf
01005 # undef vfprintf
01006 # endif
01007
01008 _GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - "
01009 "use gnulib module vfprintf-posix for portable "
01010 "POSIX compliance");
01011 #endif
01012
01013 #if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@
01014 # if (@GNULIB_VPRINTF_POSIX@ && @REPLACE_VPRINTF@) \
01015 || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
01016 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
01017 # define vprintf rpl_vprintf
01018 # endif
01019 # define GNULIB_overrides_vprintf 1
01020 _GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args)
01021 __attribute__ ((__format__ (__printf__, 1, 0)))
01022 _GL_ARG_NONNULL ((1)));
01023 _GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args));
01024 # else
01025
01026
01027
01028 _GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args));
01029 # endif
01030 _GL_CXXALIASWARN (vprintf);
01031 #endif
01032 #if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
01033 # if !GNULIB_overrides_vprintf
01034 # undef vprintf
01035 # endif
01036
01037 _GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - "
01038 "use gnulib module vprintf-posix for portable "
01039 "POSIX compliance");
01040 #endif
01041
01042 #if @GNULIB_VSNPRINTF@
01043 # if @REPLACE_VSNPRINTF@
01044 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
01045 # define vsnprintf rpl_vsnprintf
01046 # endif
01047 _GL_FUNCDECL_RPL (vsnprintf, int,
01048 (char *str, size_t size, const char *format, va_list args)
01049 __attribute__ ((__format__ (__printf__, 3, 0)))
01050 _GL_ARG_NONNULL ((3)));
01051 _GL_CXXALIAS_RPL (vsnprintf, int,
01052 (char *str, size_t size, const char *format, va_list args));
01053 # else
01054 # if !@HAVE_DECL_VSNPRINTF@
01055 _GL_FUNCDECL_SYS (vsnprintf, int,
01056 (char *str, size_t size, const char *format, va_list args)
01057 __attribute__ ((__format__ (__printf__, 3, 0)))
01058 _GL_ARG_NONNULL ((3)));
01059 # endif
01060 _GL_CXXALIAS_SYS (vsnprintf, int,
01061 (char *str, size_t size, const char *format, va_list args));
01062 # endif
01063 _GL_CXXALIASWARN (vsnprintf);
01064 #elif defined GNULIB_POSIXCHECK
01065 # undef vsnprintf
01066 # if HAVE_RAW_DECL_VSNPRINTF
01067 _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - "
01068 "use gnulib module vsnprintf for portability");
01069 # endif
01070 #endif
01071
01072 #if @GNULIB_VSPRINTF_POSIX@
01073 # if @REPLACE_VSPRINTF@
01074 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
01075 # define vsprintf rpl_vsprintf
01076 # endif
01077 _GL_FUNCDECL_RPL (vsprintf, int,
01078 (char *str, const char *format, va_list args)
01079 __attribute__ ((__format__ (__printf__, 2, 0)))
01080 _GL_ARG_NONNULL ((1, 2)));
01081 _GL_CXXALIAS_RPL (vsprintf, int,
01082 (char *str, const char *format, va_list args));
01083 # else
01084
01085
01086
01087 _GL_CXXALIAS_SYS_CAST (vsprintf, int,
01088 (char *str, const char *format, va_list args));
01089 # endif
01090 _GL_CXXALIASWARN (vsprintf);
01091 #elif defined GNULIB_POSIXCHECK
01092 # undef vsprintf
01093
01094 _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - "
01095 "use gnulib module vsprintf-posix for portable "
01096 "POSIX compliance");
01097 #endif
01098
01099
01100 #endif
01101 #endif
01102 #endif