diff options
| author | Paul Eggert | 2011-03-20 22:34:48 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-03-20 22:34:48 -0700 |
| commit | 6e5fa6bfce1362c2ebf049fcfa1e6f2a4762ccef (patch) | |
| tree | f7ff137da14c352412ee3dc3fbcaf1316428fd97 /lib | |
| parent | 81e56e612dab7d80485c640068531710a713d205 (diff) | |
| parent | 77185bdf91d42fb19c02af0f51ce63280ce911a0 (diff) | |
| download | emacs-6e5fa6bfce1362c2ebf049fcfa1e6f2a4762ccef.tar.gz emacs-6e5fa6bfce1362c2ebf049fcfa1e6f2a4762ccef.zip | |
Merge from trunk and from gnulib stdio.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Makefile.in | 218 | ||||
| -rw-r--r-- | lib/gnulib.mk | 113 | ||||
| -rw-r--r-- | lib/stdio.in.h | 1119 |
3 files changed, 1435 insertions, 15 deletions
diff --git a/lib/Makefile.in b/lib/Makefile.in index 8be57520014..f3e867a485a 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | # the same distribution terms as the rest of that program. | 24 | # the same distribution terms as the rest of that program. |
| 25 | # | 25 | # |
| 26 | # Generated by gnulib-tool. | 26 | # Generated by gnulib-tool. |
| 27 | # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen strftime symlink sys_stat | 27 | # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdio strftime symlink sys_stat |
| 28 | 28 | ||
| 29 | VPATH = @srcdir@ | 29 | VPATH = @srcdir@ |
| 30 | pkgdatadir = $(datadir)/@PACKAGE@ | 30 | pkgdatadir = $(datadir)/@PACKAGE@ |
| @@ -60,12 +60,12 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ | |||
| 60 | $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/socklen.m4 \ | 60 | $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/socklen.m4 \ |
| 61 | $(top_srcdir)/m4/st_dm_mode.m4 $(top_srcdir)/m4/stat.m4 \ | 61 | $(top_srcdir)/m4/st_dm_mode.m4 $(top_srcdir)/m4/stat.m4 \ |
| 62 | $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ | 62 | $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ |
| 63 | $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdlib_h.m4 \ | 63 | $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdio_h.m4 \ |
| 64 | $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/symlink.m4 \ | 64 | $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strftime.m4 \ |
| 65 | $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/time_h.m4 \ | 65 | $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_stat_h.m4 \ |
| 66 | $(top_srcdir)/m4/time_r.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \ | 66 | $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ |
| 67 | $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/wchar_t.m4 \ | 67 | $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/unistd_h.m4 \ |
| 68 | $(top_srcdir)/configure.in | 68 | $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.in |
| 69 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | 69 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ |
| 70 | $(ACLOCAL_M4) | 70 | $(ACLOCAL_M4) |
| 71 | mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs | 71 | mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs |
| @@ -151,6 +151,7 @@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ | |||
| 151 | GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ | 151 | GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ |
| 152 | GNULIB_CHOWN = @GNULIB_CHOWN@ | 152 | GNULIB_CHOWN = @GNULIB_CHOWN@ |
| 153 | GNULIB_CLOSE = @GNULIB_CLOSE@ | 153 | GNULIB_CLOSE = @GNULIB_CLOSE@ |
| 154 | GNULIB_DPRINTF = @GNULIB_DPRINTF@ | ||
| 154 | GNULIB_DUP2 = @GNULIB_DUP2@ | 155 | GNULIB_DUP2 = @GNULIB_DUP2@ |
| 155 | GNULIB_DUP3 = @GNULIB_DUP3@ | 156 | GNULIB_DUP3 = @GNULIB_DUP3@ |
| 156 | GNULIB_ENVIRON = @GNULIB_ENVIRON@ | 157 | GNULIB_ENVIRON = @GNULIB_ENVIRON@ |
| @@ -159,15 +160,31 @@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ | |||
| 159 | GNULIB_FCHDIR = @GNULIB_FCHDIR@ | 160 | GNULIB_FCHDIR = @GNULIB_FCHDIR@ |
| 160 | GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ | 161 | GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ |
| 161 | GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ | 162 | GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ |
| 163 | GNULIB_FCLOSE = @GNULIB_FCLOSE@ | ||
| 164 | GNULIB_FFLUSH = @GNULIB_FFLUSH@ | ||
| 165 | GNULIB_FOPEN = @GNULIB_FOPEN@ | ||
| 166 | GNULIB_FPRINTF = @GNULIB_FPRINTF@ | ||
| 167 | GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ | ||
| 168 | GNULIB_FPURGE = @GNULIB_FPURGE@ | ||
| 169 | GNULIB_FPUTC = @GNULIB_FPUTC@ | ||
| 170 | GNULIB_FPUTS = @GNULIB_FPUTS@ | ||
| 171 | GNULIB_FREOPEN = @GNULIB_FREOPEN@ | ||
| 172 | GNULIB_FSEEK = @GNULIB_FSEEK@ | ||
| 173 | GNULIB_FSEEKO = @GNULIB_FSEEKO@ | ||
| 162 | GNULIB_FSTATAT = @GNULIB_FSTATAT@ | 174 | GNULIB_FSTATAT = @GNULIB_FSTATAT@ |
| 163 | GNULIB_FSYNC = @GNULIB_FSYNC@ | 175 | GNULIB_FSYNC = @GNULIB_FSYNC@ |
| 176 | GNULIB_FTELL = @GNULIB_FTELL@ | ||
| 177 | GNULIB_FTELLO = @GNULIB_FTELLO@ | ||
| 164 | GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ | 178 | GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ |
| 165 | GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ | 179 | GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ |
| 180 | GNULIB_FWRITE = @GNULIB_FWRITE@ | ||
| 166 | GNULIB_GETCWD = @GNULIB_GETCWD@ | 181 | GNULIB_GETCWD = @GNULIB_GETCWD@ |
| 182 | GNULIB_GETDELIM = @GNULIB_GETDELIM@ | ||
| 167 | GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ | 183 | GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ |
| 168 | GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ | 184 | GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ |
| 169 | GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ | 185 | GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ |
| 170 | GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ | 186 | GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ |
| 187 | GNULIB_GETLINE = @GNULIB_GETLINE@ | ||
| 171 | GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ | 188 | GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ |
| 172 | GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ | 189 | GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ |
| 173 | GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ | 190 | GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ |
| @@ -195,22 +212,37 @@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ | |||
| 195 | GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ | 212 | GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ |
| 196 | GNULIB_MKTIME = @GNULIB_MKTIME@ | 213 | GNULIB_MKTIME = @GNULIB_MKTIME@ |
| 197 | GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ | 214 | GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ |
| 215 | GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ | ||
| 216 | GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ | ||
| 217 | GNULIB_PERROR = @GNULIB_PERROR@ | ||
| 198 | GNULIB_PIPE = @GNULIB_PIPE@ | 218 | GNULIB_PIPE = @GNULIB_PIPE@ |
| 199 | GNULIB_PIPE2 = @GNULIB_PIPE2@ | 219 | GNULIB_PIPE2 = @GNULIB_PIPE2@ |
| 220 | GNULIB_POPEN = @GNULIB_POPEN@ | ||
| 200 | GNULIB_PREAD = @GNULIB_PREAD@ | 221 | GNULIB_PREAD = @GNULIB_PREAD@ |
| 222 | GNULIB_PRINTF = @GNULIB_PRINTF@ | ||
| 223 | GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ | ||
| 201 | GNULIB_PTSNAME = @GNULIB_PTSNAME@ | 224 | GNULIB_PTSNAME = @GNULIB_PTSNAME@ |
| 225 | GNULIB_PUTC = @GNULIB_PUTC@ | ||
| 226 | GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ | ||
| 202 | GNULIB_PUTENV = @GNULIB_PUTENV@ | 227 | GNULIB_PUTENV = @GNULIB_PUTENV@ |
| 228 | GNULIB_PUTS = @GNULIB_PUTS@ | ||
| 203 | GNULIB_PWRITE = @GNULIB_PWRITE@ | 229 | GNULIB_PWRITE = @GNULIB_PWRITE@ |
| 204 | GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ | 230 | GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ |
| 205 | GNULIB_READLINK = @GNULIB_READLINK@ | 231 | GNULIB_READLINK = @GNULIB_READLINK@ |
| 206 | GNULIB_READLINKAT = @GNULIB_READLINKAT@ | 232 | GNULIB_READLINKAT = @GNULIB_READLINKAT@ |
| 207 | GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ | 233 | GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ |
| 208 | GNULIB_REALPATH = @GNULIB_REALPATH@ | 234 | GNULIB_REALPATH = @GNULIB_REALPATH@ |
| 235 | GNULIB_REMOVE = @GNULIB_REMOVE@ | ||
| 236 | GNULIB_RENAME = @GNULIB_RENAME@ | ||
| 237 | GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ | ||
| 209 | GNULIB_RMDIR = @GNULIB_RMDIR@ | 238 | GNULIB_RMDIR = @GNULIB_RMDIR@ |
| 210 | GNULIB_RPMATCH = @GNULIB_RPMATCH@ | 239 | GNULIB_RPMATCH = @GNULIB_RPMATCH@ |
| 211 | GNULIB_SETENV = @GNULIB_SETENV@ | 240 | GNULIB_SETENV = @GNULIB_SETENV@ |
| 212 | GNULIB_SLEEP = @GNULIB_SLEEP@ | 241 | GNULIB_SLEEP = @GNULIB_SLEEP@ |
| 242 | GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ | ||
| 243 | GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ | ||
| 213 | GNULIB_STAT = @GNULIB_STAT@ | 244 | GNULIB_STAT = @GNULIB_STAT@ |
| 245 | GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ | ||
| 214 | GNULIB_STRPTIME = @GNULIB_STRPTIME@ | 246 | GNULIB_STRPTIME = @GNULIB_STRPTIME@ |
| 215 | GNULIB_STRTOD = @GNULIB_STRTOD@ | 247 | GNULIB_STRTOD = @GNULIB_STRTOD@ |
| 216 | GNULIB_STRTOLL = @GNULIB_STRTOLL@ | 248 | GNULIB_STRTOLL = @GNULIB_STRTOLL@ |
| @@ -220,6 +252,7 @@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ | |||
| 220 | GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ | 252 | GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ |
| 221 | GNULIB_TIMEGM = @GNULIB_TIMEGM@ | 253 | GNULIB_TIMEGM = @GNULIB_TIMEGM@ |
| 222 | GNULIB_TIME_R = @GNULIB_TIME_R@ | 254 | GNULIB_TIME_R = @GNULIB_TIME_R@ |
| 255 | GNULIB_TMPFILE = @GNULIB_TMPFILE@ | ||
| 223 | GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ | 256 | GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ |
| 224 | GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ | 257 | GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ |
| 225 | GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ | 258 | GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ |
| @@ -229,6 +262,14 @@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ | |||
| 229 | GNULIB_UNSETENV = @GNULIB_UNSETENV@ | 262 | GNULIB_UNSETENV = @GNULIB_UNSETENV@ |
| 230 | GNULIB_USLEEP = @GNULIB_USLEEP@ | 263 | GNULIB_USLEEP = @GNULIB_USLEEP@ |
| 231 | GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ | 264 | GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ |
| 265 | GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ | ||
| 266 | GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ | ||
| 267 | GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ | ||
| 268 | GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ | ||
| 269 | GNULIB_VPRINTF = @GNULIB_VPRINTF@ | ||
| 270 | GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ | ||
| 271 | GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ | ||
| 272 | GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ | ||
| 232 | GNULIB_WCTOMB = @GNULIB_WCTOMB@ | 273 | GNULIB_WCTOMB = @GNULIB_WCTOMB@ |
| 233 | GNULIB_WRITE = @GNULIB_WRITE@ | 274 | GNULIB_WRITE = @GNULIB_WRITE@ |
| 234 | GNULIB__EXIT = @GNULIB__EXIT@ | 275 | GNULIB__EXIT = @GNULIB__EXIT@ |
| @@ -244,15 +285,24 @@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ | |||
| 244 | HAVE_CHOWN = @HAVE_CHOWN@ | 285 | HAVE_CHOWN = @HAVE_CHOWN@ |
| 245 | HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ | 286 | HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ |
| 246 | HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ | 287 | HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ |
| 288 | HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ | ||
| 289 | HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ | ||
| 290 | HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ | ||
| 291 | HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ | ||
| 247 | HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ | 292 | HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ |
| 293 | HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ | ||
| 248 | HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ | 294 | HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ |
| 249 | HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ | 295 | HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ |
| 250 | HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ | 296 | HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ |
| 251 | HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ | 297 | HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ |
| 252 | HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ | 298 | HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ |
| 299 | HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ | ||
| 253 | HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ | 300 | HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ |
| 301 | HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ | ||
| 254 | HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ | 302 | HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ |
| 255 | HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ | 303 | HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ |
| 304 | HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ | ||
| 305 | HAVE_DPRINTF = @HAVE_DPRINTF@ | ||
| 256 | HAVE_DUP2 = @HAVE_DUP2@ | 306 | HAVE_DUP2 = @HAVE_DUP2@ |
| 257 | HAVE_DUP3 = @HAVE_DUP3@ | 307 | HAVE_DUP3 = @HAVE_DUP3@ |
| 258 | HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ | 308 | HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ |
| @@ -260,8 +310,10 @@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ | |||
| 260 | HAVE_FCHDIR = @HAVE_FCHDIR@ | 310 | HAVE_FCHDIR = @HAVE_FCHDIR@ |
| 261 | HAVE_FCHMODAT = @HAVE_FCHMODAT@ | 311 | HAVE_FCHMODAT = @HAVE_FCHMODAT@ |
| 262 | HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ | 312 | HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ |
| 313 | HAVE_FSEEKO = @HAVE_FSEEKO@ | ||
| 263 | HAVE_FSTATAT = @HAVE_FSTATAT@ | 314 | HAVE_FSTATAT = @HAVE_FSTATAT@ |
| 264 | HAVE_FSYNC = @HAVE_FSYNC@ | 315 | HAVE_FSYNC = @HAVE_FSYNC@ |
| 316 | HAVE_FTELLO = @HAVE_FTELLO@ | ||
| 265 | HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ | 317 | HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ |
| 266 | HAVE_FUTIMENS = @HAVE_FUTIMENS@ | 318 | HAVE_FUTIMENS = @HAVE_FUTIMENS@ |
| 267 | HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ | 319 | HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ |
| @@ -302,6 +354,7 @@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ | |||
| 302 | HAVE_READLINK = @HAVE_READLINK@ | 354 | HAVE_READLINK = @HAVE_READLINK@ |
| 303 | HAVE_READLINKAT = @HAVE_READLINKAT@ | 355 | HAVE_READLINKAT = @HAVE_READLINKAT@ |
| 304 | HAVE_REALPATH = @HAVE_REALPATH@ | 356 | HAVE_REALPATH = @HAVE_REALPATH@ |
| 357 | HAVE_RENAMEAT = @HAVE_RENAMEAT@ | ||
| 305 | HAVE_RPMATCH = @HAVE_RPMATCH@ | 358 | HAVE_RPMATCH = @HAVE_RPMATCH@ |
| 306 | HAVE_SETENV = @HAVE_SETENV@ | 359 | HAVE_SETENV = @HAVE_SETENV@ |
| 307 | HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ | 360 | HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ |
| @@ -328,6 +381,8 @@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ | |||
| 328 | HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ | 381 | HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ |
| 329 | HAVE_USLEEP = @HAVE_USLEEP@ | 382 | HAVE_USLEEP = @HAVE_USLEEP@ |
| 330 | HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ | 383 | HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ |
| 384 | HAVE_VASPRINTF = @HAVE_VASPRINTF@ | ||
| 385 | HAVE_VDPRINTF = @HAVE_VDPRINTF@ | ||
| 331 | HAVE_WCHAR_H = @HAVE_WCHAR_H@ | 386 | HAVE_WCHAR_H = @HAVE_WCHAR_H@ |
| 332 | HAVE_WCHAR_T = @HAVE_WCHAR_T@ | 387 | HAVE_WCHAR_T = @HAVE_WCHAR_T@ |
| 333 | HAVE_XSERVER = @HAVE_XSERVER@ | 388 | HAVE_XSERVER = @HAVE_XSERVER@ |
| @@ -398,6 +453,7 @@ M_FILE = @M_FILE@ | |||
| 398 | NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ | 453 | NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ |
| 399 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ | 454 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ |
| 400 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ | 455 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ |
| 456 | NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ | ||
| 401 | NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ | 457 | NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ |
| 402 | NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ | 458 | NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ |
| 403 | NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ | 459 | NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ |
| @@ -405,6 +461,7 @@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ | |||
| 405 | NEXT_GETOPT_H = @NEXT_GETOPT_H@ | 461 | NEXT_GETOPT_H = @NEXT_GETOPT_H@ |
| 406 | NEXT_STDDEF_H = @NEXT_STDDEF_H@ | 462 | NEXT_STDDEF_H = @NEXT_STDDEF_H@ |
| 407 | NEXT_STDINT_H = @NEXT_STDINT_H@ | 463 | NEXT_STDINT_H = @NEXT_STDINT_H@ |
| 464 | NEXT_STDIO_H = @NEXT_STDIO_H@ | ||
| 408 | NEXT_STDLIB_H = @NEXT_STDLIB_H@ | 465 | NEXT_STDLIB_H = @NEXT_STDLIB_H@ |
| 409 | NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ | 466 | NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ |
| 410 | NEXT_TIME_H = @NEXT_TIME_H@ | 467 | NEXT_TIME_H = @NEXT_TIME_H@ |
| @@ -439,15 +496,28 @@ REPLACE_CALLOC = @REPLACE_CALLOC@ | |||
| 439 | REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ | 496 | REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ |
| 440 | REPLACE_CHOWN = @REPLACE_CHOWN@ | 497 | REPLACE_CHOWN = @REPLACE_CHOWN@ |
| 441 | REPLACE_CLOSE = @REPLACE_CLOSE@ | 498 | REPLACE_CLOSE = @REPLACE_CLOSE@ |
| 499 | REPLACE_DPRINTF = @REPLACE_DPRINTF@ | ||
| 442 | REPLACE_DUP = @REPLACE_DUP@ | 500 | REPLACE_DUP = @REPLACE_DUP@ |
| 443 | REPLACE_DUP2 = @REPLACE_DUP2@ | 501 | REPLACE_DUP2 = @REPLACE_DUP2@ |
| 444 | REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ | 502 | REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ |
| 503 | REPLACE_FCLOSE = @REPLACE_FCLOSE@ | ||
| 504 | REPLACE_FFLUSH = @REPLACE_FFLUSH@ | ||
| 505 | REPLACE_FOPEN = @REPLACE_FOPEN@ | ||
| 506 | REPLACE_FPRINTF = @REPLACE_FPRINTF@ | ||
| 507 | REPLACE_FPURGE = @REPLACE_FPURGE@ | ||
| 508 | REPLACE_FREOPEN = @REPLACE_FREOPEN@ | ||
| 509 | REPLACE_FSEEK = @REPLACE_FSEEK@ | ||
| 510 | REPLACE_FSEEKO = @REPLACE_FSEEKO@ | ||
| 445 | REPLACE_FSTAT = @REPLACE_FSTAT@ | 511 | REPLACE_FSTAT = @REPLACE_FSTAT@ |
| 446 | REPLACE_FSTATAT = @REPLACE_FSTATAT@ | 512 | REPLACE_FSTATAT = @REPLACE_FSTATAT@ |
| 513 | REPLACE_FTELL = @REPLACE_FTELL@ | ||
| 514 | REPLACE_FTELLO = @REPLACE_FTELLO@ | ||
| 447 | REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ | 515 | REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ |
| 448 | REPLACE_GETCWD = @REPLACE_GETCWD@ | 516 | REPLACE_GETCWD = @REPLACE_GETCWD@ |
| 517 | REPLACE_GETDELIM = @REPLACE_GETDELIM@ | ||
| 449 | REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ | 518 | REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ |
| 450 | REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ | 519 | REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ |
| 520 | REPLACE_GETLINE = @REPLACE_GETLINE@ | ||
| 451 | REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ | 521 | REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ |
| 452 | REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ | 522 | REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ |
| 453 | REPLACE_LCHOWN = @REPLACE_LCHOWN@ | 523 | REPLACE_LCHOWN = @REPLACE_LCHOWN@ |
| @@ -465,25 +535,42 @@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ | |||
| 465 | REPLACE_MKTIME = @REPLACE_MKTIME@ | 535 | REPLACE_MKTIME = @REPLACE_MKTIME@ |
| 466 | REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ | 536 | REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ |
| 467 | REPLACE_NULL = @REPLACE_NULL@ | 537 | REPLACE_NULL = @REPLACE_NULL@ |
| 538 | REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ | ||
| 539 | REPLACE_PERROR = @REPLACE_PERROR@ | ||
| 540 | REPLACE_POPEN = @REPLACE_POPEN@ | ||
| 468 | REPLACE_PREAD = @REPLACE_PREAD@ | 541 | REPLACE_PREAD = @REPLACE_PREAD@ |
| 542 | REPLACE_PRINTF = @REPLACE_PRINTF@ | ||
| 469 | REPLACE_PUTENV = @REPLACE_PUTENV@ | 543 | REPLACE_PUTENV = @REPLACE_PUTENV@ |
| 470 | REPLACE_PWRITE = @REPLACE_PWRITE@ | 544 | REPLACE_PWRITE = @REPLACE_PWRITE@ |
| 471 | REPLACE_READLINK = @REPLACE_READLINK@ | 545 | REPLACE_READLINK = @REPLACE_READLINK@ |
| 472 | REPLACE_REALLOC = @REPLACE_REALLOC@ | 546 | REPLACE_REALLOC = @REPLACE_REALLOC@ |
| 473 | REPLACE_REALPATH = @REPLACE_REALPATH@ | 547 | REPLACE_REALPATH = @REPLACE_REALPATH@ |
| 548 | REPLACE_REMOVE = @REPLACE_REMOVE@ | ||
| 549 | REPLACE_RENAME = @REPLACE_RENAME@ | ||
| 550 | REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ | ||
| 474 | REPLACE_RMDIR = @REPLACE_RMDIR@ | 551 | REPLACE_RMDIR = @REPLACE_RMDIR@ |
| 475 | REPLACE_SETENV = @REPLACE_SETENV@ | 552 | REPLACE_SETENV = @REPLACE_SETENV@ |
| 476 | REPLACE_SLEEP = @REPLACE_SLEEP@ | 553 | REPLACE_SLEEP = @REPLACE_SLEEP@ |
| 554 | REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ | ||
| 555 | REPLACE_SPRINTF = @REPLACE_SPRINTF@ | ||
| 477 | REPLACE_STAT = @REPLACE_STAT@ | 556 | REPLACE_STAT = @REPLACE_STAT@ |
| 557 | REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ | ||
| 478 | REPLACE_STRTOD = @REPLACE_STRTOD@ | 558 | REPLACE_STRTOD = @REPLACE_STRTOD@ |
| 479 | REPLACE_SYMLINK = @REPLACE_SYMLINK@ | 559 | REPLACE_SYMLINK = @REPLACE_SYMLINK@ |
| 480 | REPLACE_TIMEGM = @REPLACE_TIMEGM@ | 560 | REPLACE_TIMEGM = @REPLACE_TIMEGM@ |
| 561 | REPLACE_TMPFILE = @REPLACE_TMPFILE@ | ||
| 481 | REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ | 562 | REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ |
| 482 | REPLACE_UNLINK = @REPLACE_UNLINK@ | 563 | REPLACE_UNLINK = @REPLACE_UNLINK@ |
| 483 | REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ | 564 | REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ |
| 484 | REPLACE_UNSETENV = @REPLACE_UNSETENV@ | 565 | REPLACE_UNSETENV = @REPLACE_UNSETENV@ |
| 485 | REPLACE_USLEEP = @REPLACE_USLEEP@ | 566 | REPLACE_USLEEP = @REPLACE_USLEEP@ |
| 486 | REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ | 567 | REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ |
| 568 | REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ | ||
| 569 | REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ | ||
| 570 | REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ | ||
| 571 | REPLACE_VPRINTF = @REPLACE_VPRINTF@ | ||
| 572 | REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ | ||
| 573 | REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ | ||
| 487 | REPLACE_WCTOMB = @REPLACE_WCTOMB@ | 574 | REPLACE_WCTOMB = @REPLACE_WCTOMB@ |
| 488 | REPLACE_WRITE = @REPLACE_WRITE@ | 575 | REPLACE_WRITE = @REPLACE_WRITE@ |
| 489 | RSVG_CFLAGS = @RSVG_CFLAGS@ | 576 | RSVG_CFLAGS = @RSVG_CFLAGS@ |
| @@ -602,21 +689,22 @@ x_default_search_path = @x_default_search_path@ | |||
| 602 | # present in all Makefile.am that need it. This is ensured by the applicability | 689 | # present in all Makefile.am that need it. This is ensured by the applicability |
| 603 | # 'all' defined above. | 690 | # 'all' defined above. |
| 604 | BUILT_SOURCES = arg-nonnull.h c++defs.h $(GETOPT_H) $(STDBOOL_H) \ | 691 | BUILT_SOURCES = arg-nonnull.h c++defs.h $(GETOPT_H) $(STDBOOL_H) \ |
| 605 | $(STDDEF_H) $(STDINT_H) stdlib.h sys/stat.h time.h unistd.h \ | 692 | $(STDDEF_H) $(STDINT_H) stdio.h stdlib.h sys/stat.h time.h \ |
| 606 | warn-on-use.h | 693 | unistd.h warn-on-use.h |
| 607 | EXTRA_DIST = $(top_srcdir)/./arg-nonnull.h $(top_srcdir)/./c++defs.h \ | 694 | EXTRA_DIST = $(top_srcdir)/./arg-nonnull.h $(top_srcdir)/./c++defs.h \ |
| 608 | md5.c md5.h dosname.h ftoastr.c ftoastr.h filemode.c \ | 695 | md5.c md5.h dosname.h ftoastr.c ftoastr.h filemode.c \ |
| 609 | filemode.h getloadavg.c getopt.c getopt.in.h getopt1.c \ | 696 | filemode.h getloadavg.c getopt.c getopt.in.h getopt1.c \ |
| 610 | getopt_int.h intprops.h lstat.c mktime-internal.h mktime.c \ | 697 | getopt_int.h intprops.h lstat.c mktime-internal.h mktime.c \ |
| 611 | readlink.c stat.c stdbool.in.h stddef.in.h stdint.in.h \ | 698 | readlink.c stat.c stdbool.in.h stddef.in.h stdint.in.h \ |
| 612 | stdlib.in.h strftime.c strftime.h symlink.c sys_stat.in.h \ | 699 | stdio.in.h stdlib.in.h strftime.c strftime.h symlink.c \ |
| 613 | time.in.h time_r.c unistd.in.h $(top_srcdir)/./warn-on-use.h | 700 | sys_stat.in.h time.in.h time_r.c unistd.in.h \ |
| 701 | $(top_srcdir)/./warn-on-use.h | ||
| 614 | MOSTLYCLEANDIRS = sys | 702 | MOSTLYCLEANDIRS = sys |
| 615 | MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \ | 703 | MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \ |
| 616 | c++defs.h c++defs.h-t getopt.h getopt.h-t stdbool.h \ | 704 | c++defs.h c++defs.h-t getopt.h getopt.h-t stdbool.h \ |
| 617 | stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t stdlib.h \ | 705 | stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t stdio.h \ |
| 618 | stdlib.h-t sys/stat.h sys/stat.h-t time.h time.h-t unistd.h \ | 706 | stdio.h-t stdlib.h stdlib.h-t sys/stat.h sys/stat.h-t time.h \ |
| 619 | unistd.h-t warn-on-use.h warn-on-use.h-t | 707 | time.h-t unistd.h unistd.h-t warn-on-use.h warn-on-use.h-t |
| 620 | noinst_LIBRARIES = libgnu.a | 708 | noinst_LIBRARIES = libgnu.a |
| 621 | DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src | 709 | DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src |
| 622 | libgnu_a_SOURCES = dtoastr.c gettext.h ignore-value.h | 710 | libgnu_a_SOURCES = dtoastr.c gettext.h ignore-value.h |
| @@ -997,6 +1085,108 @@ stdint.h: stdint.in.h | |||
| 997 | } > $@-t && \ | 1085 | } > $@-t && \ |
| 998 | mv $@-t $@ | 1086 | mv $@-t $@ |
| 999 | 1087 | ||
| 1088 | # We need the following in order to create <stdio.h> when the system | ||
| 1089 | # doesn't have one that works with the given compiler. | ||
| 1090 | stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) | ||
| 1091 | $(AM_V_GEN)rm -f $@-t $@ && \ | ||
| 1092 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ | ||
| 1093 | sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ | ||
| 1094 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ | ||
| 1095 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ | ||
| 1096 | -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ | ||
| 1097 | -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \ | ||
| 1098 | -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \ | ||
| 1099 | -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \ | ||
| 1100 | -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \ | ||
| 1101 | -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \ | ||
| 1102 | -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \ | ||
| 1103 | -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \ | ||
| 1104 | -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \ | ||
| 1105 | -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \ | ||
| 1106 | -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \ | ||
| 1107 | -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \ | ||
| 1108 | -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \ | ||
| 1109 | -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \ | ||
| 1110 | -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \ | ||
| 1111 | -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \ | ||
| 1112 | -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \ | ||
| 1113 | -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \ | ||
| 1114 | -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \ | ||
| 1115 | -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \ | ||
| 1116 | -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \ | ||
| 1117 | -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \ | ||
| 1118 | -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \ | ||
| 1119 | -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \ | ||
| 1120 | -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \ | ||
| 1121 | -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \ | ||
| 1122 | -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \ | ||
| 1123 | -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \ | ||
| 1124 | -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \ | ||
| 1125 | -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \ | ||
| 1126 | -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \ | ||
| 1127 | -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \ | ||
| 1128 | -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \ | ||
| 1129 | -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \ | ||
| 1130 | -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \ | ||
| 1131 | -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \ | ||
| 1132 | -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \ | ||
| 1133 | -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \ | ||
| 1134 | -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \ | ||
| 1135 | -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \ | ||
| 1136 | -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \ | ||
| 1137 | -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \ | ||
| 1138 | < $(srcdir)/stdio.in.h | \ | ||
| 1139 | sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ | ||
| 1140 | -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \ | ||
| 1141 | -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \ | ||
| 1142 | -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ | ||
| 1143 | -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ | ||
| 1144 | -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ | ||
| 1145 | -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ | ||
| 1146 | -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ | ||
| 1147 | -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ | ||
| 1148 | -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \ | ||
| 1149 | -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \ | ||
| 1150 | -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ | ||
| 1151 | -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ | ||
| 1152 | -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ | ||
| 1153 | -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ | ||
| 1154 | -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ | ||
| 1155 | -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ | ||
| 1156 | -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ | ||
| 1157 | -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ | ||
| 1158 | -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ | ||
| 1159 | -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ | ||
| 1160 | -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ | ||
| 1161 | -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ | ||
| 1162 | -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ | ||
| 1163 | -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ | ||
| 1164 | -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ | ||
| 1165 | -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ | ||
| 1166 | -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ | ||
| 1167 | -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ | ||
| 1168 | -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ | ||
| 1169 | -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ | ||
| 1170 | -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ | ||
| 1171 | -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ | ||
| 1172 | -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ | ||
| 1173 | -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ | ||
| 1174 | -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ | ||
| 1175 | -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ | ||
| 1176 | -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \ | ||
| 1177 | -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ | ||
| 1178 | -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ | ||
| 1179 | -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ | ||
| 1180 | -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ | ||
| 1181 | -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ | ||
| 1182 | -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ | ||
| 1183 | -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ | ||
| 1184 | -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ | ||
| 1185 | -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ | ||
| 1186 | -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ | ||
| 1187 | } > $@-t && \ | ||
| 1188 | mv $@-t $@ | ||
| 1189 | |||
| 1000 | # We need the following in order to create <stdlib.h> when the system | 1190 | # We need the following in order to create <stdlib.h> when the system |
| 1001 | # doesn't have one that works with the given compiler. | 1191 | # doesn't have one that works with the given compiler. |
| 1002 | stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) | 1192 | stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) |
diff --git a/lib/gnulib.mk b/lib/gnulib.mk index 369b7a48732..030f95b7a68 100644 --- a/lib/gnulib.mk +++ b/lib/gnulib.mk | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | # the same distribution terms as the rest of that program. | 9 | # the same distribution terms as the rest of that program. |
| 10 | # | 10 | # |
| 11 | # Generated by gnulib-tool. | 11 | # Generated by gnulib-tool. |
| 12 | # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen strftime symlink sys_stat | 12 | # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdio strftime symlink sys_stat |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | MOSTLYCLEANFILES += core *.stackdump | 15 | MOSTLYCLEANFILES += core *.stackdump |
| @@ -280,6 +280,117 @@ EXTRA_DIST += stdint.in.h | |||
| 280 | 280 | ||
| 281 | ## end gnulib module stdint | 281 | ## end gnulib module stdint |
| 282 | 282 | ||
| 283 | ## begin gnulib module stdio | ||
| 284 | |||
| 285 | BUILT_SOURCES += stdio.h | ||
| 286 | |||
| 287 | # We need the following in order to create <stdio.h> when the system | ||
| 288 | # doesn't have one that works with the given compiler. | ||
| 289 | stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) | ||
| 290 | $(AM_V_GEN)rm -f $@-t $@ && \ | ||
| 291 | { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ | ||
| 292 | sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ | ||
| 293 | -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ | ||
| 294 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ | ||
| 295 | -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ | ||
| 296 | -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \ | ||
| 297 | -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \ | ||
| 298 | -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \ | ||
| 299 | -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \ | ||
| 300 | -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \ | ||
| 301 | -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \ | ||
| 302 | -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \ | ||
| 303 | -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \ | ||
| 304 | -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \ | ||
| 305 | -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \ | ||
| 306 | -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \ | ||
| 307 | -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \ | ||
| 308 | -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \ | ||
| 309 | -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \ | ||
| 310 | -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \ | ||
| 311 | -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \ | ||
| 312 | -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \ | ||
| 313 | -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \ | ||
| 314 | -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \ | ||
| 315 | -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \ | ||
| 316 | -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \ | ||
| 317 | -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \ | ||
| 318 | -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \ | ||
| 319 | -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \ | ||
| 320 | -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \ | ||
| 321 | -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \ | ||
| 322 | -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \ | ||
| 323 | -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \ | ||
| 324 | -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \ | ||
| 325 | -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \ | ||
| 326 | -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \ | ||
| 327 | -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \ | ||
| 328 | -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \ | ||
| 329 | -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \ | ||
| 330 | -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \ | ||
| 331 | -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \ | ||
| 332 | -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \ | ||
| 333 | -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \ | ||
| 334 | -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \ | ||
| 335 | -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \ | ||
| 336 | -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \ | ||
| 337 | < $(srcdir)/stdio.in.h | \ | ||
| 338 | sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ | ||
| 339 | -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \ | ||
| 340 | -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \ | ||
| 341 | -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ | ||
| 342 | -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ | ||
| 343 | -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ | ||
| 344 | -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ | ||
| 345 | -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ | ||
| 346 | -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ | ||
| 347 | -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \ | ||
| 348 | -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \ | ||
| 349 | -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ | ||
| 350 | -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ | ||
| 351 | -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ | ||
| 352 | -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ | ||
| 353 | -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ | ||
| 354 | -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ | ||
| 355 | -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ | ||
| 356 | -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ | ||
| 357 | -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ | ||
| 358 | -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ | ||
| 359 | -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ | ||
| 360 | -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ | ||
| 361 | -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ | ||
| 362 | -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ | ||
| 363 | -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ | ||
| 364 | -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ | ||
| 365 | -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ | ||
| 366 | -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ | ||
| 367 | -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ | ||
| 368 | -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ | ||
| 369 | -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ | ||
| 370 | -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ | ||
| 371 | -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ | ||
| 372 | -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ | ||
| 373 | -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ | ||
| 374 | -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ | ||
| 375 | -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \ | ||
| 376 | -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ | ||
| 377 | -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ | ||
| 378 | -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ | ||
| 379 | -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ | ||
| 380 | -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ | ||
| 381 | -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ | ||
| 382 | -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ | ||
| 383 | -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ | ||
| 384 | -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ | ||
| 385 | -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ | ||
| 386 | } > $@-t && \ | ||
| 387 | mv $@-t $@ | ||
| 388 | MOSTLYCLEANFILES += stdio.h stdio.h-t | ||
| 389 | |||
| 390 | EXTRA_DIST += stdio.in.h | ||
| 391 | |||
| 392 | ## end gnulib module stdio | ||
| 393 | |||
| 283 | ## begin gnulib module stdlib | 394 | ## begin gnulib module stdlib |
| 284 | 395 | ||
| 285 | BUILT_SOURCES += stdlib.h | 396 | BUILT_SOURCES += stdlib.h |
diff --git a/lib/stdio.in.h b/lib/stdio.in.h new file mode 100644 index 00000000000..dd31ce29ed1 --- /dev/null +++ b/lib/stdio.in.h | |||
| @@ -0,0 +1,1119 @@ | |||
| 1 | /* A GNU-like <stdio.h>. | ||
| 2 | |||
| 3 | Copyright (C) 2004, 2007-2011 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This program is free software; you can redistribute it and/or modify | ||
| 6 | it under the terms of the GNU General Public License as published by | ||
| 7 | the Free Software Foundation; either version 3, or (at your option) | ||
| 8 | any later version. | ||
| 9 | |||
| 10 | This program is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | GNU General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU General Public License | ||
| 16 | along with this program; if not, write to the Free Software Foundation, | ||
| 17 | Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ | ||
| 18 | |||
| 19 | #if __GNUC__ >= 3 | ||
| 20 | @PRAGMA_SYSTEM_HEADER@ | ||
| 21 | #endif | ||
| 22 | @PRAGMA_COLUMNS@ | ||
| 23 | |||
| 24 | #if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H | ||
| 25 | /* Special invocation convention: | ||
| 26 | - Inside glibc header files. | ||
| 27 | - On OSF/1 5.1 we have a sequence of nested includes | ||
| 28 | <stdio.h> -> <getopt.h> -> <ctype.h> -> <sys/localedef.h> -> | ||
| 29 | <sys/lc_core.h> -> <nl_types.h> -> <mesg.h> -> <stdio.h>. | ||
| 30 | In this situation, the functions are not yet declared, therefore we cannot | ||
| 31 | provide the C++ aliases. */ | ||
| 32 | |||
| 33 | #@INCLUDE_NEXT@ @NEXT_STDIO_H@ | ||
| 34 | |||
| 35 | #else | ||
| 36 | /* Normal invocation convention. */ | ||
| 37 | |||
| 38 | #ifndef _GL_STDIO_H | ||
| 39 | |||
| 40 | #define _GL_ALREADY_INCLUDING_STDIO_H | ||
| 41 | |||
| 42 | /* The include_next requires a split double-inclusion guard. */ | ||
| 43 | #@INCLUDE_NEXT@ @NEXT_STDIO_H@ | ||
| 44 | |||
| 45 | #undef _GL_ALREADY_INCLUDING_STDIO_H | ||
| 46 | |||
| 47 | #ifndef _GL_STDIO_H | ||
| 48 | #define _GL_STDIO_H | ||
| 49 | |||
| 50 | /* Get va_list. Needed on many systems, including glibc 2.8. */ | ||
| 51 | #include <stdarg.h> | ||
| 52 | |||
| 53 | #include <stddef.h> | ||
| 54 | |||
| 55 | /* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 | ||
| 56 | and eglibc 2.11.2. */ | ||
| 57 | #include <sys/types.h> | ||
| 58 | |||
| 59 | /* The __attribute__ feature is available in gcc versions 2.5 and later. | ||
| 60 | The __-protected variants of the attributes 'format' and 'printf' are | ||
| 61 | accepted by gcc versions 2.6.4 (effectively 2.7) and later. | ||
| 62 | We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because | ||
| 63 | gnulib and libintl do '#define printf __printf__' when they override | ||
| 64 | the 'printf' function. */ | ||
| 65 | #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) | ||
| 66 | # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) | ||
| 67 | #else | ||
| 68 | # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ | ||
| 69 | #endif | ||
| 70 | #define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ | ||
| 71 | _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) | ||
| 72 | |||
| 73 | /* Solaris 10 declares renameat in <unistd.h>, not in <stdio.h>. */ | ||
| 74 | /* But in any case avoid namespace pollution on glibc systems. */ | ||
| 75 | #if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \ | ||
| 76 | && ! defined __GLIBC__ | ||
| 77 | # include <unistd.h> | ||
| 78 | #endif | ||
| 79 | |||
| 80 | |||
| 81 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ | ||
| 82 | |||
| 83 | /* The definition of _GL_ARG_NONNULL is copied here. */ | ||
| 84 | |||
| 85 | /* The definition of _GL_WARN_ON_USE is copied here. */ | ||
| 86 | |||
| 87 | /* Macros for stringification. */ | ||
| 88 | #define _GL_STDIO_STRINGIZE(token) #token | ||
| 89 | #define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) | ||
| 90 | |||
| 91 | |||
| 92 | #if @GNULIB_DPRINTF@ | ||
| 93 | # if @REPLACE_DPRINTF@ | ||
| 94 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 95 | # define dprintf rpl_dprintf | ||
| 96 | # endif | ||
| 97 | _GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *format, ...) | ||
| 98 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) | ||
| 99 | _GL_ARG_NONNULL ((2))); | ||
| 100 | _GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *format, ...)); | ||
| 101 | # else | ||
| 102 | # if !@HAVE_DPRINTF@ | ||
| 103 | _GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *format, ...) | ||
| 104 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) | ||
| 105 | _GL_ARG_NONNULL ((2))); | ||
| 106 | # endif | ||
| 107 | _GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *format, ...)); | ||
| 108 | # endif | ||
| 109 | _GL_CXXALIASWARN (dprintf); | ||
| 110 | #elif defined GNULIB_POSIXCHECK | ||
| 111 | # undef dprintf | ||
| 112 | # if HAVE_RAW_DECL_DPRINTF | ||
| 113 | _GL_WARN_ON_USE (dprintf, "dprintf is unportable - " | ||
| 114 | "use gnulib module dprintf for portability"); | ||
| 115 | # endif | ||
| 116 | #endif | ||
| 117 | |||
| 118 | #if @GNULIB_FCLOSE@ | ||
| 119 | /* Close STREAM and its underlying file descriptor. */ | ||
| 120 | # if @REPLACE_FCLOSE@ | ||
| 121 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 122 | # define fclose rpl_fclose | ||
| 123 | # endif | ||
| 124 | _GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); | ||
| 125 | _GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); | ||
| 126 | # else | ||
| 127 | _GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); | ||
| 128 | # endif | ||
| 129 | _GL_CXXALIASWARN (fclose); | ||
| 130 | #elif defined GNULIB_POSIXCHECK | ||
| 131 | # undef fclose | ||
| 132 | /* Assume fclose is always declared. */ | ||
| 133 | _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " | ||
| 134 | "use gnulib module fclose for portable POSIX compliance"); | ||
| 135 | #endif | ||
| 136 | |||
| 137 | #if @GNULIB_FFLUSH@ | ||
| 138 | /* Flush all pending data on STREAM according to POSIX rules. Both | ||
| 139 | output and seekable input streams are supported. | ||
| 140 | Note! LOSS OF DATA can occur if fflush is applied on an input stream | ||
| 141 | that is _not_seekable_ or on an update stream that is _not_seekable_ | ||
| 142 | and in which the most recent operation was input. Seekability can | ||
| 143 | be tested with lseek(fileno(fp),0,SEEK_CUR). */ | ||
| 144 | # if @REPLACE_FFLUSH@ | ||
| 145 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 146 | # define fflush rpl_fflush | ||
| 147 | # endif | ||
| 148 | _GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); | ||
| 149 | _GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); | ||
| 150 | # else | ||
| 151 | _GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); | ||
| 152 | # endif | ||
| 153 | _GL_CXXALIASWARN (fflush); | ||
| 154 | #elif defined GNULIB_POSIXCHECK | ||
| 155 | # undef fflush | ||
| 156 | /* Assume fflush is always declared. */ | ||
| 157 | _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " | ||
| 158 | "use gnulib module fflush for portable POSIX compliance"); | ||
| 159 | #endif | ||
| 160 | |||
| 161 | /* It is very rare that the developer ever has full control of stdin, | ||
| 162 | so any use of gets warrants an unconditional warning. Assume it is | ||
| 163 | always declared, since it is required by C89. */ | ||
| 164 | #undef gets | ||
| 165 | _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); | ||
| 166 | |||
| 167 | #if @GNULIB_FOPEN@ | ||
| 168 | # if @REPLACE_FOPEN@ | ||
| 169 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 170 | # undef fopen | ||
| 171 | # define fopen rpl_fopen | ||
| 172 | # endif | ||
| 173 | _GL_FUNCDECL_RPL (fopen, FILE *, (const char *filename, const char *mode) | ||
| 174 | _GL_ARG_NONNULL ((1, 2))); | ||
| 175 | _GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode)); | ||
| 176 | # else | ||
| 177 | _GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode)); | ||
| 178 | # endif | ||
| 179 | _GL_CXXALIASWARN (fopen); | ||
| 180 | #elif defined GNULIB_POSIXCHECK | ||
| 181 | # undef fopen | ||
| 182 | /* Assume fopen is always declared. */ | ||
| 183 | _GL_WARN_ON_USE (fopen, "fopen on Win32 platforms is not POSIX compatible - " | ||
| 184 | "use gnulib module fopen for portability"); | ||
| 185 | #endif | ||
| 186 | |||
| 187 | #if @GNULIB_FPRINTF_POSIX@ || @GNULIB_FPRINTF@ | ||
| 188 | # if (@GNULIB_FPRINTF_POSIX@ && @REPLACE_FPRINTF@) \ | ||
| 189 | || (@GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) | ||
| 190 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 191 | # define fprintf rpl_fprintf | ||
| 192 | # endif | ||
| 193 | # define GNULIB_overrides_fprintf 1 | ||
| 194 | _GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...) | ||
| 195 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) | ||
| 196 | _GL_ARG_NONNULL ((1, 2))); | ||
| 197 | _GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...)); | ||
| 198 | # else | ||
| 199 | _GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...)); | ||
| 200 | # endif | ||
| 201 | _GL_CXXALIASWARN (fprintf); | ||
| 202 | #endif | ||
| 203 | #if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK | ||
| 204 | # if !GNULIB_overrides_fprintf | ||
| 205 | # undef fprintf | ||
| 206 | # endif | ||
| 207 | /* Assume fprintf is always declared. */ | ||
| 208 | _GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " | ||
| 209 | "use gnulib module fprintf-posix for portable " | ||
| 210 | "POSIX compliance"); | ||
| 211 | #endif | ||
| 212 | |||
| 213 | #if @GNULIB_FPURGE@ | ||
| 214 | /* Discard all pending buffered I/O data on STREAM. | ||
| 215 | STREAM must not be wide-character oriented. | ||
| 216 | When discarding pending output, the file position is set back to where it | ||
| 217 | was before the write calls. When discarding pending input, the file | ||
| 218 | position is advanced to match the end of the previously read input. | ||
| 219 | Return 0 if successful. Upon error, return -1 and set errno. */ | ||
| 220 | # if @REPLACE_FPURGE@ | ||
| 221 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 222 | # define fpurge rpl_fpurge | ||
| 223 | # endif | ||
| 224 | _GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); | ||
| 225 | _GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); | ||
| 226 | # else | ||
| 227 | # if !@HAVE_DECL_FPURGE@ | ||
| 228 | _GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); | ||
| 229 | # endif | ||
| 230 | _GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); | ||
| 231 | # endif | ||
| 232 | _GL_CXXALIASWARN (fpurge); | ||
| 233 | #elif defined GNULIB_POSIXCHECK | ||
| 234 | # undef fpurge | ||
| 235 | # if HAVE_RAW_DECL_FPURGE | ||
| 236 | _GL_WARN_ON_USE (fpurge, "fpurge is not always present - " | ||
| 237 | "use gnulib module fpurge for portability"); | ||
| 238 | # endif | ||
| 239 | #endif | ||
| 240 | |||
| 241 | #if @GNULIB_FPUTC@ | ||
| 242 | # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ | ||
| 243 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 244 | # undef fputc | ||
| 245 | # define fputc rpl_fputc | ||
| 246 | # endif | ||
| 247 | _GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); | ||
| 248 | _GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); | ||
| 249 | # else | ||
| 250 | _GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); | ||
| 251 | # endif | ||
| 252 | _GL_CXXALIASWARN (fputc); | ||
| 253 | #endif | ||
| 254 | |||
| 255 | #if @GNULIB_FPUTS@ | ||
| 256 | # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ | ||
| 257 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 258 | # undef fputs | ||
| 259 | # define fputs rpl_fputs | ||
| 260 | # endif | ||
| 261 | _GL_FUNCDECL_RPL (fputs, int, (const char *string, FILE *stream) | ||
| 262 | _GL_ARG_NONNULL ((1, 2))); | ||
| 263 | _GL_CXXALIAS_RPL (fputs, int, (const char *string, FILE *stream)); | ||
| 264 | # else | ||
| 265 | _GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream)); | ||
| 266 | # endif | ||
| 267 | _GL_CXXALIASWARN (fputs); | ||
| 268 | #endif | ||
| 269 | |||
| 270 | #if @GNULIB_FREOPEN@ | ||
| 271 | # if @REPLACE_FREOPEN@ | ||
| 272 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 273 | # undef freopen | ||
| 274 | # define freopen rpl_freopen | ||
| 275 | # endif | ||
| 276 | _GL_FUNCDECL_RPL (freopen, FILE *, | ||
| 277 | (const char *filename, const char *mode, FILE *stream) | ||
| 278 | _GL_ARG_NONNULL ((2, 3))); | ||
| 279 | _GL_CXXALIAS_RPL (freopen, FILE *, | ||
| 280 | (const char *filename, const char *mode, FILE *stream)); | ||
| 281 | # else | ||
| 282 | _GL_CXXALIAS_SYS (freopen, FILE *, | ||
| 283 | (const char *filename, const char *mode, FILE *stream)); | ||
| 284 | # endif | ||
| 285 | _GL_CXXALIASWARN (freopen); | ||
| 286 | #elif defined GNULIB_POSIXCHECK | ||
| 287 | # undef freopen | ||
| 288 | /* Assume freopen is always declared. */ | ||
| 289 | _GL_WARN_ON_USE (freopen, | ||
| 290 | "freopen on Win32 platforms is not POSIX compatible - " | ||
| 291 | "use gnulib module freopen for portability"); | ||
| 292 | #endif | ||
| 293 | |||
| 294 | |||
| 295 | /* Set up the following warnings, based on which modules are in use. | ||
| 296 | GNU Coding Standards discourage the use of fseek, since it imposes | ||
| 297 | an arbitrary limitation on some 32-bit hosts. Remember that the | ||
| 298 | fseek module depends on the fseeko module, so we only have three | ||
| 299 | cases to consider: | ||
| 300 | |||
| 301 | 1. The developer is not using either module. Issue a warning under | ||
| 302 | GNULIB_POSIXCHECK for both functions, to remind them that both | ||
| 303 | functions have bugs on some systems. _GL_NO_LARGE_FILES has no | ||
| 304 | impact on this warning. | ||
| 305 | |||
| 306 | 2. The developer is using both modules. They may be unaware of the | ||
| 307 | arbitrary limitations of fseek, so issue a warning under | ||
| 308 | GNULIB_POSIXCHECK. On the other hand, they may be using both | ||
| 309 | modules intentionally, so the developer can define | ||
| 310 | _GL_NO_LARGE_FILES in the compilation units where the use of fseek | ||
| 311 | is safe, to silence the warning. | ||
| 312 | |||
| 313 | 3. The developer is using the fseeko module, but not fseek. Gnulib | ||
| 314 | guarantees that fseek will still work around platform bugs in that | ||
| 315 | case, but we presume that the developer is aware of the pitfalls of | ||
| 316 | fseek and was trying to avoid it, so issue a warning even when | ||
| 317 | GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be | ||
| 318 | defined to silence the warning in particular compilation units. | ||
| 319 | In C++ compilations with GNULIB_NAMESPACE, in order to avoid that | ||
| 320 | fseek gets defined as a macro, it is recommended that the developer | ||
| 321 | uses the fseek module, even if he is not calling the fseek function. | ||
| 322 | |||
| 323 | Most gnulib clients that perform stream operations should fall into | ||
| 324 | category 3. */ | ||
| 325 | |||
| 326 | #if @GNULIB_FSEEK@ | ||
| 327 | # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES | ||
| 328 | # define _GL_FSEEK_WARN /* Category 2, above. */ | ||
| 329 | # undef fseek | ||
| 330 | # endif | ||
| 331 | # if @REPLACE_FSEEK@ | ||
| 332 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 333 | # undef fseek | ||
| 334 | # define fseek rpl_fseek | ||
| 335 | # endif | ||
| 336 | _GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) | ||
| 337 | _GL_ARG_NONNULL ((1))); | ||
| 338 | _GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); | ||
| 339 | # else | ||
| 340 | _GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); | ||
| 341 | # endif | ||
| 342 | _GL_CXXALIASWARN (fseek); | ||
| 343 | #endif | ||
| 344 | |||
| 345 | #if @GNULIB_FSEEKO@ | ||
| 346 | # if !@GNULIB_FSEEK@ && !defined _GL_NO_LARGE_FILES | ||
| 347 | # define _GL_FSEEK_WARN /* Category 3, above. */ | ||
| 348 | # undef fseek | ||
| 349 | # endif | ||
| 350 | # if @REPLACE_FSEEKO@ | ||
| 351 | /* Provide an fseeko function that is aware of a preceding fflush(), and which | ||
| 352 | detects pipes. */ | ||
| 353 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 354 | # undef fseeko | ||
| 355 | # define fseeko rpl_fseeko | ||
| 356 | # endif | ||
| 357 | _GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) | ||
| 358 | _GL_ARG_NONNULL ((1))); | ||
| 359 | _GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); | ||
| 360 | # else | ||
| 361 | # if ! @HAVE_DECL_FSEEKO@ | ||
| 362 | _GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) | ||
| 363 | _GL_ARG_NONNULL ((1))); | ||
| 364 | # endif | ||
| 365 | _GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); | ||
| 366 | # endif | ||
| 367 | _GL_CXXALIASWARN (fseeko); | ||
| 368 | # if (@REPLACE_FSEEKO@ || !@HAVE_FSEEKO@) && !@GNULIB_FSEEK@ | ||
| 369 | /* Provide an fseek function that is consistent with fseeko. */ | ||
| 370 | /* In order to avoid that fseek gets defined as a macro here, the | ||
| 371 | developer can request the 'fseek' module. */ | ||
| 372 | # if !GNULIB_defined_fseek_function | ||
| 373 | # undef fseek | ||
| 374 | # define fseek rpl_fseek | ||
| 375 | static inline int _GL_ARG_NONNULL ((1)) | ||
| 376 | rpl_fseek (FILE *fp, long offset, int whence) | ||
| 377 | { | ||
| 378 | # if @REPLACE_FSEEKO@ | ||
| 379 | return rpl_fseeko (fp, offset, whence); | ||
| 380 | # else | ||
| 381 | return fseeko (fp, offset, whence); | ||
| 382 | # endif | ||
| 383 | } | ||
| 384 | # define GNULIB_defined_fseek_function 1 | ||
| 385 | # endif | ||
| 386 | # endif | ||
| 387 | #elif defined GNULIB_POSIXCHECK | ||
| 388 | # define _GL_FSEEK_WARN /* Category 1, above. */ | ||
| 389 | # undef fseek | ||
| 390 | # undef fseeko | ||
| 391 | # if HAVE_RAW_DECL_FSEEKO | ||
| 392 | _GL_WARN_ON_USE (fseeko, "fseeko is unportable - " | ||
| 393 | "use gnulib module fseeko for portability"); | ||
| 394 | # endif | ||
| 395 | #endif | ||
| 396 | |||
| 397 | #ifdef _GL_FSEEK_WARN | ||
| 398 | # undef _GL_FSEEK_WARN | ||
| 399 | /* Here, either fseek is undefined (but C89 guarantees that it is | ||
| 400 | declared), or it is defined as rpl_fseek (declared above). */ | ||
| 401 | _GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " | ||
| 402 | "on 32-bit platforms - " | ||
| 403 | "use fseeko function for handling of large files"); | ||
| 404 | #endif | ||
| 405 | |||
| 406 | |||
| 407 | /* ftell, ftello. See the comments on fseek/fseeko. */ | ||
| 408 | |||
| 409 | #if @GNULIB_FTELL@ | ||
| 410 | # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES | ||
| 411 | # define _GL_FTELL_WARN /* Category 2, above. */ | ||
| 412 | # undef ftell | ||
| 413 | # endif | ||
| 414 | # if @REPLACE_FTELL@ | ||
| 415 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 416 | # undef ftell | ||
| 417 | # define ftell rpl_ftell | ||
| 418 | # endif | ||
| 419 | _GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); | ||
| 420 | _GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); | ||
| 421 | # else | ||
| 422 | _GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); | ||
| 423 | # endif | ||
| 424 | _GL_CXXALIASWARN (ftell); | ||
| 425 | #endif | ||
| 426 | |||
| 427 | #if @GNULIB_FTELLO@ | ||
| 428 | # if !@GNULIB_FTELL@ && !defined _GL_NO_LARGE_FILES | ||
| 429 | # define _GL_FTELL_WARN /* Category 3, above. */ | ||
| 430 | # undef ftell | ||
| 431 | # endif | ||
| 432 | # if @REPLACE_FTELLO@ | ||
| 433 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 434 | # undef ftello | ||
| 435 | # define ftello rpl_ftello | ||
| 436 | # endif | ||
| 437 | _GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); | ||
| 438 | _GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); | ||
| 439 | # else | ||
| 440 | # if ! @HAVE_DECL_FTELLO@ | ||
| 441 | _GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); | ||
| 442 | # endif | ||
| 443 | _GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); | ||
| 444 | # endif | ||
| 445 | _GL_CXXALIASWARN (ftello); | ||
| 446 | # if (@REPLACE_FTELLO@ || !@HAVE_FTELLO@) && !@GNULIB_FTELL@ | ||
| 447 | /* Provide an ftell function that is consistent with ftello. */ | ||
| 448 | /* In order to avoid that ftell gets defined as a macro here, the | ||
| 449 | developer can request the 'ftell' module. */ | ||
| 450 | # if !GNULIB_defined_ftell_function | ||
| 451 | # undef ftell | ||
| 452 | # define ftell rpl_ftell | ||
| 453 | static inline long _GL_ARG_NONNULL ((1)) | ||
| 454 | rpl_ftell (FILE *f) | ||
| 455 | { | ||
| 456 | # if @REPLACE_FTELLO@ | ||
| 457 | return rpl_ftello (f); | ||
| 458 | # else | ||
| 459 | return ftello (f); | ||
| 460 | # endif | ||
| 461 | } | ||
| 462 | # define GNULIB_defined_ftell_function 1 | ||
| 463 | # endif | ||
| 464 | # endif | ||
| 465 | #elif defined GNULIB_POSIXCHECK | ||
| 466 | # define _GL_FTELL_WARN /* Category 1, above. */ | ||
| 467 | # undef ftell | ||
| 468 | # undef ftello | ||
| 469 | # if HAVE_RAW_DECL_FTELLO | ||
| 470 | _GL_WARN_ON_USE (ftello, "ftello is unportable - " | ||
| 471 | "use gnulib module ftello for portability"); | ||
| 472 | # endif | ||
| 473 | #endif | ||
| 474 | |||
| 475 | #ifdef _GL_FTELL_WARN | ||
| 476 | # undef _GL_FTELL_WARN | ||
| 477 | /* Here, either ftell is undefined (but C89 guarantees that it is | ||
| 478 | declared), or it is defined as rpl_ftell (declared above). */ | ||
| 479 | _GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " | ||
| 480 | "on 32-bit platforms - " | ||
| 481 | "use ftello function for handling of large files"); | ||
| 482 | #endif | ||
| 483 | |||
| 484 | |||
| 485 | #if @GNULIB_FWRITE@ | ||
| 486 | # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ | ||
| 487 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 488 | # undef fwrite | ||
| 489 | # define fwrite rpl_fwrite | ||
| 490 | # endif | ||
| 491 | _GL_FUNCDECL_RPL (fwrite, size_t, | ||
| 492 | (const void *ptr, size_t s, size_t n, FILE *stream) | ||
| 493 | _GL_ARG_NONNULL ((1, 4))); | ||
| 494 | _GL_CXXALIAS_RPL (fwrite, size_t, | ||
| 495 | (const void *ptr, size_t s, size_t n, FILE *stream)); | ||
| 496 | # else | ||
| 497 | _GL_CXXALIAS_SYS (fwrite, size_t, | ||
| 498 | (const void *ptr, size_t s, size_t n, FILE *stream)); | ||
| 499 | |||
| 500 | /* Work around glibc bug 11959 | ||
| 501 | <http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>, | ||
| 502 | which sometimes causes an unwanted diagnostic for fwrite calls. | ||
| 503 | This affects only function declaration attributes, so it's not | ||
| 504 | needed for C++. */ | ||
| 505 | # if !defined __cplusplus && 0 < __USE_FORTIFY_LEVEL | ||
| 506 | static inline size_t _GL_ARG_NONNULL ((1, 4)) | ||
| 507 | rpl_fwrite (const void *ptr, size_t s, size_t n, FILE *stream) | ||
| 508 | { | ||
| 509 | size_t r = fwrite (ptr, s, n, stream); | ||
| 510 | (void) r; | ||
| 511 | return r; | ||
| 512 | } | ||
| 513 | # undef fwrite | ||
| 514 | # define fwrite rpl_fwrite | ||
| 515 | # endif | ||
| 516 | # endif | ||
| 517 | _GL_CXXALIASWARN (fwrite); | ||
| 518 | #endif | ||
| 519 | |||
| 520 | #if @GNULIB_GETDELIM@ | ||
| 521 | /* Read input, up to (and including) the next occurrence of DELIMITER, from | ||
| 522 | STREAM, store it in *LINEPTR (and NUL-terminate it). | ||
| 523 | *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE | ||
| 524 | bytes of space. It is realloc'd as necessary. | ||
| 525 | Return the number of bytes read and stored at *LINEPTR (not including the | ||
| 526 | NUL terminator), or -1 on error or EOF. */ | ||
| 527 | # if @REPLACE_GETDELIM@ | ||
| 528 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 529 | # undef getdelim | ||
| 530 | # define getdelim rpl_getdelim | ||
| 531 | # endif | ||
| 532 | _GL_FUNCDECL_RPL (getdelim, ssize_t, | ||
| 533 | (char **lineptr, size_t *linesize, int delimiter, | ||
| 534 | FILE *stream) | ||
| 535 | _GL_ARG_NONNULL ((1, 2, 4))); | ||
| 536 | _GL_CXXALIAS_RPL (getdelim, ssize_t, | ||
| 537 | (char **lineptr, size_t *linesize, int delimiter, | ||
| 538 | FILE *stream)); | ||
| 539 | # else | ||
| 540 | # if !@HAVE_DECL_GETDELIM@ | ||
| 541 | _GL_FUNCDECL_SYS (getdelim, ssize_t, | ||
| 542 | (char **lineptr, size_t *linesize, int delimiter, | ||
| 543 | FILE *stream) | ||
| 544 | _GL_ARG_NONNULL ((1, 2, 4))); | ||
| 545 | # endif | ||
| 546 | _GL_CXXALIAS_SYS (getdelim, ssize_t, | ||
| 547 | (char **lineptr, size_t *linesize, int delimiter, | ||
| 548 | FILE *stream)); | ||
| 549 | # endif | ||
| 550 | _GL_CXXALIASWARN (getdelim); | ||
| 551 | #elif defined GNULIB_POSIXCHECK | ||
| 552 | # undef getdelim | ||
| 553 | # if HAVE_RAW_DECL_GETDELIM | ||
| 554 | _GL_WARN_ON_USE (getdelim, "getdelim is unportable - " | ||
| 555 | "use gnulib module getdelim for portability"); | ||
| 556 | # endif | ||
| 557 | #endif | ||
| 558 | |||
| 559 | #if @GNULIB_GETLINE@ | ||
| 560 | /* Read a line, up to (and including) the next newline, from STREAM, store it | ||
| 561 | in *LINEPTR (and NUL-terminate it). | ||
| 562 | *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE | ||
| 563 | bytes of space. It is realloc'd as necessary. | ||
| 564 | Return the number of bytes read and stored at *LINEPTR (not including the | ||
| 565 | NUL terminator), or -1 on error or EOF. */ | ||
| 566 | # if @REPLACE_GETLINE@ | ||
| 567 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 568 | # undef getline | ||
| 569 | # define getline rpl_getline | ||
| 570 | # endif | ||
| 571 | _GL_FUNCDECL_RPL (getline, ssize_t, | ||
| 572 | (char **lineptr, size_t *linesize, FILE *stream) | ||
| 573 | _GL_ARG_NONNULL ((1, 2, 3))); | ||
| 574 | _GL_CXXALIAS_RPL (getline, ssize_t, | ||
| 575 | (char **lineptr, size_t *linesize, FILE *stream)); | ||
| 576 | # else | ||
| 577 | # if !@HAVE_DECL_GETLINE@ | ||
| 578 | _GL_FUNCDECL_SYS (getline, ssize_t, | ||
| 579 | (char **lineptr, size_t *linesize, FILE *stream) | ||
| 580 | _GL_ARG_NONNULL ((1, 2, 3))); | ||
| 581 | # endif | ||
| 582 | _GL_CXXALIAS_SYS (getline, ssize_t, | ||
| 583 | (char **lineptr, size_t *linesize, FILE *stream)); | ||
| 584 | # endif | ||
| 585 | # if @HAVE_DECL_GETLINE@ | ||
| 586 | _GL_CXXALIASWARN (getline); | ||
| 587 | # endif | ||
| 588 | #elif defined GNULIB_POSIXCHECK | ||
| 589 | # undef getline | ||
| 590 | # if HAVE_RAW_DECL_GETLINE | ||
| 591 | _GL_WARN_ON_USE (getline, "getline is unportable - " | ||
| 592 | "use gnulib module getline for portability"); | ||
| 593 | # endif | ||
| 594 | #endif | ||
| 595 | |||
| 596 | #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ | ||
| 597 | struct obstack; | ||
| 598 | /* Grow an obstack with formatted output. Return the number of | ||
| 599 | bytes added to OBS. No trailing nul byte is added, and the | ||
| 600 | object should be closed with obstack_finish before use. Upon | ||
| 601 | memory allocation error, call obstack_alloc_failed_handler. Upon | ||
| 602 | other error, return -1. */ | ||
| 603 | # if @REPLACE_OBSTACK_PRINTF@ | ||
| 604 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 605 | # define obstack_printf rpl_obstack_printf | ||
| 606 | # endif | ||
| 607 | _GL_FUNCDECL_RPL (obstack_printf, int, | ||
| 608 | (struct obstack *obs, const char *format, ...) | ||
| 609 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) | ||
| 610 | _GL_ARG_NONNULL ((1, 2))); | ||
| 611 | _GL_CXXALIAS_RPL (obstack_printf, int, | ||
| 612 | (struct obstack *obs, const char *format, ...)); | ||
| 613 | # else | ||
| 614 | # if !@HAVE_DECL_OBSTACK_PRINTF@ | ||
| 615 | _GL_FUNCDECL_SYS (obstack_printf, int, | ||
| 616 | (struct obstack *obs, const char *format, ...) | ||
| 617 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) | ||
| 618 | _GL_ARG_NONNULL ((1, 2))); | ||
| 619 | # endif | ||
| 620 | _GL_CXXALIAS_SYS (obstack_printf, int, | ||
| 621 | (struct obstack *obs, const char *format, ...)); | ||
| 622 | # endif | ||
| 623 | _GL_CXXALIASWARN (obstack_printf); | ||
| 624 | # if @REPLACE_OBSTACK_PRINTF@ | ||
| 625 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 626 | # define obstack_vprintf rpl_obstack_vprintf | ||
| 627 | # endif | ||
| 628 | _GL_FUNCDECL_RPL (obstack_vprintf, int, | ||
| 629 | (struct obstack *obs, const char *format, va_list args) | ||
| 630 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) | ||
| 631 | _GL_ARG_NONNULL ((1, 2))); | ||
| 632 | _GL_CXXALIAS_RPL (obstack_vprintf, int, | ||
| 633 | (struct obstack *obs, const char *format, va_list args)); | ||
| 634 | # else | ||
| 635 | # if !@HAVE_DECL_OBSTACK_PRINTF@ | ||
| 636 | _GL_FUNCDECL_SYS (obstack_vprintf, int, | ||
| 637 | (struct obstack *obs, const char *format, va_list args) | ||
| 638 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) | ||
| 639 | _GL_ARG_NONNULL ((1, 2))); | ||
| 640 | # endif | ||
| 641 | _GL_CXXALIAS_SYS (obstack_vprintf, int, | ||
| 642 | (struct obstack *obs, const char *format, va_list args)); | ||
| 643 | # endif | ||
| 644 | _GL_CXXALIASWARN (obstack_vprintf); | ||
| 645 | #endif | ||
| 646 | |||
| 647 | #if @GNULIB_PERROR@ | ||
| 648 | /* Print a message to standard error, describing the value of ERRNO, | ||
| 649 | (if STRING is not NULL and not empty) prefixed with STRING and ": ", | ||
| 650 | and terminated with a newline. */ | ||
| 651 | # if @REPLACE_PERROR@ | ||
| 652 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 653 | # define perror rpl_perror | ||
| 654 | # endif | ||
| 655 | _GL_FUNCDECL_RPL (perror, void, (const char *string)); | ||
| 656 | _GL_CXXALIAS_RPL (perror, void, (const char *string)); | ||
| 657 | # else | ||
| 658 | _GL_CXXALIAS_SYS (perror, void, (const char *string)); | ||
| 659 | # endif | ||
| 660 | _GL_CXXALIASWARN (perror); | ||
| 661 | #elif defined GNULIB_POSIXCHECK | ||
| 662 | # undef perror | ||
| 663 | /* Assume perror is always declared. */ | ||
| 664 | _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " | ||
| 665 | "use gnulib module perror for portability"); | ||
| 666 | #endif | ||
| 667 | |||
| 668 | #if @GNULIB_POPEN@ | ||
| 669 | # if @REPLACE_POPEN@ | ||
| 670 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 671 | # undef popen | ||
| 672 | # define popen rpl_popen | ||
| 673 | # endif | ||
| 674 | _GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) | ||
| 675 | _GL_ARG_NONNULL ((1, 2))); | ||
| 676 | _GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); | ||
| 677 | # else | ||
| 678 | _GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); | ||
| 679 | # endif | ||
| 680 | _GL_CXXALIASWARN (popen); | ||
| 681 | #elif defined GNULIB_POSIXCHECK | ||
| 682 | # undef popen | ||
| 683 | # if HAVE_RAW_DECL_POPEN | ||
| 684 | _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " | ||
| 685 | "use gnulib module popen or pipe for more portability"); | ||
| 686 | # endif | ||
| 687 | #endif | ||
| 688 | |||
| 689 | #if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@ | ||
| 690 | # if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \ | ||
| 691 | || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) | ||
| 692 | # if defined __GNUC__ | ||
| 693 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 694 | /* Don't break __attribute__((format(printf,M,N))). */ | ||
| 695 | # define printf __printf__ | ||
| 696 | # endif | ||
| 697 | _GL_FUNCDECL_RPL_1 (__printf__, int, | ||
| 698 | (const char *format, ...) | ||
| 699 | __asm__ (@ASM_SYMBOL_PREFIX@ | ||
| 700 | _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) | ||
| 701 | _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) | ||
| 702 | _GL_ARG_NONNULL ((1))); | ||
| 703 | _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); | ||
| 704 | # else | ||
| 705 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 706 | # define printf rpl_printf | ||
| 707 | # endif | ||
| 708 | _GL_FUNCDECL_RPL (printf, int, | ||
| 709 | (const char *format, ...) | ||
| 710 | _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) | ||
| 711 | _GL_ARG_NONNULL ((1))); | ||
| 712 | _GL_CXXALIAS_RPL (printf, int, (const char *format, ...)); | ||
| 713 | # endif | ||
| 714 | # define GNULIB_overrides_printf 1 | ||
| 715 | # else | ||
| 716 | _GL_CXXALIAS_SYS (printf, int, (const char *format, ...)); | ||
| 717 | # endif | ||
| 718 | _GL_CXXALIASWARN (printf); | ||
| 719 | #endif | ||
| 720 | #if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK | ||
| 721 | # if !GNULIB_overrides_printf | ||
| 722 | # undef printf | ||
| 723 | # endif | ||
| 724 | /* Assume printf is always declared. */ | ||
| 725 | _GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " | ||
| 726 | "use gnulib module printf-posix for portable " | ||
| 727 | "POSIX compliance"); | ||
| 728 | #endif | ||
| 729 | |||
| 730 | #if @GNULIB_PUTC@ | ||
| 731 | # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ | ||
| 732 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 733 | # undef putc | ||
| 734 | # define putc rpl_fputc | ||
| 735 | # endif | ||
| 736 | _GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); | ||
| 737 | _GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); | ||
| 738 | # else | ||
| 739 | _GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); | ||
| 740 | # endif | ||
| 741 | _GL_CXXALIASWARN (putc); | ||
| 742 | #endif | ||
| 743 | |||
| 744 | #if @GNULIB_PUTCHAR@ | ||
| 745 | # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ | ||
| 746 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 747 | # undef putchar | ||
| 748 | # define putchar rpl_putchar | ||
| 749 | # endif | ||
| 750 | _GL_FUNCDECL_RPL (putchar, int, (int c)); | ||
| 751 | _GL_CXXALIAS_RPL (putchar, int, (int c)); | ||
| 752 | # else | ||
| 753 | _GL_CXXALIAS_SYS (putchar, int, (int c)); | ||
| 754 | # endif | ||
| 755 | _GL_CXXALIASWARN (putchar); | ||
| 756 | #endif | ||
| 757 | |||
| 758 | #if @GNULIB_PUTS@ | ||
| 759 | # if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ | ||
| 760 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 761 | # undef puts | ||
| 762 | # define puts rpl_puts | ||
| 763 | # endif | ||
| 764 | _GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); | ||
| 765 | _GL_CXXALIAS_RPL (puts, int, (const char *string)); | ||
| 766 | # else | ||
| 767 | _GL_CXXALIAS_SYS (puts, int, (const char *string)); | ||
| 768 | # endif | ||
| 769 | _GL_CXXALIASWARN (puts); | ||
| 770 | #endif | ||
| 771 | |||
| 772 | #if @GNULIB_REMOVE@ | ||
| 773 | # if @REPLACE_REMOVE@ | ||
| 774 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 775 | # undef remove | ||
| 776 | # define remove rpl_remove | ||
| 777 | # endif | ||
| 778 | _GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); | ||
| 779 | _GL_CXXALIAS_RPL (remove, int, (const char *name)); | ||
| 780 | # else | ||
| 781 | _GL_CXXALIAS_SYS (remove, int, (const char *name)); | ||
| 782 | # endif | ||
| 783 | _GL_CXXALIASWARN (remove); | ||
| 784 | #elif defined GNULIB_POSIXCHECK | ||
| 785 | # undef remove | ||
| 786 | /* Assume remove is always declared. */ | ||
| 787 | _GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " | ||
| 788 | "use gnulib module remove for more portability"); | ||
| 789 | #endif | ||
| 790 | |||
| 791 | #if @GNULIB_RENAME@ | ||
| 792 | # if @REPLACE_RENAME@ | ||
| 793 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 794 | # undef rename | ||
| 795 | # define rename rpl_rename | ||
| 796 | # endif | ||
| 797 | _GL_FUNCDECL_RPL (rename, int, | ||
| 798 | (const char *old_filename, const char *new_filename) | ||
| 799 | _GL_ARG_NONNULL ((1, 2))); | ||
| 800 | _GL_CXXALIAS_RPL (rename, int, | ||
| 801 | (const char *old_filename, const char *new_filename)); | ||
| 802 | # else | ||
| 803 | _GL_CXXALIAS_SYS (rename, int, | ||
| 804 | (const char *old_filename, const char *new_filename)); | ||
| 805 | # endif | ||
| 806 | _GL_CXXALIASWARN (rename); | ||
| 807 | #elif defined GNULIB_POSIXCHECK | ||
| 808 | # undef rename | ||
| 809 | /* Assume rename is always declared. */ | ||
| 810 | _GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " | ||
| 811 | "use gnulib module rename for more portability"); | ||
| 812 | #endif | ||
| 813 | |||
| 814 | #if @GNULIB_RENAMEAT@ | ||
| 815 | # if @REPLACE_RENAMEAT@ | ||
| 816 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 817 | # undef renameat | ||
| 818 | # define renameat rpl_renameat | ||
| 819 | # endif | ||
| 820 | _GL_FUNCDECL_RPL (renameat, int, | ||
| 821 | (int fd1, char const *file1, int fd2, char const *file2) | ||
| 822 | _GL_ARG_NONNULL ((2, 4))); | ||
| 823 | _GL_CXXALIAS_RPL (renameat, int, | ||
| 824 | (int fd1, char const *file1, int fd2, char const *file2)); | ||
| 825 | # else | ||
| 826 | # if !@HAVE_RENAMEAT@ | ||
| 827 | _GL_FUNCDECL_SYS (renameat, int, | ||
| 828 | (int fd1, char const *file1, int fd2, char const *file2) | ||
| 829 | _GL_ARG_NONNULL ((2, 4))); | ||
| 830 | # endif | ||
| 831 | _GL_CXXALIAS_SYS (renameat, int, | ||
| 832 | (int fd1, char const *file1, int fd2, char const *file2)); | ||
| 833 | # endif | ||
| 834 | _GL_CXXALIASWARN (renameat); | ||
| 835 | #elif defined GNULIB_POSIXCHECK | ||
| 836 | # undef renameat | ||
| 837 | # if HAVE_RAW_DECL_RENAMEAT | ||
| 838 | _GL_WARN_ON_USE (renameat, "renameat is not portable - " | ||
| 839 | "use gnulib module renameat for portability"); | ||
| 840 | # endif | ||
| 841 | #endif | ||
| 842 | |||
| 843 | #if @GNULIB_SNPRINTF@ | ||
| 844 | # if @REPLACE_SNPRINTF@ | ||
| 845 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 846 | # define snprintf rpl_snprintf | ||
| 847 | # endif | ||
| 848 | _GL_FUNCDECL_RPL (snprintf, int, | ||
| 849 | (char *str, size_t size, const char *format, ...) | ||
| 850 | _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) | ||
| 851 | _GL_ARG_NONNULL ((3))); | ||
| 852 | _GL_CXXALIAS_RPL (snprintf, int, | ||
| 853 | (char *str, size_t size, const char *format, ...)); | ||
| 854 | # else | ||
| 855 | # if !@HAVE_DECL_SNPRINTF@ | ||
| 856 | _GL_FUNCDECL_SYS (snprintf, int, | ||
| 857 | (char *str, size_t size, const char *format, ...) | ||
| 858 | _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) | ||
| 859 | _GL_ARG_NONNULL ((3))); | ||
| 860 | # endif | ||
| 861 | _GL_CXXALIAS_SYS (snprintf, int, | ||
| 862 | (char *str, size_t size, const char *format, ...)); | ||
| 863 | # endif | ||
| 864 | _GL_CXXALIASWARN (snprintf); | ||
| 865 | #elif defined GNULIB_POSIXCHECK | ||
| 866 | # undef snprintf | ||
| 867 | # if HAVE_RAW_DECL_SNPRINTF | ||
| 868 | _GL_WARN_ON_USE (snprintf, "snprintf is unportable - " | ||
| 869 | "use gnulib module snprintf for portability"); | ||
| 870 | # endif | ||
| 871 | #endif | ||
| 872 | |||
| 873 | /* Some people would argue that sprintf should be handled like gets | ||
| 874 | (for example, OpenBSD issues a link warning for both functions), | ||
| 875 | since both can cause security holes due to buffer overruns. | ||
| 876 | However, we believe that sprintf can be used safely, and is more | ||
| 877 | efficient than snprintf in those safe cases; and as proof of our | ||
| 878 | belief, we use sprintf in several gnulib modules. So this header | ||
| 879 | intentionally avoids adding a warning to sprintf except when | ||
| 880 | GNULIB_POSIXCHECK is defined. */ | ||
| 881 | |||
| 882 | #if @GNULIB_SPRINTF_POSIX@ | ||
| 883 | # if @REPLACE_SPRINTF@ | ||
| 884 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 885 | # define sprintf rpl_sprintf | ||
| 886 | # endif | ||
| 887 | _GL_FUNCDECL_RPL (sprintf, int, (char *str, const char *format, ...) | ||
| 888 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) | ||
| 889 | _GL_ARG_NONNULL ((1, 2))); | ||
| 890 | _GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...)); | ||
| 891 | # else | ||
| 892 | _GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...)); | ||
| 893 | # endif | ||
| 894 | _GL_CXXALIASWARN (sprintf); | ||
| 895 | #elif defined GNULIB_POSIXCHECK | ||
| 896 | # undef sprintf | ||
| 897 | /* Assume sprintf is always declared. */ | ||
| 898 | _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " | ||
| 899 | "use gnulib module sprintf-posix for portable " | ||
| 900 | "POSIX compliance"); | ||
| 901 | #endif | ||
| 902 | |||
| 903 | #if @GNULIB_TMPFILE@ | ||
| 904 | # if @REPLACE_TMPFILE@ | ||
| 905 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 906 | # define tmpfile rpl_tmpfile | ||
| 907 | # endif | ||
| 908 | _GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); | ||
| 909 | _GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); | ||
| 910 | # else | ||
| 911 | _GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); | ||
| 912 | # endif | ||
| 913 | _GL_CXXALIASWARN (tmpfile); | ||
| 914 | #elif defined GNULIB_POSIXCHECK | ||
| 915 | # undef tmpfile | ||
| 916 | # if HAVE_RAW_DECL_TMPFILE | ||
| 917 | _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " | ||
| 918 | "use gnulib module tmpfile for portability"); | ||
| 919 | # endif | ||
| 920 | #endif | ||
| 921 | |||
| 922 | #if @GNULIB_VASPRINTF@ | ||
| 923 | /* Write formatted output to a string dynamically allocated with malloc(). | ||
| 924 | If the memory allocation succeeds, store the address of the string in | ||
| 925 | *RESULT and return the number of resulting bytes, excluding the trailing | ||
| 926 | NUL. Upon memory allocation error, or some other error, return -1. */ | ||
| 927 | # if @REPLACE_VASPRINTF@ | ||
| 928 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 929 | # define asprintf rpl_asprintf | ||
| 930 | # endif | ||
| 931 | _GL_FUNCDECL_RPL (asprintf, int, | ||
| 932 | (char **result, const char *format, ...) | ||
| 933 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) | ||
| 934 | _GL_ARG_NONNULL ((1, 2))); | ||
| 935 | _GL_CXXALIAS_RPL (asprintf, int, | ||
| 936 | (char **result, const char *format, ...)); | ||
| 937 | # else | ||
| 938 | # if !@HAVE_VASPRINTF@ | ||
| 939 | _GL_FUNCDECL_SYS (asprintf, int, | ||
| 940 | (char **result, const char *format, ...) | ||
| 941 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) | ||
| 942 | _GL_ARG_NONNULL ((1, 2))); | ||
| 943 | # endif | ||
| 944 | _GL_CXXALIAS_SYS (asprintf, int, | ||
| 945 | (char **result, const char *format, ...)); | ||
| 946 | # endif | ||
| 947 | _GL_CXXALIASWARN (asprintf); | ||
| 948 | # if @REPLACE_VASPRINTF@ | ||
| 949 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 950 | # define vasprintf rpl_vasprintf | ||
| 951 | # endif | ||
| 952 | _GL_FUNCDECL_RPL (vasprintf, int, | ||
| 953 | (char **result, const char *format, va_list args) | ||
| 954 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) | ||
| 955 | _GL_ARG_NONNULL ((1, 2))); | ||
| 956 | _GL_CXXALIAS_RPL (vasprintf, int, | ||
| 957 | (char **result, const char *format, va_list args)); | ||
| 958 | # else | ||
| 959 | # if !@HAVE_VASPRINTF@ | ||
| 960 | _GL_FUNCDECL_SYS (vasprintf, int, | ||
| 961 | (char **result, const char *format, va_list args) | ||
| 962 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) | ||
| 963 | _GL_ARG_NONNULL ((1, 2))); | ||
| 964 | # endif | ||
| 965 | _GL_CXXALIAS_SYS (vasprintf, int, | ||
| 966 | (char **result, const char *format, va_list args)); | ||
| 967 | # endif | ||
| 968 | _GL_CXXALIASWARN (vasprintf); | ||
| 969 | #endif | ||
| 970 | |||
| 971 | #if @GNULIB_VDPRINTF@ | ||
| 972 | # if @REPLACE_VDPRINTF@ | ||
| 973 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 974 | # define vdprintf rpl_vdprintf | ||
| 975 | # endif | ||
| 976 | _GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *format, va_list args) | ||
| 977 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) | ||
| 978 | _GL_ARG_NONNULL ((2))); | ||
| 979 | _GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *format, va_list args)); | ||
| 980 | # else | ||
| 981 | # if !@HAVE_VDPRINTF@ | ||
| 982 | _GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args) | ||
| 983 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) | ||
| 984 | _GL_ARG_NONNULL ((2))); | ||
| 985 | # endif | ||
| 986 | /* Need to cast, because on Solaris, the third parameter will likely be | ||
| 987 | __va_list args. */ | ||
| 988 | _GL_CXXALIAS_SYS_CAST (vdprintf, int, | ||
| 989 | (int fd, const char *format, va_list args)); | ||
| 990 | # endif | ||
| 991 | _GL_CXXALIASWARN (vdprintf); | ||
| 992 | #elif defined GNULIB_POSIXCHECK | ||
| 993 | # undef vdprintf | ||
| 994 | # if HAVE_RAW_DECL_VDPRINTF | ||
| 995 | _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " | ||
| 996 | "use gnulib module vdprintf for portability"); | ||
| 997 | # endif | ||
| 998 | #endif | ||
| 999 | |||
| 1000 | #if @GNULIB_VFPRINTF_POSIX@ || @GNULIB_VFPRINTF@ | ||
| 1001 | # if (@GNULIB_VFPRINTF_POSIX@ && @REPLACE_VFPRINTF@) \ | ||
| 1002 | || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) | ||
| 1003 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1004 | # define vfprintf rpl_vfprintf | ||
| 1005 | # endif | ||
| 1006 | # define GNULIB_overrides_vfprintf 1 | ||
| 1007 | _GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) | ||
| 1008 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) | ||
| 1009 | _GL_ARG_NONNULL ((1, 2))); | ||
| 1010 | _GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)); | ||
| 1011 | # else | ||
| 1012 | /* Need to cast, because on Solaris, the third parameter is | ||
| 1013 | __va_list args | ||
| 1014 | and GCC's fixincludes did not change this to __gnuc_va_list. */ | ||
| 1015 | _GL_CXXALIAS_SYS_CAST (vfprintf, int, | ||
| 1016 | (FILE *fp, const char *format, va_list args)); | ||
| 1017 | # endif | ||
| 1018 | _GL_CXXALIASWARN (vfprintf); | ||
| 1019 | #endif | ||
| 1020 | #if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK | ||
| 1021 | # if !GNULIB_overrides_vfprintf | ||
| 1022 | # undef vfprintf | ||
| 1023 | # endif | ||
| 1024 | /* Assume vfprintf is always declared. */ | ||
| 1025 | _GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " | ||
| 1026 | "use gnulib module vfprintf-posix for portable " | ||
| 1027 | "POSIX compliance"); | ||
| 1028 | #endif | ||
| 1029 | |||
| 1030 | #if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@ | ||
| 1031 | # if (@GNULIB_VPRINTF_POSIX@ && @REPLACE_VPRINTF@) \ | ||
| 1032 | || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) | ||
| 1033 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1034 | # define vprintf rpl_vprintf | ||
| 1035 | # endif | ||
| 1036 | # define GNULIB_overrides_vprintf 1 | ||
| 1037 | _GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) | ||
| 1038 | _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) | ||
| 1039 | _GL_ARG_NONNULL ((1))); | ||
| 1040 | _GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args)); | ||
| 1041 | # else | ||
| 1042 | /* Need to cast, because on Solaris, the second parameter is | ||
| 1043 | __va_list args | ||
| 1044 | and GCC's fixincludes did not change this to __gnuc_va_list. */ | ||
| 1045 | _GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args)); | ||
| 1046 | # endif | ||
| 1047 | _GL_CXXALIASWARN (vprintf); | ||
| 1048 | #endif | ||
| 1049 | #if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK | ||
| 1050 | # if !GNULIB_overrides_vprintf | ||
| 1051 | # undef vprintf | ||
| 1052 | # endif | ||
| 1053 | /* Assume vprintf is always declared. */ | ||
| 1054 | _GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " | ||
| 1055 | "use gnulib module vprintf-posix for portable " | ||
| 1056 | "POSIX compliance"); | ||
| 1057 | #endif | ||
| 1058 | |||
| 1059 | #if @GNULIB_VSNPRINTF@ | ||
| 1060 | # if @REPLACE_VSNPRINTF@ | ||
| 1061 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1062 | # define vsnprintf rpl_vsnprintf | ||
| 1063 | # endif | ||
| 1064 | _GL_FUNCDECL_RPL (vsnprintf, int, | ||
| 1065 | (char *str, size_t size, const char *format, va_list args) | ||
| 1066 | _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) | ||
| 1067 | _GL_ARG_NONNULL ((3))); | ||
| 1068 | _GL_CXXALIAS_RPL (vsnprintf, int, | ||
| 1069 | (char *str, size_t size, const char *format, va_list args)); | ||
| 1070 | # else | ||
| 1071 | # if !@HAVE_DECL_VSNPRINTF@ | ||
| 1072 | _GL_FUNCDECL_SYS (vsnprintf, int, | ||
| 1073 | (char *str, size_t size, const char *format, va_list args) | ||
| 1074 | _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) | ||
| 1075 | _GL_ARG_NONNULL ((3))); | ||
| 1076 | # endif | ||
| 1077 | _GL_CXXALIAS_SYS (vsnprintf, int, | ||
| 1078 | (char *str, size_t size, const char *format, va_list args)); | ||
| 1079 | # endif | ||
| 1080 | _GL_CXXALIASWARN (vsnprintf); | ||
| 1081 | #elif defined GNULIB_POSIXCHECK | ||
| 1082 | # undef vsnprintf | ||
| 1083 | # if HAVE_RAW_DECL_VSNPRINTF | ||
| 1084 | _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " | ||
| 1085 | "use gnulib module vsnprintf for portability"); | ||
| 1086 | # endif | ||
| 1087 | #endif | ||
| 1088 | |||
| 1089 | #if @GNULIB_VSPRINTF_POSIX@ | ||
| 1090 | # if @REPLACE_VSPRINTF@ | ||
| 1091 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 1092 | # define vsprintf rpl_vsprintf | ||
| 1093 | # endif | ||
| 1094 | _GL_FUNCDECL_RPL (vsprintf, int, | ||
| 1095 | (char *str, const char *format, va_list args) | ||
| 1096 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) | ||
| 1097 | _GL_ARG_NONNULL ((1, 2))); | ||
| 1098 | _GL_CXXALIAS_RPL (vsprintf, int, | ||
| 1099 | (char *str, const char *format, va_list args)); | ||
| 1100 | # else | ||
| 1101 | /* Need to cast, because on Solaris, the third parameter is | ||
| 1102 | __va_list args | ||
| 1103 | and GCC's fixincludes did not change this to __gnuc_va_list. */ | ||
| 1104 | _GL_CXXALIAS_SYS_CAST (vsprintf, int, | ||
| 1105 | (char *str, const char *format, va_list args)); | ||
| 1106 | # endif | ||
| 1107 | _GL_CXXALIASWARN (vsprintf); | ||
| 1108 | #elif defined GNULIB_POSIXCHECK | ||
| 1109 | # undef vsprintf | ||
| 1110 | /* Assume vsprintf is always declared. */ | ||
| 1111 | _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " | ||
| 1112 | "use gnulib module vsprintf-posix for portable " | ||
| 1113 | "POSIX compliance"); | ||
| 1114 | #endif | ||
| 1115 | |||
| 1116 | |||
| 1117 | #endif /* _GL_STDIO_H */ | ||
| 1118 | #endif /* _GL_STDIO_H */ | ||
| 1119 | #endif | ||