summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* manywarnings: update for GCC 7Paul Eggert2017-05-1612-25/+126
| | | | | | | | | | | * build-aux/gcc-warning.spec: * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add GCC 7 warnings, notably -Wimplicit-fallthrough=5, which requires a non-comment fallthrough attribute. This is a bit cleaner than the comment versions. * lib/strftime.c, lib/dfa.c, lib/fnmatch.c, lib/mbrtowc.c: * lib/vasnprintf.c, tests/macros.h (FALLTHROUGH): New macro. Use it whenever one switch case falls through into the next.
* gnulib-tool: Fix generated code when libtests contains module 'alloca'.Bruno Haible2017-05-152-2/+8
| | | | | * gnulib-tool (func_emit_tests_Makefile_am): For libtests.a, use @ALLOCA@, not @LTALLOCA@.
* sys_select: Avoid "was expanded before it was required" warning.Bruno Haible2017-05-152-1/+7
| | | | | * modules/sys_select (configure.ac): Require, not invoke, gl_HEADER_SYS_SELECT.
* autoupdateKarl Berry2017-05-151-2/+8
|
* gnulib-tool: improve GNU Make debuggingPaul Eggert2017-05-152-3/+18
| | | | | * gnulib-tool (func_emit_lib_Makefile_am): Omit unnecessary echo. Report autoconf diagnostics when it fails, in the output makefile.
* stat-time tests: Improve comment.Bruno Haible2017-05-142-1/+8
| | | | * tests/test-stat-time.c: Add hyperlink, from Paul Eggert.
* same-inode: Adapt for windows-stat-inodes.Bruno Haible2017-05-143-3/+21
| | | | | | * lib/same-inode.h: Include <sys/types.h>. (SAME_INODE) [_GL_WINDOWS_STAT_INODES]: Define specifically. * modules/same-inode (Depends-on): Add sys_types.
* windows-stat-inodes: New module.Bruno Haible2017-05-1412-125/+374
| | | | | | | | | | | | | | | | | | | | * m4/windows-stat-inodes.m4: New file. * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Set WINDOWS_STAT_INODES. * modules/sys_types (Makefile.am): Substitute WINDOWS_STAT_INODES. * lib/sys_types.in.h [WINDOWS_STAT_INODES]: Override dev_t and ino_t. (_GL_WINDOWS_STAT_INODES): New macro. * lib/stat-w32.c: Set _WIN32_WINNT. Include <string.h>, verify.h. (GetFileInformationByHandleExFunc): New variable. (initialize): Initialize it. (_gl_fstat_by_handle) [_GL_WINDOWS_STAT_INODES]: Initialize st_dev and st_ino appropriately. * lib/stat.c (rpl_stat): Use the directory entry based approach only as a fallback, because it does not provide st_dev and st_ino values. * modules/fstat (Depends-on): Add 'verify'. * modules/windows-stat-inodes: New file. * doc/windows-stat-inodes.texi: New file. * doc/gnulib.texi: Include it. * doc/posix-headers/sys_stat.texi: Mention the new module.
* stat-time tests: Workaround for native Windows.Bruno Haible2017-05-142-17/+49
| | | | | | | | | * tests/test-stat-time.c: Include <stdio.h>, <time.h>. (filename_stamp1, filename_testfile, filename_stamp2, filename_stamp3): New variables. (initialize_filenames): New function. (main): Invoke it. (cleanup, prepare_test): Update.
* stat-time: Adapt for windows-stat-timespec.Bruno Haible2017-05-142-0/+10
| | | | | * lib/stat-time.h (get_stat_birthtime) [_GL_WINDOWS_STAT_TIMESPEC]: Use entire st_ctim field.
* maint.mk: update regex to reflect 2013 addition of "assume" to verify.hJim Meyering2017-05-132-1/+7
| | | | | * top/maint.mk (sc_prohibit_verify_without_use): Don't reject a source file that uses the assume macro, claiming that verify.h is unused.
* Use symbolic values for _WIN32_WINNT.Bruno Haible2017-05-133-2/+8
| | | | | * lib/ftruncate.c (_WIN32_WINNT): Use symbolic value _WIN32_WINNT_WIN2K. * lib/sethostname.c (_WIN32_WINNT): Likewise.
* year2038: New module.Bruno Haible2017-05-135-0/+112
| | | | | | | * m4/year2038.m4: New file. * modules/year2038: New file. * doc/year2038.texi: New file. * doc/gnulib.texi: Include it.
* largefile: Simplify.Bruno Haible2017-05-132-7/+8
| | | | | * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Remove unused definition of _GL_WINDOWS_64_BIT_ST_SIZE.
* largefile: Improve and document.Bruno Haible2017-05-136-5/+41
| | | | | | | | | * m4/largefile.m4 (gl_LARGEFILE): Set WINDOWS_64_BIT_ST_SIZE to 0 if the mingw headers already define 'stat' appropriately. * modules/largefile (Description): Clarify. * doc/largefile.texi: New file. * doc/gnulib.texi: Include it. * doc/posix-headers/sys_types.texi: Update.
* truncate-tests: New module.Bruno Haible2017-05-133-0/+125
| | | | | * tests/test-truncate.c: New file. * modules/truncate-tests: New file.
* truncate: New module.Bruno Haible2017-05-139-8/+179
| | | | | | | | | | | | | | * lib/unistd.in.h (truncate): New declaration. * lib/truncate.c: New file. * m4/truncate.m4: New file. * m4/unistd_h.m4 (gl_UNISTD_H): Test whether 'truncate' is declared. (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_TRUNCATE, HAVE_TRUNCATE, REPLACE_TRUNCATE. * modules/unistd (Makefile.am): Substitute GNULIB_TRUNCATE, HAVE_TRUNCATE, REPLACE_TRUNCATE. * modules/truncate: New file. * tests/test-unistd-c++.cc (truncate): Test signature. * doc/posix-functions/truncate.texi: Mention the new module.
* windows-stat-timespec: New module.Bruno Haible2017-05-1312-10/+158
| | | | | | | | | | | | | | | | | | | | | | | | * modules/windows-stat-timespec: New file. * m4/windows-stat-timespec.m4: New file. * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Set WINDOWS_STAT_TIMESPEC. * modules/sys_stat (Makefile.am): Substitute WINDOWS_STAT_TIMESPEC. * lib/sys_stat.in.h (struct stat) [WINDOWS_STAT_TIMESPEC]: Declare with fields st_atim, st_mtim, st_ctim. (st_atime, st_mtime, st_ctime): Define as macros. (_GL_WINDOWS_STAT_TIMESPEC): New macro. * lib/stat-w32.h (_gl_convert_FILETIME_to_timespec) [_GL_WINDOWS_STAT_TIMESPEC]: New declaration. * lib/stat-w32.c (_gl_convert_FILETIME_to_timespec) [_GL_WINDOWS_STAT_TIMESPEC]: New function. (_gl_convert_FILETIME_to_POSIX): Adjust coding style. (_gl_fstat_by_handle): If _GL_WINDOWS_STAT_TIMESPEC, convert the FILETIME to 'struct timespec', not 'time_t'. * lib/stat.c (rpl_stat): If _GL_WINDOWS_STAT_TIMESPEC, convert the FILETIME to 'struct timespec', not 'time_t'. * lib/stat-time.h (STAT_TIMESPEC): Define also if _GL_WINDOWS_STAT_TIMESPEC. * doc/windows-stat-timespec.texi: New file. * doc/gnulib.texi: Include it.
* windows-stat-override: New module.Bruno Haible2017-05-135-48/+178
| | | | | | | | | | | | | | | * lib/sys_stat.in.h (stat) [GNULIB_OVERRIDES_STRUCT_STAT]: Provide own definition. Define GNULIB_defined_struct_stat. (fstat, fstatat, lstat, stat) [GNULIB_OVERRIDES_STRUCT_STAT]: Provoke link error if this symbol is used and the corresponding module is not in use. (_stat64, _stat32i64, _stati64, _stat32, _stat64i32): Don't redefine if GNULIB_OVERRIDES_STRUCT_STAT. * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_OVERRIDES_STRUCT_STAT. * modules/sys_stat (Makefile.am): Substitute GNULIB_OVERRIDES_STRUCT_STAT. * modules/windows-stat-override: New file.
* fstat: Fix module dependency conditions.Bruno Haible2017-05-132-3/+8
| | | | * modules/fstat (Depends-on): Fix typo.
* stat, fstat: Complete removal of old native Windows code.Bruno Haible2017-05-134-27/+15
| | | | | | * lib/stat.c: Remove old macrology for WINDOWS_NATIVE. * lib/fstat.c: Likewise. * lib/stat-w32.c: Likewise.
* stat: Complete removal of REPLACE_FUNC_STAT_DIR code.Bruno Haible2017-05-132-11/+5
| | | | * lib/stat.c: Remove all REPLACE_FUNC_STAT_DIR code.
* autoupdateKarl Berry2017-05-121-2/+2
|
* getopt-posix: port to mingwPaul Eggert2017-05-112-1/+9
| | | | | | * lib/getopt.c (flockfile, funlockfile): Define on mingw. Problem reported by Daniel P. Berrage in: http://lists.gnu.org/archive/html/bug-gnulib/2017-05/msg00086.html
* gettimeofday: Increase precision on mingw.Bruno Haible2017-05-114-35/+61
| | | | | | | | | * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Require AC_CANONICAL_HOST. Set REPLACE_GETTIMEOFDAY to 1 on mingw. * lib/gettimeofday.c (gettimeofday): On native Windows, use the GetSystemTimePreciseAsFileTime based implementation always. * doc/posix-functions/gettimeofday.texi: Mention precision problem on mingw.
* poll: Fix confusion between SOCKETs and FDs on native Windows.Bruno Haible2017-05-112-0/+10
| | | | | | Fix proposed by Daniel P. Berrange <berrange@redhat.com>. * lib/poll.c [WINDOWS_NATIVE]: Undefine select.
* autoupdateKarl Berry2017-05-111-2/+2
|
* doc: Clarify doc about socket functions on native Windows.Bruno Haible2017-05-1117-45/+68
| | | | | | | | | | | | | | | | | | | | | | This reworks doc that was added on 2008-09-29. * doc/posix-functions/select.texi: Fix copy-and-paste mistake and use clearer wording. * doc/posix-functions/accept.texi: Use clearer wording. * doc/posix-functions/bind.texi: Likewise. * doc/posix-functions/connect.texi: Likewise. * doc/posix-functions/getpeername.texi: Likewise. * doc/posix-functions/getsockname.texi: Likewise. * doc/posix-functions/getsockopt.texi: Likewise. * doc/posix-functions/ioctl.texi: Likewise. * doc/posix-functions/listen.texi: Likewise. * doc/posix-functions/recv.texi: Likewise. * doc/posix-functions/recvfrom.texi: Likewise. * doc/posix-functions/send.texi: Likewise. * doc/posix-functions/sendto.texi: Likewise. * doc/posix-functions/setsockopt.texi: Likewise. * doc/posix-functions/shutdown.texi: Likewise. * doc/posix-functions/socket.texi: Likewise.
* poll: Fix link error on native Windows.Bruno Haible2017-05-112-0/+9
| | | | * lib/poll.c [WINDOWS_NATIVE]: Undefine recv.
* time: Fix missing initialization of HAVE_TIMEZONE_T.Bruno Haible2017-05-115-12/+25
| | | | | | | | | | * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize HAVE_TIMEZONE_T here... * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_DEFAULTS): ... not here. * m4/time_rz.m4 (gl_TIME_RZ): Require gl_HEADER_TIME_H_DEFAULTS, not gl_HEADER_SYS_TIME_H_DEFAULTS. * modules/time_rz (Depends-on): Add 'time'. Remove useless quoting. (configure.ac): Remove useless quoting.
* Implement a way to opt out from MSVC support, part 2.Bruno Haible2017-05-103-2/+12
| | | | | * modules/msvc-inval (Include): Document recommended idiom. * modules/msvc-nothrow (Include): Likewise.
* Implement a way to opt out from MSVC support.Bruno Haible2017-05-1051-93/+350
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful for Emacs. * modules/msvc-nothrow (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/accept4.c: Include <io.h> as an alternative to msvc-nothrow.h. * lib/error.c: Likewise. * lib/fcntl.c: Likewise. * lib/flock.c: Likewise. * lib/fstat.c: Likewise. * lib/fsync.c: Likewise. * lib/ioctl.c: Likewise. * lib/isapipe.c: Likewise. * lib/lseek.c: Likewise. * lib/nonblocking.c: Likewise. * lib/poll.c: Likewise. * lib/select.c: Likewise. * lib/sockets.h: Likewise. * lib/sockets.c: Likewise. * lib/stdio-read.c: Likewise. * lib/stdio-write.c: Likewise. * lib/utimens.c: Likewise. * lib/w32sock.h: Likewise. * lib/w32spawn.h: Likewise. * tests/test-cloexec.c: Likewise. * tests/test-dup-safer.c: Likewise. * tests/test-dup2.c: Likewise. * tests/test-dup3.c: Likewise. * tests/test-fcntl.c: Likewise. * tests/test-pipe.c: Likewise. * tests/test-pipe2.c: Likewise. * lib/ftruncate.c: Likewise. (chsize_nothrow): Renamed from chsize. * lib/msvc-nothrow.c: Don't include msvc-inval.h if HAVE_MSVC_INVALID_PARAMETER_HANDLER is not defined. * lib/close.c: Likewise. * lib/dup.c: Likewise. * lib/fclose.c: Likewise. * lib/raise.c: Likewise. * tests/test-fgetc.c: Likewise. * tests/test-fputc.c: Likewise. * tests/test-fread.c: Likewise. * tests/test-fwrite.c: Likewise. * lib/getdtablesize.c: Likewise. (_setmaxstdio_nothrow): Renamed from _setmaxstdio. * lib/isatty.c: Don't include msvc-inval.h if HAVE_MSVC_INVALID_PARAMETER_HANDLER is not defined. Include <io.h> as an alternative to msvc-nothrow.h. * lib/read.c: Likewise. * lib/write.c: Likewise. * lib/dup2.c: Likewise. (dup2_nothrow): New function. (ms_windows_dup2): Use it. * m4/close.m4 (gl_FUNC_CLOSE): Invoke gl_MSVC_INVAL and test HAVE_MSVC_INVALID_PARAMETER_HANDLER only if gl_MSVC_INVAL is defined. * m4/dup.m4 (gl_FUNC_DUP): Likewise. * m4/fdopen.m4 (gl_FUNC_FDOPEN): Likewise. * m4/raise.m4 (gl_FUNC_RAISE): Likewise. * m4/read.m4 (gl_FUNC_READ): Likewise. * m4/write.m4 (gl_FUNC_WRITE): Likewise. * doc/windows-without-msvc.texi: New file. * doc/gnulib.texi (Native Windows Support without MSVC Support): New section.
* wait-process: Adjust native Windows support.Bruno Haible2017-05-102-4/+10
| | | | | * lib/wait-process.c: Use the usual condition for recognizing a native Windows platform.
* doc: New chapter "Native Windows Support".Bruno Haible2017-05-104-21/+47
| | | | | | * doc/gnulib.texi (Native Windows Support): New chapter. * doc/windows-libtool.texi: Small wording changes. * doc/windows-sockets.texi: Small wording and formatting changes.
* doc: Move section "Library version handling".Bruno Haible2017-05-102-3/+9
| | | | | * doc/gnulib.texi: Move section "Library version handling" from chapter "Miscellaneous Notes" to chapter "Particular Modules".
* doc: Move section "Running self-tests under valgrind".Bruno Haible2017-05-102-3/+9
| | | | | * doc/gnulib.texi: Move section "Running self-tests under valgrind" from chapter "Particular Modules" to chapter "Miscellaneous Notes".
* doc: New chapter "Build Infrastructure Modules".Bruno Haible2017-05-102-21/+39
| | | | * doc/gnulib.texi (Build Infrastructure Modules): New chapter.
* Prepare for reordering sections in the manual.Bruno Haible2017-05-1013-497/+516
| | | | | | | | | | | | | | | | * doc/gnulib.texi: Move several sections to separate files. Include these files. * doc/out-of-memory.texi: New file, extracted from doc/gnulib.texi. * doc/obsolete.texi: Likewise. * doc/extra-tests.texi: Likewise. * doc/transversal.texi: Likewise. * doc/namespace.texi: Likewise. * doc/check-version.texi: Likewise. * doc/windows-sockets.texi: Likewise. * doc/windows-libtool.texi: Likewise. * doc/licenses-texi.texi: Likewise. * doc/build-automation.texi: Likewise. * doc/c-locale.texi: Likewise.
* Fix instructions how to update manual on www.gnu.org.Bruno Haible2017-05-102-0/+6
| | | | * doc/README: Add -I option, so that texi2dvi finds texinfo.tex.
* tzset: Expand comment about TZ problem on native Windows.Bruno Haible2017-05-097-18/+143
| | | | | | | | | | * lib/tzset.c (tzset): Elaborate comment, based on explanations by Paul Eggert. * lib/ctime.c (rpl_ctime): Likewise. * lib/localtime.c (rpl_localtime): Likewise. * lib/mktime.c (mktime): Likewise. * lib/strftime-fixes.c (rpl_strftime): Likewise. * lib/wcsftime.c (rpl_wcsftime): Likewise.
* intprops: don’t depend on ‘verify’Paul Eggert2017-05-084-20/+33
| | | | | | | | | | Problem reported by Ævar Arnfjörð Bjarmason in: http://lists.gnu.org/archive/html/bug-gnulib/2017-05/msg00054.html * lib/intprops.h: Do not include verify.h, and move compile-time checks from here ... * tests/test-intprops.c (main): ... to here, if they’re not here already. Check widths of other standard integer types. * modules/intprops (Depends-on): Remove ‘verify’.
* utimens: On native Windows, support 100ns resolution also if fd < 0.Bruno Haible2017-05-085-6/+45
| | | | | | | | | | * lib/utime.in.h: Include <time.h>. (_gl_utimens_windows): New declaration. * lib/utime.c (_gl_utimens_windows): New function, based on utime. (utime): Invoke it. * lib/utimens.c (fdutimens): On native Windows, call _gl_utimens_windows instead of utime. * modules/utime (Depends-on): Add 'time'.
* utimens: Improve error code on native Windows.Bruno Haible2017-05-082-3/+17
| | | | | * lib/utimens.c (fdutimens): If fd was not opened with O_RDWR, fail with error code EACCES, not EINVAL.
* utime: Handle more Windows error codes.Bruno Haible2017-05-072-1/+7
| | | | | * lib/utime.c (utime): Handle ERROR_BAD_NETPATH. Based on explanations by Billy O'Neal.
* crypto/rijndael: Fix "strict-aliasing rules" warnings, alignment issues.Bruno Haible2017-05-062-57/+63
| | | | | | | | * lib/rijndael-api-fst.c (rijndaelBlockEncrypt): Declare 'block' as a union. (rijndaelPadEncrypt, rijndaelBlockDecrypt): Likewise. (rijndaelPadDecrypt): Likewise. Use local variable 'iv' to cache the value of cipher->IV.
* wctype-h-c++-tests: Update.Bruno Haible2017-05-062-3/+8
| | | | * tests/test-wctype-h-c++.cc: Reorder to match lib/wchar.in.h.
* wchar-c++-tests: Update.Bruno Haible2017-05-062-0/+10
| | | | * tests/test-wchar-c++.cc (wcsftime): Declare, missing since 2017-04-30.
* utime-h-c++-tests: New module.Bruno Haible2017-05-063-0/+61
| | | | | | * tests/test-utime-h-c++.cc: New file. (utime): Declare, missing since 2017-04-30. * modules/utime-h-c++-tests: New file.
* unistd-c++-tests: Update.Bruno Haible2017-05-062-0/+19
| | | | | | * tests/test-unistd-c++.cc (isatty): Declare, missing since 2012-01-03. (read): Declare, missing since 2011-04-15. (sethostname): Declare, missing since 2011-12-03.
* time-c++-tests: Update.Bruno Haible2017-05-062-0/+39
| | | | | | | | | * tests/test-time-c++.cc (tzset): Declare, missing since 2017-05-01. (localtime, gmtime): Declare, missing since 2017-04-30. (ctime): Declare, missing since 2017-04-30. (strftime): Declare, missing since 2017-04-30. (tzalloc, tzfree, localtime_rz, mktime_z): Declare, missing since 2015-07-24.