stdio.in.h 49 KB

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