Jim Meyering
8e2bc0b51c
maint.mk: update regex to reflect 2013 addition of "assume" to verify.h
...
* 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.
2017-05-13 18:18:22 -07:00
Bruno Haible
47727ffa41
Use symbolic values for _WIN32_WINNT.
...
* lib/ftruncate.c (_WIN32_WINNT): Use symbolic value _WIN32_WINNT_WIN2K.
* lib/sethostname.c (_WIN32_WINNT): Likewise.
2017-05-13 16:16:05 +02:00
Bruno Haible
4ecbdc8220
year2038: New module.
...
* m4/year2038.m4: New file.
* modules/year2038: New file.
* doc/year2038.texi: New file.
* doc/gnulib.texi: Include it.
2017-05-13 16:16:05 +02:00
Bruno Haible
6327c7d86b
largefile: Simplify.
...
* m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Remove unused definition
of _GL_WINDOWS_64_BIT_ST_SIZE.
2017-05-13 16:16:04 +02:00
Bruno Haible
7a06674599
largefile: Improve and document.
...
* 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.
2017-05-13 03:03:07 +02:00
Bruno Haible
63e26828e0
truncate-tests: New module.
...
* tests/test-truncate.c: New file.
* modules/truncate-tests: New file.
2017-05-13 02:55:24 +02:00
Bruno Haible
f4d71054e7
truncate: New module.
...
* 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.
2017-05-13 02:54:37 +02:00
Bruno Haible
7d2f35f7f9
windows-stat-timespec: New module.
...
* 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.
2017-05-13 02:51:54 +02:00
Bruno Haible
44fe2082cf
windows-stat-override: New module.
...
* 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.
2017-05-13 02:46:43 +02:00
Bruno Haible
532f7f1eb7
fstat: Fix module dependency conditions.
...
* modules/fstat (Depends-on): Fix typo.
2017-05-13 02:39:00 +02:00
Bruno Haible
3a447f5959
stat, fstat: Complete removal of old native Windows code.
...
* lib/stat.c: Remove old macrology for WINDOWS_NATIVE.
* lib/fstat.c: Likewise.
* lib/stat-w32.c: Likewise.
2017-05-13 02:36:19 +02:00
Bruno Haible
4557f862d2
stat: Complete removal of REPLACE_FUNC_STAT_DIR code.
...
* lib/stat.c: Remove all REPLACE_FUNC_STAT_DIR code.
2017-05-13 02:32:24 +02:00
Karl Berry
757a0f5afe
autoupdate
2017-05-12 06:18:50 -07:00
Paul Eggert
19fb4184b0
getopt-posix: port to mingw
...
* 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
2017-05-11 17:59:49 -07:00
Bruno Haible
055746f501
gettimeofday: Increase precision on mingw.
...
* 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.
2017-05-11 21:39:06 +02:00
Bruno Haible
8898223d74
poll: Fix confusion between SOCKETs and FDs on native Windows.
...
Fix proposed by Daniel P. Berrange <berrange@redhat.com >.
* lib/poll.c [WINDOWS_NATIVE]: Undefine select.
2017-05-11 16:35:54 +02:00
Karl Berry
d8c3882dfe
autoupdate
2017-05-11 06:50:43 -07:00
Bruno Haible
df7f87dfe6
doc: Clarify doc about socket functions on native Windows.
...
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.
2017-05-11 15:23:11 +02:00
Bruno Haible
4df5fde5d4
poll: Fix link error on native Windows.
...
* lib/poll.c [WINDOWS_NATIVE]: Undefine recv.
2017-05-11 00:38:03 +02:00
Bruno Haible
2511522d3b
time: Fix missing initialization of HAVE_TIMEZONE_T.
...
* 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.
2017-05-11 00:27:52 +02:00
Bruno Haible
f16bb1a764
Implement a way to opt out from MSVC support, part 2.
...
* modules/msvc-inval (Include): Document recommended idiom.
* modules/msvc-nothrow (Include): Likewise.
2017-05-10 23:39:15 +02:00
Bruno Haible
03c3f38b55
Implement a way to opt out from MSVC support.
...
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.
2017-05-10 22:18:34 +02:00
Bruno Haible
1888a27a1e
wait-process: Adjust native Windows support.
...
* lib/wait-process.c: Use the usual condition for recognizing a native
Windows platform.
2017-05-10 20:42:33 +02:00
Bruno Haible
8621e56843
doc: New chapter "Native Windows Support".
...
* doc/gnulib.texi (Native Windows Support): New chapter.
* doc/windows-libtool.texi: Small wording changes.
* doc/windows-sockets.texi: Small wording and formatting changes.
2017-05-10 20:30:45 +02:00
Bruno Haible
d0a9c55474
doc: Move section "Library version handling".
...
* doc/gnulib.texi: Move section "Library version handling"
from chapter "Miscellaneous Notes" to chapter "Particular Modules".
2017-05-10 19:43:20 +02:00
Bruno Haible
33c1f82e82
doc: Move section "Running self-tests under valgrind".
...
* doc/gnulib.texi: Move section "Running self-tests under valgrind"
from chapter "Particular Modules" to chapter "Miscellaneous Notes".
2017-05-10 19:39:36 +02:00
Bruno Haible
b23eb748a3
doc: New chapter "Build Infrastructure Modules".
...
* doc/gnulib.texi (Build Infrastructure Modules): New chapter.
2017-05-10 19:35:44 +02:00
Bruno Haible
67d1468377
Prepare for reordering sections in the manual.
...
* 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.
2017-05-10 19:19:51 +02:00
Bruno Haible
3f67783fb1
Fix instructions how to update manual on www.gnu.org.
...
* doc/README: Add -I option, so that texi2dvi finds texinfo.tex.
2017-05-10 18:40:13 +02:00
Bruno Haible
aca75e962f
tzset: Expand comment about TZ problem on native Windows.
...
* 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.
2017-05-09 21:28:00 +02:00
Paul Eggert
d9c44b2b3b
intprops: don’t depend on ‘verify’
...
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’.
2017-05-08 10:38:24 -07:00
Bruno Haible
26d5667876
utimens: On native Windows, support 100ns resolution also if fd < 0.
...
* 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'.
2017-05-08 11:59:00 +02:00
Bruno Haible
df46bfb995
utimens: Improve error code on native Windows.
...
* lib/utimens.c (fdutimens): If fd was not opened with O_RDWR, fail with
error code EACCES, not EINVAL.
2017-05-08 11:58:49 +02:00
Bruno Haible
eb5c620e3b
utime: Handle more Windows error codes.
...
* lib/utime.c (utime): Handle ERROR_BAD_NETPATH.
Based on explanations by Billy O'Neal.
2017-05-07 21:09:25 +02:00
Bruno Haible
4f0a093a59
crypto/rijndael: Fix "strict-aliasing rules" warnings, alignment issues.
...
* 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.
2017-05-06 01:26:23 +02:00
Bruno Haible
7a10cf55ff
wctype-h-c++-tests: Update.
...
* tests/test-wctype-h-c++.cc: Reorder to match lib/wchar.in.h.
2017-05-06 00:22:47 +02:00
Bruno Haible
2c3911f5e9
wchar-c++-tests: Update.
...
* tests/test-wchar-c++.cc (wcsftime): Declare, missing since 2017-04-30.
2017-05-06 00:22:46 +02:00
Bruno Haible
308880d809
utime-h-c++-tests: New module.
...
* tests/test-utime-h-c++.cc: New file.
(utime): Declare, missing since 2017-04-30.
* modules/utime-h-c++-tests: New file.
2017-05-06 00:22:46 +02:00
Bruno Haible
22760ce69f
unistd-c++-tests: Update.
...
* 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.
2017-05-06 00:22:46 +02:00
Bruno Haible
8f4aa68441
time-c++-tests: Update.
...
* 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.
2017-05-06 00:22:45 +02:00
Bruno Haible
f614b66a4c
sys_resource-c++-tests: New module.
...
* tests/test-sys_resource-c++.cc: New file.
(getrusage): Declare, missing since 2012-04-13.
* modules/sys_resource-c++-tests: New file.
2017-05-06 00:22:45 +02:00
Bruno Haible
e31d3f5cea
strings-c++-tests: New module.
...
* tests/test-strings-c++.cc: New file.
(ffs): Declare, missing since 2011-07-12.
* modules/strings-c++-tests: New file.
2017-05-06 00:22:45 +02:00
Bruno Haible
ec17d7520f
string-c++-tests: Update.
...
* tests/test-string-c++.cc (ffsl): Declare, missing since 2011-07-15.
(ffsll): Declare, missing since 2011-07-15.
2017-05-06 00:22:44 +02:00
Bruno Haible
b8af9e178a
stdlib-c++-tests: Update.
...
* tests/test-stdlib-c++.cc (posix_openpt): Declare, missing since
2011-10-18.
(ptsname_r): Declare, missing since 2011-11-07.
(qsort_r): Declare, missing since 2014-08-29.
(random, srandom, initstate, setstate): Declare, missing since
2012-01-14.
(secure_getenv): Declare, missing since 2013-02-05.
2017-05-06 00:22:44 +02:00
Bruno Haible
dc3abe2b78
stdio-c++-tests: Update.
...
* tests/test-stdio-c++.cc (pclose): Declare, missing since 2011-09-18.
2017-05-06 00:22:44 +02:00
Bruno Haible
532cc565b1
signal-h-c++-tests: Update.
...
* tests/test-signal-h-c++.cc (raise): Remove redundant declaration.
2017-05-06 00:22:43 +02:00
Bruno Haible
b42edb720e
math-c++-tests: Update.
...
* tests/test-math-c++.cc (fmaf): Declare, missing since 2011-10-17.
(fma): Declare, missing since 2011-10-17.
(fmal): Declare, missing since 2011-10-17.
2017-05-06 00:22:38 +02:00
Bruno Haible
b2ed664da2
locale-c++-tests: Update.
...
* tests/test-locale-c++.cc (localeconv): Declare, missing since
2012-03-25.
2017-05-06 00:22:37 +02:00
Bruno Haible
f33c48694d
inttypes-c++-tests: New module.
...
* tests/test-inttypes-c++.cc: New file.
(strtoimax): Declare, missing since 2012-01-05.
(strtoumax): Declare, missing since 2012-01-05.
* modules/inttypes-c++-tests: New file.
2017-05-06 00:22:37 +02:00
Bruno Haible
89b335be47
dirent-c++-tests: Update.
...
* tests/test-dirent-c++.cc (readdir): Declare, missing since 2011-09-13.
(rewinddir): Declare, missing since 2011-09-13.
(dirfd): Declare, missing since 2010-03-08.
2017-05-06 00:22:32 +02:00