summaryrefslogtreecommitdiff
path: root/modules
Commit message (Collapse)AuthorAgeFilesLines
* maint: break out '&& mv $@-t $@'Paul Eggert2021-12-243-10/+8
| | | | | | | * build-aux/git-version-gen, config/argz.mk, modules/configmake: * modules/posix_spawnp-tests, modules/snippet/link-warning: Break out '&& mv $@-t $@' to a separate line in the Make recipe, as this makes things a bit easier to debug.
* gen-header: new modulePaul Eggert2021-12-2485-421/+446
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify header generation by using Makefile variables defined by a new gen-header module. * modules/gen-header: New module. * modules/alloca-opt, modules/argz, modules/arpa_inet: * modules/assert-h, modules/byteswap: * modules/ctype, modules/dirent, modules/dynarray, modules/errno: * modules/execinfo, modules/fcntl-h, modules/float: * modules/fnmatch-h, modules/getopt-posix, modules/glob-h: * modules/iconv-h, modules/ieee754-h, modules/inttypes-incomplete: * modules/langinfo, modules/libtextstyle-optional, modules/limits-h: * modules/locale, modules/malloc-h, modules/math, modules/monetary: * modules/net_if, modules/netdb, modules/netinet_in: * modules/openmp-init, modules/poll-h: * modules/pthread-h, modules/pty, modules/sched: * modules/scratch_buffer, modules/search, modules/selinux-h: * modules/signal-h, modules/sigsegv: * modules/spawn, modules/stdalign, modules/stdarg, modules/stdbool: * modules/stddef, modules/stdint, modules/stdio, modules/stdlib: * modules/stdnoreturn, modules/string, modules/strings: * modules/sys_file, modules/sys_ioctl, modules/sys_random: * modules/sys_resource, modules/sys_select, modules/sys_socket: * modules/sys_stat, modules/sys_time, modules/sys_times: * modules/sys_types, modules/sys_uio, modules/sys_utsname: * modules/sys_wait, modules/sysexits, modules/termios: * modules/threads-h, modules/time, modules/uchar: * modules/unicase/base, modules/unicase/special-casing: * modules/uniconv/base, modules/unictype/base, modules/unigbrk/base: * modules/unilbrk/base, modules/uniname/base, modules/uninorm/base: * modules/unistd, modules/unistdio/base, modules/unistr/base: * modules/unitypes, modules/uniwbrk/base, modules/uniwidth/base: * modules/utime-h, modules/wchar, modules/wctype-h: Depend on gen-header, and use its macros to simplify header generation.
* tests: Fix link errors on AIX.Bruno Haible2021-12-245-4/+5
| | | | | | | | | | | | | * modules/fnmatch-h-c++-tests (Makefile.am): Link test-fnmatch-h-c++ with $(LIB_MBRTOWC). * modules/glob-h-c++-tests (Makefile.am): Link test-glob-h-c++ with $(LIB_MBRTOWC). * modules/stdlib-c++-tests (Makefile.am): Link test-stdlib-c++ with $(GETLOADAVG_LIBS). * modules/sys_stat-c++-tests (Makefile.am): Link test-sys_stat-c++ with $(LIB_MBRTOWC). * modules/uchar-c++-tests (Makefile.am): Link test-uchar-c++ with $(LIBUNISTRING).
* libgmp: omit redundant 'mkdir -p .'Paul Eggert2021-12-221-2/+2
| | | | | * modules/libgmp: Mark $(MKDIR) with @NMD@; this was missed in a previous pass.
* maint: omit unnecessary ‘rm -f $@-t $@’Paul Eggert2021-12-2288-281/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * modules/alloca-opt, modules/argz, modules/arpa_inet: * modules/assert-h, modules/byteswap, modules/configmake: * modules/ctype, modules/dirent, modules/dynarray, modules/errno: * modules/execinfo, modules/fcntl-h, modules/float: * modules/fnmatch-h, modules/getopt-posix, modules/glob-h: * modules/iconv-h, modules/ieee754-h, modules/inttypes-incomplete: * modules/langinfo, modules/libtextstyle-optional: * modules/limits-h, modules/langinfo, modules/libgmp, modules/limits-h: * modules/locale, modules/malloc-h, modules/math, modules/monetary: * modules/net_if, modules/netdb, modules/netinet_in: * modules/openmp-init, modules/poll-h, modules/posix-shell: * modules/posix_spawnp-tests, modules/pthread-h, modules/pty: * modules/sched, modules/scratch_buffer, modules/search: * modules/selinux-h, modules/signal-h, modules/sigsegv: * modules/snippet/link-warning, modules/spawn, modules/stdalign: * modules/stdarg, modules/stdbool, modules/stddef, modules/stdint: * modules/stdio, modules/stdlib, modules/stdnoreturn: * modules/string, modules/strings, modules/sys_file: * modules/sys_ioctl, modules/sys_random, modules/sys_resource: * modules/sys_select, modules/sys_socket, modules/sys_stat: * modules/sys_time, modules/sys_times, modules/sys_types: * modules/sys_uio, modules/sys_utsname, modules/sys_wait: * modules/sysexits, modules/termios, modules/threads-h: * modules/time, modules/uchar, modules/unicase/base: * modules/unicase/special-casing, modules/uniconv/base: * modules/unictype/base, modules/unigbrk/base, modules/unilbrk/base: * modules/uniname/base, modules/uninorm/base, modules/unistd: * modules/unistdio/base, modules/unistr/base, modules/unitypes: * modules/uniwbrk/base, modules/uniwidth/base, modules/utime-h: * modules/wchar, modules/wctype-h: Don’t bother to do a ‘rm -f $@-t $@’ at the start of recipes that create .h and similar files. This is a revenant of a style in which the files were created read-only. Also, consistently use use plain ‘mv $@-t $@’ afterwards, instead of usually using ‘mv -f’ but sometimes plain ‘mv’.
* Move AM_V_GEN to recipe startPaul Eggert2021-12-2120-46/+46
| | | | | | | | | | | | | | | | | | | This is especially needed when building Emacs, as it uses ‘AM_V_GEN=@$(info GEN $@)', which means the GEN line is output by GNU make just before the recipe runs, regardless of where AM_V_GEN appears in the recipe. And it’s also good practice even if the default Automake ‘AM_V_GEN=@echo GEN $@;’ is used, as it’s better to output the GEN line consistently at the start of every recipe, even if this precedes a preparatory command that almost always works silently. * modules/arpa_inet, modules/dynarray, modules/net_if: * modules/netinet_in, modules/scratch_buffer, modules/selinux-h: * modules/sys_file, modules/sys_ioctl, modules/sys_random: * modules/sys_resource, modules/sys_select, modules/sys_socket: * modules/sys_stat, modules/sys_time, modules/sys_times: * modules/sys_types, modules/sys_uio, modules/sys_utsname: * modules/sys_wait, modules/unicase/special-casing, top/maint.mk: Use AM_V_GEN only at the start of each recipe.
* Optimize redundant 'mkdir -p .' invocations.Bruno Haible2021-12-2167-67/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported by Paul Eggert. * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Eliminate @NMD@ tokens. * modules/alloca-opt (Makefile.am): Prefix the "$(MKDIR_P) '%reldir%'" line with @NMD@. * modules/argz (Makefile.am): Likewise. * modules/assert-h (Makefile.am): Likewise. * modules/byteswap (Makefile.am): Likewise. * modules/configmake (Makefile.am): Likewise. * modules/ctype (Makefile.am): Likewise. * modules/dirent (Makefile.am): Likewise. * modules/errno (Makefile.am): Likewise. * modules/execinfo (Makefile.am): Likewise. * modules/fcntl-h (Makefile.am): Likewise. * modules/float (Makefile.am): Likewise. * modules/fnmatch-h (Makefile.am): Likewise. * modules/getopt-posix (Makefile.am): Likewise. * modules/glob-h (Makefile.am): Likewise. * modules/iconv-h (Makefile.am): Likewise. * modules/ieee754-h (Makefile.am): Likewise. * modules/inttypes-incomplete (Makefile.am): Likewise. * modules/langinfo (Makefile.am): Likewise. * modules/libtextstyle-optional (Makefile.am): Likewise. * modules/limits-h (Makefile.am): Likewise. * modules/locale (Makefile.am): Likewise. * modules/malloc-h (Makefile.am): Likewise. * modules/math (Makefile.am): Likewise. * modules/monetary (Makefile.am): Likewise. * modules/netdb (Makefile.am): Likewise. * modules/openmp-init (Makefile.am): Likewise. * modules/poll-h (Makefile.am): Likewise. * modules/posix-shell (Makefile.am): Likewise. * modules/pthread-h (Makefile.am): Likewise. * modules/pty (Makefile.am): Likewise. * modules/sched (Makefile.am): Likewise. * modules/search (Makefile.am): Likewise. * modules/signal-h (Makefile.am): Likewise. * modules/sigsegv (Makefile.am): Likewise. * modules/snippet/link-warning (Makefile.am): Likewise. * modules/spawn (Makefile.am): Likewise. * modules/stdalign (Makefile.am): Likewise. * modules/stdarg (Makefile.am): Likewise. * modules/stdbool (Makefile.am): Likewise. * modules/stddef (Makefile.am): Likewise. * modules/stdint (Makefile.am): Likewise. * modules/stdio (Makefile.am): Likewise. * modules/stdlib (Makefile.am): Likewise. * modules/stdnoreturn (Makefile.am): Likewise. * modules/string (Makefile.am): Likewise. * modules/strings (Makefile.am): Likewise. * modules/sysexits (Makefile.am): Likewise. * modules/termios (Makefile.am): Likewise. * modules/threads-h (Makefile.am): Likewise. * modules/time (Makefile.am): Likewise. * modules/uchar (Makefile.am): Likewise. * modules/unicase/base (Makefile.am): Likewise. * modules/uniconv/base (Makefile.am): Likewise. * modules/unictype/base (Makefile.am): Likewise. * modules/unigbrk/base (Makefile.am): Likewise. * modules/unilbrk/base (Makefile.am): Likewise. * modules/uniname/base (Makefile.am): Likewise. * modules/uninorm/base (Makefile.am): Likewise. * modules/unistd (Makefile.am): Likewise. * modules/unistdio/base (Makefile.am): Likewise. * modules/unistr/base (Makefile.am): Likewise. * modules/unitypes (Makefile.am): Likewise. * modules/uniwbrk/base (Makefile.am): Likewise. * modules/uniwidth/base (Makefile.am): Likewise. * modules/utime-h (Makefile.am): Likewise. * modules/wchar (Makefile.am): Likewise. * modules/wctype-h (Makefile.am): Likewise.
* non-recursive-gnulib-prefix-hack: Deprecate module.Bruno Haible2021-12-191-0/+9
| | | | | * modules/non-recursive-gnulib-prefix-hack (Status, Notice): New sections.
* stdint: Fix handling of limits.h (regression 2021-12-16).Bruno Haible2021-12-181-0/+2
| | | | | | | * modules/stdint (configure.ac): Revert last change. * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): If --gnu-make is used, assume that AC_SUBSTed variables for conditionals are constructed by appending the suffix '_CONDITION'.
* nstrftime: simplify by using libc-config.h.Paul Eggert2021-12-181-0/+1
| | | | | | | | * lib/nstrftime.c [!_LIBC]: Include libc-config.h instead of config.h. (iso_week_days): Simplify via libc-config.h’s __inline. (my_strftime): Simplify via libc-config.h’s libc_hidden_def. * modules/nstrftime (Depends-on): Add libc-config.
* getopt-posix: Fix build on AIX (regression 2021-12-15).Bruno Haible2021-12-181-1/+7
| | | | | | * modules/getopt-posix (configure.ac): Arrange to generate getopt-cdefs.h. (Makefile.am): Separate the rules for getopt.h and getopt-cdefs.h.
* getopt-posix,Paul Eggert2021-12-161-0/+5
| | | | | * modules/getopt-posix (getopt.h, getopt-cdefs.h): Build only if GL_GENERATE_GETOPT_H.
* stdint: omit duplicate gl_CONFIGURE_HEADER callsPaul Eggert2021-12-161-2/+0
| | | | | | | | * modules/stdint (configure.ac): Omit ‘gl_CONDITIONAL_HEADER([limits.h])’, since stdint depends on limits-h and doing gl_CONDITIONAL_HEADER twice can result in ‘configure’ failing with “*** GL_GENERATE_LIMITS_H is not set correctly”.
* Move .h file names out of the *.m4 files.Bruno Haible2021-12-1530-8/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful because Autoconf macros defined in *.m4 files can be AC_REQUIREd. In the configure file, they are then expanded before gl_INIT, i.e. at a place where it is not known whether they are required for the lib/ or for the tests/ directory (or both). * m4/gnulib-common.m4 (gl_CONDITIONAL_HEADER): New macro. * m4/alloca.m4 (gl_FUNC_ALLOCA): Set GL_GENERATE_ALLOCA_H instead of ALLOCA_H. Drop AC_SUBST and AM_CONDITIONAL invocations. * modules/alloca-opt (configure.ac): Invoke gl_CONDITIONAL_HEADER. * m4/argz.m4 (gl_FUNC_ARGZ): Set GL_GENERATE_ARGZ_H instead of ARGZ_H. Drop AC_SUBST and AM_CONDITIONAL invocations. * modules/argz (configure.ac): Invoke gl_CONDITIONAL_HEADER. * m4/assert_h.m4 (gl_ASSERT_H): Set GL_GENERATE_ASSERT_H instead of ASSERT_H. Drop AC_SUBST and AM_CONDITIONAL invocations. * modules/assert-h (configure.ac): Invoke gl_CONDITIONAL_HEADER. * m4/byteswap.m4 (gl_BYTESWAP): Set GL_GENERATE_BYTESWAP_H instead of BYTESWAP_H. Drop AC_SUBST and AM_CONDITIONAL invocations. * modules/byteswap (configure.ac): Invoke gl_CONDITIONAL_HEADER. * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Set GL_GENERATE_ERRNO_H instead of ERRNO_H. Drop AC_SUBST and AM_CONDITIONAL invocations. (gl_REPLACE_ERRNO_VALUE): Update. * m4/perror.m4 (gl_FUNC_PERROR): Update. * m4/strerror.m4 (gl_FUNC_STRERROR): Update. * m4/strerror_r.m4 (gl_FUNC_STRERROR_R, gl_FUNC_STRERROR_R_WORKS): Update. * modules/errno (configure.ac): Invoke gl_CONDITIONAL_HEADER. * m4/execinfo.m4 (gl_EXECINFO_H): Set GL_GENERATE_EXECINFO_H instead of EXECINFO_H. Drop AC_SUBST and AM_CONDITIONAL invocations. Drop AC_LIBOBJ invocation. * modules/execinfo (configure.ac): Invoke gl_CONDITIONAL_HEADER and AC_LIBOBJ. * m4/float_h.m4 (gl_FLOAT_H): Set GL_GENERATE_FLOAT_H instead of FLOAT_H. Drop AC_SUBST and AM_CONDITIONAL invocations. * modules/float (configure.ac): Invoke gl_CONDITIONAL_HEADER. * m4/fnmatch_h.m4 (gl_FNMATCH_H, gl_REPLACE_FNMATCH_H): Set GL_GENERATE_FNMATCH_H instead of FNMATCH_H. Drop AC_SUBST and AM_CONDITIONAL invocations. * modules/fnmatch-h (configure.ac): Invoke gl_CONDITIONAL_HEADER. * modules/fnmatch (configure.ac): Likewise. * m4/getopt.m4 (gl_FUNC_GETOPT_POSIX, gl_GETOPT_SUBSTITUTE_HEADER): Set GL_GENERATE_GETOPT_H instead of GETOPT_H. Set GL_GENERATE_GETOPT_CDEFS_H instead of GETOPT_CDEFS_H. Drop AC_SUBST invocations. * modules/getopt-posix (configure.ac): Invoke gl_CONDITIONAL_HEADER. * m4/glob_h.m4 (gl_GLOB_H, gl_REPLACE_GLOB_H): Set GL_GENERATE_GLOB_H instead of GLOB_H. Drop AC_SUBST and AM_CONDITIONAL invocations. * modules/glob-h (configure.ac): Invoke gl_CONDITIONAL_HEADER. * modules/glob (configure.ac): Likewise. * m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS, gl_REPLACE_ICONV_H): Set GL_GENERATE_ICONV_H instead of ICONV_H. Drop AC_SUBST and AM_CONDITIONAL invocations. (gl_ICONV_H): Update. * modules/iconv-h (configure.ac): Invoke gl_CONDITIONAL_HEADER. * modules/iconv_open (configure.ac): Likewise. * m4/ieee754-h.m4 (gl_IEEE754_H): Set GL_GENERATE_IEEE754_H instead of IEEE754_H. Drop AC_SUBST and AM_CONDITIONAL invocations. * modules/ieee754-h (configure.ac): Invoke gl_CONDITIONAL_HEADER. * m4/libgmp.m4 (gl_LIBGMP): Set GL_GENERATE_GMP_H instead of GMP_H. Drop AC_SUBST invocation. * modules/libgmp (configure.ac): Invoke gl_CONDITIONAL_HEADER. (Makefile.am): Use GL_GENERATE_GMP_H. * m4/libtextstyle-optional.m4 (gl_LIBTEXTSTYLE_OPTIONAL): Set GL_GENERATE_TEXTSTYLE_H instead of TEXTSTYLE_H. Drop AC_SUBST and AM_CONDITIONAL invocations. * modules/libtextstyle-optional (configure.ac): Invoke gl_CONDITIONAL_HEADER. * m4/limits-h.m4 (gl_LIMITS_H, gl_REPLACE_LIMITS_H): Set GL_GENERATE_LIMITS_H instead of LIMITS_H. Drop AC_SUBST and AM_CONDITIONAL invocations. * modules/limits-h (configure.ac): Invoke gl_CONDITIONAL_HEADER. * m4/monetary_h.m4 (gl_MONETARY_H): Set GL_GENERATE_MONETARY_H instead of MONETARY_H. Drop AC_SUBST and AM_CONDITIONAL invocations. * modules/monetary (configure.ac): Invoke gl_CONDITIONAL_HEADER. * m4/net_if_h.m4 (gl_HEADER_NET_IF): Set GL_GENERATE_NET_IF_H instead of NET_IF_H. Drop AC_SUBST and AM_CONDITIONAL invocations. * modules/net_if (configure.ac): Invoke gl_CONDITIONAL_HEADER. * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Set GL_GENERATE_NETINET_IN_H instead of NETINET_IN_H. Drop AC_SUBST and AM_CONDITIONAL invocations. * modules/netinet_in (configure.ac): Invoke gl_CONDITIONAL_HEADER. * m4/selinux-context-h.m4 (gl_HEADERS_SELINUX_CONTEXT_H): Set GL_GENERATE_SELINUX_CONTEXT_H instead of SELINUX_CONTEXT_H. Drop AC_SUBST and AM_CONDITIONAL invocations. * m4/selinux-label-h.m4 (gl_HEADERS_SELINUX_LABEL_H): Set GL_GENERATE_SELINUX_LABEL_H instead of SELINUX_LABEL_H. Drop AC_SUBST and AM_CONDITIONAL invocations. * modules/selinux-h (configure.ac): Invoke gl_CONDITIONAL_HEADER. * m4/stdalign.m4 (gl_STDALIGN_H): Set GL_GENERATE_STDALIGN_H instead of STDALIGN_H. Drop AC_SUBST and AM_CONDITIONAL invocations. * modules/stdalign (configure.ac): Invoke gl_CONDITIONAL_HEADER. * m4/stdarg.m4 (gl_STDARG_H): Set GL_GENERATE_STDARG_H instead of STDARG_H. Drop AC_SUBST and AM_CONDITIONAL invocations. * modules/stdarg (configure.ac): Invoke gl_CONDITIONAL_HEADER. * m4/stdbool.m4 (gl_STDBOOL_H): Renamed from AM_STDBOOL_H. Set GL_GENERATE_STDBOOL_H instead of STDBOOL_H. Drop AC_SUBST and AM_CONDITIONAL invocations. * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Don't require AM_STDBOOL_H. * modules/stdbool (configure.ac): Invoke gl_STDBOOL_H instead of AM_STDBOOL_H. Invoke gl_CONDITIONAL_HEADER. * m4/stddef_h.m4 (gl_STDDEF_H): Set GL_GENERATE_STDDEF_H instead of STDDEF_H. Drop AC_SUBST and AM_CONDITIONAL invocations. * modules/stddef (configure.ac): Invoke gl_CONDITIONAL_HEADER. * m4/stdint.m4 (gl_STDINT_H): Set GL_GENERATE_STDINT_H instead of STDINT_H. Drop AC_SUBST and AM_CONDITIONAL invocations. * m4/inttypes.m4 (gl_INTTYPES_PRI_SCN): Update. * modules/stdint (configure.ac): Invoke gl_CONDITIONAL_HEADER. * m4/stdnoreturn.m4 (gl_STDNORETURN_H): Set GL_GENERATE_STDNORETURN_H instead of STDNORETURN_H. Drop AC_SUBST and AM_CONDITIONAL invocations. * modules/stdnoreturn (configure.ac): Invoke gl_CONDITIONAL_HEADER. * m4/sys_socket_h.m4 (gl_SYS_SOCKET_H): Set GL_GENERATE_SYS_SOCKET_H instead of SYS_SOCKET_H. * m4/sysexits.m4 (gl_SYSEXITS): Set GL_GENERATE_SYSEXITS_H instead of SYSEXITS_H. Drop AC_SUBST and AM_CONDITIONAL invocations. * modules/sysexits (configure.ac): Invoke gl_CONDITIONAL_HEADER. * modules/sigsegv (configure.ac): Set GL_GENERATE_SIGSEGV_H instead of SIGSEGV_H. Drop AC_SUBST and AM_CONDITIONAL invocations. Invoke gl_CONDITIONAL_HEADER.
* Fix creation of build directories with non-recursive-gnulib-prefix-hack.Bruno Haible2021-12-1588-26/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is necessary for executing "make" in a VPATH build of a package that uses prefix-gnulib-mk and a module such as alloca-opt. * modules/alloca-opt (Makefile.am): Before generating the .h-t file, ensure that the directory in which we want to create it exists. (configure.ac): Invoke AC_PROG_MKDIR_P. * modules/argz: Likewise. * modules/arpa_inet: Likewise. * modules/assert-h: Likewise. * modules/byteswap: Likewise. * modules/configmake: Likewise. * modules/ctype: Likewise. * modules/dirent: Likewise. * modules/dynarray: Likewise. * modules/errno: Likewise. * modules/execinfo: Likewise. * modules/fcntl-h: Likewise. * modules/float: Likewise. * modules/fnmatch-h: Likewise. * modules/getopt-posix: Likewise. * modules/glob-h: Likewise. * modules/iconv-h: Likewise. * modules/ieee754-h: Likewise. * modules/inttypes-incomplete: Likewise. * modules/langinfo: Likewise. * modules/libgmp: Likewise. * modules/libtextstyle-optional: Likewise. * modules/limits-h: Likewise. * modules/locale: Likewise. * modules/malloc-h: Likewise. * modules/math: Likewise. * modules/monetary: Likewise. * modules/net_if: Likewise. * modules/netdb: Likewise. * modules/netinet_in: Likewise. * modules/openmp-init: Likewise. * modules/poll-h: Likewise. * modules/posix-shell: Likewise. * modules/pthread-h: Likewise. * modules/pty: Likewise. * modules/sched: Likewise. * modules/scratch_buffer: Likewise. * modules/search: Likewise. * modules/selinux-h: Likewise. * modules/signal-h: Likewise. * modules/sigsegv: Likewise. * modules/snippet/link-warning: Likewise. * modules/spawn: Likewise. * modules/stdalign: Likewise. * modules/stdarg: Likewise. * modules/stdbool: Likewise. * modules/stddef: Likewise. * modules/stdint: Likewise. * modules/stdio: Likewise. * modules/stdlib: Likewise. * modules/stdnoreturn: Likewise. * modules/string: Likewise. * modules/strings: Likewise. * modules/sys_file: Likewise. * modules/sys_ioctl: Likewise. * modules/sys_random: Likewise. * modules/sys_resource: Likewise. * modules/sys_select: Likewise. * modules/sys_socket: Likewise. * modules/sys_stat: Likewise. * modules/sys_time: Likewise. * modules/sys_times: Likewise. * modules/sys_types: Likewise. * modules/sys_uio: Likewise. * modules/sys_utsname: Likewise. * modules/sys_wait: Likewise. * modules/sysexits: Likewise. * modules/termios: Likewise. * modules/threads-h: Likewise. * modules/time: Likewise. * modules/uchar: Likewise. * modules/unicase/base: Likewise. * modules/unicase/special-casing: Likewise. * modules/uniconv/base: Likewise. * modules/unictype/base: Likewise. * modules/unigbrk/base: Likewise. * modules/unilbrk/base: Likewise. * modules/uniname/base: Likewise. * modules/uninorm/base: Likewise. * modules/unistd: Likewise. * modules/unistdio/base: Likewise. * modules/unistr/base: Likewise. * modules/unitypes: Likewise. * modules/uniwbrk/base: Likewise. * modules/uniwidth/base: Likewise. * modules/utime-h: Likewise. * modules/wchar: Likewise. * modules/wctype-h: Likewise. * gnulib-tool (func_emit_lib_Makefile_am): When producing output for GNU make, eliminate %reldir% tokens.
* backupfile: prefer signed integersPaul Eggert2021-12-102-2/+2
| | | | | | | | * lib/backupfile.c: Include ialloc.h instead of idx.h. Prefer idx_t to size_t where either will do. Use imalloc and irealloc instead of malloc and realloc. * modules/backupfile, modules/backup-rename (Depends-on): Depend on ialloc not idx.
* gettext-h: use VLA test similar to regexPaul Eggert2021-11-271-0/+1
| | | | | | | | | | * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Assuming GNULIB_NO_VLA, define if (defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__ \ + && !defined __STDC_NO_VLA___), not if ((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__). This is more consistent with what the regex module does. * modules/gettext-h (Depends-on): Depend on vararrays, since lib/gettext.h uses __STDC_NO_VLA__.
* regex: port to tccPaul Eggert2021-11-272-1/+2
| | | | | | | | Problem reported by Benno Schulenberg in: https://lists.gnu.org/r/bug-gnulib/2021-11/msg00038.html * modules/regex (Depends-on): Depend on vararrays, since lib/regex.h uses __STDC_NO_VLA__. * modules/vararrays: Change license from LGPL to LGPLv2+.
* regex: assume RE_ENABLE_I18NPaul Eggert2021-11-241-0/+1
| | | | | | | | | | | These days there is no longer any need to port to platforms lacking iswctype etc., since Gnulib now has substitutes. * config/srclist.txt: Comment out regex_internal.c and regex_internal.h for now, since they no longer match glibc. The intent is to merge them again soon. * lib/regex_internal.h (RE_ENABLE_I18N): Remove. All uses changed to assume that RE_ENABLE_I18N is 1. * modules/regex (Depends-on): Add iswctype.
* lseek: port around macOS SEEK_DATA glitchPaul Eggert2021-11-151-2/+2
| | | | | | | | | | Problem reported by Sudhip Nashi (Bug#51857). * doc/posix-functions/lseek.texi (lseek): Mention macOS SEEK_DATA issue. * lib/lseek.c (rpl_lseek): Work around macOS portability glitch. * m4/lseek.m4 (gl_FUNC_LSEEK): Replace lseek on Darwin. * modules/lseek (Depends-on): Depend on msvc-nothrow and fstat only if needed.
* sm3-buffer tests: New module.Bruno Haible2021-09-192-11/+11
| | | | | | | * tests/test-sm3-buffer.c: Renamed from tests/test-sm3.c. * modules/crypto/sm3-buffer-tests: Renamed from modules/crypto/sm3-tests. Test tests/test-sm3-buffer.c instead of tests/test-sm3.c.
* sm3-buffer: New module.Bruno Haible2021-09-192-10/+35
| | | | | | | | | * lib/sm3-stream.c: New file, extracted from lib/sm3.c. * lib/sm3.c: Don't include stdlib.h, unlocked-io.h. (BLOCKSIZE, sm3_stream): Moved to sm3-stream.c. * lib/sm3.h: Tweak. * modules/crypto/sm3-buffer: New file, based on modules/crypto/sm3. * modules/crypto/sm3: Rewritten.
* sha512-buffer tests: New module.Bruno Haible2021-09-192-12/+20
| | | | | | | | | * tests/test-sha512-stream.c: Renamed from tests/test-sha512.c. * modules/crypto/sha512-buffer-tests: New file, based on modules/crypto/sha512-tests. * modules/crypto/sha512-tests: Remove tests that are now in modules/crypto/sha512-buffer-tests. Test tests/test-sha512-stream.c instead of tests/test-sha512.c.
* sha512: Clarify module to source relation.Bruno Haible2021-09-191-1/+5
| | | | | | | | | | | | * lib/sha512-stream.c: New file, extracted from lib/sha512.c. * lib/sha512.c: Don't include stdlib.h, unlocked-io.h. (BLOCKSIZE, shaxxx_stream, sha512_stream, sha384_stream): Moved to sha512-stream.c. * lib/sha512.h: Tweak. * modules/crypto/sha512 (Files): Add lib/sha512-stream.c. (configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM. (Makefile.am): Arrange to compile sha512-stream.c. (Link): Mention $(LIB_CRYPTO).
* sha256-buffer tests: New module.Bruno Haible2021-09-192-12/+20
| | | | | | | | | * tests/test-sha256-stream.c: Renamed from tests/test-sha256.c. * modules/crypto/sha256-buffer-tests: New file, based on modules/crypto/sha256-tests. * modules/crypto/sha256-tests: Remove tests that are now in modules/crypto/sha256-buffer-tests. Test tests/test-sha256-stream.c instead of tests/test-sha256.c.
* sha256: Clarify module to source relation.Bruno Haible2021-09-191-1/+5
| | | | | | | | | | | | * lib/sha256-stream.c: New file, extracted from lib/sha256.c. * lib/sha256.c: Don't include stdlib.h, unlocked-io.h. (BLOCKSIZE, shaxxx_stream, sha256_stream, sha224_stream): Moved to sha256-stream.c. * lib/sha256.h: Tweak. * modules/crypto/sha256 (Files): Add lib/sha256-stream.c. (configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM. (Makefile.am): Arrange to compile sha256-stream.c. (Link): Mention $(LIB_CRYPTO).
* sha1-buffer tests: New module.Bruno Haible2021-09-192-10/+22
| | | | | | | | | | | * tests/test-sha1-buffer.c: New file, based on tests/test-sha1.c. * tests/test-sha1-stream.c: Renamed from tests/test-sha1.c. (main): Remove sha1-buffer tests. * modules/crypto/sha1-buffer-tests: New file, based on modules/crypto/sha1-tests. * modules/crypto/sha1-tests: Remove tests that are now in modules/crypto/sha1-buffer-tests. Test tests/test-sha1-stream.c instead of tests/test-sha1.c.
* sha1: Clarify module to source relation.Bruno Haible2021-09-191-1/+5
| | | | | | | | | | | * lib/sha1-stream.c: New file, extracted from lib/sha1.c. * lib/sha1.c: Don't include stdlib.h, unlocked-io.h. (BLOCKSIZE, sha1_stream): Moved to sha1-stream.c. * lib/sha1.h: Correct indentation. * modules/crypto/sha1 (Files): Add lib/sha1-stream.c. (configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM. (Makefile.am): Arrange to compile sha1-stream.c. (Link): Mention $(LIB_CRYPTO).
* md5-buffer tests: New module.Bruno Haible2021-09-192-10/+22
| | | | | | | | | | | * tests/test-md5-buffer.c: New file, based on tests/test-md5.c. * tests/test-md5-stream.c: Renamed from tests/test-md5.c. (main): Remove md5-buffer tests. * modules/crypto/md5-buffer-tests: New file, based on modules/crypto/md5-tests. * modules/crypto/md5-tests: Remove tests that are now in modules/crypto/md5-buffer-tests. Test tests/test-md5-stream.c instead of tests/test-md5.c.
* md5: Clarify module to source relation.Bruno Haible2021-09-191-1/+5
| | | | | | | | | | | * lib/md5-stream.c: New file, extracted from lib/md5.c. * lib/md5.c: Don't include stdlib.h, unlocked-io.h. (BLOCKSIZE, md5_stream): Moved to md5-stream.c. * lib/md5.h: Tweak. * modules/crypto/md5 (Files): Add lib/md5-stream.c. (configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM. (Makefile.am): Arrange to compile md5-stream.c. (Link): Mention $(LIB_CRYPTO).
* md4-buffer tests: New module.Bruno Haible2021-09-192-10/+10
| | | | | | | * tests/test-md4-buffer.c: Renamed from tests/test-md4.c. * modules/crypto/md4-buffer-tests: Renamed from modules/crypto/md4-tests. Test tests/test-md4-buffer.c instead of tests/test-md4.c.
* md4-buffer: New module.Bruno Haible2021-09-192-9/+31
| | | | | | | | | * lib/md4-stream.c: New file, extracted from lib/md4.c. * lib/md4.c: Don't include stdlib.h, unlocked-io.h. (BLOCKSIZE, md4_stream): Moved to md4-stream.c. * lib/md4.h: Reorder declarations. * modules/crypto/md4-buffer: New file, based on modules/crypto/md4. * modules/crypto/md4: Rewritten.
* md2-buffer tests: New module.Bruno Haible2021-09-192-10/+10
| | | | | | | * tests/test-md2-buffer.c: Renamed from tests/test-md2.c. * modules/crypto/md2-buffer-tests: Renamed from modules/crypto/md2-tests. Test tests/test-md2-buffer.c instead of tests/test-md2.c.
* md2-buffer: New module.Bruno Haible2021-09-192-5/+27
| | | | | | | | | * lib/md2-stream.c: New file, extracted from lib/md2.c. * lib/md2.c: Don't include stdlib.h, unlocked-io.h. (BLOCKSIZE, md2_stream): Moved to md2-stream.c. * lib/md2.h: Reorder declarations. * modules/crypto/md2-buffer: New file, based on modules/crypto/md2. * modules/crypto/md2: Rewritten.
* string, wchar: Don't cause link errors for rpl_free (regr. 2021-09-07).Bruno Haible2021-09-182-0/+2
| | | | | | | | | | * lib/string.in.h (free, rpl_free): Consider GNULIB_FREE_POSIX variable. * lib/wchar.in.h (free, rpl_free): Likewise. * m4/string_h.m4 (gl_STRING_H_REQUIRE_DEFAULTS): Require module indicator variable initializations from the stdlib module. * m4/wchar_h.m4 (gl_WCHAR_H_REQUIRE_DEFAULTS): Likewise. * modules/string (Makefile.am): Substitute GNULIB_FREE_POSIX in string.h. * modules/wchar (Makefile.am): Substitute GNULIB_FREE_POSIX in wchar.h.
* strerror_r-posix: port even better to AndroidPaul Eggert2021-09-082-4/+4
| | | | | | | | | | | | | | | | * lib/strerror_r.c: Use STRERROR_R_CHAR_P to decide whether the system strerror_r returns char *, and HAVE_DECL_STRERROR_R to decide whether it either does that or returns an integer. In the former case, use the system strerror_r even on platforms like Android API level 23 that don’t have __xpg_strerror_r; also check for strerror_r failure just in case. * m4/error.m4 (gl_PREREQ_ERROR): * m4/strerror_r.m4 (gl_PREREQ_STRERROR_R): Use system extensions on Android, to avoid mishandling strerror_r on API level 23 and later. * modules/error, modules/strerror_r-posix (configure.ac): Surround gl_PREREQ_ERROR with AS_IF instead of plain if, so that AC_REQUIREs are propagated out.
* string, wchar: avoid some namespace pollutionPaul Eggert2021-09-072-0/+4
| | | | | | | | | | | * lib/string.in.h, lib/wchar.in.h: (free): Declare by hand instead of including stdlib.h. This avoids some namespace pollution. It should also avoid some nested-include problems described by Lucy Phipps in: https://lists.gnu.org/r/bug-gnulib/2021-09/msg00018.html * modules/string, modules/wchar: (Depends-on): Add stdlib, so that REPLACE_FREE has the right value. (Makefile.am): Replace @REPLACE_FREE@ when creating the include file.
* crypto: revert previous changePaul Eggert2021-09-074-4/+0
|
* crypto: add missing file af_alg.hPaul Eggert2021-09-064-0/+4
| | | | | | * modules/crypto/md5-buffer, modules/crypto/sha1-buffer: * modules/crypto/sha256-buffer, modules/crypto/sha512-buffer: (Files): Add lib/af_alg.h, since the .c files include it.
* spawn-pipe: Fix test failure when running under QEMU user-mode.Bruno Haible2021-08-301-0/+2
| | | | | | | | * tests/test-spawn-pipe-child.c: Include <stdbool.h>, <string.h>, qemu.h. (main): Under QEMU user-mode, allow fd 2 or fd 3 to be open. * modules/spawn-pipe-tests (Files): Add qemu.h. (Depends-on): Add stdbool.
* execute: Fix test failure when running under QEMU user-mode.Bruno Haible2021-08-301-0/+2
| | | | | | | * tests/test-execute-child.c: Include <stdbool.h>, qemu.h. (main): Under QEMU user-mode, allow fd 3 to be open. * modules/execute-tests (Files): Add qemu.h. (Depends-on): Add stdbool.
* posix_spawn_file_actions_addfchdir: Avoid test failure under QEMU.Bruno Haible2021-08-301-0/+2
| | | | | | | | | | | * tests/test-posix_spawn-fchdir.c: Include qemu.h. (is_qemu): New variable. (test): Under QEMU user-mode, don't expect that "pwd" produces the result "/". (main): Initialize is_qemu. Under QEMU user-mode, skip the relative file name test. * modules/posix_spawn_file_actions_addfchdir-tests (Files): Add qemu.h. (Depends-on): Add stdbool.
* getcwd tests: Avoid test failure when running under QEMU user-mode.Bruno Haible2021-08-301-1/+3
| | | | | | | | * modules/getcwd-tests (Files): Add qemu.h. (Depends-on): Add stdbool. * tests/test-getcwd.c: Include qemu.h. (test_long_name): Skip this test when running under QEMU user-mode. (main): Consider return code 77 from test_long_name.
* base32, base64: fix broken testsPaul Eggert2021-08-292-2/+0
| | | | | | | | | | | | Problem reported by Bruno Haible in: https://lists.gnu.org/r/bug-gnulib/2021-08/msg00170.html * lib/base32.c, lib/base64.c: Do not include verify.h, and omit all uses of ‘assume’. * modules/base32, modules/base64 (Depends-on): Remove verify. * tests/test-base32.c, tests/test-base64.c: Don’t pass out-of-range values to allocator, as converting them to idx_t relies on implementation-defined behavior that could trap.
* ialloc: relicensePaul Eggert2021-08-291-1/+1
| | | | * modules/ialloc (License): Change from LGPL to LGPLv2+.
* Skip some tests when running under QEMU user-mode.Bruno Haible2021-08-294-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/qemu.h: New file. * tests/test-get-rusage-as.c: Include qemu.h. (main): Skip the test when running under QEMU. * tests/test-get-rusage-data.c: Include qemu.h. (main): Skip the test when running under QEMU. * tests/test-printf-posix2.c: Include qemu.h. (main): Return with code 77 when running under QEMU. * tests/test-fprintf-posix2.c: Include qemu.h. (main): Return with code 77 when running under QEMU. * tests/test-fprintf-posix3.c: Include qemu.h. (main): Return with code 79 when running under QEMU. * tests/test-fprintf-posix3.sh: Skip the test when the return code was 79. * tests/test-dprintf-posix2.c: Include qemu.h. (main): Return with code 79 when running under QEMU. Use return code 80 instead of 78. * tests/test-dprintf-posix2.sh: Skip the test when the return code was 79. Update for changed return code. * modules/get-rusage-as-tests (Files): Add qemu.h. (Depends-on): Add stdbool. * modules/get-rusage-data-tests (Files): Add qemu.h. (Depends-on): Add stdbool. * modules/fprintf-posix-tests (Files): Add qemu.h. (Depends-on): Add stdbool. * modules/dprintf-posix-tests (Files): Add qemu.h. (Depends-on): Add stdbool.
* base32, base64: prefer signed to unsigned integersPaul Eggert2021-08-272-0/+4
| | | | | | | | | | | | | | | | | | | | * lib/base32.c, lib/base64.c: Include ialloc.h instad of stdlib.h. Include intprops.h, verify.h. * lib/base32.c (base32_encode, base32_encode_alloc, get_8, decode_8) (base32_decode_ctx, base32_decode_alloc_ctx): * lib/base32.h (struct base32_decode_context): * lib/base64.c (base64_encode_fast, base64_encode) (base64_encode_alloc, get_4, decode_4, base64_decode_ctx) (base64_decode_alloc_ctx): * lib/base64.h (struct base64_decode_context): * tests/test-base32.c (main): * tests/test-base64.c (main): Prefer signed to unsigned integers. * lib/base32.c (base32_encode_alloc): * lib/base64.c (base64_encode_alloc): Use simpler and more-direct check for overflow, removing a TODO. * lib/base32.h, lib/base64.h: Include idx.h instead of stddef.h. * modules/base32, modules/base64 (Depends-on): Add ialloc, verify.
* execute tests: Fix test failure when libtool is in use.Bruno Haible2021-08-253-0/+3
| | | | | | | | | * modules/execute-tests (Makefile.am): Link test-execute-child without using libtool. * modules/spawn-pipe-tests (Makefile.am): Link test-spawn-pipe-child without using libtool. * modules/system-quote-tests (Makefile.am): Link test-system-quote-child without using libtool.
* snippet/unused-parameter: Mark unused module obsolete.Bruno Haible2021-08-231-0/+6
| | | | * modules/snippet/unused-parameter (Status, Notice): Mark as obsolete.
* c-stack: depend on inttypes, mempcpyPaul Eggert2021-08-221-0/+2
| | | | | | * modules/c-stack (Depends-on): Add inttypes, mempcpy. mempcpy problem reported by Evan Miller in: https://debbugs.gnu.org/50098#31