stdio.in.h 49 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354
  1. /* A GNU-like <stdio.h>.
  2. Copyright (C) 2004, 2007-2014 Free Software Foundation, Inc.
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU Lesser General Public License as published by
  5. the Free Software Foundation; either version 2, or (at your option)
  6. any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public License
  12. along with this program; if not, see <http://www.gnu.org/licenses/>. */
  13. #if __GNUC__ >= 3
  14. @PRAGMA_SYSTEM_HEADER@
  15. #endif
  16. @PRAGMA_COLUMNS@
  17. #if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H
  18. /* Special invocation convention:
  19. - Inside glibc header files.
  20. - On OSF/1 5.1 we have a sequence of nested includes
  21. <stdio.h> -> <getopt.h> -> <ctype.h> -> <sys/localedef.h> ->
  22. <sys/lc_core.h> -> <nl_types.h> -> <mesg.h> -> <stdio.h>.
  23. In this situation, the functions are not yet declared, therefore we cannot
  24. provide the C++ aliases. */
  25. #@INCLUDE_NEXT@ @NEXT_STDIO_H@
  26. #else
  27. /* Normal invocation convention. */
  28. #ifndef _@GUARD_PREFIX@_STDIO_H
  29. #define _GL_ALREADY_INCLUDING_STDIO_H
  30. /* The include_next requires a split double-inclusion guard. */
  31. #@INCLUDE_NEXT@ @NEXT_STDIO_H@
  32. #undef _GL_ALREADY_INCLUDING_STDIO_H
  33. #ifndef _@GUARD_PREFIX@_STDIO_H
  34. #define _@GUARD_PREFIX@_STDIO_H
  35. /* Get va_list. Needed on many systems, including glibc 2.8. */
  36. #include <stdarg.h>
  37. #include <stddef.h>
  38. /* Get off_t and ssize_t. Needed on many systems, including glibc 2.8
  39. and eglibc 2.11.2.
  40. May also define off_t to a 64-bit type on native Windows. */
  41. #include <sys/types.h>
  42. /* The __attribute__ feature is available in gcc versions 2.5 and later.
  43. The __-protected variants of the attributes 'format' and 'printf' are
  44. accepted by gcc versions 2.6.4 (effectively 2.7) and later.
  45. We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
  46. gnulib and libintl do '#define printf __printf__' when they override
  47. the 'printf' function. */
  48. #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
  49. # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
  50. #else
  51. # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
  52. #endif
  53. /* _GL_ATTRIBUTE_FORMAT_PRINTF
  54. indicates to GCC that the function takes a format string and arguments,
  55. where the format string directives are the ones standardized by ISO C99
  56. and POSIX. */
  57. #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
  58. # define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
  59. _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument))
  60. #else
  61. # define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
  62. _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
  63. #endif
  64. /* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF,
  65. except that it indicates to GCC that the supported format string directives
  66. are the ones of the system printf(), rather than the ones standardized by
  67. ISO C99 and POSIX. */
  68. #define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \
  69. _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
  70. /* _GL_ATTRIBUTE_FORMAT_SCANF
  71. indicates to GCC that the function takes a format string and arguments,
  72. where the format string directives are the ones standardized by ISO C99
  73. and POSIX. */
  74. #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
  75. # define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \
  76. _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument))
  77. #else
  78. # define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \
  79. _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument))
  80. #endif
  81. /* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF,
  82. except that it indicates to GCC that the supported format string directives
  83. are the ones of the system scanf(), rather than the ones standardized by
  84. ISO C99 and POSIX. */
  85. #define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \
  86. _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument))
  87. /* Solaris 10 declares renameat in <unistd.h>, not in <stdio.h>. */
  88. /* But in any case avoid namespace pollution on glibc systems. */
  89. #if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \
  90. && ! defined __GLIBC__
  91. # include <unistd.h>
  92. #endif
  93. /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
  94. /* The definition of _GL_ARG_NONNULL is copied here. */
  95. /* The definition of _GL_WARN_ON_USE is copied here. */
  96. /* Macros for stringification. */
  97. #define _GL_STDIO_STRINGIZE(token) #token
  98. #define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token)
  99. /* When also using extern inline, suppress the use of static inline in
  100. standard headers of problematic Apple configurations, as Libc at
  101. least through Libc-825.26 (2013-04-09) mishandles it; see, e.g.,
  102. <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
  103. Perhaps Apple will fix this some day. */
  104. #if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \
  105. && defined __GNUC__ && defined __STDC__)
  106. # undef putc_unlocked
  107. #endif
  108. #if @GNULIB_DPRINTF@
  109. # if @REPLACE_DPRINTF@
  110. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  111. # define dprintf rpl_dprintf
  112. # endif
  113. _GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *format, ...)
  114. _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
  115. _GL_ARG_NONNULL ((2)));
  116. _GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *format, ...));
  117. # else
  118. # if !@HAVE_DPRINTF@
  119. _GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *format, ...)
  120. _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
  121. _GL_ARG_NONNULL ((2)));
  122. # endif
  123. _GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *format, ...));
  124. # endif
  125. _GL_CXXALIASWARN (dprintf);
  126. #elif defined GNULIB_POSIXCHECK
  127. # undef dprintf
  128. # if HAVE_RAW_DECL_DPRINTF
  129. _GL_WARN_ON_USE (dprintf, "dprintf is unportable - "
  130. "use gnulib module dprintf for portability");
  131. # endif
  132. #endif
  133. #if @GNULIB_FCLOSE@
  134. /* Close STREAM and its underlying file descriptor. */
  135. # if @REPLACE_FCLOSE@
  136. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  137. # define fclose rpl_fclose
  138. # endif
  139. _GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
  140. _GL_CXXALIAS_RPL (fclose, int, (FILE *stream));
  141. # else
  142. _GL_CXXALIAS_SYS (fclose, int, (FILE *stream));
  143. # endif
  144. _GL_CXXALIASWARN (fclose);
  145. #elif defined GNULIB_POSIXCHECK
  146. # undef fclose
  147. /* Assume fclose is always declared. */
  148. _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - "
  149. "use gnulib module fclose for portable POSIX compliance");
  150. #endif
  151. #if @GNULIB_FDOPEN@
  152. # if @REPLACE_FDOPEN@
  153. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  154. # undef fdopen
  155. # define fdopen rpl_fdopen
  156. # endif
  157. _GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode)
  158. _GL_ARG_NONNULL ((2)));
  159. _GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode));
  160. # else
  161. _GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode));
  162. # endif
  163. _GL_CXXALIASWARN (fdopen);
  164. #elif defined GNULIB_POSIXCHECK
  165. # undef fdopen
  166. /* Assume fdopen is always declared. */
  167. _GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - "
  168. "use gnulib module fdopen for portability");
  169. #endif
  170. #if @GNULIB_FFLUSH@
  171. /* Flush all pending data on STREAM according to POSIX rules. Both
  172. output and seekable input streams are supported.
  173. Note! LOSS OF DATA can occur if fflush is applied on an input stream
  174. that is _not_seekable_ or on an update stream that is _not_seekable_
  175. and in which the most recent operation was input. Seekability can
  176. be tested with lseek(fileno(fp),0,SEEK_CUR). */
  177. # if @REPLACE_FFLUSH@
  178. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  179. # define fflush rpl_fflush
  180. # endif
  181. _GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream));
  182. _GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream));
  183. # else
  184. _GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream));
  185. # endif
  186. _GL_CXXALIASWARN (fflush);
  187. #elif defined GNULIB_POSIXCHECK
  188. # undef fflush
  189. /* Assume fflush is always declared. */
  190. _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - "
  191. "use gnulib module fflush for portable POSIX compliance");
  192. #endif
  193. #if @GNULIB_FGETC@
  194. # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
  195. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  196. # undef fgetc
  197. # define fgetc rpl_fgetc
  198. # endif
  199. _GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
  200. _GL_CXXALIAS_RPL (fgetc, int, (FILE *stream));
  201. # else
  202. _GL_CXXALIAS_SYS (fgetc, int, (FILE *stream));
  203. # endif
  204. _GL_CXXALIASWARN (fgetc);
  205. #endif
  206. #if @GNULIB_FGETS@
  207. # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
  208. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  209. # undef fgets
  210. # define fgets rpl_fgets
  211. # endif
  212. _GL_FUNCDECL_RPL (fgets, char *, (char *s, int n, FILE *stream)
  213. _GL_ARG_NONNULL ((1, 3)));
  214. _GL_CXXALIAS_RPL (fgets, char *, (char *s, int n, FILE *stream));
  215. # else
  216. _GL_CXXALIAS_SYS (fgets, char *, (char *s, int n, FILE *stream));
  217. # endif
  218. _GL_CXXALIASWARN (fgets);
  219. #endif
  220. #if @GNULIB_FOPEN@
  221. # if @REPLACE_FOPEN@
  222. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  223. # undef fopen
  224. # define fopen rpl_fopen
  225. # endif
  226. _GL_FUNCDECL_RPL (fopen, FILE *, (const char *filename, const char *mode)
  227. _GL_ARG_NONNULL ((1, 2)));
  228. _GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode));
  229. # else
  230. _GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode));
  231. # endif
  232. _GL_CXXALIASWARN (fopen);
  233. #elif defined GNULIB_POSIXCHECK
  234. # undef fopen
  235. /* Assume fopen is always declared. */
  236. _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - "
  237. "use gnulib module fopen for portability");
  238. #endif
  239. #if @GNULIB_FPRINTF_POSIX@ || @GNULIB_FPRINTF@
  240. # if (@GNULIB_FPRINTF_POSIX@ && @REPLACE_FPRINTF@) \
  241. || (@GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@))
  242. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  243. # define fprintf rpl_fprintf
  244. # endif
  245. # define GNULIB_overrides_fprintf 1
  246. # if @GNULIB_FPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@
  247. _GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...)
  248. _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
  249. _GL_ARG_NONNULL ((1, 2)));
  250. # else
  251. _GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...)
  252. _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3)
  253. _GL_ARG_NONNULL ((1, 2)));
  254. # endif
  255. _GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...));
  256. # else
  257. _GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...));
  258. # endif
  259. _GL_CXXALIASWARN (fprintf);
  260. #endif
  261. #if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
  262. # if !GNULIB_overrides_fprintf
  263. # undef fprintf
  264. # endif
  265. /* Assume fprintf is always declared. */
  266. _GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - "
  267. "use gnulib module fprintf-posix for portable "
  268. "POSIX compliance");
  269. #endif
  270. #if @GNULIB_FPURGE@
  271. /* Discard all pending buffered I/O data on STREAM.
  272. STREAM must not be wide-character oriented.
  273. When discarding pending output, the file position is set back to where it
  274. was before the write calls. When discarding pending input, the file
  275. position is advanced to match the end of the previously read input.
  276. Return 0 if successful. Upon error, return -1 and set errno. */
  277. # if @REPLACE_FPURGE@
  278. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  279. # define fpurge rpl_fpurge
  280. # endif
  281. _GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1)));
  282. _GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream));
  283. # else
  284. # if !@HAVE_DECL_FPURGE@
  285. _GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1)));
  286. # endif
  287. _GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream));
  288. # endif
  289. _GL_CXXALIASWARN (fpurge);
  290. #elif defined GNULIB_POSIXCHECK
  291. # undef fpurge
  292. # if HAVE_RAW_DECL_FPURGE
  293. _GL_WARN_ON_USE (fpurge, "fpurge is not always present - "
  294. "use gnulib module fpurge for portability");
  295. # endif
  296. #endif
  297. #if @GNULIB_FPUTC@
  298. # if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)
  299. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  300. # undef fputc
  301. # define fputc rpl_fputc
  302. # endif
  303. _GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2)));
  304. _GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream));
  305. # else
  306. _GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream));
  307. # endif
  308. _GL_CXXALIASWARN (fputc);
  309. #endif
  310. #if @GNULIB_FPUTS@
  311. # if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)
  312. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  313. # undef fputs
  314. # define fputs rpl_fputs
  315. # endif
  316. _GL_FUNCDECL_RPL (fputs, int, (const char *string, FILE *stream)
  317. _GL_ARG_NONNULL ((1, 2)));
  318. _GL_CXXALIAS_RPL (fputs, int, (const char *string, FILE *stream));
  319. # else
  320. _GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream));
  321. # endif
  322. _GL_CXXALIASWARN (fputs);
  323. #endif
  324. #if @GNULIB_FREAD@
  325. # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
  326. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  327. # undef fread
  328. # define fread rpl_fread
  329. # endif
  330. _GL_FUNCDECL_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream)
  331. _GL_ARG_NONNULL ((4)));
  332. _GL_CXXALIAS_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream));
  333. # else
  334. _GL_CXXALIAS_SYS (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream));
  335. # endif
  336. _GL_CXXALIASWARN (fread);
  337. #endif
  338. #if @GNULIB_FREOPEN@
  339. # if @REPLACE_FREOPEN@
  340. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  341. # undef freopen
  342. # define freopen rpl_freopen
  343. # endif
  344. _GL_FUNCDECL_RPL (freopen, FILE *,
  345. (const char *filename, const char *mode, FILE *stream)
  346. _GL_ARG_NONNULL ((2, 3)));
  347. _GL_CXXALIAS_RPL (freopen, FILE *,
  348. (const char *filename, const char *mode, FILE *stream));
  349. # else
  350. _GL_CXXALIAS_SYS (freopen, FILE *,
  351. (const char *filename, const char *mode, FILE *stream));
  352. # endif
  353. _GL_CXXALIASWARN (freopen);
  354. #elif defined GNULIB_POSIXCHECK
  355. # undef freopen
  356. /* Assume freopen is always declared. */
  357. _GL_WARN_ON_USE (freopen,
  358. "freopen on native Windows platforms is not POSIX compliant - "
  359. "use gnulib module freopen for portability");
  360. #endif
  361. #if @GNULIB_FSCANF@
  362. # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
  363. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  364. # undef fscanf
  365. # define fscanf rpl_fscanf
  366. # endif
  367. _GL_FUNCDECL_RPL (fscanf, int, (FILE *stream, const char *format, ...)
  368. _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3)
  369. _GL_ARG_NONNULL ((1, 2)));
  370. _GL_CXXALIAS_RPL (fscanf, int, (FILE *stream, const char *format, ...));
  371. # else
  372. _GL_CXXALIAS_SYS (fscanf, int, (FILE *stream, const char *format, ...));
  373. # endif
  374. _GL_CXXALIASWARN (fscanf);
  375. #endif
  376. /* Set up the following warnings, based on which modules are in use.
  377. GNU Coding Standards discourage the use of fseek, since it imposes
  378. an arbitrary limitation on some 32-bit hosts. Remember that the
  379. fseek module depends on the fseeko module, so we only have three
  380. cases to consider:
  381. 1. The developer is not using either module. Issue a warning under
  382. GNULIB_POSIXCHECK for both functions, to remind them that both
  383. functions have bugs on some systems. _GL_NO_LARGE_FILES has no
  384. impact on this warning.
  385. 2. The developer is using both modules. They may be unaware of the
  386. arbitrary limitations of fseek, so issue a warning under
  387. GNULIB_POSIXCHECK. On the other hand, they may be using both
  388. modules intentionally, so the developer can define
  389. _GL_NO_LARGE_FILES in the compilation units where the use of fseek
  390. is safe, to silence the warning.
  391. 3. The developer is using the fseeko module, but not fseek. Gnulib
  392. guarantees that fseek will still work around platform bugs in that
  393. case, but we presume that the developer is aware of the pitfalls of
  394. fseek and was trying to avoid it, so issue a warning even when
  395. GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be
  396. defined to silence the warning in particular compilation units.
  397. In C++ compilations with GNULIB_NAMESPACE, in order to avoid that
  398. fseek gets defined as a macro, it is recommended that the developer
  399. uses the fseek module, even if he is not calling the fseek function.
  400. Most gnulib clients that perform stream operations should fall into
  401. category 3. */
  402. #if @GNULIB_FSEEK@
  403. # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES
  404. # define _GL_FSEEK_WARN /* Category 2, above. */
  405. # undef fseek
  406. # endif
  407. # if @REPLACE_FSEEK@
  408. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  409. # undef fseek
  410. # define fseek rpl_fseek
  411. # endif
  412. _GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence)
  413. _GL_ARG_NONNULL ((1)));
  414. _GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence));
  415. # else
  416. _GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence));
  417. # endif
  418. _GL_CXXALIASWARN (fseek);
  419. #endif
  420. #if @GNULIB_FSEEKO@
  421. # if !@GNULIB_FSEEK@ && !defined _GL_NO_LARGE_FILES
  422. # define _GL_FSEEK_WARN /* Category 3, above. */
  423. # undef fseek
  424. # endif
  425. # if @REPLACE_FSEEKO@
  426. /* Provide an fseeko function that is aware of a preceding fflush(), and which
  427. detects pipes. */
  428. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  429. # undef fseeko
  430. # define fseeko rpl_fseeko
  431. # endif
  432. _GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)
  433. _GL_ARG_NONNULL ((1)));
  434. _GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence));
  435. # else
  436. # if ! @HAVE_DECL_FSEEKO@
  437. _GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)
  438. _GL_ARG_NONNULL ((1)));
  439. # endif
  440. _GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence));
  441. # endif
  442. _GL_CXXALIASWARN (fseeko);
  443. #elif defined GNULIB_POSIXCHECK
  444. # define _GL_FSEEK_WARN /* Category 1, above. */
  445. # undef fseek
  446. # undef fseeko
  447. # if HAVE_RAW_DECL_FSEEKO
  448. _GL_WARN_ON_USE (fseeko, "fseeko is unportable - "
  449. "use gnulib module fseeko for portability");
  450. # endif
  451. #endif
  452. #ifdef _GL_FSEEK_WARN
  453. # undef _GL_FSEEK_WARN
  454. /* Here, either fseek is undefined (but C89 guarantees that it is
  455. declared), or it is defined as rpl_fseek (declared above). */
  456. _GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB "
  457. "on 32-bit platforms - "
  458. "use fseeko function for handling of large files");
  459. #endif
  460. /* ftell, ftello. See the comments on fseek/fseeko. */
  461. #if @GNULIB_FTELL@
  462. # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES
  463. # define _GL_FTELL_WARN /* Category 2, above. */
  464. # undef ftell
  465. # endif
  466. # if @REPLACE_FTELL@
  467. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  468. # undef ftell
  469. # define ftell rpl_ftell
  470. # endif
  471. _GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1)));
  472. _GL_CXXALIAS_RPL (ftell, long, (FILE *fp));
  473. # else
  474. _GL_CXXALIAS_SYS (ftell, long, (FILE *fp));
  475. # endif
  476. _GL_CXXALIASWARN (ftell);
  477. #endif
  478. #if @GNULIB_FTELLO@
  479. # if !@GNULIB_FTELL@ && !defined _GL_NO_LARGE_FILES
  480. # define _GL_FTELL_WARN /* Category 3, above. */
  481. # undef ftell
  482. # endif
  483. # if @REPLACE_FTELLO@
  484. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  485. # undef ftello
  486. # define ftello rpl_ftello
  487. # endif
  488. _GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1)));
  489. _GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp));
  490. # else
  491. # if ! @HAVE_DECL_FTELLO@
  492. _GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1)));
  493. # endif
  494. _GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp));
  495. # endif
  496. _GL_CXXALIASWARN (ftello);
  497. #elif defined GNULIB_POSIXCHECK
  498. # define _GL_FTELL_WARN /* Category 1, above. */
  499. # undef ftell
  500. # undef ftello
  501. # if HAVE_RAW_DECL_FTELLO
  502. _GL_WARN_ON_USE (ftello, "ftello is unportable - "
  503. "use gnulib module ftello for portability");
  504. # endif
  505. #endif
  506. #ifdef _GL_FTELL_WARN
  507. # undef _GL_FTELL_WARN
  508. /* Here, either ftell is undefined (but C89 guarantees that it is
  509. declared), or it is defined as rpl_ftell (declared above). */
  510. _GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB "
  511. "on 32-bit platforms - "
  512. "use ftello function for handling of large files");
  513. #endif
  514. #if @GNULIB_FWRITE@
  515. # if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)
  516. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  517. # undef fwrite
  518. # define fwrite rpl_fwrite
  519. # endif
  520. _GL_FUNCDECL_RPL (fwrite, size_t,
  521. (const void *ptr, size_t s, size_t n, FILE *stream)
  522. _GL_ARG_NONNULL ((1, 4)));
  523. _GL_CXXALIAS_RPL (fwrite, size_t,
  524. (const void *ptr, size_t s, size_t n, FILE *stream));
  525. # else
  526. _GL_CXXALIAS_SYS (fwrite, size_t,
  527. (const void *ptr, size_t s, size_t n, FILE *stream));
  528. /* Work around bug 11959 when fortifying glibc 2.4 through 2.15
  529. <http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>,
  530. which sometimes causes an unwanted diagnostic for fwrite calls.
  531. This affects only function declaration attributes under certain
  532. versions of gcc and clang, and is not needed for C++. */
  533. # if (0 < __USE_FORTIFY_LEVEL \
  534. && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \
  535. && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \
  536. && !defined __cplusplus)
  537. # undef fwrite
  538. # undef fwrite_unlocked
  539. extern size_t __REDIRECT (rpl_fwrite,
  540. (const void *__restrict, size_t, size_t,
  541. FILE *__restrict),
  542. fwrite);
  543. extern size_t __REDIRECT (rpl_fwrite_unlocked,
  544. (const void *__restrict, size_t, size_t,
  545. FILE *__restrict),
  546. fwrite_unlocked);
  547. # define fwrite rpl_fwrite
  548. # define fwrite_unlocked rpl_fwrite_unlocked
  549. # endif
  550. # endif
  551. _GL_CXXALIASWARN (fwrite);
  552. #endif
  553. #if @GNULIB_GETC@
  554. # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
  555. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  556. # undef getc
  557. # define getc rpl_fgetc
  558. # endif
  559. _GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
  560. _GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream));
  561. # else
  562. _GL_CXXALIAS_SYS (getc, int, (FILE *stream));
  563. # endif
  564. _GL_CXXALIASWARN (getc);
  565. #endif
  566. #if @GNULIB_GETCHAR@
  567. # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
  568. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  569. # undef getchar
  570. # define getchar rpl_getchar
  571. # endif
  572. _GL_FUNCDECL_RPL (getchar, int, (void));
  573. _GL_CXXALIAS_RPL (getchar, int, (void));
  574. # else
  575. _GL_CXXALIAS_SYS (getchar, int, (void));
  576. # endif
  577. _GL_CXXALIASWARN (getchar);
  578. #endif
  579. #if @GNULIB_GETDELIM@
  580. /* Read input, up to (and including) the next occurrence of DELIMITER, from
  581. STREAM, store it in *LINEPTR (and NUL-terminate it).
  582. *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
  583. bytes of space. It is realloc'd as necessary.
  584. Return the number of bytes read and stored at *LINEPTR (not including the
  585. NUL terminator), or -1 on error or EOF. */
  586. # if @REPLACE_GETDELIM@
  587. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  588. # undef getdelim
  589. # define getdelim rpl_getdelim
  590. # endif
  591. _GL_FUNCDECL_RPL (getdelim, ssize_t,
  592. (char **lineptr, size_t *linesize, int delimiter,
  593. FILE *stream)
  594. _GL_ARG_NONNULL ((1, 2, 4)));
  595. _GL_CXXALIAS_RPL (getdelim, ssize_t,
  596. (char **lineptr, size_t *linesize, int delimiter,
  597. FILE *stream));
  598. # else
  599. # if !@HAVE_DECL_GETDELIM@
  600. _GL_FUNCDECL_SYS (getdelim, ssize_t,
  601. (char **lineptr, size_t *linesize, int delimiter,
  602. FILE *stream)
  603. _GL_ARG_NONNULL ((1, 2, 4)));
  604. # endif
  605. _GL_CXXALIAS_SYS (getdelim, ssize_t,
  606. (char **lineptr, size_t *linesize, int delimiter,
  607. FILE *stream));
  608. # endif
  609. _GL_CXXALIASWARN (getdelim);
  610. #elif defined GNULIB_POSIXCHECK
  611. # undef getdelim
  612. # if HAVE_RAW_DECL_GETDELIM
  613. _GL_WARN_ON_USE (getdelim, "getdelim is unportable - "
  614. "use gnulib module getdelim for portability");
  615. # endif
  616. #endif
  617. #if @GNULIB_GETLINE@
  618. /* Read a line, up to (and including) the next newline, from STREAM, store it
  619. in *LINEPTR (and NUL-terminate it).
  620. *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
  621. bytes of space. It is realloc'd as necessary.
  622. Return the number of bytes read and stored at *LINEPTR (not including the
  623. NUL terminator), or -1 on error or EOF. */
  624. # if @REPLACE_GETLINE@
  625. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  626. # undef getline
  627. # define getline rpl_getline
  628. # endif
  629. _GL_FUNCDECL_RPL (getline, ssize_t,
  630. (char **lineptr, size_t *linesize, FILE *stream)
  631. _GL_ARG_NONNULL ((1, 2, 3)));
  632. _GL_CXXALIAS_RPL (getline, ssize_t,
  633. (char **lineptr, size_t *linesize, FILE *stream));
  634. # else
  635. # if !@HAVE_DECL_GETLINE@
  636. _GL_FUNCDECL_SYS (getline, ssize_t,
  637. (char **lineptr, size_t *linesize, FILE *stream)
  638. _GL_ARG_NONNULL ((1, 2, 3)));
  639. # endif
  640. _GL_CXXALIAS_SYS (getline, ssize_t,
  641. (char **lineptr, size_t *linesize, FILE *stream));
  642. # endif
  643. # if @HAVE_DECL_GETLINE@
  644. _GL_CXXALIASWARN (getline);
  645. # endif
  646. #elif defined GNULIB_POSIXCHECK
  647. # undef getline
  648. # if HAVE_RAW_DECL_GETLINE
  649. _GL_WARN_ON_USE (getline, "getline is unportable - "
  650. "use gnulib module getline for portability");
  651. # endif
  652. #endif
  653. /* It is very rare that the developer ever has full control of stdin,
  654. so any use of gets warrants an unconditional warning; besides, C11
  655. removed it. */
  656. #undef gets
  657. #if HAVE_RAW_DECL_GETS
  658. _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
  659. #endif
  660. #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
  661. struct obstack;
  662. /* Grow an obstack with formatted output. Return the number of
  663. bytes added to OBS. No trailing nul byte is added, and the
  664. object should be closed with obstack_finish before use. Upon
  665. memory allocation error, call obstack_alloc_failed_handler. Upon
  666. other error, return -1. */
  667. # if @REPLACE_OBSTACK_PRINTF@
  668. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  669. # define obstack_printf rpl_obstack_printf
  670. # endif
  671. _GL_FUNCDECL_RPL (obstack_printf, int,
  672. (struct obstack *obs, const char *format, ...)
  673. _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
  674. _GL_ARG_NONNULL ((1, 2)));
  675. _GL_CXXALIAS_RPL (obstack_printf, int,
  676. (struct obstack *obs, const char *format, ...));
  677. # else
  678. # if !@HAVE_DECL_OBSTACK_PRINTF@
  679. _GL_FUNCDECL_SYS (obstack_printf, int,
  680. (struct obstack *obs, const char *format, ...)
  681. _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
  682. _GL_ARG_NONNULL ((1, 2)));
  683. # endif
  684. _GL_CXXALIAS_SYS (obstack_printf, int,
  685. (struct obstack *obs, const char *format, ...));
  686. # endif
  687. _GL_CXXALIASWARN (obstack_printf);
  688. # if @REPLACE_OBSTACK_PRINTF@
  689. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  690. # define obstack_vprintf rpl_obstack_vprintf
  691. # endif
  692. _GL_FUNCDECL_RPL (obstack_vprintf, int,
  693. (struct obstack *obs, const char *format, va_list args)
  694. _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
  695. _GL_ARG_NONNULL ((1, 2)));
  696. _GL_CXXALIAS_RPL (obstack_vprintf, int,
  697. (struct obstack *obs, const char *format, va_list args));
  698. # else
  699. # if !@HAVE_DECL_OBSTACK_PRINTF@
  700. _GL_FUNCDECL_SYS (obstack_vprintf, int,
  701. (struct obstack *obs, const char *format, va_list args)
  702. _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
  703. _GL_ARG_NONNULL ((1, 2)));
  704. # endif
  705. _GL_CXXALIAS_SYS (obstack_vprintf, int,
  706. (struct obstack *obs, const char *format, va_list args));
  707. # endif
  708. _GL_CXXALIASWARN (obstack_vprintf);
  709. #endif
  710. #if @GNULIB_PCLOSE@
  711. # if !@HAVE_PCLOSE@
  712. _GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
  713. # endif
  714. _GL_CXXALIAS_SYS (pclose, int, (FILE *stream));
  715. _GL_CXXALIASWARN (pclose);
  716. #elif defined GNULIB_POSIXCHECK
  717. # undef pclose
  718. # if HAVE_RAW_DECL_PCLOSE
  719. _GL_WARN_ON_USE (pclose, "pclose is unportable - "
  720. "use gnulib module pclose for more portability");
  721. # endif
  722. #endif
  723. #if @GNULIB_PERROR@
  724. /* Print a message to standard error, describing the value of ERRNO,
  725. (if STRING is not NULL and not empty) prefixed with STRING and ": ",
  726. and terminated with a newline. */
  727. # if @REPLACE_PERROR@
  728. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  729. # define perror rpl_perror
  730. # endif
  731. _GL_FUNCDECL_RPL (perror, void, (const char *string));
  732. _GL_CXXALIAS_RPL (perror, void, (const char *string));
  733. # else
  734. _GL_CXXALIAS_SYS (perror, void, (const char *string));
  735. # endif
  736. _GL_CXXALIASWARN (perror);
  737. #elif defined GNULIB_POSIXCHECK
  738. # undef perror
  739. /* Assume perror is always declared. */
  740. _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - "
  741. "use gnulib module perror for portability");
  742. #endif
  743. #if @GNULIB_POPEN@
  744. # if @REPLACE_POPEN@
  745. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  746. # undef popen
  747. # define popen rpl_popen
  748. # endif
  749. _GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode)
  750. _GL_ARG_NONNULL ((1, 2)));
  751. _GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode));
  752. # else
  753. # if !@HAVE_POPEN@
  754. _GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode)
  755. _GL_ARG_NONNULL ((1, 2)));
  756. # endif
  757. _GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode));
  758. # endif
  759. _GL_CXXALIASWARN (popen);
  760. #elif defined GNULIB_POSIXCHECK
  761. # undef popen
  762. # if HAVE_RAW_DECL_POPEN
  763. _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - "
  764. "use gnulib module popen or pipe for more portability");
  765. # endif
  766. #endif
  767. #if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@
  768. # if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \
  769. || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@))
  770. # if defined __GNUC__
  771. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  772. /* Don't break __attribute__((format(printf,M,N))). */
  773. # define printf __printf__
  774. # endif
  775. # if @GNULIB_PRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@
  776. _GL_FUNCDECL_RPL_1 (__printf__, int,
  777. (const char *format, ...)
  778. __asm__ (@ASM_SYMBOL_PREFIX@
  779. _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf))
  780. _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2)
  781. _GL_ARG_NONNULL ((1)));
  782. # else
  783. _GL_FUNCDECL_RPL_1 (__printf__, int,
  784. (const char *format, ...)
  785. __asm__ (@ASM_SYMBOL_PREFIX@
  786. _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf))
  787. _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2)
  788. _GL_ARG_NONNULL ((1)));
  789. # endif
  790. _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...));
  791. # else
  792. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  793. # define printf rpl_printf
  794. # endif
  795. _GL_FUNCDECL_RPL (printf, int,
  796. (const char *format, ...)
  797. _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2)
  798. _GL_ARG_NONNULL ((1)));
  799. _GL_CXXALIAS_RPL (printf, int, (const char *format, ...));
  800. # endif
  801. # define GNULIB_overrides_printf 1
  802. # else
  803. _GL_CXXALIAS_SYS (printf, int, (const char *format, ...));
  804. # endif
  805. _GL_CXXALIASWARN (printf);
  806. #endif
  807. #if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK
  808. # if !GNULIB_overrides_printf
  809. # undef printf
  810. # endif
  811. /* Assume printf is always declared. */
  812. _GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - "
  813. "use gnulib module printf-posix for portable "
  814. "POSIX compliance");
  815. #endif
  816. #if @GNULIB_PUTC@
  817. # if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)
  818. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  819. # undef putc
  820. # define putc rpl_fputc
  821. # endif
  822. _GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2)));
  823. _GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream));
  824. # else
  825. _GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream));
  826. # endif
  827. _GL_CXXALIASWARN (putc);
  828. #endif
  829. #if @GNULIB_PUTCHAR@
  830. # if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)
  831. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  832. # undef putchar
  833. # define putchar rpl_putchar
  834. # endif
  835. _GL_FUNCDECL_RPL (putchar, int, (int c));
  836. _GL_CXXALIAS_RPL (putchar, int, (int c));
  837. # else
  838. _GL_CXXALIAS_SYS (putchar, int, (int c));
  839. # endif
  840. _GL_CXXALIASWARN (putchar);
  841. #endif
  842. #if @GNULIB_PUTS@
  843. # if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)
  844. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  845. # undef puts
  846. # define puts rpl_puts
  847. # endif
  848. _GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1)));
  849. _GL_CXXALIAS_RPL (puts, int, (const char *string));
  850. # else
  851. _GL_CXXALIAS_SYS (puts, int, (const char *string));
  852. # endif
  853. _GL_CXXALIASWARN (puts);
  854. #endif
  855. #if @GNULIB_REMOVE@
  856. # if @REPLACE_REMOVE@
  857. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  858. # undef remove
  859. # define remove rpl_remove
  860. # endif
  861. _GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1)));
  862. _GL_CXXALIAS_RPL (remove, int, (const char *name));
  863. # else
  864. _GL_CXXALIAS_SYS (remove, int, (const char *name));
  865. # endif
  866. _GL_CXXALIASWARN (remove);
  867. #elif defined GNULIB_POSIXCHECK
  868. # undef remove
  869. /* Assume remove is always declared. */
  870. _GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - "
  871. "use gnulib module remove for more portability");
  872. #endif
  873. #if @GNULIB_RENAME@
  874. # if @REPLACE_RENAME@
  875. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  876. # undef rename
  877. # define rename rpl_rename
  878. # endif
  879. _GL_FUNCDECL_RPL (rename, int,
  880. (const char *old_filename, const char *new_filename)
  881. _GL_ARG_NONNULL ((1, 2)));
  882. _GL_CXXALIAS_RPL (rename, int,
  883. (const char *old_filename, const char *new_filename));
  884. # else
  885. _GL_CXXALIAS_SYS (rename, int,
  886. (const char *old_filename, const char *new_filename));
  887. # endif
  888. _GL_CXXALIASWARN (rename);
  889. #elif defined GNULIB_POSIXCHECK
  890. # undef rename
  891. /* Assume rename is always declared. */
  892. _GL_WARN_ON_USE (rename, "rename is buggy on some platforms - "
  893. "use gnulib module rename for more portability");
  894. #endif
  895. #if @GNULIB_RENAMEAT@
  896. # if @REPLACE_RENAMEAT@
  897. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  898. # undef renameat
  899. # define renameat rpl_renameat
  900. # endif
  901. _GL_FUNCDECL_RPL (renameat, int,
  902. (int fd1, char const *file1, int fd2, char const *file2)
  903. _GL_ARG_NONNULL ((2, 4)));
  904. _GL_CXXALIAS_RPL (renameat, int,
  905. (int fd1, char const *file1, int fd2, char const *file2));
  906. # else
  907. # if !@HAVE_RENAMEAT@
  908. _GL_FUNCDECL_SYS (renameat, int,
  909. (int fd1, char const *file1, int fd2, char const *file2)
  910. _GL_ARG_NONNULL ((2, 4)));
  911. # endif
  912. _GL_CXXALIAS_SYS (renameat, int,
  913. (int fd1, char const *file1, int fd2, char const *file2));
  914. # endif
  915. _GL_CXXALIASWARN (renameat);
  916. #elif defined GNULIB_POSIXCHECK
  917. # undef renameat
  918. # if HAVE_RAW_DECL_RENAMEAT
  919. _GL_WARN_ON_USE (renameat, "renameat is not portable - "
  920. "use gnulib module renameat for portability");
  921. # endif
  922. #endif
  923. #if @GNULIB_SCANF@
  924. # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
  925. # if defined __GNUC__
  926. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  927. # undef scanf
  928. /* Don't break __attribute__((format(scanf,M,N))). */
  929. # define scanf __scanf__
  930. # endif
  931. _GL_FUNCDECL_RPL_1 (__scanf__, int,
  932. (const char *format, ...)
  933. __asm__ (@ASM_SYMBOL_PREFIX@
  934. _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf))
  935. _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2)
  936. _GL_ARG_NONNULL ((1)));
  937. _GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *format, ...));
  938. # else
  939. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  940. # undef scanf
  941. # define scanf rpl_scanf
  942. # endif
  943. _GL_FUNCDECL_RPL (scanf, int, (const char *format, ...)
  944. _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2)
  945. _GL_ARG_NONNULL ((1)));
  946. _GL_CXXALIAS_RPL (scanf, int, (const char *format, ...));
  947. # endif
  948. # else
  949. _GL_CXXALIAS_SYS (scanf, int, (const char *format, ...));
  950. # endif
  951. _GL_CXXALIASWARN (scanf);
  952. #endif
  953. #if @GNULIB_SNPRINTF@
  954. # if @REPLACE_SNPRINTF@
  955. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  956. # define snprintf rpl_snprintf
  957. # endif
  958. _GL_FUNCDECL_RPL (snprintf, int,
  959. (char *str, size_t size, const char *format, ...)
  960. _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4)
  961. _GL_ARG_NONNULL ((3)));
  962. _GL_CXXALIAS_RPL (snprintf, int,
  963. (char *str, size_t size, const char *format, ...));
  964. # else
  965. # if !@HAVE_DECL_SNPRINTF@
  966. _GL_FUNCDECL_SYS (snprintf, int,
  967. (char *str, size_t size, const char *format, ...)
  968. _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4)
  969. _GL_ARG_NONNULL ((3)));
  970. # endif
  971. _GL_CXXALIAS_SYS (snprintf, int,
  972. (char *str, size_t size, const char *format, ...));
  973. # endif
  974. _GL_CXXALIASWARN (snprintf);
  975. #elif defined GNULIB_POSIXCHECK
  976. # undef snprintf
  977. # if HAVE_RAW_DECL_SNPRINTF
  978. _GL_WARN_ON_USE (snprintf, "snprintf is unportable - "
  979. "use gnulib module snprintf for portability");
  980. # endif
  981. #endif
  982. /* Some people would argue that all sprintf uses should be warned about
  983. (for example, OpenBSD issues a link warning for it),
  984. since it can cause security holes due to buffer overruns.
  985. However, we believe that sprintf can be used safely, and is more
  986. efficient than snprintf in those safe cases; and as proof of our
  987. belief, we use sprintf in several gnulib modules. So this header
  988. intentionally avoids adding a warning to sprintf except when
  989. GNULIB_POSIXCHECK is defined. */
  990. #if @GNULIB_SPRINTF_POSIX@
  991. # if @REPLACE_SPRINTF@
  992. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  993. # define sprintf rpl_sprintf
  994. # endif
  995. _GL_FUNCDECL_RPL (sprintf, int, (char *str, const char *format, ...)
  996. _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
  997. _GL_ARG_NONNULL ((1, 2)));
  998. _GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...));
  999. # else
  1000. _GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...));
  1001. # endif
  1002. _GL_CXXALIASWARN (sprintf);
  1003. #elif defined GNULIB_POSIXCHECK
  1004. # undef sprintf
  1005. /* Assume sprintf is always declared. */
  1006. _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - "
  1007. "use gnulib module sprintf-posix for portable "
  1008. "POSIX compliance");
  1009. #endif
  1010. #if @GNULIB_TMPFILE@
  1011. # if @REPLACE_TMPFILE@
  1012. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1013. # define tmpfile rpl_tmpfile
  1014. # endif
  1015. _GL_FUNCDECL_RPL (tmpfile, FILE *, (void));
  1016. _GL_CXXALIAS_RPL (tmpfile, FILE *, (void));
  1017. # else
  1018. _GL_CXXALIAS_SYS (tmpfile, FILE *, (void));
  1019. # endif
  1020. _GL_CXXALIASWARN (tmpfile);
  1021. #elif defined GNULIB_POSIXCHECK
  1022. # undef tmpfile
  1023. # if HAVE_RAW_DECL_TMPFILE
  1024. _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - "
  1025. "use gnulib module tmpfile for portability");
  1026. # endif
  1027. #endif
  1028. #if @GNULIB_VASPRINTF@
  1029. /* Write formatted output to a string dynamically allocated with malloc().
  1030. If the memory allocation succeeds, store the address of the string in
  1031. *RESULT and return the number of resulting bytes, excluding the trailing
  1032. NUL. Upon memory allocation error, or some other error, return -1. */
  1033. # if @REPLACE_VASPRINTF@
  1034. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1035. # define asprintf rpl_asprintf
  1036. # endif
  1037. _GL_FUNCDECL_RPL (asprintf, int,
  1038. (char **result, const char *format, ...)
  1039. _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
  1040. _GL_ARG_NONNULL ((1, 2)));
  1041. _GL_CXXALIAS_RPL (asprintf, int,
  1042. (char **result, const char *format, ...));
  1043. # else
  1044. # if !@HAVE_VASPRINTF@
  1045. _GL_FUNCDECL_SYS (asprintf, int,
  1046. (char **result, const char *format, ...)
  1047. _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
  1048. _GL_ARG_NONNULL ((1, 2)));
  1049. # endif
  1050. _GL_CXXALIAS_SYS (asprintf, int,
  1051. (char **result, const char *format, ...));
  1052. # endif
  1053. _GL_CXXALIASWARN (asprintf);
  1054. # if @REPLACE_VASPRINTF@
  1055. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1056. # define vasprintf rpl_vasprintf
  1057. # endif
  1058. _GL_FUNCDECL_RPL (vasprintf, int,
  1059. (char **result, const char *format, va_list args)
  1060. _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
  1061. _GL_ARG_NONNULL ((1, 2)));
  1062. _GL_CXXALIAS_RPL (vasprintf, int,
  1063. (char **result, const char *format, va_list args));
  1064. # else
  1065. # if !@HAVE_VASPRINTF@
  1066. _GL_FUNCDECL_SYS (vasprintf, int,
  1067. (char **result, const char *format, va_list args)
  1068. _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
  1069. _GL_ARG_NONNULL ((1, 2)));
  1070. # endif
  1071. _GL_CXXALIAS_SYS (vasprintf, int,
  1072. (char **result, const char *format, va_list args));
  1073. # endif
  1074. _GL_CXXALIASWARN (vasprintf);
  1075. #endif
  1076. #if @GNULIB_VDPRINTF@
  1077. # if @REPLACE_VDPRINTF@
  1078. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1079. # define vdprintf rpl_vdprintf
  1080. # endif
  1081. _GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *format, va_list args)
  1082. _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
  1083. _GL_ARG_NONNULL ((2)));
  1084. _GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *format, va_list args));
  1085. # else
  1086. # if !@HAVE_VDPRINTF@
  1087. _GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args)
  1088. _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
  1089. _GL_ARG_NONNULL ((2)));
  1090. # endif
  1091. /* Need to cast, because on Solaris, the third parameter will likely be
  1092. __va_list args. */
  1093. _GL_CXXALIAS_SYS_CAST (vdprintf, int,
  1094. (int fd, const char *format, va_list args));
  1095. # endif
  1096. _GL_CXXALIASWARN (vdprintf);
  1097. #elif defined GNULIB_POSIXCHECK
  1098. # undef vdprintf
  1099. # if HAVE_RAW_DECL_VDPRINTF
  1100. _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - "
  1101. "use gnulib module vdprintf for portability");
  1102. # endif
  1103. #endif
  1104. #if @GNULIB_VFPRINTF_POSIX@ || @GNULIB_VFPRINTF@
  1105. # if (@GNULIB_VFPRINTF_POSIX@ && @REPLACE_VFPRINTF@) \
  1106. || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@))
  1107. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1108. # define vfprintf rpl_vfprintf
  1109. # endif
  1110. # define GNULIB_overrides_vfprintf 1
  1111. # if @GNULIB_VFPRINTF_POSIX@
  1112. _GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)
  1113. _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
  1114. _GL_ARG_NONNULL ((1, 2)));
  1115. # else
  1116. _GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)
  1117. _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0)
  1118. _GL_ARG_NONNULL ((1, 2)));
  1119. # endif
  1120. _GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args));
  1121. # else
  1122. /* Need to cast, because on Solaris, the third parameter is
  1123. __va_list args
  1124. and GCC's fixincludes did not change this to __gnuc_va_list. */
  1125. _GL_CXXALIAS_SYS_CAST (vfprintf, int,
  1126. (FILE *fp, const char *format, va_list args));
  1127. # endif
  1128. _GL_CXXALIASWARN (vfprintf);
  1129. #endif
  1130. #if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
  1131. # if !GNULIB_overrides_vfprintf
  1132. # undef vfprintf
  1133. # endif
  1134. /* Assume vfprintf is always declared. */
  1135. _GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - "
  1136. "use gnulib module vfprintf-posix for portable "
  1137. "POSIX compliance");
  1138. #endif
  1139. #if @GNULIB_VFSCANF@
  1140. # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
  1141. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1142. # undef vfscanf
  1143. # define vfscanf rpl_vfscanf
  1144. # endif
  1145. _GL_FUNCDECL_RPL (vfscanf, int,
  1146. (FILE *stream, const char *format, va_list args)
  1147. _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0)
  1148. _GL_ARG_NONNULL ((1, 2)));
  1149. _GL_CXXALIAS_RPL (vfscanf, int,
  1150. (FILE *stream, const char *format, va_list args));
  1151. # else
  1152. _GL_CXXALIAS_SYS (vfscanf, int,
  1153. (FILE *stream, const char *format, va_list args));
  1154. # endif
  1155. _GL_CXXALIASWARN (vfscanf);
  1156. #endif
  1157. #if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@
  1158. # if (@GNULIB_VPRINTF_POSIX@ && @REPLACE_VPRINTF@) \
  1159. || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@))
  1160. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1161. # define vprintf rpl_vprintf
  1162. # endif
  1163. # define GNULIB_overrides_vprintf 1
  1164. # if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@
  1165. _GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args)
  1166. _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0)
  1167. _GL_ARG_NONNULL ((1)));
  1168. # else
  1169. _GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args)
  1170. _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0)
  1171. _GL_ARG_NONNULL ((1)));
  1172. # endif
  1173. _GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args));
  1174. # else
  1175. /* Need to cast, because on Solaris, the second parameter is
  1176. __va_list args
  1177. and GCC's fixincludes did not change this to __gnuc_va_list. */
  1178. _GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args));
  1179. # endif
  1180. _GL_CXXALIASWARN (vprintf);
  1181. #endif
  1182. #if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
  1183. # if !GNULIB_overrides_vprintf
  1184. # undef vprintf
  1185. # endif
  1186. /* Assume vprintf is always declared. */
  1187. _GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - "
  1188. "use gnulib module vprintf-posix for portable "
  1189. "POSIX compliance");
  1190. #endif
  1191. #if @GNULIB_VSCANF@
  1192. # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
  1193. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1194. # undef vscanf
  1195. # define vscanf rpl_vscanf
  1196. # endif
  1197. _GL_FUNCDECL_RPL (vscanf, int, (const char *format, va_list args)
  1198. _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0)
  1199. _GL_ARG_NONNULL ((1)));
  1200. _GL_CXXALIAS_RPL (vscanf, int, (const char *format, va_list args));
  1201. # else
  1202. _GL_CXXALIAS_SYS (vscanf, int, (const char *format, va_list args));
  1203. # endif
  1204. _GL_CXXALIASWARN (vscanf);
  1205. #endif
  1206. #if @GNULIB_VSNPRINTF@
  1207. # if @REPLACE_VSNPRINTF@
  1208. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1209. # define vsnprintf rpl_vsnprintf
  1210. # endif
  1211. _GL_FUNCDECL_RPL (vsnprintf, int,
  1212. (char *str, size_t size, const char *format, va_list args)
  1213. _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0)
  1214. _GL_ARG_NONNULL ((3)));
  1215. _GL_CXXALIAS_RPL (vsnprintf, int,
  1216. (char *str, size_t size, const char *format, va_list args));
  1217. # else
  1218. # if !@HAVE_DECL_VSNPRINTF@
  1219. _GL_FUNCDECL_SYS (vsnprintf, int,
  1220. (char *str, size_t size, const char *format, va_list args)
  1221. _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0)
  1222. _GL_ARG_NONNULL ((3)));
  1223. # endif
  1224. _GL_CXXALIAS_SYS (vsnprintf, int,
  1225. (char *str, size_t size, const char *format, va_list args));
  1226. # endif
  1227. _GL_CXXALIASWARN (vsnprintf);
  1228. #elif defined GNULIB_POSIXCHECK
  1229. # undef vsnprintf
  1230. # if HAVE_RAW_DECL_VSNPRINTF
  1231. _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - "
  1232. "use gnulib module vsnprintf for portability");
  1233. # endif
  1234. #endif
  1235. #if @GNULIB_VSPRINTF_POSIX@
  1236. # if @REPLACE_VSPRINTF@
  1237. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1238. # define vsprintf rpl_vsprintf
  1239. # endif
  1240. _GL_FUNCDECL_RPL (vsprintf, int,
  1241. (char *str, const char *format, va_list args)
  1242. _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
  1243. _GL_ARG_NONNULL ((1, 2)));
  1244. _GL_CXXALIAS_RPL (vsprintf, int,
  1245. (char *str, const char *format, va_list args));
  1246. # else
  1247. /* Need to cast, because on Solaris, the third parameter is
  1248. __va_list args
  1249. and GCC's fixincludes did not change this to __gnuc_va_list. */
  1250. _GL_CXXALIAS_SYS_CAST (vsprintf, int,
  1251. (char *str, const char *format, va_list args));
  1252. # endif
  1253. _GL_CXXALIASWARN (vsprintf);
  1254. #elif defined GNULIB_POSIXCHECK
  1255. # undef vsprintf
  1256. /* Assume vsprintf is always declared. */
  1257. _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - "
  1258. "use gnulib module vsprintf-posix for portable "
  1259. "POSIX compliance");
  1260. #endif
  1261. #endif /* _@GUARD_PREFIX@_STDIO_H */
  1262. #endif /* _@GUARD_PREFIX@_STDIO_H */
  1263. #endif