annotate lib/stdio.in.h @ 11653:ecb384fccb5b

fpurge: migrate into <stdio.h> * lib/fpurge.h: Delete... * lib/stdio.in.h (fpurge): ...and declare here, instead. * lib/fpurge.c (fpurge): Change declaring header. * modules/fpurge (Files): Drop deleted file. (Depends-on): Add stdio. (configure.ac): Set witness. * modules/stdio (Makefile.am): Support fpurge macros. * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise. * m4/fpurge.m4 (gl_FUNC_FPURGE): Set appropriate variables. * lib/fflush.c: Update client. * tests/test-fpurge.c: Likewise. * NEWS: Mention the change. Signed-off-by: Eric Blake <ebb9@byu.net>
author Eric Blake <ebb9@byu.net>
date Wed, 24 Jun 2009 06:49:00 -0600
parents bf21f4597784
children de4ad188001d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9262
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* A GNU-like <stdio.h>.
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2
11653
ecb384fccb5b fpurge: migrate into <stdio.h>
Eric Blake <ebb9@byu.net>
parents: 11035
diff changeset
3 Copyright (C) 2004, 2007-2009 Free Software Foundation, Inc.
9262
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 This program is free software; you can redistribute it and/or modify
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 it under the terms of the GNU General Public License as published by
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 the Free Software Foundation; either version 2, or (at your option)
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 any later version.
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 GNU General Public License for more details.
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 You should have received a copy of the GNU General Public License
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 along with this program; if not, write to the Free Software Foundation,
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18
10655
8668b19a7032 Avoid gcc warnings because of #pragma GCC system_header on older gcc.
Bruno Haible <bruno@clisp.org>
parents: 10622
diff changeset
19 #if __GNUC__ >= 3
10375
f96e845fc36d Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
20 @PRAGMA_SYSTEM_HEADER@
10655
8668b19a7032 Avoid gcc warnings because of #pragma GCC system_header on older gcc.
Bruno Haible <bruno@clisp.org>
parents: 10622
diff changeset
21 #endif
10375
f96e845fc36d Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
22
9262
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 #if defined __need_FILE || defined __need___FILE
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 /* Special invocation convention inside glibc header files. */
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 #@INCLUDE_NEXT@ @NEXT_STDIO_H@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28 #else
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 /* Normal invocation convention. */
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 #ifndef _GL_STDIO_H
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
33 /* The include_next requires a split double-inclusion guard. */
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34 #@INCLUDE_NEXT@ @NEXT_STDIO_H@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
36 #ifndef _GL_STDIO_H
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 #define _GL_STDIO_H
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39 #include <stdarg.h>
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 #include <stddef.h>
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42 #if (@GNULIB_FSEEKO@ && @REPLACE_FSEEKO@) \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43 || (@GNULIB_FTELLO@ && @REPLACE_FTELLO@) \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44 || (@GNULIB_GETDELIM@ && !@HAVE_DECL_GETDELIM@) \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
45 || (@GNULIB_GETLINE@ && (!@HAVE_DECL_GETLINE@ || @REPLACE_GETLINE@))
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
46 /* Get off_t and ssize_t. */
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
47 # include <sys/types.h>
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
48 #endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
49
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
50 #ifndef __attribute__
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
51 /* This feature is available in gcc versions 2.5 and later. */
9613
c4fa39bf5223 Don't redefine __attribute__ without a need.
Bruno Haible <bruno@clisp.org>
parents: 9301
diff changeset
52 # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
9262
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53 # define __attribute__(Spec) /* empty */
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
54 # endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55 /* The __-protected variants of `format' and `printf' attributes
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
56 are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
57 # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
58 # define __format__ format
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
59 # define __printf__ printf
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
60 # endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
61 #endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
62
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
63
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
64 /* The definition of GL_LINK_WARNING is copied here. */
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
65
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
66
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
67 #ifdef __cplusplus
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
68 extern "C" {
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
69 #endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
70
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
71
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
72 #if @GNULIB_FPRINTF_POSIX@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
73 # if @REPLACE_FPRINTF@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
74 # define fprintf rpl_fprintf
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
75 extern int fprintf (FILE *fp, const char *format, ...)
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
76 __attribute__ ((__format__ (__printf__, 2, 3)));
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
77 # endif
10487
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
78 #elif @GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
79 # define fprintf rpl_fprintf
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
80 extern int fprintf (FILE *fp, const char *format, ...)
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
81 __attribute__ ((__format__ (__printf__, 2, 3)));
9262
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
82 #elif defined GNULIB_POSIXCHECK
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
83 # undef fprintf
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
84 # define fprintf \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
85 (GL_LINK_WARNING ("fprintf is not always POSIX compliant - " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
86 "use gnulib module fprintf-posix for portable " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
87 "POSIX compliance"), \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
88 fprintf)
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
89 #endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
90
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
91 #if @GNULIB_VFPRINTF_POSIX@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
92 # if @REPLACE_VFPRINTF@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
93 # define vfprintf rpl_vfprintf
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
94 extern int vfprintf (FILE *fp, const char *format, va_list args)
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
95 __attribute__ ((__format__ (__printf__, 2, 0)));
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
96 # endif
10487
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
97 #elif @GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
98 # define vfprintf rpl_vfprintf
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
99 extern int vfprintf (FILE *fp, const char *format, va_list args)
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
100 __attribute__ ((__format__ (__printf__, 2, 0)));
9262
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
101 #elif defined GNULIB_POSIXCHECK
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
102 # undef vfprintf
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
103 # define vfprintf(s,f,a) \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
104 (GL_LINK_WARNING ("vfprintf is not always POSIX compliant - " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
105 "use gnulib module vfprintf-posix for portable " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
106 "POSIX compliance"), \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
107 vfprintf (s, f, a))
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
108 #endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
109
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
110 #if @GNULIB_PRINTF_POSIX@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
111 # if @REPLACE_PRINTF@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
112 /* Don't break __attribute__((format(printf,M,N))). */
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
113 # define printf __printf__
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
114 extern int printf (const char *format, ...)
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
115 __attribute__ ((__format__ (__printf__, 1, 2)));
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
116 # endif
10487
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
117 #elif @GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
118 /* Don't break __attribute__((format(printf,M,N))). */
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
119 # define printf __printf__
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
120 extern int printf (const char *format, ...)
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
121 __attribute__ ((__format__ (__printf__, 1, 2)));
9262
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
122 #elif defined GNULIB_POSIXCHECK
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
123 # undef printf
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
124 # define printf \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
125 (GL_LINK_WARNING ("printf is not always POSIX compliant - " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
126 "use gnulib module printf-posix for portable " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
127 "POSIX compliance"), \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
128 printf)
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
129 /* Don't break __attribute__((format(printf,M,N))). */
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
130 # define format(kind,m,n) format (__##kind##__, m, n)
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
131 # define __format__(kind,m,n) __format__ (__##kind##__, m, n)
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
132 # define ____printf____ __printf__
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
133 # define ____scanf____ __scanf__
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
134 # define ____strftime____ __strftime__
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
135 # define ____strfmon____ __strfmon__
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
136 #endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
137
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
138 #if @GNULIB_VPRINTF_POSIX@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
139 # if @REPLACE_VPRINTF@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
140 # define vprintf rpl_vprintf
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
141 extern int vprintf (const char *format, va_list args)
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
142 __attribute__ ((__format__ (__printf__, 1, 0)));
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
143 # endif
10487
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
144 #elif @GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
145 # define vprintf rpl_vprintf
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
146 extern int vprintf (const char *format, va_list args)
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
147 __attribute__ ((__format__ (__printf__, 1, 0)));
9262
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
148 #elif defined GNULIB_POSIXCHECK
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
149 # undef vprintf
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
150 # define vprintf(f,a) \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
151 (GL_LINK_WARNING ("vprintf is not always POSIX compliant - " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
152 "use gnulib module vprintf-posix for portable " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
153 "POSIX compliance"), \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
154 vprintf (f, a))
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
155 #endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
156
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
157 #if @GNULIB_SNPRINTF@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
158 # if @REPLACE_SNPRINTF@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
159 # define snprintf rpl_snprintf
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
160 # endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
161 # if @REPLACE_SNPRINTF@ || !@HAVE_DECL_SNPRINTF@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
162 extern int snprintf (char *str, size_t size, const char *format, ...)
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
163 __attribute__ ((__format__ (__printf__, 3, 4)));
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
164 # endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
165 #elif defined GNULIB_POSIXCHECK
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
166 # undef snprintf
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
167 # define snprintf \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
168 (GL_LINK_WARNING ("snprintf is unportable - " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
169 "use gnulib module snprintf for portability"), \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
170 snprintf)
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
171 #endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
172
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
173 #if @GNULIB_VSNPRINTF@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
174 # if @REPLACE_VSNPRINTF@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
175 # define vsnprintf rpl_vsnprintf
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
176 # endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
177 # if @REPLACE_VSNPRINTF@ || !@HAVE_DECL_VSNPRINTF@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
178 extern int vsnprintf (char *str, size_t size, const char *format, va_list args)
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
179 __attribute__ ((__format__ (__printf__, 3, 0)));
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
180 # endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
181 #elif defined GNULIB_POSIXCHECK
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
182 # undef vsnprintf
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
183 # define vsnprintf(b,s,f,a) \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
184 (GL_LINK_WARNING ("vsnprintf is unportable - " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
185 "use gnulib module vsnprintf for portability"), \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
186 vsnprintf (b, s, f, a))
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
187 #endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
188
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
189 #if @GNULIB_SPRINTF_POSIX@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
190 # if @REPLACE_SPRINTF@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
191 # define sprintf rpl_sprintf
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
192 extern int sprintf (char *str, const char *format, ...)
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
193 __attribute__ ((__format__ (__printf__, 2, 3)));
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
194 # endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
195 #elif defined GNULIB_POSIXCHECK
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
196 # undef sprintf
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
197 # define sprintf \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
198 (GL_LINK_WARNING ("sprintf is not always POSIX compliant - " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
199 "use gnulib module sprintf-posix for portable " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
200 "POSIX compliance"), \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
201 sprintf)
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
202 #endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
203
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
204 #if @GNULIB_VSPRINTF_POSIX@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
205 # if @REPLACE_VSPRINTF@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
206 # define vsprintf rpl_vsprintf
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
207 extern int vsprintf (char *str, const char *format, va_list args)
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
208 __attribute__ ((__format__ (__printf__, 2, 0)));
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
209 # endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
210 #elif defined GNULIB_POSIXCHECK
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
211 # undef vsprintf
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
212 # define vsprintf(b,f,a) \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
213 (GL_LINK_WARNING ("vsprintf is not always POSIX compliant - " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
214 "use gnulib module vsprintf-posix for portable " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
215 "POSIX compliance"), \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
216 vsprintf (b, f, a))
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
217 #endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
218
11035
bf21f4597784 New modules 'dprintf', 'dprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 11033
diff changeset
219 #if @GNULIB_DPRINTF@
bf21f4597784 New modules 'dprintf', 'dprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 11033
diff changeset
220 # if @REPLACE_DPRINTF@
bf21f4597784 New modules 'dprintf', 'dprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 11033
diff changeset
221 # define dprintf rpl_dprintf
bf21f4597784 New modules 'dprintf', 'dprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 11033
diff changeset
222 # endif
bf21f4597784 New modules 'dprintf', 'dprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 11033
diff changeset
223 # if @REPLACE_DPRINTF@ || !@HAVE_DPRINTF@
bf21f4597784 New modules 'dprintf', 'dprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 11033
diff changeset
224 extern int dprintf (int fd, const char *format, ...)
bf21f4597784 New modules 'dprintf', 'dprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 11033
diff changeset
225 __attribute__ ((__format__ (__printf__, 2, 3)));
bf21f4597784 New modules 'dprintf', 'dprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 11033
diff changeset
226 # endif
bf21f4597784 New modules 'dprintf', 'dprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 11033
diff changeset
227 #elif defined GNULIB_POSIXCHECK
bf21f4597784 New modules 'dprintf', 'dprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 11033
diff changeset
228 # undef dprintf
bf21f4597784 New modules 'dprintf', 'dprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 11033
diff changeset
229 # define dprintf(d,f,a) \
bf21f4597784 New modules 'dprintf', 'dprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 11033
diff changeset
230 (GL_LINK_WARNING ("dprintf is unportable - " \
bf21f4597784 New modules 'dprintf', 'dprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 11033
diff changeset
231 "use gnulib module dprintf for portability"), \
bf21f4597784 New modules 'dprintf', 'dprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 11033
diff changeset
232 dprintf (d, f, a))
bf21f4597784 New modules 'dprintf', 'dprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 11033
diff changeset
233 #endif
bf21f4597784 New modules 'dprintf', 'dprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 11033
diff changeset
234
11033
049c445485ee New modules 'vdprintf', 'vdprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
235 #if @GNULIB_VDPRINTF@
049c445485ee New modules 'vdprintf', 'vdprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
236 # if @REPLACE_VDPRINTF@
049c445485ee New modules 'vdprintf', 'vdprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
237 # define vdprintf rpl_vdprintf
049c445485ee New modules 'vdprintf', 'vdprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
238 # endif
049c445485ee New modules 'vdprintf', 'vdprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
239 # if @REPLACE_VDPRINTF@ || !@HAVE_VDPRINTF@
049c445485ee New modules 'vdprintf', 'vdprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
240 extern int vdprintf (int fd, const char *format, va_list args)
049c445485ee New modules 'vdprintf', 'vdprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
241 __attribute__ ((__format__ (__printf__, 2, 0)));
049c445485ee New modules 'vdprintf', 'vdprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
242 # endif
049c445485ee New modules 'vdprintf', 'vdprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
243 #elif defined GNULIB_POSIXCHECK
049c445485ee New modules 'vdprintf', 'vdprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
244 # undef vdprintf
049c445485ee New modules 'vdprintf', 'vdprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
245 # define vdprintf(d,f,a) \
049c445485ee New modules 'vdprintf', 'vdprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
246 (GL_LINK_WARNING ("vdprintf is unportable - " \
049c445485ee New modules 'vdprintf', 'vdprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
247 "use gnulib module vdprintf for portability"), \
049c445485ee New modules 'vdprintf', 'vdprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
248 vdprintf (d, f, a))
049c445485ee New modules 'vdprintf', 'vdprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
249 #endif
049c445485ee New modules 'vdprintf', 'vdprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
250
9262
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
251 #if @GNULIB_VASPRINTF@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
252 # if @REPLACE_VASPRINTF@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
253 # define asprintf rpl_asprintf
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
254 # define vasprintf rpl_vasprintf
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
255 # endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
256 # if @REPLACE_VASPRINTF@ || !@HAVE_VASPRINTF@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
257 /* Write formatted output to a string dynamically allocated with malloc().
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
258 If the memory allocation succeeds, store the address of the string in
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
259 *RESULT and return the number of resulting bytes, excluding the trailing
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
260 NUL. Upon memory allocation error, or some other error, return -1. */
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
261 extern int asprintf (char **result, const char *format, ...)
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
262 __attribute__ ((__format__ (__printf__, 2, 3)));
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
263 extern int vasprintf (char **result, const char *format, va_list args)
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
264 __attribute__ ((__format__ (__printf__, 2, 0)));
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
265 # endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
266 #endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
267
10205
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents: 9613
diff changeset
268 #if @GNULIB_OBSTACK_PRINTF@
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents: 9613
diff changeset
269 # if @REPLACE_OBSTACK_PRINTF@
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents: 9613
diff changeset
270 # define obstack_printf rpl_osbtack_printf
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents: 9613
diff changeset
271 # define obstack_vprintf rpl_obstack_vprintf
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents: 9613
diff changeset
272 # endif
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents: 9613
diff changeset
273 # if @REPLACE_OBSTACK_PRINTF@ || !@HAVE_DECL_OBSTACK_PRINTF@
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents: 9613
diff changeset
274 struct obstack;
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents: 9613
diff changeset
275 /* Grow an obstack with formatted output. Return the number of
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents: 9613
diff changeset
276 bytes added to OBS. No trailing nul byte is added, and the
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents: 9613
diff changeset
277 object should be closed with obstack_finish before use. Upon
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents: 9613
diff changeset
278 memory allocation error, call obstack_alloc_failed_handler. Upon
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents: 9613
diff changeset
279 other error, return -1. */
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents: 9613
diff changeset
280 extern int obstack_printf (struct obstack *obs, const char *format, ...)
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents: 9613
diff changeset
281 __attribute__ ((__format__ (__printf__, 2, 3)));
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents: 9613
diff changeset
282 extern int obstack_vprintf (struct obstack *obs, const char *format,
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents: 9613
diff changeset
283 va_list args)
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents: 9613
diff changeset
284 __attribute__ ((__format__ (__printf__, 2, 0)));
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents: 9613
diff changeset
285 # endif
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents: 9613
diff changeset
286 #endif
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents: 9613
diff changeset
287
9301
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
288 #if @GNULIB_FOPEN@
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
289 # if @REPLACE_FOPEN@
10528
97cab1215a7c Tweak patch that overrides open() and fopen().
Bruno Haible <bruno@clisp.org>
parents: 10487
diff changeset
290 # undef fopen
9301
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
291 # define fopen rpl_fopen
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
292 extern FILE * fopen (const char *filename, const char *mode);
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
293 # endif
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
294 #elif defined GNULIB_POSIXCHECK
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
295 # undef fopen
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
296 # define fopen(f,m) \
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
297 (GL_LINK_WARNING ("fopen on Win32 platforms is not POSIX compatible - " \
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
298 "use gnulib module fopen for portability"), \
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
299 fopen (f, m))
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
300 #endif
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
301
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
302 #if @GNULIB_FREOPEN@
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
303 # if @REPLACE_FREOPEN@
10528
97cab1215a7c Tweak patch that overrides open() and fopen().
Bruno Haible <bruno@clisp.org>
parents: 10487
diff changeset
304 # undef freopen
9301
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
305 # define freopen rpl_freopen
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
306 extern FILE * freopen (const char *filename, const char *mode, FILE *stream);
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
307 # endif
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
308 #elif defined GNULIB_POSIXCHECK
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
309 # undef freopen
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
310 # define freopen(f,m,s) \
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
311 (GL_LINK_WARNING ("freopen on Win32 platforms is not POSIX compatible - " \
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
312 "use gnulib module freopen for portability"), \
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
313 freopen (f, m, s))
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
314 #endif
98e1721b4e40 New modules 'fopen' and 'freopen'.
Bruno Haible <bruno@clisp.org>
parents: 9262
diff changeset
315
9262
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
316 #if @GNULIB_FSEEKO@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
317 # if @REPLACE_FSEEKO@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
318 /* Provide fseek, fseeko functions that are aware of a preceding
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
319 fflush(), and which detect pipes. */
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
320 # define fseeko rpl_fseeko
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
321 extern int fseeko (FILE *fp, off_t offset, int whence);
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
322 # define fseek(fp, offset, whence) fseeko (fp, (off_t)(offset), whence)
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
323 # endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
324 #elif defined GNULIB_POSIXCHECK
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
325 # undef fseeko
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
326 # define fseeko(f,o,w) \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
327 (GL_LINK_WARNING ("fseeko is unportable - " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
328 "use gnulib module fseeko for portability"), \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
329 fseeko (f, o, w))
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
330 #endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
331
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
332 #if @GNULIB_FSEEK@ && @REPLACE_FSEEK@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
333 extern int rpl_fseek (FILE *fp, long offset, int whence);
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
334 # undef fseek
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
335 # if defined GNULIB_POSIXCHECK
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
336 # define fseek(f,o,w) \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
337 (GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
338 "on 32-bit platforms - " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
339 "use fseeko function for handling of large files"), \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
340 rpl_fseek (f, o, w))
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
341 # else
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
342 # define fseek rpl_fseek
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
343 # endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
344 #elif defined GNULIB_POSIXCHECK
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
345 # ifndef fseek
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
346 # define fseek(f,o,w) \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
347 (GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
348 "on 32-bit platforms - " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
349 "use fseeko function for handling of large files"), \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
350 fseek (f, o, w))
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
351 # endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
352 #endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
353
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
354 #if @GNULIB_FTELLO@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
355 # if @REPLACE_FTELLO@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
356 # define ftello rpl_ftello
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
357 extern off_t ftello (FILE *fp);
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
358 # define ftell(fp) ftello (fp)
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
359 # endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
360 #elif defined GNULIB_POSIXCHECK
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
361 # undef ftello
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
362 # define ftello(f) \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
363 (GL_LINK_WARNING ("ftello is unportable - " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
364 "use gnulib module ftello for portability"), \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
365 ftello (f))
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
366 #endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
367
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
368 #if @GNULIB_FTELL@ && @REPLACE_FTELL@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
369 extern long rpl_ftell (FILE *fp);
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
370 # undef ftell
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
371 # if GNULIB_POSIXCHECK
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
372 # define ftell(f) \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
373 (GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
374 "on 32-bit platforms - " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
375 "use ftello function for handling of large files"), \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
376 rpl_ftell (f))
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
377 # else
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
378 # define ftell rpl_ftell
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
379 # endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
380 #elif defined GNULIB_POSIXCHECK
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
381 # ifndef ftell
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
382 # define ftell(f) \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
383 (GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
384 "on 32-bit platforms - " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
385 "use ftello function for handling of large files"), \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
386 ftell (f))
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
387 # endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
388 #endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
389
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
390 #if @GNULIB_FFLUSH@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
391 # if @REPLACE_FFLUSH@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
392 # define fflush rpl_fflush
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
393 /* Flush all pending data on STREAM according to POSIX rules. Both
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
394 output and seekable input streams are supported.
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
395 Note! LOSS OF DATA can occur if fflush is applied on an input stream
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
396 that is _not_seekable_ or on an update stream that is _not_seekable_
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
397 and in which the most recent operation was input. Seekability can
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
398 be tested with lseek(fileno(fp),0,SEEK_CUR). */
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
399 extern int fflush (FILE *gl_stream);
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
400 # endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
401 #elif defined GNULIB_POSIXCHECK
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
402 # undef fflush
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
403 # define fflush(f) \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
404 (GL_LINK_WARNING ("fflush is not always POSIX compliant - " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
405 "use gnulib module fflush for portable " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
406 "POSIX compliance"), \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
407 fflush (f))
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
408 #endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
409
11653
ecb384fccb5b fpurge: migrate into <stdio.h>
Eric Blake <ebb9@byu.net>
parents: 11035
diff changeset
410 #if @GNULIB_FPURGE@
ecb384fccb5b fpurge: migrate into <stdio.h>
Eric Blake <ebb9@byu.net>
parents: 11035
diff changeset
411 # if @REPLACE_FPURGE@
ecb384fccb5b fpurge: migrate into <stdio.h>
Eric Blake <ebb9@byu.net>
parents: 11035
diff changeset
412 # define fpurge rpl_fpurge
ecb384fccb5b fpurge: migrate into <stdio.h>
Eric Blake <ebb9@byu.net>
parents: 11035
diff changeset
413 # endif
ecb384fccb5b fpurge: migrate into <stdio.h>
Eric Blake <ebb9@byu.net>
parents: 11035
diff changeset
414 # if @REPLACE_FPURGE@ || !@HAVE_DECL_FPURGE@
ecb384fccb5b fpurge: migrate into <stdio.h>
Eric Blake <ebb9@byu.net>
parents: 11035
diff changeset
415 /* Discard all pending buffered I/O data on STREAM.
ecb384fccb5b fpurge: migrate into <stdio.h>
Eric Blake <ebb9@byu.net>
parents: 11035
diff changeset
416 STREAM must not be wide-character oriented.
ecb384fccb5b fpurge: migrate into <stdio.h>
Eric Blake <ebb9@byu.net>
parents: 11035
diff changeset
417 Return 0 if successful. Upon error, return -1 and set errno. */
ecb384fccb5b fpurge: migrate into <stdio.h>
Eric Blake <ebb9@byu.net>
parents: 11035
diff changeset
418 extern int fpurge (FILE *gl_stream);
ecb384fccb5b fpurge: migrate into <stdio.h>
Eric Blake <ebb9@byu.net>
parents: 11035
diff changeset
419 # endif
ecb384fccb5b fpurge: migrate into <stdio.h>
Eric Blake <ebb9@byu.net>
parents: 11035
diff changeset
420 #elif defined GNULIB_POSIXCHECK
ecb384fccb5b fpurge: migrate into <stdio.h>
Eric Blake <ebb9@byu.net>
parents: 11035
diff changeset
421 # undef fpurge
ecb384fccb5b fpurge: migrate into <stdio.h>
Eric Blake <ebb9@byu.net>
parents: 11035
diff changeset
422 # define fpurge(f) \
ecb384fccb5b fpurge: migrate into <stdio.h>
Eric Blake <ebb9@byu.net>
parents: 11035
diff changeset
423 (GL_LINK_WARNING ("fpurge is not always present - " \
ecb384fccb5b fpurge: migrate into <stdio.h>
Eric Blake <ebb9@byu.net>
parents: 11035
diff changeset
424 "use gnulib module fpurge for portability"), \
ecb384fccb5b fpurge: migrate into <stdio.h>
Eric Blake <ebb9@byu.net>
parents: 11035
diff changeset
425 fpurge (f))
ecb384fccb5b fpurge: migrate into <stdio.h>
Eric Blake <ebb9@byu.net>
parents: 11035
diff changeset
426 #endif
ecb384fccb5b fpurge: migrate into <stdio.h>
Eric Blake <ebb9@byu.net>
parents: 11035
diff changeset
427
10622
ac6f431cc95d New module 'fclose'.
Bruno Haible <bruno@clisp.org>
parents: 10528
diff changeset
428 #if @GNULIB_FCLOSE@
ac6f431cc95d New module 'fclose'.
Bruno Haible <bruno@clisp.org>
parents: 10528
diff changeset
429 # if @REPLACE_FCLOSE@
ac6f431cc95d New module 'fclose'.
Bruno Haible <bruno@clisp.org>
parents: 10528
diff changeset
430 # define fclose rpl_fclose
ac6f431cc95d New module 'fclose'.
Bruno Haible <bruno@clisp.org>
parents: 10528
diff changeset
431 /* Close STREAM and its underlying file descriptor. */
ac6f431cc95d New module 'fclose'.
Bruno Haible <bruno@clisp.org>
parents: 10528
diff changeset
432 extern int fclose (FILE *stream);
ac6f431cc95d New module 'fclose'.
Bruno Haible <bruno@clisp.org>
parents: 10528
diff changeset
433 # endif
ac6f431cc95d New module 'fclose'.
Bruno Haible <bruno@clisp.org>
parents: 10528
diff changeset
434 #elif defined GNULIB_POSIXCHECK
ac6f431cc95d New module 'fclose'.
Bruno Haible <bruno@clisp.org>
parents: 10528
diff changeset
435 # undef fclose
ac6f431cc95d New module 'fclose'.
Bruno Haible <bruno@clisp.org>
parents: 10528
diff changeset
436 # define fclose(f) \
ac6f431cc95d New module 'fclose'.
Bruno Haible <bruno@clisp.org>
parents: 10528
diff changeset
437 (GL_LINK_WARNING ("fclose is not always POSIX compliant - " \
ac6f431cc95d New module 'fclose'.
Bruno Haible <bruno@clisp.org>
parents: 10528
diff changeset
438 "use gnulib module fclose for portable " \
ac6f431cc95d New module 'fclose'.
Bruno Haible <bruno@clisp.org>
parents: 10528
diff changeset
439 "POSIX compliance"), \
ac6f431cc95d New module 'fclose'.
Bruno Haible <bruno@clisp.org>
parents: 10528
diff changeset
440 fclose (f))
ac6f431cc95d New module 'fclose'.
Bruno Haible <bruno@clisp.org>
parents: 10528
diff changeset
441 #endif
ac6f431cc95d New module 'fclose'.
Bruno Haible <bruno@clisp.org>
parents: 10528
diff changeset
442
10487
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
443 #if @GNULIB_FPUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
444 # undef fputc
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
445 # define fputc rpl_fputc
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
446 extern int fputc (int c, FILE *stream);
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
447 #endif
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
448
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
449 #if @GNULIB_PUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
450 # undef putc
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
451 # define putc rpl_fputc
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
452 extern int putc (int c, FILE *stream);
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
453 #endif
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
454
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
455 #if @GNULIB_PUTCHAR@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
456 # undef putchar
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
457 # define putchar rpl_putchar
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
458 extern int putchar (int c);
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
459 #endif
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
460
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
461 #if @GNULIB_FPUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
462 # undef fputs
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
463 # define fputs rpl_fputs
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
464 extern int fputs (const char *string, FILE *stream);
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
465 #endif
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
466
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
467 #if @GNULIB_PUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
468 # undef puts
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
469 # define puts rpl_puts
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
470 extern int puts (const char *string);
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
471 #endif
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
472
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
473 #if @GNULIB_FWRITE@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
474 # undef fwrite
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
475 # define fwrite rpl_fwrite
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
476 extern size_t fwrite (const void *ptr, size_t s, size_t n, FILE *stream);
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
477 #endif
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 10433
diff changeset
478
9262
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
479 #if @GNULIB_GETDELIM@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
480 # if !@HAVE_DECL_GETDELIM@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
481 /* Read input, up to (and including) the next occurrence of DELIMITER, from
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
482 STREAM, store it in *LINEPTR (and NUL-terminate it).
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
483 *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
484 bytes of space. It is realloc'd as necessary.
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
485 Return the number of bytes read and stored at *LINEPTR (not including the
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
486 NUL terminator), or -1 on error or EOF. */
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
487 extern ssize_t getdelim (char **lineptr, size_t *linesize, int delimiter,
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
488 FILE *stream);
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
489 # endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
490 #elif defined GNULIB_POSIXCHECK
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
491 # undef getdelim
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
492 # define getdelim(l, s, d, f) \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
493 (GL_LINK_WARNING ("getdelim is unportable - " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
494 "use gnulib module getdelim for portability"), \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
495 getdelim (l, s, d, f))
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
496 #endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
497
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
498 #if @GNULIB_GETLINE@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
499 # if @REPLACE_GETLINE@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
500 # undef getline
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
501 # define getline rpl_getline
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
502 # endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
503 # if !@HAVE_DECL_GETLINE@ || @REPLACE_GETLINE@
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
504 /* Read a line, up to (and including) the next newline, from STREAM, store it
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
505 in *LINEPTR (and NUL-terminate it).
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
506 *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
507 bytes of space. It is realloc'd as necessary.
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
508 Return the number of bytes read and stored at *LINEPTR (not including the
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
509 NUL terminator), or -1 on error or EOF. */
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
510 extern ssize_t getline (char **lineptr, size_t *linesize, FILE *stream);
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
511 # endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
512 #elif defined GNULIB_POSIXCHECK
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
513 # undef getline
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
514 # define getline(l, s, f) \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
515 (GL_LINK_WARNING ("getline is unportable - " \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
516 "use gnulib module getline for portability"), \
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
517 getline (l, s, f))
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
518 #endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
519
10433
02b0f65bfbfc New module 'perror'.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
520 #if @GNULIB_PERROR@
02b0f65bfbfc New module 'perror'.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
521 # if @REPLACE_PERROR@
02b0f65bfbfc New module 'perror'.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
522 # define perror rpl_perror
02b0f65bfbfc New module 'perror'.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
523 /* Print a message to standard error, describing the value of ERRNO,
02b0f65bfbfc New module 'perror'.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
524 (if STRING is not NULL and not empty) prefixed with STRING and ": ",
02b0f65bfbfc New module 'perror'.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
525 and terminated with a newline. */
02b0f65bfbfc New module 'perror'.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
526 extern void perror (const char *string);
02b0f65bfbfc New module 'perror'.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
527 # endif
02b0f65bfbfc New module 'perror'.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
528 #elif defined GNULIB_POSIXCHECK
02b0f65bfbfc New module 'perror'.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
529 # undef perror
02b0f65bfbfc New module 'perror'.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
530 # define perror(s) \
02b0f65bfbfc New module 'perror'.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
531 (GL_LINK_WARNING ("perror is not always POSIX compliant - " \
02b0f65bfbfc New module 'perror'.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
532 "use gnulib module perror for portability"), \
02b0f65bfbfc New module 'perror'.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
533 perror (s))
02b0f65bfbfc New module 'perror'.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
534 #endif
02b0f65bfbfc New module 'perror'.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
535
9262
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
536 #ifdef __cplusplus
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
537 }
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
538 #endif
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
539
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
540 #endif /* _GL_STDIO_H */
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
541 #endif /* _GL_STDIO_H */
9857038c7b89 Rename stdio_.h to stdio.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
542 #endif