Karl Berry [Wed, 21 Nov 2018 18:11:57 +0000 (10:11 -0800)]
autoupdate
Paul Eggert [Wed, 21 Nov 2018 17:12:33 +0000 (09:12 -0800)]
mktime: add libc-config dependency
I missed this when we synced from glibc.
* modules/mktime (Depends-on): Add libc-config.
Paul Eggert [Fri, 16 Nov 2018 16:13:39 +0000 (08:13 -0800)]
autoupdate
Paul Eggert [Tue, 13 Nov 2018 19:04:58 +0000 (11:04 -0800)]
longlong: fix comment typo
* m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Fix typo.
Bruno Haible [Sun, 11 Nov 2018 11:45:44 +0000 (12:45 +0100)]
havelib: Remove the need to include asm-underscore.m4.
* m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI_32BIT): New macro.
* m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Use it instead of
gl_HOST_CPU_C_ABI.
* modules/havelib (Files): Add host-cpu-c-abi.m4.
(Depends-on): Remove host-cpu-c-abi.
Paul Eggert [Sun, 4 Nov 2018 06:31:33 +0000 (23:31 -0700)]
parse-datetime: simplify test for mktime failure
* lib/parse-datetime.y (mktime_ok): Simplify.
Remove args TZ and T; no longer needed. Callers changed.
Paul Eggert [Sun, 4 Nov 2018 06:04:44 +0000 (23:04 -0700)]
posixtm: simplify test for mktime failure
* lib/posixtm.c (posixtime): Simplify.
Paul Eggert [Sun, 4 Nov 2018 04:51:33 +0000 (21:51 -0700)]
nstrftime: simplify test for mktime failure
* lib/nstrftime.c (__strftime_internal): Simplify.
Paul Eggert [Fri, 2 Nov 2018 21:09:35 +0000 (14:09 -0700)]
gnulib-common.m4: port _Noreturn to C++
Problem reported by Akim Demaille in:
https://lists.gnu.org/r/bug-bison/2018-10/msg00067.html
* m4/gnulib-common.m4 (gl_COMMON_BODY): If C++, use [[noreturn]].
Merge adjustments from _Noreturn.h and from glibc into the non-C++
version.
* lib/_Noreturn.h: Match gnulib-common.
Bruno Haible [Tue, 30 Oct 2018 11:56:42 +0000 (12:56 +0100)]
gnu-make: Fix for NetBSD 8 'make'.
Reported by Reuben Thomas in
<https://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00135.html>.
* m4/gnu-make.m4 (gl_GNU_MAKE): Use a heuristic based on the --version
output, ignoring exit codes.
Bernhard Voelker [Sun, 28 Oct 2018 12:06:30 +0000 (13:06 +0100)]
maintainer-makefile: fix syntax-check rule for "same.h"
* top/maint.mk (sc_prohibit_same_without_use): Adjust regex to check
for 'same_nameat', too.
Norihiro Tanaka [Mon, 22 Oct 2018 15:02:16 +0000 (00:02 +0900)]
dfa: Simplify a building state
dfa.c (build_state): Simplify a building state.
Norihiro Tanaka [Mon, 22 Oct 2018 15:01:08 +0000 (00:01 +0900)]
dfa: reorder tokens before execution
Reorder tokens before execution. It improves efficiency to access
memory in building states. For example, A(BCD|E(F|G)|HI) are reorderda
as following.
(Before reorder)
A:1 - B:2 - C:3 - D:4
` E:5 - F:6
` G:7
` H:8 - I:9
(After reorder)
A:1 - B:2 - C:5 - D:6
` E:3 - F:7
` G:8
` H:4 - I:9
dfa.c (compare, reorder_tokens): New function.
(reorder_tokens): Call them.
Norihiro Tanaka [Mon, 22 Oct 2018 14:51:20 +0000 (23:51 +0900)]
dfa: a state has a set of current positions.
Up to now, a state had a set of follow-on positions. It is replaced a
set of current positions. This change will save memory space.
dfa.c (leaf_set): Remove it.
(struct dfa): Add new member constraints and separates.
(append): New function.
(state_index): Bring constraint from pre-calculated.
(state_separate_contexts): Bring separate contexts from pre-calculated.
Change argument, update callers.
(merge_nfa_state): Pre-calculate constraints for END. and remove END.
No longer END is not used after here.
(dfaoptimize): Initialize added member constraints.
(dfaanalyze): Pre-calculate seprate contexts.
(build_state): Change for this update.
(dfassbuild): Initialize new members .
(dfafree): Free memory for new members.
Norihiro Tanaka [Mon, 22 Oct 2018 14:35:50 +0000 (23:35 +0900)]
dfa: simplify dfa optimization
dfa.c (merge_nfa_state, dfaoptimize): Simplify dfa optimization.
Norihiro Tanaka [Mon, 22 Oct 2018 14:31:26 +0000 (23:31 +0900)]
dfa: position set sorts increasing order
Change the order of position set from decreasing to increaing, then even
after dfa is optimized, it is guaranteed that the number of a position
is smaller than the subsequent one's number.
dfa.c (insert, merged_constrained, delete): Reverse the direction of an
inequality sign.
(dfaanalyze): Position set sorts increasing order.
Norihiro Tanaka [Mon, 22 Oct 2018 14:22:40 +0000 (23:22 +0900)]
dfa: remove unneeded code
By the addition of beg, a code for the initial state is unnecessary, so
remove it.
dfa.c (epsclosure): Remove a code for the initial state.
(dfaanalyze): Print follows for BEG in debug mode.
Karl Berry [Fri, 26 Oct 2018 16:46:25 +0000 (09:46 -0700)]
autoupdate
Paul Eggert [Thu, 25 Oct 2018 15:33:59 +0000 (08:33 -0700)]
havelib: fix nested ‘configure’ chatter
* m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Don’t nest
AC_CACHE_CHECK calls, which resulted in confusing output like
“checking for the common suffixes of directories in the library
search path... checking for 64-bit host... no lib,lib”.
Paul Eggert [Thu, 25 Oct 2018 15:25:41 +0000 (08:25 -0700)]
backupfile: tweak for better code
* lib/backupfile.c: Sort include directives, and remove
unnecessary <limits.h> include.
(FALLTHROUGH): New macro, copied from other modules.
(backupfile_internal): Use it to avoid code duplication.
This lets GCC 8.2.1 generate better code by inlining the
call to check_extension.
Karl Berry [Wed, 24 Oct 2018 14:26:20 +0000 (07:26 -0700)]
autoupdate
Paul Eggert [Wed, 24 Oct 2018 02:10:21 +0000 (19:10 -0700)]
backupfile: new dir_fd args
New module opendirat with code taken from fts.
Use this module to let backupfile use a directory file descriptor.
* NEWS: Document the incompatible change.
* lib/backup-find.c (find_backup_file_name):
* lib/backup-rename.c (backup_file_rename):
New arg DIR_FD.
* lib/backupfile.c: Include stdint.h, for SIZE_MAX.
(SIZE_MAX): Remove.
Include opendirat.h rather than dirent--.h.
(check_extension): New args DIR_FD and BASE_MAX. All callers changed.
(numbered_backup): New args DIR_FD and PNEW_FD. All callers changed.
(backupfile_internal): New arg DIR_FD. All callers changed.
* lib/fts.c: Include opendirat.h.
(opendirat): Move to opendirat.c.
* lib/opendirat.c, lib/opendirat.h, modules/opendirat: New files.
* modules/backupfile (Depends-on): Remove dirfd, opendir.
Add opendirat.
* modules/fts (Depends-on): Remove fdopendir, openat-safer.
Add opendirat.
Bruno Haible [Tue, 23 Oct 2018 20:18:24 +0000 (22:18 +0200)]
localename: Simplify support for per-thread locales on Solaris 11.4.
* m4/intl-thread-locale.m4: Renamed from m4/intlsolaris.m4.
(gt_INTL_THREAD_LOCALE_NAME): Renamed from gt_INTL_SOLARIS. Define
HAVE_SOLARIS114_LOCALES instead of HAVE_NAMELESS_LOCALES.
* lib/localename.c: Handle HAVE_SOLARIS114_LOCALES through Solaris
specific code.
* lib/localename-table.h: Update comments.
* lib/localename-table.c: Update comments.
* m4/localename.m4 (gl_LOCALENAME): Require gt_INTL_THREAD_LOCALE_NAME.
Test for 'uselocale'. Don't invoke gt_INTL_SOLARIS.
* m4/intl.m4 (AM_INTL_SUBDIR): Require gt_INTL_THREAD_LOCALE_NAME. Test
for 'uselocale'. Set HAVE_NAMELESS_LOCALES.
(gt_INTL_SUBDIR_CORE): Don't invoke gt_INTL_SOLARIS. Don't set
HAVE_NAMELESS_LOCALES here.
* modules/localename (Files): Add m4/intl-thread-locale.m4. Remove
m4/intlsolaris.m4.
* modules/gettext (Files): Likewise.
Bruno Haible [Mon, 22 Oct 2018 23:08:10 +0000 (01:08 +0200)]
Mention changed minimum requirements for Automake and Autoconf.
* NEWS: Mention the new minimum requirements.
Bruno Haible [Mon, 22 Oct 2018 22:12:11 +0000 (00:12 +0200)]
std-gnu11: Support Autoconf versions < 2.64.
* m4/std-gnu11.m4 (AC_PROG_CC, AC_PROG_CXX): Use _AC_DO as fallback
when _AC_DO_LIMIT does not exist.
Bruno Haible [Mon, 22 Oct 2018 22:06:52 +0000 (00:06 +0200)]
Assume Autoconf >= 2.63.
* DEPENDENCIES: Mention the requirement.
* gnulib-tool (DEFAULT_AUTOCONF_MINVERSION): Bump to 2.63.
(func_get_filelist): Don't list m4/onceonly.m4 any more.
* pygnulib/GLModuleSystem.py (getFiles): Likewise.
* m4/onceonly.m4: Remove file.
* m4/openmp.m4: Remove file.
* modules/openmp (Files): Remove m4/openmp.m4.
* m4/configmake.m4 (gl_CONFIGMAKE_PREP): Don't set datarootdir, docdir,
htmldir, dvidir, pdfdir, psdir, localedir.
* m4/po.m4 (AM_PO_SUBDIRS): Don't set localedir.
* m4/gnulib-common.m4 (m4_foreach_w): Remove fallback for
Autoconf < 2.60.
(AC_PROG_MKDIR_P): Remove definition for Autoconf < 2.62.
(AC_PROG_SED): Remove fallback for Autoconf < 2.60.
* m4/errno_h.m4 (AC_COMPUTE_INT): Remove fallback for Autoconf < 2.61.
* m4/size_max.m4 (AC_COMPUTE_INT): Likewise.
* m4/stdint.m4 (AC_COMPUTE_INT): Likewise.
* m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Assume AC_USE_SYSTEM_EXTENSIONS
exists.
* m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Likewise,
* m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Remove workaround for
Autoconf < 2.61.
* m4/lib-prefix.m4 (AC_LIB_ARG_WITH): Remove macro.
(AC_LIB_PREFIX): Use AC_ARG_WITH, assuming semantics of
Autoconf >= 2.52.
* m4/longlong.m4: Require Autoconf >= 2.62. Update comments.
* m4/ls-mntd-fs.m4: Require Autoconf >= 2.60. Update comments.
* m4/gettext.m4 (AM_GNU_GETTEXT): Update comment.
Bruno Haible [Mon, 22 Oct 2018 22:06:46 +0000 (00:06 +0200)]
Assume Automake >= 1.11.
* m4/configmake.m4: Update comments.
* m4/lib-link.m4 (AC_LIB_RPATH): Assume AC_REQUIRE_AUX_FILE exists.
* m4/po.m4 (AM_PO_SUBDIRS, AM_POSTPROCESS_PO_MAKEFILE): Eliminate uses
of 'eval'.
* gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am,
func_create_testdir, func_create_megatestdir): Emit a Makefile.am that
requires Automake >= 1.11.
Bruno Haible [Mon, 22 Oct 2018 22:05:27 +0000 (00:05 +0200)]
localename: Fix typo in comment.
* tests/test-locale-c++.cc (newlocale): Fix typo in comment.
Bruno Haible [Mon, 22 Oct 2018 18:32:41 +0000 (20:32 +0200)]
Fix failure of 'gnulib-tool --create-testdir' with all modules.
* gnulib-tool (func_create_testdir): Exclude 'timevar' module.
Bruno Haible [Mon, 22 Oct 2018 00:58:30 +0000 (02:58 +0200)]
locale: Ease integration with GNU libintl.
* lib/locale.in.h (GNULIB_defined_newlocale, GNULIB_defined_duplocale,
GNULIB_defined_freelocale): New macros.
Bruno Haible [Mon, 22 Oct 2018 00:49:56 +0000 (02:49 +0200)]
localename: Fine-tune support for per-thread locales on Solaris 11.4.
Bruno Haible [Mon, 22 Oct 2018 00:38:39 +0000 (02:38 +0200)]
localename: Fine-tune support for per-thread locales on Solaris 11.4.
* lib/localename-table.h: New file, extracted from lib/localename.c.
* lib/localename-table.c: Likewise.
* lib/localename.c: Include localename-table.h.
(get_locale_t_name, newlocale, duplocale, freelocale): Invoke
locale_hash_function instead of pointer_hash.
* modules/localename (Files): Add lib/localename-table.h,
lib/localename-table.c.
(lib_SOURCES): Add localename-table.c.
* m4/intlsolaris.m4 (gt_INTL_SOLARIS): Require AC_CANONICAL_HOST. Test
for Solaris 11.4 locale system only on Solaris. Test for it
independently whether getlocalename_l exists.
* m4/intl.m4 (gt_INTL_SUBDIR_CORE): Don't test for 'uselocale' and
'getlocalename_l'. Instead, invoke gt_INTL_SOLARIS. Set
HAVE_NAMELESS_LOCALES.
* modules/gettext (Files): Add m4/intlsolaris.m4.
Bruno Haible [Mon, 22 Oct 2018 00:34:07 +0000 (02:34 +0200)]
Small update from gettext.
* m4/intl.m4: Update from gettext:
- 2018-01-02: Fix 'ar' invocation when cross-compiling and in 64-bit
mode on AIX.
- 2018-01-02: Don't use -lc explicitly when linking with libtool.
- 2017-05-19: (AM_INTL_SUBDIR): Require AC_C_FLEXIBLE_ARRAY_MEMBER.
Karl Berry [Sun, 21 Oct 2018 16:02:59 +0000 (09:02 -0700)]
autoupdate
Bruno Haible [Tue, 16 Oct 2018 19:27:45 +0000 (21:27 +0200)]
mountlist: Remove support for Cray with UNICOS 9.
* m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't define
MOUNTED_LISTMNTENT.
* lib/mountlist.c: Remove MOUNTED_LISTMNTENT case.
Bruno Haible [Tue, 16 Oct 2018 19:25:00 +0000 (21:25 +0200)]
fsusage, mountlist, getloadavg, getgroups: Remove support for Ultrix.
* m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't define
STAT_STATFS2_FS_DATA.
* lib/fsusage.c: Remove STAT_STATFS2_FS_DATA case.
* m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't define
MOUNTED_GETMNT.
* lib/mountlist.c: Remove MOUNTED_GETMNT case.
* lib/getloadavg.c (decstation): Remove definition and case.
* m4/getgroups.m4 (AC_FUNC_GETGROUPS): Mention NeXTstep, not Ultrix.
* lib/getgroups.c: Likewise.
* doc/posix-functions/getgroups.texi: Likewise.
* lib/time.in.h: Update comments.
Bruno Haible [Tue, 16 Oct 2018 19:09:51 +0000 (21:09 +0200)]
getloadavg: Remove support for ConvexOS.
* lib/getloadavg.c: Remove convex case.
Bruno Haible [Tue, 16 Oct 2018 19:05:02 +0000 (21:05 +0200)]
getloadavg: Remove support for Sony NEWS.
* lib/getloadavg.c: Remove sony_news case.
Bruno Haible [Tue, 16 Oct 2018 19:02:51 +0000 (21:02 +0200)]
fsusage, mountlist, getloadavg: Remove support for Dynix/ptx.
* lib/fsusage.c: Remove _SEQUENT_ case.
* m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Update comments.
* lib/mountlist.c: Don't test for MNTTABNAME.
* m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Don't test for libseq.
(gl_LIST_MOUNTED_FILE_SYSTEMS): Don't test for MNTTABNAME.
* lib/getloadavg.c: Remove _SEQUENT_ and sequent cases.
* lib/stat-size.h: Don't mention the Sequent bug.
* doc/posix-functions/utime.texi: Don't mention the Dynix bug.
Bruno Haible [Tue, 16 Oct 2018 18:47:03 +0000 (20:47 +0200)]
fsusage: Remove support for AIX 3.
* lib/fsusage.c: Remove code for AIX 3.
* m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Update comments.
Bruno Haible [Tue, 16 Oct 2018 18:43:03 +0000 (20:43 +0200)]
fsusage, stat-size, getloadavg: Remove support for AIX PS/2.
* m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for dustat.h.
* lib/fsusage.c: Remove code for AIX PS/2.
* lib/stat-size.h (ST_NBLOCKSIZE): Likewise.
* lib/getloadavg.c: Likewise.
Bruno Haible [Tue, 16 Oct 2018 18:21:30 +0000 (20:21 +0200)]
getloadavg: Remove support for HP-UX on m68k.
* lib/getloadavg.c: Remove hp9000s300 case.
Bruno Haible [Tue, 16 Oct 2018 16:59:25 +0000 (18:59 +0200)]
fsusage, mountlist: Remove support for DolphinOS (an SVR3 variant).
* lib/fsusage.c: Remove DOLPHIN case.
* m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Update comments.
* lib/mountlist.c: Remove MOUNTED_GETMNTTBL case.
Bruno Haible [Tue, 16 Oct 2018 16:53:05 +0000 (18:53 +0200)]
getloadavg: Remove support for Alliant FX/2800.
* lib/getloadavg.c: Remove alliant case.
Bruno Haible [Tue, 16 Oct 2018 16:51:00 +0000 (18:51 +0200)]
getloadavg: Remove support for tek4300.
* lib/getloadavg.c: Remove tek4300 case.
Bruno Haible [Tue, 16 Oct 2018 16:47:19 +0000 (18:47 +0200)]
getloadavg: Remove support for Ardent.
* lib/getloadavg.c: Remove ardent case.
Bruno Haible [Tue, 16 Oct 2018 16:44:33 +0000 (18:44 +0200)]
mountlist: Remove support for SVR2.
Reported by Andrew Borodin <aborodin@vmail.ru> in
<https://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00101.html>.
* lib/mountlist.c: Remove MOUNTED_FREAD case.
* m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't define
MOUNTED_FREAD.
Karl Berry [Wed, 17 Oct 2018 17:30:48 +0000 (10:30 -0700)]
autoupdate
Bruno Haible [Mon, 15 Oct 2018 08:14:15 +0000 (10:14 +0200)]
assure: Fix comment.
* lib/assure.h: Fix typo in comment.
Paul Eggert [Mon, 15 Oct 2018 05:37:55 +0000 (00:37 -0500)]
libc-config: merge from glibc
* lib/cdefs.h (__glibc_has_attribute): New macro.
Paul Eggert [Mon, 15 Oct 2018 05:17:34 +0000 (00:17 -0500)]
regex: depend on libc-config
* modules/regex (Depends-on): Add libc-config.
This is needed after the recent autoupdate from glibc.
Paul Eggert [Mon, 15 Oct 2018 04:49:00 +0000 (23:49 -0500)]
autoupdate
Bruno Haible [Sun, 14 Oct 2018 15:03:01 +0000 (17:03 +0200)]
localename: Add support for per-thread locales on Solaris 11.4.
* lib/locale.in.h (newlocale, freelocale): New declarations.
(duplocale): Declare also when the 'localename' module requests it.
* lib/localename.c (struniq_hash_node): Renamed from hash_node.
(STRUNIQ_HASH_TABLE_SIZE): Renamed from HASH_TABLE_SIZE.
(struniq): Update.
(struct locale_categories_names, struct locale_hash_node): New types.
(LOCALE_HASH_TABLE_SIZE): New constant.
(locale_hash_table, locale_lock): New variables.
(pointer_hash, get_locale_t_name): New functions.
(newlocale, duplocale, freelocale): New overridden functions.
(gl_locale_name_thread_unsafe): Use get_locale_t_name.
* m4/intlsolaris.m4: New file.
* m4/localename.m4 (gl_LOCALENAME): Require gl_LOCALE_H_DEFAULTS. Invoke
gt_INTL_SOLARIS. Set HAVE_NEWLOCALE, HAVE_DUPLOCALE, HAVE_FREELOCALE,
REPLACE_NEWLOCALE, REPLACE_DUPLOCALE, REPLACE_FREELOCALE.
* m4/locale_h.m4 (gl_LOCALE_H): Test whether newlocale, freelocale are
declared.
(gl_LOCALE_H_DEFAULTS): Initialize GNULIB_LOCALENAME, HAVE_NEWLOCALE,
HAVE_FREELOCALE, REPLACE_NEWLOCALE, REPLACE_FREELOCALE.
* modules/locale (Makefile.am): Substitute GNULIB_LOCALENAME,
HAVE_NEWLOCALE, HAVE_FREELOCALE, REPLACE_NEWLOCALE, REPLACE_FREELOCALE.
* modules/localename (Files): Add intlsolaris.m4.
(Depends-on): Add 'locale'.
(configure.ac): Invoke gl_LOCALE_MODULE_INDICATOR.
* tests/test-locale-c++.cc (newlocale, freelocale): Prepare for checking
the signatures.
Akim Demaille [Fri, 12 Oct 2018 04:46:09 +0000 (06:46 +0200)]
timevar: use gethrxtime to get wall clock time
clock_gettime is not portable. gethrxtime takes the best available
option to get the wall clock time, including clock_gettime (monotonic
clock), and gettime (non monotonic).
Also, using xtime_t instead of float preserves the precision.
Suggested by Bruno Haible.
* lib/xtime.h (xtime_make): Handle overflows of nanoseconds.
* modules/timevar (Depends-on): We need gethrxtime.
We no longer use times().
(Link): Update.
* lib/timevar.h (timevar_time_def): Use xtime_t.
* lib/timevar.c (set_to_current_time): Use gethrxtime.
(timevar_print): Instead of checking whether the timings themselves
are large enough for the timevar to be printed, check the percentages.
Bruno Haible [Sun, 14 Oct 2018 07:21:24 +0000 (09:21 +0200)]
wcsnrtombs: Work around Solaris 11.4 bug.
* m4/wcsnrtombs.m4 (gl_WCSNRTOMBS_WORKS_IN_TRADITIONAL_LOCALE): New
macro.
(gl_FUNC_WCSNRTOMBS): Invoke it.
* doc/posix-functions/wcsnrtombs.texi: Mention the Solaris bug.
Bruno Haible [Sun, 14 Oct 2018 07:19:12 +0000 (09:19 +0200)]
mbsnrtowcs: Work around Solaris 11.4 bug.
* m4/mbsnrtowcs.m4 (gl_MBSNRTOWCS_WORKS_IN_TRADITIONAL_LOCALE): New
macro.
(gl_FUNC_MBSNRTOWCS): Invoke it.
* doc/posix-functions/mbsnrtowcs.texi: Mention the Solaris bug.
Bruno Haible [Sun, 14 Oct 2018 07:33:46 +0000 (09:33 +0200)]
doc: Update for Solaris 11.4.
* doc/**/*.texi: For bugs that exist in both Solaris 11.3 and 11.4,
mention Solaris 11.4.
* m4/printf.m4: Update comments about Solaris.
* m4/log.m4: Likewise.
* m4/log10.m4: Likewise.
* m4/logb.m4: Likewise.
* m4/logbf.m4: Likewise.
* m4/logbl.m4: Likewise.
* m4/rename.m4: Likewise.
* m4/wcrtomb.m4: Likewise.
* m4/hostent.m4: Likewise.
* m4/servent.m4: Likewise.
Bruno Haible [Sun, 14 Oct 2018 07:27:21 +0000 (09:27 +0200)]
floor, ceil, trunc, truncf, truncl: Defeat GCC optimizations.
* m4/floor.m4 (gl_FUNC_FLOOR_LIBS): Use 'floor' also through a function
pointer.
* m4/ceil.m4 (gl_FUNC_CEIL_LIBS): Use 'ceil' also through a function
pointer.
* m4/trunc.m4 (gl_FUNC_TRUNC): Use 'trunc' also through a function
pointer.
* m4/truncf.m4 (gl_FUNC_TRUNCF): Use 'truncf' also through a function
pointer.
* m4/truncl.m4 (gl_FUNC_TRUNCL): Use 'truncl' also through a function
pointer.
Akim Demaille [Sat, 13 Oct 2018 05:16:00 +0000 (07:16 +0200)]
bootstrap: fix wget command for po files.
* build-aux/bootstrap (po_download_command_format): Fix comment,
and adjust callers.
Akim Demaille [Thu, 11 Oct 2018 20:15:36 +0000 (22:15 +0200)]
timevar: improve the output format
From:
Execution times (seconds)
reader : 0,01 ( 3%) usr 0,00 (16%) sys 0,00 ( 0%) wall
outputting report : 0,03 ( 6%) usr 0,00 (15%) sys 0,00 ( 0%) wall
parser action tables : 0,02 ( 4%) usr 0,00 ( 2%) sys 0,00 ( 0%) wall
outputting parser : 0,01 ( 2%) usr 0,00 (13%) sys 0,00 ( 0%) wall
running m4 : 0,37 (84%) usr 0,00 (50%) sys 0,00 ( 0%) wall
total time : 0,44 0,01 0,00
To:
Execution times (seconds)
CPU user CPU system wall clock
reader 0,020 ( 4%) 0,002 ( 9%) 0,000000 ( 0%)
outputting report 0,029 ( 6%) 0,002 (11%) 0,000000 ( 0%)
parser action tables 0,020 ( 4%) 0,001 ( 6%) 0,000000 ( 0%)
outputting parser 0,014 ( 3%) 0,002 (10%) 0,000000 ( 0%)
running m4 0,431 (83%) 0,012 (59%) 0,000000 ( 0%)
total time 0,522 0,020 0,000000
Suggested by Bruno Haible.
See https://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00040.html.
* lib/timevar.c (timevar_print): Use %7.3f for usr/sys and %11.6f for
wall, since its resolution is much higher.
Akim Demaille [Thu, 11 Oct 2018 15:54:35 +0000 (17:54 +0200)]
timevar: expect that getrusage is available
Don't keep both times and getrusage as backend: both are guaranteed by
gnulib, a single one suffices. Using getrusage is open to possibly
tracking other types of resources in the future.
* modules/timevar (Depends-on): Add getrusage.
(configure.ac): Remove gl_TIMEVAR.
(Files): Remove m4/timevar.m4.
* m4/timevar.m4: Remove, rely on gnulib for getrusage.
* lib/timevar.h (timevar_enabled): Clarify documentation.
* lib/timevar.c: Remove all the code about times.
Remove all the CPP guards about getrusage: expect it to be present
(courtesy of gnulib).
Bruno Haible [Fri, 12 Oct 2018 09:12:53 +0000 (11:12 +0200)]
mountlist: Improve support for Solaris in 64-bit mode.
Reported by David Wood <David.Wood@deshaw.com> in
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=6816>.
* m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): On Solaris 8 or
newer, define MOUNTED_GETEXTMNTENT instead of MOUNTED_GETMNTENT2.
* lib/mountlist.c: Add code for MOUNTED_GETEXTMNTENT case.
Bruno Haible [Fri, 12 Oct 2018 09:06:33 +0000 (11:06 +0200)]
mountlist: Add support for Minix.
Reported by Assaf Gordon in
<https://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00074.html>.
* m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use
AC_CHECK_FUNCS to check for 'getmntinfo'.
* lib/mountlist.c: Update comments.
Bruno Haible [Fri, 12 Oct 2018 00:42:44 +0000 (02:42 +0200)]
Make better use of Autoconf.
* m4/environ.m4: Use AC_CACHE_CHECK where possible.
* m4/manywarnings.m4: Likewise.
* m4/manywarnings-c++.m4: Likewise.
* m4/socklen.m4: Likewise.
* m4/sockpfaf.m4: Likewise.
* m4/stdarg.m4: Likewise.
* m4/visibility.m4: Likewise.
* m4/fsusage.m4: Use AC_CACHE_CHECK where possible. Modernize
indentation.
* m4/ls-mntd-fs.m4: Likewise.
Bruno Haible [Thu, 11 Oct 2018 21:29:28 +0000 (23:29 +0200)]
mountlist: Modernize platform lists.
* m4/ls-mntd-fs.m4: Clarify which MOUNTED_* symbol applies to which
platforms, deemphasizing the obsolete ones.
* lib/mountlist.c: Likewise.
Bruno Haible [Thu, 11 Oct 2018 18:07:00 +0000 (20:07 +0200)]
getprogname: Add support for 32-bit programs on HP-UX.
* lib/getprogname.c (getprogname) [HP-UX]: If pstat_getproc fails,
try the similar functions 32-bit programs on 64-bit HP-UX.
Bruno Haible [Thu, 11 Oct 2018 16:24:51 +0000 (18:24 +0200)]
getprogname: Work around program name truncation when possible.
* lib/getprogname.c (getprogname) [HP-UX]: When pst_ucomm is truncated,
possibly use pst_cmd instead.
Paul Eggert [Mon, 8 Oct 2018 23:53:59 +0000 (16:53 -0700)]
fts: cleanup after FTS_NOATIME removal
* lib/fts_.h (FTS_VERBATIM, FTS_OPTIONMASK, FTS_NAMEONLY)
(FTS_STOP): Shrink to minimal values. We don’t need to
worry about binary compatibility in Gnulib, and the old way
of doing things had a hole in the user options that caused
FTS_OPTIONMASK to not work as desired.
Bernhard Voelker [Mon, 8 Oct 2018 23:45:36 +0000 (16:45 -0700)]
fts: remove FTS_NOATIME
This reverts commit
da4d6974013c822af1498941e32db774b2031765.
We cannot guarantee that O_NOATIME works: e.g. openat fails
with EPERM if the effective user ID of the caller does not match
the owner of the file and the caller is not privileged.
Downstream findutils has never picked up FTS_NOATIME. Discussed at
<https://lists.gnu.org/r/bug-gnulib/2018-09/msg00122.html>.
* lib/fts_.h (FTS_NOATIME): Remove bit flag.
(FTS_OPTIONMASK): Adjust.
* lib/fts.c (diropen, fts_open, fts_build): Likewise.
(fd_ring_check): Likewise.
Bruno Haible [Mon, 8 Oct 2018 23:44:07 +0000 (01:44 +0200)]
csharpcomp*, csharpexec*: Remove support for pnet.
* m4/csharpcomp.m4 (gt_CSHARPCOMP): Don't test for cscc. Don't set
HAVE_CSCC.
* build-aux/csharpcomp.sh.in (options_cscc): Remove variable.
Don't test HAVE_CSCC.
* lib/csharpcomp.c (compile_csharp_using_pnet): Remove function.
(compile_csharp_class): Don't invoke it.
* m4/csharpexec.m4 (gt_CSHARPEXEC): Don't test for ilrun. Don't set
HAVE_ILRUN.
* build-aux/csharpexec.sh.in (options_ilrun): Remove variable.
Don't test HAVE_ILRUN.
* lib/csharpexec.c (execute_csharp_using_pnet): Remove function.
(execute_csharp_program): Don't invoke it.
* m4/csharp.m4 (gt_CSHARP_CHOICE): Don't recognize --enable-csharp=pnet
any more.
Paul Eggert [Mon, 8 Oct 2018 18:32:09 +0000 (11:32 -0700)]
autoupdate
Andreas Henriksson [Sun, 7 Oct 2018 22:01:07 +0000 (15:01 -0700)]
renameatu: prefer renameat2 to syscall
* lib/renameatu.c (renameatu) [HAVE_RENAMEAT2]:
Use renameat2 instead of syscall (Bug#32796).
* m4/renameat.m4 (gl_FUNC_RENAMEAT): Check for renameat2.
Benno Schulenberg [Sun, 7 Oct 2018 16:20:44 +0000 (18:20 +0200)]
bootstrap, gnulib-tool: use https instead of insecure rsync
The rsync command does not do any authentication and thus allows
man-in-the-middle attacks. Better use wget over https, although
this is slower.
* build-aux/bootstrap (download_po_files, po_download_command_format):
Don't try using rsync; always use wget over https to fetch PO files.
* gnulib-tool (func_import): Likewise.
* pygnulib/GLImport.py (GLImport.execute): Likewise.
Benno Schulenberg [Sun, 7 Oct 2018 17:19:30 +0000 (19:19 +0200)]
Add ChangeLog entry for last commit.
Benno Schulenberg [Sun, 7 Oct 2018 16:20:43 +0000 (18:20 +0200)]
bootstrap, gnulib-tool: correct the translations wget command
Using the -np (--no-parent) option doesn't prevent wget from
traversing the given URL to a default depth of 5, and since
the domain directory contains a href="/latest/" link, this
means that wget searches through all domains anyway and will
also download PO files that are meant for other packages.
When getting the PO files for the nano domain, for example,
you will end up with af.po and ast.po (and many others) too,
but there are no African nor Asturian translations for nano.
So, use the --level option instead, to stop wget from looking
any further than the given URL.
* build-aux/bootstrap (po_download_command_format2): Restrict
recursion to a single level.
* gnulib-tool (func_import): Likewise.
* pygnulib/GLImport.py (GLImport.execute): Likewise.
Akim Demaille [Sun, 7 Oct 2018 07:33:21 +0000 (09:33 +0200)]
doc: the gnulib snapshots are not maintained
* doc/gnulib-intro.texi (Steady Development): Don't mention them.
Akim Demaille [Sat, 6 Oct 2018 10:16:12 +0000 (12:16 +0200)]
timevar: add to lib_SOURCES
* modules/timevar (lib_SOURCES): Add timevar.c and timevar.def.
Bruno Haible [Sun, 7 Oct 2018 09:04:50 +0000 (11:04 +0200)]
dirent: Update documentation.
* doc/posix-headers/dirent.texi: The MSVC issue is fixed by Gnulib.
Bruno Haible [Fri, 5 Oct 2018 19:54:56 +0000 (21:54 +0200)]
strpbrk: Make it possible to namespace the defined symbol.
* lib/strpbrk.c (strpbrk): Don't undefine outside of glibc.
Bruno Haible [Fri, 5 Oct 2018 19:54:14 +0000 (21:54 +0200)]
strcspn: Make it possible to namespace the defined symbol.
* lib/strcspn.c (strcspn): Don't undefine outside of glibc.
Bruno Haible [Fri, 5 Oct 2018 19:53:24 +0000 (21:53 +0200)]
raise: Make it possible to namespace the defined symbol.
* lib/raise.c (raise): Undefine only after the replacement function has
been defined.
(raise): Renamed from rpl_raise.
(raise_nothrow): Move to the end of the compilation unit.
Bruno Haible [Fri, 5 Oct 2018 19:50:47 +0000 (21:50 +0200)]
memcmp: Make it possible to namespace the defined symbol.
* lib/memcmp.c (memcmp): Don't undefine outside of glibc.
Bruno Haible [Fri, 5 Oct 2018 19:49:39 +0000 (21:49 +0200)]
explicit_bzero: Make it possible to namespace the defined symbol.
* lib/explicit_bzero.c (explicit_bzero): Don't undefine outside of
glibc.
Bruno Haible [Fri, 5 Oct 2018 16:42:44 +0000 (18:42 +0200)]
mkdir-p: Depend on 'mkdir'.
* modules/mkdir-p (Depends-on): Add 'mkdir'.
Bruno Haible [Fri, 5 Oct 2018 16:37:31 +0000 (18:37 +0200)]
tempname: Depend on 'mkdir'.
Reported by Maarten Bosmans <mkbosmans@gmail.com>
at <https://savannah.gnu.org/bugs/?33379>.
* modules/tempname (Depends-on): Add 'mkdir'.
Akim Demaille [Tue, 2 Oct 2018 04:19:19 +0000 (06:19 +0200)]
timevar: rely on gnulib modules for time portability.
* modules/timevar (Depends-on): Add sys_time, sys_times, and times.
* m4/timevar.m4: Don't check for clock_t and struct tms,
guaranteed by gnulib.
* lib/timevar.h: Use extern "C" protection.
Include <stdio.h> for FILE.
* lib/timevar.c: Include sys/time.h, sys/times.h unconditionally,
they are guaranteed by gnulib.
Remove uses of clock as (now useless) fallback.
Bruno Haible [Thu, 4 Oct 2018 23:38:46 +0000 (01:38 +0200)]
sh-filename: New module.
* m4/sh-filename.m4: New file.
* modules/sh-filename: New file.
* lib/spawni.c (_PATH_BSHELL): Use BOURNE_SHELL instead of hardcoding
"/bin/sh".
* tests/test-posix_spawn1.c (main): Likewise.
* tests/test-posix_spawn2.c (main): Likewise.
* lib/javacomp.c (compile_using_envjavac, is_envjavac_gcj,
is_envjavac_gcj43): Likewise.
* lib/javaexec.c (execute_java_class): Likewise.
* modules/posix_spawn-internal (Depends-on): Add sh-filename.
* modules/posix_spawnp-tests (Depends-on): Likewise.
* modules/javacomp (Depends-on): Likewise.
* modules/javaexec (Depends-on): Likewise.
Bruno Haible [Thu, 4 Oct 2018 23:16:56 +0000 (01:16 +0200)]
fcntl: Make it possible to namespace the defined symbol, part 2.
* lib/fcntl.c: Fix syntax errors in last commit.
Bruno Haible [Thu, 4 Oct 2018 22:27:25 +0000 (00:27 +0200)]
spawn-pipe tests: Avoid test failure on native Windows.
* tests/test-spawn-pipe-child.c (main): On native Windows, don't expect
that fd 2 is closed.
Bruno Haible [Thu, 4 Oct 2018 22:22:57 +0000 (00:22 +0200)]
fcntl: Make it possible to namespace the defined symbol.
* lib/fcntl.c (fcntl): Undefine only after the replacement function has
been defined.
(fcntl): Renamed from rpl_fcntl.
(rpl_fcntl_DUPFD, rpl_fcntl_DUPFD_CLOEXEC): New functions, extracted
from fcntl.
(klibc_fcntl): Move to the end of the compilation unit.
Bruno Haible [Wed, 3 Oct 2018 00:56:57 +0000 (02:56 +0200)]
vasnprintf tests: Avoid test failure on HP-UX/hppa and IRIX.
* tests/test-vasnprintf.c (test_function): Change the test added on
2018-09-23 to check only the 18 most significant digits.
Bruno Haible [Tue, 2 Oct 2018 08:50:42 +0000 (10:50 +0200)]
vasnprintf tests: Avoid test failure on Cygwin.
* tests/test-vasnprintf.c (test_function): Change the test added on
2018-09-23 to check only the 42 most significant digits.
Bruno Haible [Mon, 1 Oct 2018 23:17:34 +0000 (01:17 +0200)]
mkostemp, mkostemps: Update documentation.
* doc/glibc-functions/mkostemp.texi: Mention the Mac OS X issue.
* doc/glibc-functions/mkostemps.texi: Likewise.
Tom Tromey [Mon, 1 Oct 2018 20:57:45 +0000 (14:57 -0600)]
mkostemp, mkostemps: Fix compilation error in C++ mode on Mac OS X.
Attempting to use the mkostemp module in gdb caused a build failure
when using the C++ namespace feature, because mkostemp was not
declared. On OS X, mkostemp is declared in unistd.h, so this patch
extends the existing special case in stdlib.in.h to cover mkostemp and
mkostemps.
* lib/stdlib.in.h: Include <unistd.h> for mkostemp and mkostemps
on OS X.
Pádraig Brady [Sun, 30 Sep 2018 05:20:17 +0000 (22:20 -0700)]
hmac-*: refactor to remove repetitive code
A net removal of 240 lines.
* lib/hmac.c: A new parameterized single implementation.
* lib/hmac-md5.c: Define parameters and include implementation.
* lib/hmac-sha1.c: Likewise.
* lib/hmac-sha256.c: Likewise.
* lib/hmac-sha512.c: Likewise.
* modules/crypto/hmac-md5: Reference the new implementation file.
* modules/crypto/hmac-sha1: Likewise.
* modules/crypto/hmac-sha256: Likewise.
* modules/crypto/hmac-sha512: Likewise.
* tests/test-hmac-md5.c: Refactor common code to a single function.
* tests/test-hmac-sha1.c: Likewise.
* tests/test-hmac-sha256.c: Likewise.
* tests/test-hmac-sha512.c: Likewise.
Zhang Qing [Sun, 30 Sep 2018 02:57:56 +0000 (19:57 -0700)]
hmac-sha512: fix hash for keys > blocksize (128 bytes)
* lib/hmac-sha512.c (hmac_sha512): Set the computed/shortened
key length to that output by sha512, not the blocksize.
Otherwise uninitialized data from the stack
is used when computing the hash.
* tests/test-hmac-sha512.c: Add a shortened key test case.
Reported at https://github.com/coreutils/gnulib/pull/5
Bruno Haible [Sun, 30 Sep 2018 21:16:45 +0000 (23:16 +0200)]
vasnprintf: Avoid warnings from GCC's -Wsign-compare.
Reported by Bjarni Ingi Gislason <bjarniig@rhi.hi.is> in
<https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00105.html>.
* lib/vasnprintf.c (VASNPRINTF): Cast 'count' from 'int' to
'unsigned int' before comparison with an unsigned value.
Bruno Haible [Sun, 30 Sep 2018 17:50:34 +0000 (19:50 +0200)]
grantpt: Remove unnecessary dependency.
* modules/grantpt (Depends-on): Remove 'builtin-expect'.
Bruno Haible [Sun, 30 Sep 2018 17:36:29 +0000 (19:36 +0200)]
timevar: Small tweaks.
* lib/timevar.h: Fix comments. Add parameter names to function
declarations.
* lib/timevar.c: Include timevar.h immediately after config.h.
* lib/timevar.def: Fix comments.
* modules/timevar (Maintainer): List Akim Demaille.
Bruno Haible [Sun, 30 Sep 2018 17:27:56 +0000 (19:27 +0200)]
timevar: Include documentation in gnulib manual.
* doc/timevar.texi: Change node and section name to 'Profiling of
program phases'.
In the code snippets, tweak the #includes and use GNU coding style.
* doc/gnulib.texi: Include timevar.texi.