| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
* tests/test-sys_resource-c++.cc: New file.
(getrusage): Declare, missing since 2012-04-13.
* modules/sys_resource-c++-tests: New file.
|
|
|
|
|
|
| |
* tests/test-strings-c++.cc: New file.
(ffs): Declare, missing since 2011-07-12.
* modules/strings-c++-tests: New file.
|
|
|
|
|
| |
* tests/test-string-c++.cc (ffsl): Declare, missing since 2011-07-15.
(ffsll): Declare, missing since 2011-07-15.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
* tests/test-stdio-c++.cc (pclose): Declare, missing since 2011-09-18.
|
|
|
|
| |
* tests/test-signal-h-c++.cc (raise): Remove redundant declaration.
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* tests/test-locale-c++.cc (localeconv): Declare, missing since
2012-03-25.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* lib/argp-help.c (__argp_failure): If GNULIB_STRERROR_R_POSIX is set,
assume that strerror_r returns 'int', not 'char *'.
|
|
|
|
| |
* lib/argp-help.c (argp_doc): Fix spelling mistake in comment.
|
|
|
|
|
|
|
|
| |
Skip the new MS-Windows-specific code if Emacs.
* lib/utimens.c [EMACS_CONFIGUATION]:
Avoid new MS-Windows-specific code.
(USE_SETFILETIME): New macro.
(fdutimens): Use it.
|
|
|
|
|
|
|
|
|
| |
* doc/posix-functions/ctime.texi, doc/posix-functions/daylight.texi:
* doc/posix-functions/localtime.texi, doc/posix-functions/mktime.texi:
* doc/posix-functions/strftime.texi, doc/posix-functions/timezone.texi:
* doc/posix-functions/tzname.texi, doc/posix-functions/tzset.texi:
* doc/posix-functions/wcsftime.texi:
Mention some issues with TZ under MS-Windows.
|
|
|
|
| |
* modules/copy-file (Depends-on): Add 'close'.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/tzset.m4 (gl_FUNC_TZSET): Require AC_CANONICAL_HOST. On native
Windows, set REPLACE_TZSET to 1.
* lib/tzset.c (tzset): On native Windows, fix TZ if necessary, and
invoke '_tzset' instead of 'tzset'.
* doc/posix-functions/tzset.texi: Mention the native Windows workaround.
* modules/time_rz (Depends-on): Add tzset.
* lib/time_rz.c (tzset): Remove fallback definition.
* m4/time_rz.m4 (gl_TIME_RZ): Don't test for tzset.
|
|
|
|
| |
* modules/mktime (Depends-on): Add 'time'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/localtime-buffer.h: New file.
* lib/localtime-buffer.c: New file, extracted from lib/gettimeofday.c.
* lib/time.in.h (tzset): New declaration.
(localtime, gmtime): Don't test GNULIB_GETTIMEOFDAY.
* lib/tzset.c: New file, extracted from lib/gettimeofday.c.
* lib/gettimeofday.c: Include localtime-buffer.h. Remove code that was
moved to lib/localtime-buffer.c or lib/tzset.c.
* m4/localtime-buffer.m4: New file.
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_TZSET,
HAVE_TZSET, REPLACE_TZSET.
* m4/tzset.m4 (gl_FUNC_TZSET): Move code from m4/gettimeofday.m4 to
here, with modifications. Set HAVE_TZSET, REPLACE_TZSET. Invoke
gl_LOCALTIME_BUFFER_NEEDED.
(gl_FUNC_TZSET_CLOBBER): Don't require gl_HEADER_SYS_TIME_H; not needed
since 2007-01-18.
* m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Remove code that deals with
tzset.
(gl_FUNC_GETTIMEOFDAY_CLOBBER): Require gl_LOCALTIME_BUFFER_DEFAULTS.
Invoke gl_LOCALTIME_BUFFER_NEEDED instead of
gl_GETTIMEOFDAY_REPLACE_LOCALTIME.
(gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Remove macro.
* modules/localtime-buffer: New file.
* modules/time (Depends-on): Remove 'gettimeofday'.
(Makefile.am): Substitute GNULIB_TZSET, HAVE_TZSET,
REPLACE_TZSET. Don't substitute GNULIB_GETTIMEOFDAY.
* modules/tzset (Description): Enable hyperlink to POSIX spec.
(Files): Add lib/tzset.c.
(Depends-on): Remove gettimeofday. Add localtime-buffer, time.
(configure.ac): Arrange to conditionally compile lib/tzset.c. Invoke
gl_TIME_MODULE_INDICATOR.
* modules/gettimeofday (Depends-on): Add localtime-buffer.
|
|
|
|
|
|
|
|
|
|
| |
* lib/copy-file.c: Include stat-time.h, utimens.h instead of <utime.h>.
(qcopy_file_preserving): Use 'struct timespec' and utimens() to
transport the time stamps from the original file to the destination
file.
* m4/copy-file.m4 (gl_COPY_FILE): Don't test for utime, utimes.
* modules/copy-file (Depends-on): Add stat-time, utimns instead of
utime-h.
|
|
|
|
|
|
| |
* lib/wctype.in.h: Include not only <ctype.h> but also <wchar.h>. Do so
also on MSVC.
Reported by Eli Zaretskii <eliz@gnu.org>.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/wchar.in.h (rpl_wint_t): If <crtdefs.h> does not exist, include
<stddef.h> instead.
* m4/wint_t.m4 (gl_TYPE_WINT_T_PREREQ): New macro, extracted from
gl_WCTYPE_H.
* m4/wctype_h.m4 (gl_WCTYPE_H): Don't set HAVE_CRTDEFS_H here; require
gl_TYPE_WINT_T_PREREQ instead.
* m4/wchar_h.m4 (gl_WCHAR_H): Require gl_TYPE_WINT_T_PREREQ.
* modules/wchar (Makefile.am): Substitute HAVE_CRTDEFS_H.
Reported by Eli Zaretskii <eliz@gnu.org>.
|
|
|
|
| |
* lib/utimecmp.c (SYSCALL_RESOLUTION): Set to 100 on native Windows.
|
|
|
|
|
|
|
|
| |
* lib/utimens.c: Include <windows.h>, msvc-nothrow.h.
(fdutimens): Provide a native Windows implementation, like utime.c with
added tv_nsec support.
* modules/utimens (Depends-on): Add msvc-nothrow, utime.
Suggested by Tim Rühsen <tim.ruehsen@gmx.de>.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/wchar.in.h (wcsftime): New declaration.
* lib/wcsftime.c: New file.
* m4/wcsftime.m4: New file.
* m4/wchar_h.m4 (gl_WCHAR_H): Test for wcsftime declaration.
(gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_WCSFTIME,
HAVE_WCSFTIME, REPLACE_WCSFTIME.
* modules/wchar (Makefile.am): Substitute GNULIB_WCSFTIME,
HAVE_WCSFTIME, REPLACE_WCSFTIME.
* modules/wcsftime: New file.
* doc/posix-functions/wcsftime.texi: Mention the new module.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/time.in.h (strftime): New declaration.
* lib/strftime-fixes.c: New file.
* m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Inline gl_FUNC_STRFTIME macro.
(gl_FUNC_STRFTIME): Remove macro.
* m4/strftime-fixes.m4: New file.
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_STRFTIME,
REPLACE_STRFTIME.
* modules/time (Makefile.am): Substitute GNULIB_STRFTIME,
REPLACE_STRFTIME.
* modules/strftime-fixes: New file.
* doc/posix-functions/strftime.texi: Mention the new module.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/mktime.c: Add #ifs to make the algorithmic workaround independent
from the native Windows workaround.
* m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): New macro, extracted from
gl_FUNC_MKTIME. If guessing, set gl_cv_func_working_mktime to
'guessing no'.
(gl_FUNC_MKTIME): Require it. Require AC_CANONICAL_HOST.
Set REPLACE_MKTIME to 1 on native Windows. Define NEED_MKTIME_WORKING,
NEED_MKTIME_WINDOWS.
(gl_FUNC_MKTIME_INTERNAL): Require gl_FUNC_MKTIME_WORKS, not
gl_FUNC_MKTIME. Set WANT_MKTIME_INTERNAL, not REPLACE_MKTIME. Define
NEED_MKTIME_INTERNAL.
* m4/timegm.m4 (gl_FUNC_TIMEGM): Require gl_FUNC_MKTIME_WORKS, not
gl_FUNC_MKTIME. Cope with 'guessing yes' value.
* modules/mktime-internal (configure.ac): Test WANT_MKTIME_INTERNAL,
not REPLACE_MKTIME.
* doc/posix-functions/mktime.texi: Mention the native Windows
workaround.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/time.in.h (localtime): Declare also if requested by module
'localtime'.
* lib/localtime.c: New file.
* m4/localtime.m4: New file.
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_LOCALTIME.
* modules/time (Makefile.am): Substitute GNULIB_LOCALTIME.
* modules/localtime: New file.
* doc/posix-functions/localtime.texi: Mention the new module.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/time.in.h (ctime): New declaration.
* lib/ctime.c: New file.
* m4/ctime.m4: New file.
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_CTIME,
REPLACE_CTIME.
* modules/time (Makefile.am): Substitute GNULIB_CTIME, REPLACE_CTIME.
* modules/ctime: New file.
* doc/posix-functions/ctime.texi: Mention the new module.
|
|
|
|
|
|
|
|
|
|
| |
* lib/gettimeofday.c: Don't include <sys/timeb.h>.
(GetSystemTimePreciseAsFileTimeFuncType): New variable.
(initialize): Initialize it.
(gettimeofday) [WINDOWS_NATIVE]: Use it, and convert from FILETIME to
'struct timeval'. Don't use _ftime().
* m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): Don't test for
<sys/timeb.h> and _ftime.
|
|
|
|
|
|
|
|
|
|
| |
* doc/posix-functions/tzset.texi: Add note about TZ.
* doc/posix-functions/ctime.texi: Likewise.
* doc/posix-functions/localtime.texi: Likewise.
* doc/posix-functions/mktime.texi: Likewise.
* doc/posix-functions/strftime.texi: Likewise.
* doc/posix-functions/wcsftime.texi: Likewise.
* doc/pastposix-functions/ftime.texi: Likewise.
|
|
|
|
|
|
| |
* tests/test-utime.c: New file, based on tests/test-utimens.h.
* tests/test-utimens-common.h: Include <sys/stat.h>.
* modules/utime-tests: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/utime.in.h: Add comment for snippets.
(utime): New declaration.
* lib/utime.c: New file.
* m4/utime.m4: New file.
* m4/utime_h.m4 (gl_UTIME_H): Test for utime declaration.
(gl_UTIME_H_DEFAULTS): Initialize GNULIB_UTIME, HAVE_UTIME,
REPLACE_UTIME.
* modules/utime-h (Depends-on): Add snippets.
(Makefile.am): Substitute GNULIB_UTIME, HAVE_UTIME, REPLACE_UTIME.
Insert snippets.
* modules/utime: New file.
* doc/posix-functions/utime.texi: Mention the new module.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/utime.in.h: Include next <utime.h> if it exists.
(utimbuf): Define to _utimbuf on native Windows.
* m4/utime-h.m4 (gl_UTIME_H): Check for prerequisites of include_next.
Set UTIME_H on native Windows.
(gl_UTIME_MODULE_INDICATOR, gl_HEADER_UTIME_H_DEFAULTS): New macros.
* modules/utime-h (Depends-on): Add include_next.
(Makefile.am): Substitute also HAVE_UTIME_H, INCLUDE_NEXT,
PRAGMA_SYSTEM_HEADER, PRAGMA_COLUMNS, NEXT_UTIME_H.
* lib/utimens.c (utimbuf): Remove fallback definition.
* m4/utimens.m4 (gl_UTIMENS): Don't require
gl_CHECK_TYPE_STRUCT_UTIMBUF.
* m4/utimbuf.m4: Remove file.
* modules/utimens (Files): Remove m4/utimbuf.m4.
|
|
|
|
|
|
|
|
|
| |
* modules/copy-file (Depends-on): Add utime-h.
* lib/copy-file.c: Assume that <utime.h> exists.
* m4/copy-file.m4 (gl_COPY_FILE): Don't test for <utime.h>.
* modules/utimens (Depends-on): Add utime-h.
* lib/utimens.c: Assume that <utime.h> exists.
|
|
|
|
|
|
|
|
|
|
| |
* m4/utime_h.m4: New file.
* lib/utime.in.h: New file.
* modules/utime-h: New file.
* doc/posix-headers/utime.texi: Mention the new module.
* tests/test-utime-h.c: New file.
* modules/utime-h-tests: New file.
|
|
|
|
|
|
|
|
| |
* m4/fstat.m4 (gl_FUNC_FSTAT): Require AC_CANONICAL_HOST.
* m4/stat.m4 (gl_FUNC_STAT): Fix comment.
* doc/posix-functions/fstat.texi: Fix a plural typo.
* doc/posix-functions/stat.texi: Likewise.
* m4/include_next.m4: Update comments.
|
|
|
|
|
| |
* lib/error.c (print_errno_message): If GNULIB_STRERROR_R_POSIX is set,
assume that strerror_r returns 'int', not 'char *'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/posix-functions/stat.texi: Mention the problem with the Microsoft
implementations of stat().
* lib/stat.c: Include filename.h instead of dosname.h. Include
malloca.h, stat-w32.h.
(is_unc_root): New function.
(rpl_stat): New implementation for native Windows. Remove
REPLACE_FUNC_STAT_DIR code.
* m4/stat.m4 (gl_FUNC_STAT): On native Windows, set REPLACE_STAT always.
Don't define REPLACE_FUNC_STAT_DIR.
(gl_PREREQ_STAT): Require gl_HEADER_SYS_STAT_H.
* modules/stat (Files): Add lib/stat-w32.h, lib/stat-w32.c.
(Depends-on): Remove dosname. Add filename, malloca.
(configure.ac): Also compile lib/stat-w32.c.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/posix-functions/fstat.texi: Mention the problem with st_*time.
* lib/stat-w32.h: New file.
* lib/stat-w32.c: New file.
* lib/fstat.c: Don't include msvc-inval.h. Include msvc-nothrow.h,
stat-w32.h instead.
(fstat_nothrow): Remove function.
(rpl_fstat): Implement by means of _gl_fstat_by_handle.
* m4/fstat.m4 (gl_FUNC_FSTAT): On native Windows, set REPLACE_FSTAT
always.
(gl_PREREQ_FSTAT): Require gl_HEADER_SYS_STAT_H.
* modules/fstat (Files): Add lib/stat-w32.h, lib/stat-w32.c.
(Depends-on): Remove msvc-inval. Add pathmax, msvc-nothrow.
(configure.ac): Also compile lib/stat-w32.c.
|
|
|
|
|
|
|
| |
Problem reported by Assaf Gordon and Gavin Smith in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-04/msg00157.html
* lib/getopt-pfx-ext.h (_getopt_internal) [__GETOPT_PREFIX]:
#define this, too.
|
|
|
|
|
|
| |
* lib/strerror_r.c: Include <stdarg.h>.
(strerror_r): Provide error messages for errno values 100...140.
* doc/posix-functions/strerror_r.texi: Mention the MSVC 14 problem.
|
|
|
|
|
|
|
|
|
| |
* lib/noreturn.h: New file.
* modules/noreturn: New file.
* tests/test-noreturn.c: New file.
* modules/noreturn-tests: New file.
* tests/test-noreturn-c++.cc: New file.
* modules/noreturn-c++-tests: New file.
|
|
|
|
|
|
|
|
|
| |
* m4/wctype_h.m4 (gl_WCTYPE_H): Test for <crtdefs.h>. Set
HAVE_CRTDEFS_H.
* modules/wctype-h (Makefile.am): Substitute HAVE_CRTDEFS_H.
* lib/wctype.in.h (rpl_wint_t): If <crtdefs.h> does not exist, include
<stddef.h> instead.
Reported and proposed by Eli Zaretskii <eliz@gnu.org>.
|
|
|
|
| |
* tests/nap.h: Move misplaced endif.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This issue has been assigned CVE-2017-7476 and was
detected with American Fuzzy Lop 2.41b run on the
coreutils date(1) program with ASAN enabled.
ERROR: AddressSanitizer: heap-buffer-overflow on address 0x...
WRITE of size 8 at 0x60d00000cff8 thread T0
#1 0x443020 in extend_abbrs lib/time_rz.c:88
#2 0x443356 in save_abbr lib/time_rz.c:155
#3 0x44393f in localtime_rz lib/time_rz.c:290
#4 0x41e4fe in parse_datetime2 lib/parse-datetime.y:1798
A minimized reproducer is the following 120 byte TZ value,
which goes beyond the value of ABBR_SIZE_MIN (119) on x86_64.
Extend the aa...b portion to overwrite more of the heap.
date -d $(printf 'TZ="aaa%020daaaaaab%089d"')
localtime_rz and mktime_z were affected since commit 4bc76593.
parse_datetime was affected since commit 4e6e16b3f.
* lib/time_rz.c (save_abbr): Rearrange the calculation determining
whether there is enough buffer space available. The rearrangement
ensures we're only dealing with positive numbers, thus avoiding
the problematic promotion of signed to unsigned causing an invalid
comparison when zone_copy is more than ABBR_SIZE_MIN bytes beyond
the start of the buffer.
* tests/test-parse-datetime.c (main): Add a test case written by
Paul Eggert, which overwrites enough of the heap so that
standard glibc will fail with "free(): invalid pointer"
without the patch applied.
Reported and analyzed at https://bugzilla.redhat.com/1444774
|
|
|
|
|
| |
* lib/xalloc.h (x2nrealloc): Also check for multiplication
overflow when P is null.
|
|
|
|
|
|
| |
* lib/parse-datetime.y: Include <stdarg.h>, for va_start etc.
(_GL_ATTRIBUTE_FORMAT): New macro.
These are needed to get './gnulib-tool --test parse-datetime' to work.
|
|
|
|
|
|
|
|
| |
* tests/nap.h (nap_get_stat): Renamed from get_stat. Remove argument fd;
use nap_fd instead. On native Windows, close and reopen nap_fd.
(nap_works): Don't compare the ctimes, because on native Windows, these
are the creation times.
(nap): Update.
|
|
|
|
| |
* tests/nap.h (nap): Avoid signed integer overflow in loop.
|