1. 17 May, 2017 1 commit
  2. 16 May, 2017 5 commits
    • Bruno Haible's avatar
      javacomp: Fix handle leak. · b82b3835
      Bruno Haible authored
      Found by Coverity.
      * lib/javacomp.c (get_classfile_version): Close fd before returning.
    • Bruno Haible's avatar
      relocate: Make it easier to reclaim allocated memory. · 3a285f29
      Bruno Haible authored
      * lib/relocatable.h (relocate2): New declaration/macro.
      * lib/relocatable.c (relocate2): New function.
      * doc/relocatable-maint.texi (Supporting Relocation): Mention the
      relocate2 function.
      * lib/localcharset.c (relocate2): Define fallback.
      (get_charset_aliases): Invoke relocate2 instead of relocate. Free the
      allocated memory.
      * lib/javaversion.c (relocate2): Define fallback.
      (javaexec_version): Invoke relocate2 instead of relocate. Free the
      allocated memory.
    • Bruno Haible's avatar
      relocate: Simplify EMX specific code. · 88fdf7f8
      Bruno Haible authored
      * lib/relocatable.c (relocate): Assume pathname is non-NULL. Use
      ISSLASH macro consistently. Avoid dangerous string concatenation idiom.
    • Bruno Haible's avatar
      sigpipe tests: Fix file list. · 90d98286
      Bruno Haible authored
      * modules/sigpipe-tests (Files): Add tests/macros.h.
    • Paul Eggert's avatar
      manywarnings: update for GCC 7 · 5e22aee7
      Paul Eggert authored
      * 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.
  3. 15 May, 2017 4 commits
  4. 14 May, 2017 6 commits
    • Bruno Haible's avatar
      stat-time tests: Improve comment. · da830b51
      Bruno Haible authored
      * tests/test-stat-time.c: Add hyperlink, from Paul Eggert.
    • Bruno Haible's avatar
      same-inode: Adapt for windows-stat-inodes. · 0e9b97cf
      Bruno Haible authored
      * lib/same-inode.h: Include <sys/types.h>.
      (SAME_INODE) [_GL_WINDOWS_STAT_INODES]: Define specifically.
      * modules/same-inode (Depends-on): Add sys_types.
    • Bruno Haible's avatar
      windows-stat-inodes: New module. · 8123b614
      Bruno Haible authored
      * 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.
    • Bruno Haible's avatar
      stat-time tests: Workaround for native Windows. · d75a6cfc
      Bruno Haible authored
      * 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.
    • Bruno Haible's avatar
      stat-time: Adapt for windows-stat-timespec. · 5f1eef73
      Bruno Haible authored
      * lib/stat-time.h (get_stat_birthtime) [_GL_WINDOWS_STAT_TIMESPEC]: Use
      entire st_ctim field.
    • Jim Meyering's avatar
      maint.mk: update regex to reflect 2013 addition of "assume" to verify.h · 8e2bc0b5
      Jim Meyering authored
      * 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.
  5. 13 May, 2017 11 commits
    • Bruno Haible's avatar
      Use symbolic values for _WIN32_WINNT. · 47727ffa
      Bruno Haible authored
      * lib/ftruncate.c (_WIN32_WINNT): Use symbolic value _WIN32_WINNT_WIN2K.
      * lib/sethostname.c (_WIN32_WINNT): Likewise.
    • Bruno Haible's avatar
      year2038: New module. · 4ecbdc82
      Bruno Haible authored
      * m4/year2038.m4: New file.
      * modules/year2038: New file.
      * doc/year2038.texi: New file.
      * doc/gnulib.texi: Include it.
    • Bruno Haible's avatar
      largefile: Simplify. · 6327c7d8
      Bruno Haible authored
      * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Remove unused definition
      of _GL_WINDOWS_64_BIT_ST_SIZE.
    • Bruno Haible's avatar
      largefile: Improve and document. · 7a066745
      Bruno Haible authored
      * 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.
    • Bruno Haible's avatar
      truncate-tests: New module. · 63e26828
      Bruno Haible authored
      * tests/test-truncate.c: New file.
      * modules/truncate-tests: New file.
    • Bruno Haible's avatar
      truncate: New module. · f4d71054
      Bruno Haible authored
      * 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.
      * modules/unistd (Makefile.am): Substitute GNULIB_TRUNCATE,
      * modules/truncate: New file.
      * tests/test-unistd-c++.cc (truncate): Test signature.
      * doc/posix-functions/truncate.texi: Mention the new module.
    • Bruno Haible's avatar
      windows-stat-timespec: New module. · 7d2f35f7
      Bruno Haible authored
      * 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
      * doc/windows-stat-timespec.texi: New file.
      * doc/gnulib.texi: Include it.
    • Bruno Haible's avatar
      windows-stat-override: New module. · 44fe2082
      Bruno Haible authored
      * 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
      * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize
      * modules/sys_stat (Makefile.am): Substitute
      * modules/windows-stat-override: New file.
    • Bruno Haible's avatar
      fstat: Fix module dependency conditions. · 532f7f1e
      Bruno Haible authored
      * modules/fstat (Depends-on): Fix typo.
    • Bruno Haible's avatar
      stat, fstat: Complete removal of old native Windows code. · 3a447f59
      Bruno Haible authored
      * lib/stat.c: Remove old macrology for WINDOWS_NATIVE.
      * lib/fstat.c: Likewise.
      * lib/stat-w32.c: Likewise.
    • Bruno Haible's avatar
      stat: Complete removal of REPLACE_FUNC_STAT_DIR code. · 4557f862
      Bruno Haible authored
      * lib/stat.c: Remove all REPLACE_FUNC_STAT_DIR code.
  6. 12 May, 2017 2 commits
  7. 11 May, 2017 4 commits
    • Bruno Haible's avatar
      gettimeofday: Increase precision on mingw. · 055746f5
      Bruno Haible authored
      * 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
    • Bruno Haible's avatar
      poll: Fix confusion between SOCKETs and FDs on native Windows. · 8898223d
      Bruno Haible authored
      Fix proposed by Daniel P. Berrange <berrange@redhat.com>.
      * lib/poll.c [WINDOWS_NATIVE]: Undefine select.
    • Karl Berry's avatar
      autoupdate · d8c3882d
      Karl Berry authored
    • Bruno Haible's avatar
      doc: Clarify doc about socket functions on native Windows. · df7f87df
      Bruno Haible authored
      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.
  8. 10 May, 2017 7 commits
    • Bruno Haible's avatar
      poll: Fix link error on native Windows. · 4df5fde5
      Bruno Haible authored
      * lib/poll.c [WINDOWS_NATIVE]: Undefine recv.
    • Bruno Haible's avatar
      time: Fix missing initialization of HAVE_TIMEZONE_T. · 2511522d
      Bruno Haible authored
      * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize HAVE_TIMEZONE_T
      * 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
      * modules/time_rz (Depends-on): Add 'time'. Remove useless quoting.
      (configure.ac): Remove useless quoting.
    • Bruno Haible's avatar
      Implement a way to opt out from MSVC support, part 2. · f16bb1a7
      Bruno Haible authored
      * modules/msvc-inval (Include): Document recommended idiom.
      * modules/msvc-nothrow (Include): Likewise.
    • Bruno Haible's avatar
      Implement a way to opt out from MSVC support. · 03c3f38b
      Bruno Haible authored
      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
      * 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
      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
      * 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
    • Bruno Haible's avatar
      wait-process: Adjust native Windows support. · 1888a27a
      Bruno Haible authored
      * lib/wait-process.c: Use the usual condition for recognizing a native
      Windows platform.
    • Bruno Haible's avatar
      doc: New chapter "Native Windows Support". · 8621e568
      Bruno Haible authored
      * doc/gnulib.texi (Native Windows Support): New chapter.
      * doc/windows-libtool.texi: Small wording changes.
      * doc/windows-sockets.texi: Small wording and formatting changes.
    • Bruno Haible's avatar
      doc: Move section "Library version handling". · d0a9c554
      Bruno Haible authored
      * doc/gnulib.texi: Move section "Library version handling"
      from chapter "Miscellaneous Notes" to chapter "Particular Modules".