| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* m4/*_h.m4: Add comments regarding *_REQUIRE_DEFAULTS and
*_MODULE_INDICATOR macros.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Reuben Thomas <rrt@sc3d.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00104.html>.
This is done by defining the Gnulib module indicator variables per
gnulib-tool invocation. So that a generated .h file is no longer
influenced by the set of modules used in other gnulib-tool invocations.
* gnulib-tool (func_compute_include_guard_prefix): Set
module_indicator_prefix.
(func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use it to
modify $(GNULIB_*) variable references in the Automake snippets.
(func_emit_initmacro_start): Push macro definitions for GL_MACRO_PREFIX
and GL_MODULE_INDICATOR_PREFIX.
(func_emit_initmacro_end): Pop these macro definitions.
* pygnulib/GLConfig.py (GLConfig.getIncludeGuardPrefix): New method.
* pygnulib/GLEmiter.py (GLEmiter.initmacro_start): Push macro
definitions for GL_MACRO_PREFIX and GL_MODULE_INDICATOR_PREFIX.
(GLEmiter.initmacro_end): Pop these macro definitions.
(GLEmiter.lib_Makefile_am, GLEmiter.tests_Makefile_am): Use the module
indicator prefix to modify $(GNULIB_*) variable references in the
Automake snippets.
* m4/gnulib-common.m4 (gl_MODULE_INDICATOR_INIT_VARIABLE,
gl_MODULE_INDICATOR_SET_VARIABLE): Use the value of
GL_MODULE_INDICATOR_PREFIX.
* m4/arpa_inet_h.m4: Use new idiom for header files that contain
references to Gnulib module indicator variables:
- Define the main macro through AC_DEFUN_ONCE.
- Define a macro gl_*_H_REQUIRE_DEFAULTS that initializes the Gnulib
module indicator variables (each prefixed with
GL_MODULE_INDICATOR_PREFIX).
- Invoke this macro in the gl_*_MODULE_INDICATOR macro.
* m4/ctype.m4: Likewise.
* m4/dirent_h.m4: Likewise.
* m4/fcntl_h.m4: Likewise.
* m4/fnmatch_h.m4: Likewise.
* m4/glob_h.m4: Likewise.
* m4/iconv_h.m4: Likewise.
* m4/inttypes.m4: Likewise.
* m4/langinfo_h.m4: Likewise.
* m4/locale_h.m4: Likewise.
* m4/malloc_h.m4: Likewise.
* m4/math_h.m4: Likewise.
* m4/monetary_h.m4: Likewise.
* m4/netdb_h.m4: Likewise.
* m4/poll_h.m4: Likewise.
* m4/pthread_h.m4: Likewise.
* m4/pty_h.m4: Likewise.
* m4/sched_h.m4: Likewise.
* m4/search_h.m4: Likewise.
* m4/signal_h.m4: Likewise.
* m4/spawn_h.m4: Likewise.
* m4/stddef_h.m4: Likewise.
* m4/stdio_h.m4: Likewise.
* m4/stdlib_h.m4: Likewise.
* m4/string_h.m4: Likewise.
* m4/strings_h.m4: Likewise.
* m4/sys_file_h.m4: Likewise.
* m4/sys_ioctl_h.m4: Likewise.
* m4/sys_random_h.m4: Likewise.
* m4/sys_resource_h.m4: Likewise.
* m4/sys_select_h.m4: Likewise.
* m4/sys_socket_h.m4: Likewise.
* m4/sys_stat_h.m4: Likewise.
* m4/sys_time_h.m4: Likewise.
* m4/sys_times_h.m4: Likewise.
* m4/sys_types_h.m4: Likewise.
* m4/sys_uio_h.m4: Likewise.
* m4/sys_utsname_h.m4: Likewise.
* m4/sys_wait_h.m4: Likewise.
* m4/termios_h.m4: Likewise.
* m4/threads.m4: Likewise.
* m4/time_h.m4: Likewise.
* m4/uchar.m4: Likewise.
* m4/unistd_h.m4: Likewise.
* m4/utime_h.m4: Likewise.
* m4/wchar_h.m4: Likewise.
* m4/wctype_h.m4: Likewise.
* modules/arpa_inet (configure.ac): Invoke the macro
gl_*_H_REQUIRE_DEFAULTS explicitly.
* modules/ctype (configure.ac): Likewise.
* modules/dirent (configure.ac): Likewise.
* modules/fcntl-h (configure.ac): Likewise.
* modules/fnmatch-h (configure.ac): Likewise.
* modules/glob-h (configure.ac): Likewise.
* modules/iconv-h (configure.ac): Likewise.
* modules/inttypes-incomplete (configure.ac): Likewise.
* modules/langinfo (configure.ac): Likewise.
* modules/locale (configure.ac): Likewise.
* modules/malloc-h (configure.ac): Likewise.
* modules/math (configure.ac): Likewise.
* modules/monetary (configure.ac): Likewise.
* modules/netdb (configure.ac): Likewise.
* modules/poll-h (configure.ac): Likewise.
* modules/pthread-h (configure.ac): Likewise.
* modules/pty (configure.ac): Likewise.
* modules/sched (configure.ac): Likewise.
* modules/search (configure.ac): Likewise.
* modules/signal-h (configure.ac): Likewise.
* modules/spawn (configure.ac): Likewise.
* modules/stddef (configure.ac): Likewise.
* modules/stdio (configure.ac): Likewise.
* modules/stdlib (configure.ac): Likewise.
* modules/string (configure.ac): Likewise.
* modules/strings (configure.ac): Likewise.
* modules/sys_file (configure.ac): Likewise.
* modules/sys_ioctl (configure.ac): Likewise.
* modules/sys_random (configure.ac): Likewise.
* modules/sys_resource (configure.ac): Likewise.
* modules/sys_select (configure.ac): Likewise.
* modules/sys_socket (configure.ac): Likewise.
* modules/sys_stat (configure.ac): Likewise.
* modules/sys_time (configure.ac): Likewise.
* modules/sys_times (configure.ac): Likewise.
* modules/sys_types (configure.ac): Likewise.
* modules/sys_uio (configure.ac): Likewise.
* modules/sys_utsname (configure.ac): Likewise.
* modules/sys_wait (configure.ac): Likewise.
* modules/termios (configure.ac): Likewise.
* modules/threads-h (configure.ac): Likewise.
* modules/time (configure.ac): Likewise.
* modules/uchar (configure.ac): Likewise.
* modules/unistd (configure.ac): Likewise.
* modules/utime-h (configure.ac): Likewise.
* modules/wchar (configure.ac): Likewise.
* modules/wctype-h (configure.ac): Likewise.
* m4/af_alg.m4: Update after a macro name changed.
* m4/ctime.m4: Likewise.
* m4/explicit_bzero.m4: Likewise.
* m4/ffs.m4: Likewise.
* m4/ffsl.m4: Likewise.
* m4/ffsll.m4: Likewise.
* m4/flock.m4: Likewise.
* m4/fstat.m4: Likewise.
* m4/getaddrinfo.m4: Likewise.
* m4/getdomainname.m4: Likewise.
* m4/gettimeofday.m4: Likewise.
* m4/hostent.m4: Likewise.
* m4/ioctl.m4: Likewise.
* m4/localtime.m4: Likewise.
* m4/mbslen.m4: Likewise.
* m4/memchr.m4: Likewise.
* m4/memmem.m4: Likewise.
* m4/mempcpy.m4: Likewise.
* m4/memrchr.m4: Likewise.
* m4/mktime.m4: Likewise.
* m4/nanosleep.m4: Likewise.
* m4/passfd.m4: Likewise.
* m4/pselect.m4: Likewise.
* m4/rawmemchr.m4: Likewise.
* m4/select.m4: Likewise.
* m4/servent.m4: Likewise.
* m4/sigabbrev_np.m4: Likewise.
* m4/sigdescr_np.m4: Likewise.
* m4/sockpfaf.m4: Likewise.
* m4/stat.m4: Likewise.
* m4/stpcpy.m4: Likewise.
* m4/stpncpy.m4: Likewise.
* m4/strcase.m4: Likewise.
* m4/strcasestr.m4: Likewise.
* m4/strchrnul.m4: Likewise.
* m4/strdup.m4: Likewise.
* m4/strerror.m4: Likewise.
* m4/strerror_r.m4: Likewise.
* m4/strerrorname_np.m4: Likewise.
* m4/strftime-fixes.m4: Likewise.
* m4/strncat.m4: Likewise.
* m4/strndup.m4: Likewise.
* m4/strnlen.m4: Likewise.
* m4/strpbrk.m4: Likewise.
* m4/strptime.m4: Likewise.
* m4/strsep.m4: Likewise.
* m4/strsignal.m4: Likewise.
* m4/strstr.m4: Likewise.
* m4/strtok_r.m4: Likewise.
* m4/strverscmp.m4: Likewise.
* m4/time_r.m4: Likewise.
* m4/time_rz.m4: Likewise.
* m4/timegm.m4: Likewise.
* m4/timespec_get.m4: Likewise.
* m4/tzset.m4: Likewise.
* modules/accept (configure.ac): Likewise.
* modules/bind (configure.ac): Likewise.
* modules/connect (configure.ac): Likewise.
* modules/flock (configure.ac): Likewise.
* modules/getpeername (configure.ac): Likewise.
* modules/getsockname (configure.ac): Likewise.
* modules/getsockopt (configure.ac): Likewise.
* modules/listen (configure.ac): Likewise.
* modules/recv (configure.ac): Likewise.
* modules/recvfrom (configure.ac): Likewise.
* modules/send (configure.ac): Likewise.
* modules/sendto (configure.ac): Likewise.
* modules/setsockopt (configure.ac): Likewise.
* modules/shutdown (configure.ac): Likewise.
* modules/socket (configure.ac): Likewise. Use the
gl_*_H_REQUIRE_DEFAULTS macros.
* modules/nonblocking (configure.ac): Use the gl_*_H_REQUIRE_DEFAULTS
and gl_MODULE_INDICATOR_INIT_VARIABLE macros.
* modules/sigpipe (configure.ac): Likewise.
* modules/windows-stat-override (configure.ac): Likewise.
* m4/nonblocking.m4: Update a comment.
* m4/sigpipe.m4: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* modules/gnulib-common.m4 (gl_MODULE_INDICATOR_INIT_VARIABLE): New
macro.
* m4/arpa_inet_h.m4 (gl_ARPA_INET_H_DEFAULTS): Use it.
* m4/ctype.m4 (gl_CTYPE_H_DEFAULTS): Likewise.
* m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Likewise.
* m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Likewise.
* m4/fnmatch_h.m4 (gl_FNMATCH_H_DEFAULTS): Likewise.
* m4/glob_h.m4 (gl_GLOB_H_DEFAULTS): Likewise.
* m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS): Likewise.
* m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Likewise.
* m4/langinfo_h.m4 (gl_LANGINFO_H_DEFAULTS): Likewise.
* m4/locale_h.m4 (gl_LOCALE_H_DEFAULTS): Likewise.
* m4/malloc_h.m4 (gl_MALLOC_H_DEFAULTS): Likewise.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Likewise.
* m4/monetary_h.m4 (gl_MONETARY_H_DEFAULTS): Likewise.
* m4/netdb_h.m4 (gl_NETDB_H_DEFAULTS): Likewise.
* m4/poll_h.m4 (gl_POLL_H_DEFAULTS): Likewise.
* m4/pthread_h.m4 (gl_PTHREAD_H_DEFAULTS): Likewise.
* m4/pty_h.m4 (gl_PTY_H_DEFAULTS): Likewise.
* m4/sched_h.m4 (gl_SCHED_H_DEFAULTS): Likewise.
* m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Likewise.
* m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Likewise.
* m4/spawn_h.m4 (gl_SPAWN_H_DEFAULTS): Likewise.
* m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Likewise.
* m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Likewise.
* m4/strings_h.m4 (gl_HEADER_STRINGS_H_DEFAULTS): Likewise.
* m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_H_DEFAULTS): Likewise.
* m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H_DEFAULTS): Likewise.
* m4/sys_random_h.m4 (gl_SYS_RANDOM_H_DEFAULTS): Likewise.
* m4/sys_resource_h.m4 (gl_SYS_RESOURCE_H_DEFAULTS): Likewise.
* m4/sys_select_h.m4 (gl_SYS_SELECT_H_DEFAULTS): Likewise.
* m4/sys_socket_h.m4 (gl_SYS_SOCKET_H_DEFAULTS): Likewise.
* m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Likewise.
* m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_DEFAULTS): Likewise.
* m4/sys_times_h.m4 (gl_SYS_TIMES_H_DEFAULTS): Likewise.
* m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H_DEFAULTS): Likewise.
* m4/sys_wait_h.m4 (gl_SYS_WAIT_H_DEFAULTS): Likewise.
* m4/termios_h.m4 (gl_TERMIOS_H_DEFAULTS): Likewise.
* m4/threads.m4 (gl_THREADS_H_DEFAULTS): Likewise.
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Likewise.
* m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Likewise.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Likewise.
* m4/utime_h.m4 (gl_UTIME_H_DEFAULTS): Likewise.
* m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Likewise.
* m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/time.in.h (timespec_get): New declaration.
* lib/timespec_get.c: New file.
* m4/timespec_get.m4: New file.
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize
GNULIB_TIMESPEC_GET, HAVE_TIMESPEC_GET.
* modules/time (Makefile.am): Substitute GNULIB_TIMESPEC_GET,
HAVE_TIMESPEC_GET.
* modules/timespec_get: New file.
* tests/test-time-c++.cc (timespec_get): Check signature.
* doc/glibc-functions/timespec_get.texi: Mention the new module.
|
|
|
|
|
|
|
|
|
| |
* lib/time.in.h (TIME_UTC, GNULIB_defined_TIME_UTC): New macros.
* m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Set TIME_H_DEFINES_TIME_UTC.
* modules/time (Makefile.am): Substitute TIME_H_DEFINES_TIME_UTC.
* tests/test-time.c: Check that TIME_UTC is defined and a positive
integer.
* doc/posix-headers/time.texi: Mention TIME_UTC.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/fcntl.in.h (creat, open): Conditionalize each of the Windows
oldnames workarounds through a GNULIB_MDA_<func> symbol.
* lib/math.in.h (j0, j1, jn, y0, y1, yn): Likewise.
* 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.
* m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Initialize these
GNULIB_MDA_<func> symbols.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Likewise.
* m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Likewise.
* m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Likewise.
* m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Likewise.
* m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Likewise.
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Likewise.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Likewise.
* m4/utime_h.m4 (gl_UTIME_H_DEFAULTS): Likewise.
* m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Likewise.
* modules/fcntl-h (Makefile.am): Substitute these GNULIB_MDA_<func>
symbols.
* modules/math (Makefile.am): Likewise.
* modules/search (Makefile.am): Likewise.
* modules/stdio (Makefile.am): Likewise.
* modules/stdlib (Makefile.am): Likewise.
* modules/string (Makefile.am): Likewise.
* modules/sys_stat (Makefile.am): Likewise.
* modules/time (Makefile.am): Likewise.
* modules/unistd (Makefile.am): Likewise.
* modules/utime-h (Makefile.am): Likewise.
* modules/wchar (Makefile.am): Likewise.
|
|
|
|
|
|
|
|
|
|
| |
* lib/time.in.h (tzset): Assume HAVE_TZSET is 1.
* lib/tzset.c: Define rpl_tzset, not tzset. Assume HAVE_TZSET is 1.
* modules/tzset (configure.ac): Don't test HAVE_TZSET.
* m4/tzset.m4 (gl_FUNC_TZSET): Don't test for tzset. Don't set
HAVE_TZSET.
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Don't initialize HAVE_TZSET.
* modules/time (Makefile.am): Don't substitute HAVE_TZSET.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/iconv.in.h (iconv): Use 'restrict'.
* lib/inttypes.in.h (strtoimax, strtoumax): Likewise.
* lib/monetary.in.h (strfmon_l): Likewise.
* lib/pthread.in.h (pthread_create, pthread_mutex_init,
pthread_mutexattr_gettype, pthread_mutexattr_getrobust,
pthread_mutex_timedlock, pthread_rwlock_init,
pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock,
pthread_cond_init, pthread_cond_wait, pthread_cond_timedwait): Likewise.
* lib/search.in.h (tdelete): Likewise.
* lib/signal.in.h (pthread_sigmask, sigprocmask): Likewise.
* lib/stdio.in.h (dprintf, fgets, fopen, fprintf, fputs, fread, freopen,
fscanf, fwrite, getdelim, getline, printf, scanf, snprintf, sprintf,
vdprintf, vfprintf, vfscanf, vprintf, vscanf, vsnprintf, vsprintf):
Likewise.
* lib/stdlib.in.h (mbtowc, realpath, strtod, strtold, strtoll,
strtoull): Likewise.
* lib/string.in.h (strncat): Likewise.
* lib/sys_socket.in.h (accept, getpeername, getsockname, getsockopt,
recvfrom): Likewise.
* lib/sys_stat.in.h (fstatat, lstat, stat): Likewise.
* lib/time.in.h (strftime): Likewise.
* lib/unistd.in.h (readlink, readlinkat): Likewise.
* lib/wchar.in.h (mbrtowc, mbrlen, mbsrtowcs, mbsnrtowcs, wcrtomb,
wcsrtombs, wcsnrtombs, wmemcpy, wcscpy, wcpcpy, wcsncpy, wcpncpy,
wcscat, wcsncat, wcsxfrm, wcsstr, wcstok, wcsftime): Likewise.
* m4/iconv_h.m4 (gl_ICONV_H): Require AC_C_RESTRICT.
* m4/inttypes.m4 (gl_INTTYPES_INCOMPLETE): Likewise.
* m4/monetary_h.m4 (gl_MONETARY_H): Likewise.
* m4/search_h.m4 (gl_SEARCH_H): Likewise.
* m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
* m4/stdio_h.m4 (gl_STDIO_H): Likewise.
* m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
* m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
* m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
* m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
* m4/wchar_h.m4 (gl_WCHAR_H): Likewise.
* m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Make consistent with the
other *_h.m4 files.
* m4/time_h.m4 (gl_HEADER_TIME_H): Likewise.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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/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/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.
|
|
|
|
|
|
|
|
|
|
| |
* 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'.
|
|
|
|
|
|
|
|
|
|
| |
* 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'.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* MODULES.html.sh: Add time_rz.
* lib/time_rz.c, m4/time_rz.m4, modules/time_rz: New files.
* lib/time.in.h (timezone_t, tzalloc, tzfree, localtime_rz, mktime_z):
New decls if _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@.
* m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_DEFAULTS):
New var HAVE_TIMEZONE_T (default 0).
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS):
New var GNULIB_TIME_RZ (default 0).
* modules/time (time.h): Substitute the new vars.
|
|
|
|
|
|
|
|
|
|
| |
Problem reported by Eli Zaretskii in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-01/msg00042.html
* lib/time.in.h:
* m4/time_h.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC):
* modules/time (Depends-on):
Fall back on unistd.h if the other include files don't define
struct timespec.
|
|
|
|
|
|
| |
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date.
* all files: Run 'make update-copyright'.
|
|
|
|
|
|
| |
I ran 'make update-copyright'.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without this further patch, Emacs won't build due to
the portcheck failing. Also, this simplifies the patch a bit.
* lib/time.in.h (localtime, gmtime): Don't replace unless
GNULIB_GETTIMEOFDAY. Treat them more like mktime.
* lib/time.in.h (localtime, gmtime):
* m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME):
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS):
* modules/time (time.h):
Don't worry about about the possibility of localtime and gmtime
being absent; they're present in all C libraries we know about.
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS):
Don't assume sys_time is present and has been initialized.
Instead, use a hack that should work even if it hasn't been.
Don't use a portcheck for gmtime or localtime; this supports
the hack.
* modules/time (time.h): Substitute GNULIB_GETTIMEOFDAY.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Never replace gmtime and localtime by macros when compiling with
C++, this prevents <ctime> from being included.
* m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Do not
define gmtime and localtime as preprocessor macros. Instead
define some HAVE_GMTIME, HAVE_LOCALTIME, REPLACE_GMTIME, and
REPLACE_LOCALTIME substitutions.
* lib/time.in.h: Declare gmtime and localtime when needed.
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): AC_SUBST HAVE_GMTIME,
HAVE_LOCALTIME, REPLACE_GMTIME, and REPLACE_LOCALTIME.
* modules/time: Depend on gettimeofday, and substitute the above
variables in time.h.
|
|
|
|
|
|
| |
Run "make update-copyright". Compare to commit 1602f0a from last year.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
| |
* m4/time_h.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Remove obsolete
reference to HAVE_STRUCT_TIMESPEC in comment.
|
| |
|
|
|
|
| |
Run "make update-copyright".
|
|
|
|
|
|
| |
* doc/posix-headers/time.texi: Revert last change.
* m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Revert last change.
* tests/test-time.c: Comment out the check for pid_t.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/fcntl_h.m4 (gl_FCNTL_H): Require AC_TYPE_PID_T.
* m4/sched_h.m4 (gl_SCHED_H): Likewise.
* m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
* m4/spawn_h.m4 (gl_SPAWN_H): Likewise.
* m4/sys_wait_h.m4 (gl_SYS_WAIT_H): Likewise.
* m4/termios_h.m4 (gl_TERMIOS_H): Likewise.
* m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
* m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
* tests/test-fcntl-h.c: Check that pid_t is defined.
* tests/test-sched.c: Likewise.
* tests/test-termios.c: Likewise.
* tests/test-time.c: Likewise.
* doc/posix-headers/fcntl.texi: Mention lack of pid_t on MSVC platform.
* doc/posix-headers/signal.texi: Likewise.
* doc/posix-headers/sys_types.texi: Likewise.
* doc/posix-headers/time.texi: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For years gnulib has been assuming the existence of the headers
<ctime.h>, <errno.h>, <fcntl.h>, <locale.h>, <signal.h>,
<stdio.h>, <stdlib.h>, <string.h>, and <time.h>. Omit checks for
them, since they don't appear to be needed.
* README (Portability guidelines): Document this.
* lib/flock.c: Assume <fcntl.h> exists.
* lib/regex_internal.h: Assume <locale.h> exists.
* m4/ctype.m4 (gl_CTYPE_H): Assume <ctype.h> exists.
* m4/errno_h.m4 (gl_HEADER_ERRNO_H): Assume <errno.h> exists.
* m4/fcntl_h.m4 (gl_FCNTL_H): Assume <fcntl.h> exists.
* m4/flock.m4 (gl_PREREQ_FLOCK): Likewise.
* m4/locale_h.m4 (gl_LOCALE_H): Assume <locale.h> exists.
* m4/regex.m4 (gl_REGEX): Likewise.
* m4/signal_h.m4 (gl_SIGNAL_H): Assume <signal.h> exists.
* m4/stdio_h.m4 (gl_STDIO_H): Assume <stdio.h> exists.
* m4/stdlib_h.m4 (gl_STDLIB_H): Assume <stdlib.h> exists.
* m4/string_h.m4 (gl_STRING_H): Assume <string.h> exists.
* tests/test-argp.c: Likewise.
* m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Assume <time.h> exists.
|
|
|
|
| |
Run the new "make update-copyright" rule.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/time.in.h (localtime_r, gmtime_r): Test HAVE_DECL_LOCALTIME_R
instead of HAVE_LOCALTIME_R.
* m4/time_r.m4 (gl_TIME_R): Test whether localtime_r is declared. Set
HAVE_LOCALTIME_R always.
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize
HAVE_DECL_LOCALTIME_R, not HAVE_LOCALTIME_R.
* modules/time (Makefile.am): Substitute HAVE_DECL_LOCALTIME_R, not
HAVE_LOCALTIME_R.
* doc/posix-functions/gmtime_r.texi: Document the HP-UX 11 problem.
* doc/posix-functions/localtime_r.texi: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using the pthreads-win32 library with mingw, struct timespec
is available in <pthread.h>. Meanwhile, that header has some
rather buggy macros for localtime_r and gmtime_r that interfere
with proper gnulib replacement header actions.
Tested in a cross-compilation environment: Fedora 13 with mingw32-gcc
and mingw32-pthreads installed.
* m4/time_h.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Set new variable
if timespec is defined only in pthread.h.
* modules/time (Makefile.am): Substitute it.
* lib/time.in.h (!TIME_H_DEFINES_STRUCT_TIMESPEC): Include
<pthread.h>, when needed.
(GNULIB_TIME_R): Undefine broken localtime_r and gmtime_r macros
from the library.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Use the same procedure as for 2009, outlined in
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
|
| |
|
|
|
|
|
|
|
|
|
| |
* lib/time.in.h (mktime): New declaration.
* m4/mktime.m4 (gl_FUNC_MKTIME): Require gl_HEADER_TIME_H_DEFAULTS. Set
REPLACE_MKTIME instead of defining mktime in config.h.
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize REPLACE_MKTIME.
* modules/time (Makefile.am): Substitute REPLACE_MKTIME.
Reported by Ross McFarland <rwmcfa1@neces.com>.
|
|
|
|
| |
in variable name.
|