summaryrefslogtreecommitdiff
path: root/modules
Commit message (Collapse)AuthorAgeFilesLines
* array-omap: Add tests.Bruno Haible2018-12-111-0/+14
| | | | | * tests/test-array_omap.c: New file. * modules/array-omap-tests: New file.
* xomap: New module.Bruno Haible2018-12-111-0/+26
| | | | | | * lib/gl_xomap.h: New file. * lib/gl_xomap.c: New file. * modules/xomap: New file.
* rbtree-omap: New module.Bruno Haible2018-12-112-1/+27
| | | | | | | | | | | * lib/gl_rbtree_omap.h: New file. * lib/gl_rbtree_omap.c: New file. * lib/gl_rbtree_ordered.h: Code moved to here from lib/gl_rbtree_oset.c. Parameterize. * lib/gl_rbtree_oset.c: Include gl_rbtree_ordered.h. * modules/rbtree-omap: New file. * modules/rbtree-oset (Files): Add lib/gl_rbtree_ordered.h. (Makefile.am): Add gl_rbtree_ordered.h to lib_SOURCES.
* avltree-omap: New module.Bruno Haible2018-12-112-1/+27
| | | | | | | | | | | | * lib/gl_avltree_omap.h: New file. * lib/gl_avltree_omap.c: New file. * lib/gl_avltree_ordered.h: Code moved to here from lib/gl_avltree_oset.c. Parameterize. * lib/gl_avltree_oset.c: Include gl_avltree_ordered.h. * lib/gl_anytree_omap.h: New file. * modules/avltree-omap: New file. * modules/avltree-oset (Files): Add lib/gl_avltree_ordered.h. (Makefile.am): Add gl_avltree_ordered.h to lib_SOURCES.
* array-omap: New module.Bruno Haible2018-12-111-0/+24
| | | | | | * lib/gl_array_omap.h: New file. * lib/gl_array_omap.c: New file. * modules/array-omap: New file.
* omap: New module.Bruno Haible2018-12-111-0/+24
| | | | | | * lib/gl_omap.h: New file. * lib/gl_omap.c: New file. * modules/omap: New file.
* hash-set, linkedhash-set: Reduce code duplication.Bruno Haible2018-12-115-15/+15
| | | | | | | | | | | | | | | | | | | | | | * lib/gl_anyhash1.h: Rename from lib/gl_anyhash_list1.h and lib/gl_anyhash_set1.h. * lib/gl_anyhash2.h: Rename from lib/gl_anyhash_list2.h and lib/gl_anyhash_set2.h. Parameterize. (hash_resize_after_add): New function, from lib/gl_anyhash_set2.h. * lib/gl_anytreehash_list1.h (hash_resize_after_add): Remove function. * lib/gl_avltreehash_list.c: Include gl_anyhash1.h instead of gl_anyhash_list1.h. Include gl_anyhash2.h instead of gl_anyhash_list2.h. * lib/gl_rbtreehash_list.c: Likewise. * lib/gl_linkedhash_list.c: Likewise. (hash_resize_after_add): Remove function. * lib/gl_linkedhash_set.c: Include gl_anyhash1.h instead of gl_anyhash_set1.h. Include gl_anyhash2.h instead of gl_anyhash_set2.h. * gl_hash_set.c: Likewise. * modules/avltreehash-list (Files, Makefile.am): Update file list. * modules/rbtreehash-list (Files, Makefile.am): Likewise. * modules/linkedhash-list (Files, Makefile.am): Likewise. * modules/linkedhash-set (Files, Makefile.am): Likewise. * modules/hash-set (Files, Makefile.am): Likewise.
* hash-set: Add tests.Bruno Haible2018-12-071-0/+13
| | | | | * tests/test-hash_set.c: New file. * modules/hash-set-tests: New file.
* linkedhash-set: Add tests.Bruno Haible2018-12-071-0/+13
| | | | | * tests/test-linkedhash_set.c: New file. * modules/linkedhash-set-tests: New file.
* array-set: Add tests.Bruno Haible2018-12-071-0/+14
| | | | | * tests/test-array_set.c: New file. * modules/array-set-tests: New file.
* xset: New module.Bruno Haible2018-12-071-0/+26
| | | | | | * lib/gl_xset.h: New file. * lib/gl_xset.c: New file. * modules/xset: New file.
* hash-set: New module.Bruno Haible2018-12-071-0/+28
| | | | | | * lib/gl_hash_set.h: New file. * lib/gl_hash_set.c: New file. * modules/hash-set: New file.
* linkedhash-set: New module.Bruno Haible2018-12-074-3/+34
| | | | | | | | | | | | | | | | | | * lib/gl_linkedhash_set.h: New file. * lib/gl_linkedhash_set.c: New file. * lib/gl_anyhash_set1.h: New file, based on lib/gl_anyhash_list1.h. * lib/gl_anyhash_set2.h: New file, based on lib/gl_anyhash_list2.h. * lib/gl_anyhash_primes.h: New file, extracted from lib/gl_anyhash_list2.h. * lib/gl_anyhash_list2.h: Include it. (primes, next_prime): Remove definitions. * modules/linkedhash-set: New file. * modules/avltreehash-list (Files): Add lib/gl_anyhash_primes.h. (Makefile.am): Add gl_anyhash_primes.h to lib_SOURCES. * modules/linkedhash-list (Files): Add lib/gl_anyhash_primes.h. (Makefile.am): Add gl_anyhash_primes.h to lib_SOURCES. * modules/rbtreehash-list (Files): Add lib/gl_anyhash_primes.h. (Makefile.am): Add gl_anyhash_primes.h to lib_SOURCES.
* array-set: New module.Bruno Haible2018-12-071-0/+24
| | | | | | * lib/gl_array_set.h: New file. * lib/gl_array_set.c: New file. * modules/array-set: New file.
* set: New module.Bruno Haible2018-12-071-0/+24
| | | | | | | | * lib/gl_set.h: New file. * lib/gl_set.c: New file. * lib/gl_oset.h (gl_setelement_dispose_fn): Avoid conflict with gl_set.h. * modules/set: New file.
* bitset: rename ebitset/expandable.* as tbitset/table.*Akim Demaille2018-11-291-3/+3
| | | | | | | | | | See https://lists.gnu.org/archive/html/bug-gnulib/2018-11/msg00096.html. * lib/bitset/expandable.h, lib/bitset/expandable.c: Rename as... * lib/bitset/table.h, lib/bitset/table.c: these. Rename all the ebitset* symbols as tbitset*. Adjust dependencies.
* bitsetv: new moduleAkim Demaille2018-11-251-0/+21
| | | | * lib/bitsetv.c, lib/bitsetv.h, modules/bitsetv: New.
* bitset: add tests and docAkim Demaille2018-11-251-0/+11
| | | | | | | First stabs at providing a documentation and test for the bitset module. * doc/bitset.texi, modules/test-bitset, tests/bitset-tests.c: New.
* bitset: new moduleAkim Demaille2018-11-251-0/+35
| | | | | | | | | * lib/bitset.c, lib/bitset.h, lib/bitset/array.c, * lib/bitset/array.h, lib/bitset/base.h, lib/bitset/expandable.c, * lib/bitset/expandable.h, lib/bitset/list.c, lib/bitset/list.h, * lib/bitset/stats.c, lib/bitset/stats.h, lib/bitset/vector.c, * lib/bitset/vector.h, modules/bitset: New.
* mktime: add libc-config dependencyPaul Eggert2018-11-211-0/+1
| | | | | I missed this when we synced from glibc. * modules/mktime (Depends-on): Add libc-config.
* havelib: Remove the need to include asm-underscore.m4.Bruno Haible2018-11-111-1/+1
| | | | | | | | * 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.
* backupfile: new dir_fd argsPaul Eggert2018-10-233-4/+29
| | | | | | | | | | | | | | | | | | | | | | 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.
* localename: Simplify support for per-thread locales on Solaris 11.4.Bruno Haible2018-10-232-2/+2
| | | | | | | | | | | | | | | | | | | * 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.
* Assume Autoconf >= 2.63.Bruno Haible2018-10-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* localename: Fine-tune support for per-thread locales on Solaris 11.4.Bruno Haible2018-10-222-1/+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.
* regex: depend on libc-configPaul Eggert2018-10-151-0/+1
| | | | | * modules/regex (Depends-on): Add libc-config. This is needed after the recent autoupdate from glibc.
* localename: Add support for per-thread locales on Solaris 11.4.Bruno Haible2018-10-142-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* timevar: use gethrxtime to get wall clock timeAkim Demaille2018-10-141-1/+5
| | | | | | | | | | | | | | | | | 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.
* timevar: expect that getrusage is availableAkim Demaille2018-10-131-4/+1
| | | | | | | | | | | | | | | 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).
* timevar: add to lib_SOURCESAkim Demaille2018-10-071-0/+3
| | | | * modules/timevar (lib_SOURCES): Add timevar.c and timevar.def.
* mkdir-p: Depend on 'mkdir'.Bruno Haible2018-10-051-0/+1
| | | | * modules/mkdir-p (Depends-on): Add 'mkdir'.
* tempname: Depend on 'mkdir'.Bruno Haible2018-10-051-0/+1
| | | | | | | Reported by Maarten Bosmans <mkbosmans@gmail.com> at <https://savannah.gnu.org/bugs/?33379>. * modules/tempname (Depends-on): Add 'mkdir'.
* timevar: rely on gnulib modules for time portability.Akim Demaille2018-10-051-1/+4
| | | | | | | | | | | * 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.
* sh-filename: New module.Bruno Haible2018-10-055-0/+24
| | | | | | | | | | | | | | | | * 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.
* hmac-*: refactor to remove repetitive codePádraig Brady2018-10-014-0/+4
| | | | | | | | | | | | | | | | | | 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.
* grantpt: Remove unnecessary dependency.Bruno Haible2018-09-301-1/+0
| | | | * modules/grantpt (Depends-on): Remove 'builtin-expect'.
* timevar: Small tweaks.Bruno Haible2018-09-301-2/+2
| | | | | | | | * 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.
* timevar: import from Bison.Akim Demaille2018-09-291-0/+24
| | | | | | | * m4/timevar.m4, modules/timevar, lib/timevar.h, lib/timevar.c: New files. * lib/timevar.def: New file. * doc/timevar.texi: New file.
* posix_spawn tests: Fix link error on 64-bit Cygwin.Bruno Haible2018-09-182-1/+3
| | | | | | | | | * tests/test-posix_spawn1.c (environ): Remove declaration. * tests/test-posix_spawn2.c (environ): Likewise. * tests/test-posix_spawn3.c (environ): Likewise. * tests/test-posix_spawn4.c (environ): Likewise. * modules/posix_spawn-tests (Depends-on): Add 'environ'. * modules/posix_spawnp-tests (Depends-on): Likewise.
* timespec: new function current_timespecPaul Eggert2018-09-161-0/+1
| | | | | | | | | | | | | * lib/gettime.c (gettime): Prefer clock_gettime to nanotime, and don’t worry about it failing on a CLOCK_REALTIME arg. POSIX requires it to succeed and I don’t know of any counterexamples where the fallbacks would work. (current_timespec): New function, taken from Emacs. It is more convenient than gettime, and can help register allocation. * lib/timespec.h: Include arg-nonnull.h. (current_timespec): New declaration. (gettime, settime): Declare args to be nonnull. * modules/timespec (Depends-on): Add snippet/arg-nonnull.
* posix_spawn_file_actions_addchdir: Add tests.Bruno Haible2018-09-071-0/+20
| | | | | | * tests/test-posix_spawn_file_actions_addchdir.c: New file. * tests/test-posix_spawn4.c: New file. * modules/posix_spawn_file_actions_addchdir-tests: New file.
* posix_spawn_file_actions_addchdir: New module.Bruno Haible2018-09-075-9/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suggested by Eric Blake in <https://lists.gnu.org/archive/html/bug-findutils/2018-09/msg00007.html>. * lib/spawn.in.h (posix_spawn_file_actions_addchdir): New declaration. * lib/spawn_int.h (struct __spawn_action): Add tag 'spawn_do_chdir' and union member 'chdir_action'. * lib/spawn_faction_addchdir.c: New file. * lib/spawni.c (__spawni): Implement the spawn_do_chdir action. * lib/spawn_faction_addclose.c: Test REPLACE_POSIX_SPAWN instead of HAVE_WORKING_POSIX_SPAWN. * lib/spawn_faction_adddup2.c: Likewise. * lib/spawn_faction_addopen.c: Likewise. * m4/posix_spawn_faction_addchdir.m4: New file. * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Test whether module 'posix_spawn_file_actions_addchdir' is present and whether posix_spawn_file_actions_addchdir_np exists. Define REPLACE_POSIX_SPAWN instead of HAVE_WORKING_POSIX_SPAWN. * m4/spawn_h.m4 (gl_SPAWN_H): Test whether posix_spawn_file_actions_addchdir is declared. (gl_SPAWN_H_DEFAULTS): Initialize GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR, HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR, REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR. * modules/spawn (Makefile.am): Substitute GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR, HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR, REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR. * modules/posix_spawn_file_actions_addchdir: New file. * modules/posix_spawn_file_actions_addclose (Depends-on, configure.ac): Test also REPLACE_POSIX_SPAWN. * modules/posix_spawn_file_actions_adddup2 (Depends-on, configure.ac): Likewise. * modules/posix_spawn_file_actions_addopen (Depends-on, configure.ac): Likewise. * tests/test-spawn-c++.cc (posix_spawn_file_actions_addchdir): Check signature. * doc/posix-functions/posix_spawn.texi: Mention the new module. * doc/posix-functions/posix_spawnp.texi: Likewise.
* count-trailing-zeros tests: Rely on limits-h module.Bruno Haible2018-09-061-0/+1
| | | | | | * tests/test-count-trailing-zeros.c (ULLONG_MAX): Remove fallback definition. * modules/count-trailing-zeros-tests (Depends-on): Add 'limits-h'.
* count-leading-zeros tests: Rely on limits-h module.Bruno Haible2018-09-061-0/+1
| | | | | | * tests/test-count-leading-zeros.c (ULLONG_MAX): Remove fallback definition. * modules/count-leading-zeros-tests (Depends-on): Add 'limits-h'.
* count-one-bits tests: Rely on limits-h module.Bruno Haible2018-09-061-0/+1
| | | | | * tests/test-count-one-bits.c (ULLONG_MAX): Remove fallback definition. * modules/count-one-bits-tests (Depends-on): Add 'limits-h'.
* xstrtoll: Rely on limits-h module.Bruno Haible2018-09-062-1/+1
| | | | | | | * lib/xstrtol.c: Don't include intprops.h. (ULLONG_MAX, LLONG_MAX, LLONG_MIN): Remove fallback definitions. * modules/xstrtol (Depends-on): Remove 'intprops'. * modules/xstrtoll (Depends-on): Add 'limits-h'.
* strtoll, strtoull: Rely on limits-h module.Bruno Haible2018-09-062-0/+2
| | | | | | | * lib/strtol.c (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove macros. (ULLONG_MAX, LLONG_MAX, LLONG_MIN): Remove fallback definitions. * modules/strtoll (Depends-on): Add limits-h. * modules/strtoull (Depends-on): Likewise.
* getpass: Move declaration to <unistd.h>.Bruno Haible2018-08-193-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | * lib/unistd.in.h (getpass): New declaration. * lib/getpass.h: Replace with a stub that just includes <unistd.h>. * m4/getpass.m4 (gl_FUNC_GETPASS): Declare through AC_DEFUN_ONCE. Require gl_UNISTD_H_DEFAULTS. Don't test whether getpass is declared. (gl_FUNC_GETPASS_GNU): Require gl_UNISTD_H_DEFAULTS and gl_FUNC_GETPASS. On glibc systems, don't set REPLACE_GETPASS to 1. * modules/getpass (Depends-on): Add 'unistd'. (configure.ac): Test also REPLACE_GETPASS. Define a module indicator. (Include): Specify <unistd.h> instead of "getpass.h". * modules/getpass-gnu (Depends-on): Merely depend on 'getpass'. (configure.ac): Sync with the configure.ac section of modules/getpass. (Include): Specify <unistd.h> instead of "getpass.h". * m4/unistd_h.m4 (gl_UNISTD_H): Test whether getpass is declared. (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETPASS, HAVE_GETPASS, REPLACE_GETPASS. * modules/unistd (Makefile.am): Substitute GNULIB_GETPASS, HAVE_GETPASS, REPLACE_GETPASS. * tests/test-unistd-c++.cc: Test also the declaration of 'getpass'. * doc/glibc-functions/getpass.texi: A length limit exists also on uClibc and musl. * NEWS: Mention the change.
* glob: Fix compilation error when glob.h is not replaced.Bruno Haible2018-08-181-0/+1
| | | | | | | | Reported and fix proposed by Reuben Thomas <rrt@sc3d.org> in <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00096.html>. * lib/glob_pattern_p.c: Include <libc-config.h>. * modules/glob (Depends-on): Add libc-config.
* scratch_buffer: Add tests.Bruno Haible2018-08-181-0/+12
| | | | | * tests/test-scratch-buffer.c: New file. * modules/scratch_buffer-tests: New file.