summaryrefslogtreecommitdiff
path: root/m4/fflush.m4
Commit message (Collapse)AuthorAgeFilesLines
* maint: run 'make update-copyright'Simon Josefsson2023-01-011-1/+1
|
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* Support compiling without -loldnames on native Windows.Bruno Haible2020-08-151-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * m4/gnulib-common.m4 (GL_MDA_DEFINES, _GL_MDA_DEFINES): New macros. * m4/chown.m4 (AC_FUNC_CHOWN): In the test programs, use GL_MDA_DEFINES. (gl_FUNC_CHOWN, gl_FUNC_CHOWN_FOLLOWS_SYMLINK): Likewise. * m4/dup.m4 (gl_FUNC_DUP): Likewise. * m4/dup2.m4 (gl_FUNC_DUP2): Likewise. * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise. * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): Likewise. * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): Likewise. * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Likewise. * m4/fcntl.m4 (gl_FUNC_FCNTL): Likewise. * m4/fdopen.m4 (gl_FUNC_FDOPEN): Likewise. * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Likewise. * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): Likewise. * m4/fopen.m4 (gl_FUNC_FOPEN_GNU): Likewise. * m4/freopen.m4 (gl_FUNC_FREOPEN): Likewise. * m4/futimens.m4 (gl_FUNC_FUTIMENS): Likewise. * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise. * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise. * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL, gl_FUNC_GETCWD_SIGNATURE): Likewise. * m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE): Likewise. * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise. * m4/lseek.m4 (gl_FUNC_LSEEK): Likewise. * m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise. * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise. * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Likewise. * m4/open-slash.m4 (gl_OPEN_TRAILING_SLASH_BUG): Likewise. * m4/poll.m4 (gl_FUNC_POLL): Likewise. * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Likewise. * m4/pread.m4 (gl_FUNC_PREAD): Likewise. * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise. * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Likewise. * m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Likewise. * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise. * m4/pwrite.m4 (gl_FUNC_PWRITE): Likewise. * m4/rename.m4 (gl_FUNC_RENAME): Likewise. * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise. * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise. * m4/select.m4 (gl_FUNC_SELECT): Likewise. * m4/setenv.m4 (gl_FUNC_UNSETENV): Likewise. * m4/strncat.m4 (gl_FUNC_STRNCAT): Likewise. * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Likewise. * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise. * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise. * m4/utimens.m4 (gl_UTIMENS): Likewise. * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise. * m4/utimes.m4 (gl_FUNC_UTIMES): Likewise. * m4/canonicalize.m4 (gl_CANONICALIZE_LGPL): On native Windows, don't test for getcwd. * m4/utime.m4 (gl_FUNC_UTIME): On native Windows, don't test for utime. * m4/wcsdup.m4 (gl_FUNC_WCSDUP): To test for wcsdup, use a test program with GL_MDA_DEFINES. * lib/c++defs.h (_GL_CXXALIAS_MDA): New macro. * lib/fcntl.in.h (creat, open): On native Windows, use the underscore- prefixed symbol. * lib/search.in.h (lfind, lsearch): Likewise. * lib/stdio.in.h (fcloseall, fdopen, fileno, getw, putw, tempnam): Likewise. * lib/stdlib.in.h (ecvt, fcvt, gcvt, mktemp, putenv): Likewise. * lib/string.in.h (memccpy, strdup): Likewise. * lib/sys_stat.in.h (chmod, umask): Likewise. * lib/time.in.h (tzset): Likewise. * lib/unistd.in.h (access, chdir, close, dup, dup2, execl, execle, execlp, execv, execve, execvp, execvpe, getcwd, getpid, isatty, lseek, read, rmdir, swab, unlink, write): Likewise. * lib/utime.in.h (utime): Likewise. * lib/wchar.in.h (wcsdup): Likewise. * lib/math.in.h (j0, j1, jn, y0, y1, yn): Likewise. (isfinite, isinf, isnan, signbit): On native Windows, don't define as an rpl_-prefixed macro. * lib/canonicalize-lgpl.c (__getcwd): On native Windows, use _getcwd. * lib/close.c (close_nothrow): On native Windows, use _close. * lib/creat.c (orig_creat): On native Windows, use _creat. * lib/dup.c (dup_nothrow): On native Windows, use _dup. * lib/dup2.c (dup2_nothrow): Use _dup2. * lib/fdopen.c (fdopen_nothrow): On native Windows, use _fdopen. * lib/getcwd-lgpl.c: On native Windows, use _getcwd. * lib/getcwd.c (getcwd_nothrow): Use _getcwd also on mingw. * lib/open.c (orig_open): On native Windows, use _open. * lib/read.c (read_nothrow): Use _read. * lib/rmdir.c: On native Windows, use _rmdir. * lib/unlink.c: On native Windows, use _unlink. * lib/write.c (write_nothrow): Use _write. * lib/sys_select.in.h (close): With clang, don't attach a warning on an undefined symbol. * lib/sys_socket.in.h (close): Likewise. * lib/sys_time.in.h (close): Likewise. * tests/test-spawn-pipe-child.c: On native Windows, use _fdopen.
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* Update some URLsPaul Eggert2019-09-221-1/+1
| | | | | | This is a clerical change that mostly changes http: to https: in URLs where either will work. It also updates some URLs that have moved, removes some URLs that no longer work, and fixes related text.
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* Improve cross-compilation guesses for native Windows.Bruno Haible2017-07-131-10/+19
| | | | | | | | * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): Add cross-compilation guess for native Windows. (gl_FUNC_FFLUSH): Update accordingly. * m4/fclose.m4 (gl_FUNC_FCLOSE): Likewise. * m4/fseeko.m4 (gl_FUNC_FFLUSH_STDIN): Likewise.
* Avoid wrong configure results with gcc -fsanitize=address.Bruno Haible2017-05-201-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | This completes the work done on 2016-02-06 on this topic. * m4/memmem.m4 (gl_FUNC_MEMMEM): Free allocated memory before returning. * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise. * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise. * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise. * m4/fopen.m4 (gl_FUNC_FOPEN): Close allocated FILE streams before returning. * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): Likewise. * m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise. * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise. * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise. * m4/signbit.m4 (gl_FLOATTYPE_SIGN_LOCATION): Likewise. * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise. * m4/getdelim.m4 (gl_FUNC_GETDELIM): Close allocated FILE streams and free allocated memory before returning. * m4/getline.m4 (gl_FUNC_GETLINE): Likewise. * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Close allocated DIR objects before returning. * m4/iconv.m4 (AM_ICONV_LINK): Close allocated iconv_t handles before returning.
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* fflush, fseeko: port to musl cross-compilesPaul Eggert2013-06-181-4/+11
| | | | | | | | | | | | | | | | | | * lib/fseeko.c (fseeko): Assume that fflushing stdin works if on some implementation that (1) is not known to be buggy, (2) claims conformance to POSIX.1-2008 or later, and (3) is being cross-compiled to so we can't easily check for lack of conformance. This is for cross-compiling to musl. Reported by Rich Felker in <http://lists.gnu.org/archive/html/bug-gnulib/2013-06/msg00043.html>. * m4/fclose.m4 (gl_FUNC_FCLOSE): * m4/fflush.m4 (gl_FUNC_FFLUSH): * m4/fseeko.m4 (gl_FUNC_FSEEKO): Adjust to above change. * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): Set gl_cv_func_fflush_stdin to 'cross', not to 'no', when cross-compiling. AC_DEFINE FUNC_FFLUSH_STDIN to 1, 0, -1 if fflushing stdin is known to work, known not to work, or unknown.
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* fflush, stat: no 'static inline'Paul Eggert2012-11-291-6/+2
| | | | | | | | | | | | | | * lib/fflush.c (clear_ungetc_buffer_preserving_position) (clear_ungetc_buffer, disable_seek_optimization) (restore_seek_optimization, update_fpos_cache): * lib/stat.c (orig_stat): Now static, not static inline. * lib/fflush.c (disable_seek_optimization, restore_seek_optimization) (update_fpos_cache): Define only if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1). * m4/fflush.m4 (gl_PREREQ_FFLUSH): * m4/stat.m4 (gl_PREREQ_STAT): Do not require AC_C_INLINE.
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* unistd et al.: Don't assume <unistd.h> exists.Bruno Haible2011-09-111-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Don't include <unistd.h> if it does not exist. * m4/environ.m4 (gl_ENVIRON): Don't include <unistd.h> if it does not exist. But include <stdlib.h>. * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): If <unistd.h> does not exist, include <io.h> and <stdlib.h> instead. Don't test symbolink links if symlink() does not exist. * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): If <unistd.h> does not exist, include <io.h> instead. * m4/free.m4 (gl_FUNC_FREE): Assume free(NULL) works on native Windows. * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): If <unistd.h> does not exist, include <direct.h> instead. * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise. * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise. * m4/lseek.m4 (gl_FUNC_LSEEK): If <unistd.h> does not exist, include <io.h> instead. * m4/rename.m4 (gl_FUNC_RENAME): Assume rename() manages hard links correctly if the system does not have hard links. * m4/rmdir.m4 (gl_FUNC_RMDIR): If <unistd.h> does not exist, include <direct.h> instead. * m4/unistd_h.m4 (gl_UNISTD_H): If <unistd.h> does not exist, bypass it when looking for function declarations. * m4/unlink.m4 (gl_FUNC_UNLINK): If <unistd.h> does not exist, include <direct.h> and <io.h> instead. * doc/posix-headers/unistd.texi: More details about MSVC problem.
* fflush: Move AC_LIBOBJ invocations to module description.Bruno Haible2011-06-161-10/+3
| | | | | | | * m4/fflush.m4 (gl_REPLACE_FFLUSH): Remove macro. (gl_FUNC_FFLUSH): Inline it here. Move AC_LIBOBJ and gl_PREREQ_FFLUSH invocations from here... * modules/fflush (configure.ac): ... to here.
* fclose, fflush: Respect rules for use of AC_LIBOBJ.Bruno Haible2011-05-061-2/+1
| | | | | | | | | * m4/fflush.m4 (gl_FUNC_FFLUSH): Don't invoke gl_REPLACE_FCLOSE. * m4/fclose.m4 (gl_FUNC_FCLOSE): Invoke gl_FUNC_FFLUSH_STDIN and gl_REPLACE_FCLOSE here. * modules/fflush (Depends-on): Remove fclose. * doc/posix-functions/fclose.texi: Mention module 'fflush' only in combination with module 'fclose'.
* fflush, fseeko: Respect rules for use of AC_LIBOBJ.Bruno Haible2011-05-061-6/+13
| | | | | | | | | * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): New macro, extracted from gl_FUNC_FFLUSH. (gl_FUNC_FFLUSH): Use it. (gl_REPLACE_FFLUSH): Don't invoke gl_REPLACE_FSEEKO. * m4/fseeko.m4 (gl_FUNC_FSEEKO): Invoke gl_FUNC_FFLUSH_STDIN and gl_REPLACE_FSEEKO here.
* fflush: also replace fclose when fixing fflushEric Blake2011-05-021-1/+2
| | | | | | | | | | | | | | | | | | | | This fixes the fclose failures detected in the previous patch, but only when the GPL fflush module is also in use. That is because the need for behavior of resetting seekable input streams is much less common, and the fix more complex. The LGPLv2+ test for fclose() in isolation is relaxed to pass if fflush is not being replaced to cater to input streams. * modules/fflush (Depends-on): Add fclose. * m4/fflush.m4 (gl_FUNC_FFLUSH): Also replace fclose. * lib/fclose.c (rpl_fclose): Don't cause spurious failures on memstreams with no backing fd. * doc/posix-functions/fclose.texi (fclose): Document the use of fflush module to fix the bug. * tests/test-fclose.c (main): Relax test when fclose is used in isolation. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-011-1/+1
| | | | Run the new "make update-copyright" rule.
* fseeko: Fix C++ test error on mingw.Bruno Haible2010-04-051-3/+2
|
* update nearly all FSF copyright year lists to include 2010Jim Meyering2010-01-011-1/+1
| | | | | Use the same procedure as for 2009, outlined in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
* Use spaces for indentation, not tabs.Bruno Haible2009-12-101-34/+34
|
* Make fflush-after-ungetc POSIX compliant on glibc systems.Bruno Haible2009-01-161-7/+22
|
* Put system dependent routines into inline functions.Bruno Haible2008-04-261-1/+9
|
* Disable the fflush-after-ungetc tests, since gnulib currently does notBruno Haible2008-03-291-5/+12
| | | | guarantee consistent results.
* Remove execute permission.Bruno Haible2007-09-301-0/+0
|
* Fix lseek on mingw.Eric Blake2007-05-241-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * modules/lseek: New module. * m4/lseek.m4: New file. * lib/lseek.c: New file. * modules/lseek-tests: New file. * tests/test-lseek.c: New file. * tests/test-lseek.sh: New file. * MODULES.html.sh: Document lseek module. * modules/fflush (Depends-on): Add lseek, fseeko. * modules/fseeko (Depends-on): Likewise. * modules/ftello (Depends-on): Likewise. * m4/fseeko.m4 (gl_FUNC_FSEEKO): Replace fseek[o] if lseek is broken. * m4/ftello.m4 (gl_FUNC_FTELLO): Replace ftell[o] if lseek is broken. * m4/fflush.m4 (gl_REPLACE_FFLUSH): Trigger fseeko module. * lib/fseeko.c (rpl_fseeko): Quit early on non-seekable files. * lib/ftello.c (rpl_ftello): Likewise. * tests/test-fseeko.c (main): Test this. * tests/test-fseeko.sh: Likewise. * tests/test-ftello.c (main): Likewise. * tests/test-ftello.sh: Likewise. * lib/stdio_.h (fseek, ftell): Simplify, since missing fseeko now implies replacing fseek. * modules/stdio (Makefile.am): No longer need HAVE_FSEEKO, HAVE_FTELLO. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add lseek info. * modules/unistd (Makefile.am): Likewise. * lib/unistd_.h (lseek): Declare a replacement. * doc/functions/lseek.texi (lseek): Document this fix. * doc/functions/fseek.texi (fseek): Likewise. * doc/functions/ftell.texi (ftell): Likewise.
* Ensure fseeko and ftello are declared on glibc systems.Bruno Haible2007-04-261-5/+0
|
* Make the combination of fflush and fseek/fseeko POSIX compliant.Bruno Haible2007-04-251-1/+7
|
* Make fflush rely on fpurge.Eric Blake2007-04-171-1/+1
| | | | | | | | * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than open coding all variants. * modules/fflush (Depends-on): Add fpurge and unistd. * modules/fflush-tests (Depends-on): Unistd is no longer extra. * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
* Make fflush rely on fpurge.Eric Blake2007-04-171-11/+1
| | | | | | | | * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than open coding all variants. * modules/fflush (Depends-on): Add fpurge and unistd. * modules/fflush-tests (Depends-on): Unistd is no longer extra. * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
* * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.Eric Blake2007-04-101-0/+60
* modules/stdio (Makefile.am): Support fflush. * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise. * modules/fflush: New file. * lib/fflush.c: Likewise. * m4/fflush.m4: Likewise. * modules/fflush-tests: New test. * tests/test-fflush.c: Likewise. * MODULES.html.sh (Input/output <stdio.h>): Document new module.