From bbdcf5a704517d35a76ba8b666075da9ffe39ac4 Mon Sep 17 00:00:00 2001 From: RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> Date: Tue, 23 Aug 2022 17:13:04 +0200 Subject: Sync with the latest Gnulib code (fa1ac7ec) diff --git a/build-aux/config.rpath b/build-aux/config.rpath index 4b7dc49..1e1ab67 100755 --- a/build-aux/config.rpath +++ b/build-aux/config.rpath @@ -2,7 +2,7 @@ # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # -# Copyright 1996-2021 Free Software Foundation, Inc. +# Copyright 1996-2022 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # diff --git a/gl/Makefile.am b/gl/Makefile.am index 5451c47..deb665c 100644 --- a/gl/Makefile.am +++ b/gl/Makefile.am @@ -1,10 +1,10 @@ ## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. -# Copyright (C) 2002-2021 Free Software Foundation, Inc. +# Copyright (C) 2002-2022 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This file is distributed in the hope that it will be useful, @@ -56,7 +56,7 @@ # vasprintf \ # vsnprintf -AUTOMAKE_OPTIONS = 1.11 gnits subdir-objects +AUTOMAKE_OPTIONS = 1.14 gnits subdir-objects SUBDIRS = noinst_HEADERS = @@ -79,6 +79,7 @@ AM_CFLAGS = noinst_LIBRARIES += libgnu.a libgnu_a_SOURCES = +libgnu_a_CFLAGS = $(AM_CFLAGS) $(GL_CFLAG_GNULIB_WARNINGS) libgnu_a_LIBADD = $(gl_LIBOBJS) libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) EXTRA_libgnu_a_SOURCES = @@ -100,11 +101,10 @@ BUILT_SOURCES += $(ALLOCA_H) # doesn't have one that works with the given compiler. if GL_GENERATE_ALLOCA_H alloca.h: alloca.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''HAVE_ALLOCA_H''@|$(HAVE_ALLOCA_H)|g' < $(srcdir)/alloca.in.h; \ - } > $@-t && \ - mv -f $@-t $@ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''HAVE_ALLOCA_H''@|$(HAVE_ALLOCA_H)|g' \ + $(srcdir)/alloca.in.h > $@-t + $(AM_V_at)mv $@-t $@ else alloca.h: $(top_builddir)/config.status rm -f $@ @@ -122,10 +122,9 @@ BUILT_SOURCES += arpa/inet.h # We need the following in order to create when the system # doesn't have one. arpa/inet.h: arpa_inet.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) - $(AM_V_at)$(MKDIR_P) arpa - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(AM_V_GEN)$(MKDIR_P) '%reldir%/arpa' + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -142,9 +141,8 @@ arpa/inet.h: arpa_inet.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/arpa_inet.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/arpa_inet.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += arpa/inet.h arpa/inet.h-t MOSTLYCLEANDIRS += arpa @@ -175,10 +173,9 @@ EXTRA_DIST += basename-lgpl.h ## begin gnulib module btowc - -EXTRA_DIST += btowc.c - -EXTRA_libgnu_a_SOURCES += btowc.c +if GL_COND_OBJ_BTOWC +libgnu_a_SOURCES += btowc.c +endif ## end gnulib module btowc @@ -190,11 +187,8 @@ BUILT_SOURCES += $(BYTESWAP_H) # doesn't have one. if GL_GENERATE_BYTESWAP_H byteswap.h: byteswap.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/byteswap.in.h; \ - } > $@-t && \ - mv -f $@-t $@ + $(gl_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/byteswap.in.h + $(AM_V_at)mv $@-t $@ else byteswap.h: $(top_builddir)/config.status rm -f $@ @@ -233,10 +227,9 @@ EXTRA_DIST += cloexec.h ## begin gnulib module close - -EXTRA_DIST += close.c - -EXTRA_libgnu_a_SOURCES += close.c +if GL_COND_OBJ_CLOSE +libgnu_a_SOURCES += close.c +endif ## end gnulib module close @@ -282,10 +275,9 @@ EXTRA_DIST += dirname.h ## begin gnulib module dup2 - -EXTRA_DIST += dup2.c - -EXTRA_libgnu_a_SOURCES += dup2.c +if GL_COND_OBJ_DUP2 +libgnu_a_SOURCES += dup2.c +endif ## end gnulib module dup2 @@ -294,27 +286,24 @@ EXTRA_libgnu_a_SOURCES += dup2.c BUILT_SOURCES += malloc/dynarray.gl.h malloc/dynarray-skeleton.gl.h malloc/dynarray.gl.h: malloc/dynarray.h - $(AM_V_at)$(MKDIR_P) malloc - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e '/libc_hidden_proto/d' < $(srcdir)/malloc/dynarray.h; \ - } > $@-t && \ - mv $@-t $@ + $(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc' + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e '/libc_hidden_proto/d' \ + $(srcdir)/malloc/dynarray.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += malloc/dynarray.gl.h malloc/dynarray.gl.h-t malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c - $(AM_V_at)$(MKDIR_P) malloc - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|||g' \ + $(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc' + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|||g' \ -e 's|__attribute_maybe_unused__|_GL_ATTRIBUTE_MAYBE_UNUSED|g' \ -e 's|__attribute_nonnull__|_GL_ATTRIBUTE_NONNULL|g' \ -e 's|__attribute_warn_unused_result__|_GL_ATTRIBUTE_NODISCARD|g' \ -e 's|__glibc_likely|_GL_LIKELY|g' \ -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \ - < $(srcdir)/malloc/dynarray-skeleton.c; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/malloc/dynarray-skeleton.c > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += malloc/dynarray-skeleton.gl.h malloc/dynarray-skeleton.gl.h-t libgnu_a_SOURCES += malloc/dynarray_at_failure.c malloc/dynarray_emplace_enlarge.c malloc/dynarray_finalize.c malloc/dynarray_resize.c malloc/dynarray_resize_clear.c @@ -333,9 +322,8 @@ BUILT_SOURCES += $(ERRNO_H) # doesn't have one that is POSIX compliant. if GL_GENERATE_ERRNO_H errno.h: errno.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -346,9 +334,8 @@ errno.h: errno.in.h $(top_builddir)/config.status -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ - < $(srcdir)/errno.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/errno.in.h > $@-t + $(AM_V_at)mv $@-t $@ else errno.h: $(top_builddir)/config.status rm -f $@ @@ -361,10 +348,11 @@ EXTRA_DIST += errno.in.h ## begin gnulib module error +if GL_COND_OBJ_ERROR +libgnu_a_SOURCES += error.c +endif -EXTRA_DIST += error.c error.h - -EXTRA_libgnu_a_SOURCES += error.c +EXTRA_DIST += error.h ## end gnulib module error @@ -378,10 +366,9 @@ EXTRA_DIST += exitfail.h ## begin gnulib module fcntl - -EXTRA_DIST += fcntl.c - -EXTRA_libgnu_a_SOURCES += fcntl.c +if GL_COND_OBJ_FCNTL +libgnu_a_SOURCES += fcntl.c +endif ## end gnulib module fcntl @@ -392,9 +379,8 @@ BUILT_SOURCES += fcntl.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -415,9 +401,8 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/fcntl.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/fcntl.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += fcntl.h fcntl.h-t EXTRA_DIST += fcntl.in.h @@ -434,10 +419,11 @@ EXTRA_DIST += fd-hook.h ## begin gnulib module fflush +if GL_COND_OBJ_FFLUSH +libgnu_a_SOURCES += fflush.c +endif -EXTRA_DIST += fflush.c stdio-impl.h - -EXTRA_libgnu_a_SOURCES += fflush.c +EXTRA_DIST += stdio-impl.h ## end gnulib module fflush @@ -456,35 +442,41 @@ BUILT_SOURCES += $(FLOAT_H) # doesn't have one that works with the given compiler. if GL_GENERATE_FLOAT_H float.h: float.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \ -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \ - < $(srcdir)/float.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/float.in.h > $@-t + $(AM_V_at)mv $@-t $@ else float.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += float.h float.h-t -EXTRA_DIST += float.c float.in.h itold.c +if GL_COND_OBJ_FLOAT +libgnu_a_SOURCES += float.c +endif +if GL_COND_OBJ_ITOLD +libgnu_a_SOURCES += itold.c +endif -EXTRA_libgnu_a_SOURCES += float.c itold.c +EXTRA_DIST += float.in.h ## end gnulib module float ## begin gnulib module floorf +if GL_COND_OBJ_FLOORF +libgnu_a_SOURCES += floorf.c +endif -EXTRA_DIST += floor.c floorf.c +EXTRA_DIST += floor.c -EXTRA_libgnu_a_SOURCES += floor.c floorf.c +EXTRA_libgnu_a_SOURCES += floor.c ## end gnulib module floorf @@ -508,10 +500,11 @@ EXTRA_libgnu_a_SOURCES += fopen.c ## begin gnulib module fpurge +if GL_COND_OBJ_FPURGE +libgnu_a_SOURCES += fpurge.c +endif -EXTRA_DIST += fpurge.c stdio-impl.h - -EXTRA_libgnu_a_SOURCES += fpurge.c +EXTRA_DIST += stdio-impl.h ## end gnulib module fpurge @@ -525,118 +518,139 @@ EXTRA_DIST += freading.h stdio-impl.h ## begin gnulib module free-posix - -EXTRA_DIST += free.c - -EXTRA_libgnu_a_SOURCES += free.c +if GL_COND_OBJ_FREE +libgnu_a_SOURCES += free.c +endif ## end gnulib module free-posix ## begin gnulib module fseek - -EXTRA_DIST += fseek.c - -EXTRA_libgnu_a_SOURCES += fseek.c +if GL_COND_OBJ_FSEEK +libgnu_a_SOURCES += fseek.c +endif ## end gnulib module fseek ## begin gnulib module fseeko +if GL_COND_OBJ_FSEEKO +libgnu_a_SOURCES += fseeko.c +endif -EXTRA_DIST += fseeko.c stdio-impl.h - -EXTRA_libgnu_a_SOURCES += fseeko.c +EXTRA_DIST += stdio-impl.h ## end gnulib module fseeko ## begin gnulib module fstat +if GL_COND_OBJ_FSTAT +libgnu_a_SOURCES += fstat.c +endif -EXTRA_DIST += fstat.c stat-w32.c stat-w32.h +EXTRA_DIST += stat-w32.c stat-w32.h -EXTRA_libgnu_a_SOURCES += fstat.c stat-w32.c +EXTRA_libgnu_a_SOURCES += stat-w32.c ## end gnulib module fstat ## begin gnulib module fsusage +if GL_COND_OBJ_FSUSAGE +libgnu_a_SOURCES += fsusage.c +endif -EXTRA_DIST += fsusage.c fsusage.h - -EXTRA_libgnu_a_SOURCES += fsusage.c +EXTRA_DIST += fsusage.h ## end gnulib module fsusage ## begin gnulib module ftell - -EXTRA_DIST += ftell.c - -EXTRA_libgnu_a_SOURCES += ftell.c +if GL_COND_OBJ_FTELL +libgnu_a_SOURCES += ftell.c +endif ## end gnulib module ftell ## begin gnulib module ftello +if GL_COND_OBJ_FTELLO +libgnu_a_SOURCES += ftello.c +endif -EXTRA_DIST += ftello.c stdio-impl.h - -EXTRA_libgnu_a_SOURCES += ftello.c +EXTRA_DIST += stdio-impl.h ## end gnulib module ftello -## begin gnulib module getaddrinfo +## begin gnulib module gen-header +# In 'sed', replace the pattern space with a "DO NOT EDIT" comment. +SED_HEADER_NOEDIT = s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */, -EXTRA_DIST += gai_strerror.c getaddrinfo.c +# '$(SED_HEADER_STDOUT) -e "..."' runs 'sed' but first outputs "DO NOT EDIT". +SED_HEADER_STDOUT = sed -e 1h -e '1$(SED_HEADER_NOEDIT)' -e 1G -EXTRA_libgnu_a_SOURCES += gai_strerror.c getaddrinfo.c +# '$(SED_HEADER_TO_AT_t) FILE' copies FILE to $@-t, prepending a leading +# "DO_NOT_EDIT". Although this could be done more simply via: +# SED_HEADER_TO_AT_t = $(SED_HEADER_STDOUT) > $@-t +# the -n and 'w' avoid a fork+exec, at least when GNU Make is used. +SED_HEADER_TO_AT_t = $(SED_HEADER_STDOUT) -n -e 'w $@-t' -## end gnulib module getaddrinfo +# Use $(gl_V_at) instead of $(AM_V_GEN) or $(AM_V_at) on a line that +gl_V_at = $(AM_V_GEN) -## begin gnulib module getdelim +## end gnulib module gen-header +## begin gnulib module getaddrinfo -EXTRA_DIST += getdelim.c +if GL_COND_OBJ_GETADDRINFO +libgnu_a_SOURCES += getaddrinfo.c +endif +if GL_COND_OBJ_GAI_STRERROR +libgnu_a_SOURCES += gai_strerror.c +endif -EXTRA_libgnu_a_SOURCES += getdelim.c +## end gnulib module getaddrinfo -## end gnulib module getdelim +## begin gnulib module getdelim -## begin gnulib module getdtablesize +if GL_COND_OBJ_GETDELIM +libgnu_a_SOURCES += getdelim.c +endif +## end gnulib module getdelim -EXTRA_DIST += getdtablesize.c +## begin gnulib module getdtablesize -EXTRA_libgnu_a_SOURCES += getdtablesize.c +if GL_COND_OBJ_GETDTABLESIZE +libgnu_a_SOURCES += getdtablesize.c +endif ## end gnulib module getdtablesize ## begin gnulib module gethostname +if GL_COND_OBJ_GETHOSTNAME +libgnu_a_SOURCES += gethostname.c +endif -EXTRA_DIST += gethostname.c w32sock.h - -EXTRA_libgnu_a_SOURCES += gethostname.c +EXTRA_DIST += w32sock.h ## end gnulib module gethostname ## begin gnulib module getline - -EXTRA_DIST += getline.c - -EXTRA_libgnu_a_SOURCES += getline.c +if GL_COND_OBJ_GETLINE +libgnu_a_SOURCES += getline.c +endif ## end gnulib module getline ## begin gnulib module getloadavg - -EXTRA_DIST += getloadavg.c - -EXTRA_libgnu_a_SOURCES += getloadavg.c +if GL_COND_OBJ_GETLOADAVG +libgnu_a_SOURCES += getloadavg.c +endif ## end gnulib module getloadavg @@ -646,33 +660,41 @@ BUILT_SOURCES += $(GETOPT_H) $(GETOPT_CDEFS_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. +if GL_GENERATE_GETOPT_H getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - < $(srcdir)/getopt.in.h; \ - } > $@-t && \ - mv -f $@-t $@ + $(srcdir)/getopt.in.h > $@-t + $(AM_V_at)mv $@-t $@ +else +getopt.h: $(top_builddir)/config.status + rm -f $@ +endif +if GL_GENERATE_GETOPT_CDEFS_H getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \ - < $(srcdir)/getopt-cdefs.in.h; \ - } > $@-t && \ - mv -f $@-t $@ + $(AM_V_GEN)$(SED_HEADER_STDOUT) \ + -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \ + $(srcdir)/getopt-cdefs.in.h > $@-t + $(AM_V_at)mv $@-t $@ +else +getopt-cdefs.h: $(top_builddir)/config.status + rm -f $@ +endif MOSTLYCLEANFILES += getopt.h getopt.h-t getopt-cdefs.h getopt-cdefs.h-t -EXTRA_DIST += getopt-cdefs.in.h getopt-core.h getopt-ext.h getopt-pfx-core.h getopt-pfx-ext.h getopt.c getopt.in.h getopt1.c getopt_int.h +if GL_COND_OBJ_GETOPT +libgnu_a_SOURCES += getopt.c getopt1.c +endif -EXTRA_libgnu_a_SOURCES += getopt.c getopt1.c +EXTRA_DIST += getopt-cdefs.in.h getopt-core.h getopt-ext.h getopt-pfx-core.h getopt-pfx-ext.h getopt.in.h getopt_int.h ## end gnulib module getopt-posix @@ -744,17 +766,16 @@ libgnu_a_SOURCES += idx.h ## begin gnulib module inet_ntop - -EXTRA_DIST += inet_ntop.c - -EXTRA_libgnu_a_SOURCES += inet_ntop.c +if GL_COND_OBJ_INET_NTOP +libgnu_a_SOURCES += inet_ntop.c +endif ## end gnulib module inet_ntop ## begin gnulib module intprops -EXTRA_DIST += intprops.h +EXTRA_DIST += intprops-internal.h intprops.h ## end gnulib module intprops @@ -765,9 +786,8 @@ BUILT_SOURCES += inttypes.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -792,9 +812,8 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/inttypes.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/inttypes.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += inttypes.h inttypes.h-t EXTRA_DIST += inttypes.in.h @@ -808,9 +827,8 @@ BUILT_SOURCES += langinfo.h # We need the following in order to create an empty placeholder for # when the system doesn't have one. langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -826,9 +844,8 @@ langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/langinfo.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/langinfo.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += langinfo.h langinfo.h-t EXTRA_DIST += langinfo.in.h @@ -850,16 +867,14 @@ BUILT_SOURCES += $(LIMITS_H) # doesn't have one that is compatible with GNU. if GL_GENERATE_LIMITS_H limits.h: limits.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_LIMITS_H''@|$(NEXT_LIMITS_H)|g' \ - < $(srcdir)/limits.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/limits.in.h > $@-t + $(AM_V_at)mv $@-t $@ else limits.h: $(top_builddir)/config.status rm -f $@ @@ -885,9 +900,8 @@ BUILT_SOURCES += locale.h # We need the following in order to create when the system # doesn't have one that provides all definitions. locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -911,9 +925,8 @@ locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/locale.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/locale.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += locale.h locale.h-t EXTRA_DIST += locale.in.h @@ -922,10 +935,9 @@ EXTRA_DIST += locale.in.h ## begin gnulib module localeconv - -EXTRA_DIST += localeconv.c - -EXTRA_libgnu_a_SOURCES += localeconv.c +if GL_COND_OBJ_LOCALECONV +libgnu_a_SOURCES += localeconv.c +endif ## end gnulib module localeconv @@ -937,10 +949,9 @@ libgnu_a_SOURCES += glthread/lock.h glthread/lock.c ## begin gnulib module lseek - -EXTRA_DIST += lseek.c - -EXTRA_libgnu_a_SOURCES += lseek.c +if GL_COND_OBJ_LSEEK +libgnu_a_SOURCES += lseek.c +endif ## end gnulib module lseek @@ -978,9 +989,8 @@ libgnu_a_SOURCES += math.c # We need the following in order to create when the system # doesn't have one that works with the given compiler. math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -1267,9 +1277,9 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += math.h math.h-t EXTRA_DIST += math.in.h @@ -1278,37 +1288,41 @@ EXTRA_DIST += math.in.h ## begin gnulib module mbrtowc +if GL_COND_OBJ_MBRTOWC +libgnu_a_SOURCES += mbrtowc.c +endif -EXTRA_DIST += lc-charset-dispatch.c lc-charset-dispatch.h mbrtowc-impl-utf8.h mbrtowc-impl.h mbrtowc.c mbtowc-lock.c mbtowc-lock.h windows-initguard.h +EXTRA_DIST += lc-charset-dispatch.c lc-charset-dispatch.h mbrtowc-impl-utf8.h mbrtowc-impl.h mbtowc-lock.c mbtowc-lock.h windows-initguard.h -EXTRA_libgnu_a_SOURCES += lc-charset-dispatch.c mbrtowc.c mbtowc-lock.c +EXTRA_libgnu_a_SOURCES += lc-charset-dispatch.c mbtowc-lock.c ## end gnulib module mbrtowc ## begin gnulib module mbsinit - -EXTRA_DIST += mbsinit.c - -EXTRA_libgnu_a_SOURCES += mbsinit.c +if GL_COND_OBJ_MBSINIT +libgnu_a_SOURCES += mbsinit.c +endif ## end gnulib module mbsinit ## begin gnulib module mbtowc +if GL_COND_OBJ_MBTOWC +libgnu_a_SOURCES += mbtowc.c +endif -EXTRA_DIST += mbtowc-impl.h mbtowc.c - -EXTRA_libgnu_a_SOURCES += mbtowc.c +EXTRA_DIST += mbtowc-impl.h ## end gnulib module mbtowc ## begin gnulib module memchr +if GL_COND_OBJ_MEMCHR +libgnu_a_SOURCES += memchr.c +endif -EXTRA_DIST += memchr.c memchr.valgrind - -EXTRA_libgnu_a_SOURCES += memchr.c +EXTRA_DIST += memchr.valgrind ## end gnulib module memchr @@ -1338,28 +1352,31 @@ EXTRA_libgnu_a_SOURCES += mktime.c ## begin gnulib module mountlist +if GL_COND_OBJ_MOUNTLIST +libgnu_a_SOURCES += mountlist.c +endif -EXTRA_DIST += mountlist.c mountlist.h - -EXTRA_libgnu_a_SOURCES += mountlist.c +EXTRA_DIST += mountlist.h ## end gnulib module mountlist ## begin gnulib module msvc-inval +if GL_COND_OBJ_MSVC_INVAL +libgnu_a_SOURCES += msvc-inval.c +endif -EXTRA_DIST += msvc-inval.c msvc-inval.h - -EXTRA_libgnu_a_SOURCES += msvc-inval.c +EXTRA_DIST += msvc-inval.h ## end gnulib module msvc-inval ## begin gnulib module msvc-nothrow +if GL_COND_OBJ_MSVC_NOTHROW +libgnu_a_SOURCES += msvc-nothrow.c +endif -EXTRA_DIST += msvc-nothrow.c msvc-nothrow.h - -EXTRA_libgnu_a_SOURCES += msvc-nothrow.c +EXTRA_DIST += msvc-nothrow.h ## end gnulib module msvc-nothrow @@ -1370,9 +1387,8 @@ BUILT_SOURCES += netdb.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. netdb.h: netdb.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -1389,9 +1405,8 @@ netdb.h: netdb.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/netdb.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/netdb.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += netdb.h netdb.h-t EXTRA_DIST += netdb.in.h @@ -1406,18 +1421,16 @@ BUILT_SOURCES += $(NETINET_IN_H) # doesn't have one. if GL_GENERATE_NETINET_IN_H netinet/in.h: netinet_in.in.h $(top_builddir)/config.status - $(AM_V_at)$(MKDIR_P) netinet - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(AM_V_GEN)$(MKDIR_P) '%reldir%/netinet' + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_NETINET_IN_H''@|$(NEXT_NETINET_IN_H)|g' \ -e 's|@''HAVE_NETINET_IN_H''@|$(HAVE_NETINET_IN_H)|g' \ - < $(srcdir)/netinet_in.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/netinet_in.in.h > $@-t + $(AM_V_at)mv $@-t $@ else netinet/in.h: $(top_builddir)/config.status rm -f $@ @@ -1431,19 +1444,22 @@ EXTRA_DIST += netinet_in.in.h ## begin gnulib module nl_langinfo +if GL_COND_OBJ_NL_LANGINFO +libgnu_a_SOURCES += nl_langinfo.c +endif +if GL_COND_OBJ_NL_LANGINFO_LOCK +libgnu_a_SOURCES += nl_langinfo-lock.c +endif -EXTRA_DIST += nl_langinfo-lock.c nl_langinfo.c windows-initguard.h - -EXTRA_libgnu_a_SOURCES += nl_langinfo-lock.c nl_langinfo.c +EXTRA_DIST += windows-initguard.h ## end gnulib module nl_langinfo ## begin gnulib module open - -EXTRA_DIST += open.c - -EXTRA_libgnu_a_SOURCES += open.c +if GL_COND_OBJ_OPEN +libgnu_a_SOURCES += open.c +endif ## end gnulib module open @@ -1474,38 +1490,40 @@ EXTRA_libgnu_a_SOURCES += realloc.c ## begin gnulib module reallocarray - -EXTRA_DIST += reallocarray.c - -EXTRA_libgnu_a_SOURCES += reallocarray.c +if GL_COND_OBJ_REALLOCARRAY +libgnu_a_SOURCES += reallocarray.c +endif ## end gnulib module reallocarray ## begin gnulib module regex +if GL_COND_OBJ_REGEX +libgnu_a_SOURCES += regex.c +endif -EXTRA_DIST += regcomp.c regex.c regex.h regex_internal.c regex_internal.h regexec.c +EXTRA_DIST += regcomp.c regex.h regex_internal.c regex_internal.h regexec.c -EXTRA_libgnu_a_SOURCES += regcomp.c regex.c regex_internal.c regexec.c +EXTRA_libgnu_a_SOURCES += regcomp.c regex_internal.c regexec.c ## end gnulib module regex ## begin gnulib module setenv - -EXTRA_DIST += setenv.c - -EXTRA_libgnu_a_SOURCES += setenv.c +if GL_COND_OBJ_SETENV +libgnu_a_SOURCES += setenv.c +endif ## end gnulib module setenv ## begin gnulib module setlocale-null libgnu_a_SOURCES += setlocale_null.c +if GL_COND_OBJ_SETLOCALE_LOCK +libgnu_a_SOURCES += setlocale-lock.c +endif -EXTRA_DIST += setlocale-lock.c setlocale_null.h windows-initguard.h - -EXTRA_libgnu_a_SOURCES += setlocale-lock.c +EXTRA_DIST += setlocale_null.h windows-initguard.h ## end gnulib module setlocale-null @@ -1582,10 +1600,13 @@ EXTRA_DIST += w32sock.h ## begin gnulib module stat +if GL_COND_OBJ_STAT +libgnu_a_SOURCES += stat.c +endif -EXTRA_DIST += stat-w32.c stat-w32.h stat.c +EXTRA_DIST += stat-w32.c stat-w32.h -EXTRA_libgnu_a_SOURCES += stat-w32.c stat.c +EXTRA_libgnu_a_SOURCES += stat-w32.c ## end gnulib module stat @@ -1605,11 +1626,8 @@ BUILT_SOURCES += $(STDALIGN_H) # doesn't have one that works. if GL_GENERATE_STDALIGN_H stdalign.h: stdalign.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/stdalign.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(gl_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/stdalign.in.h + $(AM_V_at)mv $@-t $@ else stdalign.h: $(top_builddir)/config.status rm -f $@ @@ -1628,11 +1646,10 @@ BUILT_SOURCES += $(STDBOOL_H) # doesn't have one that works. if GL_GENERATE_STDBOOL_H stdbool.h: stdbool.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' \ + $(srcdir)/stdbool.in.h > $@-t + $(AM_V_at)mv $@-t $@ else stdbool.h: $(top_builddir)/config.status rm -f $@ @@ -1643,6 +1660,27 @@ EXTRA_DIST += stdbool.in.h ## end gnulib module stdbool +## begin gnulib module stdckdint + +BUILT_SOURCES += $(STDCKDINT_H) + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +if GL_GENERATE_STDCKDINT_H +stdckdint.h: stdckdint.in.h $(top_builddir)/config.status + $(gl_V_at)$(SED_HEADER_STDOUT) \ + $(srcdir)/stdckdint.in.h > $@-t + $(AM_V_at)mv $@-t $@ +else +stdckdint.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += stdckdint.h stdckdint.h-t + +EXTRA_DIST += intprops-internal.h stdckdint.in.h + +## end gnulib module stdckdint + ## begin gnulib module stddef BUILT_SOURCES += $(STDDEF_H) @@ -1651,9 +1689,8 @@ BUILT_SOURCES += $(STDDEF_H) # doesn't have one that works with the given compiler. if GL_GENERATE_STDDEF_H stddef.h: stddef.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -1661,9 +1698,8 @@ stddef.h: stddef.in.h $(top_builddir)/config.status -e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ - < $(srcdir)/stddef.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/stddef.in.h > $@-t + $(AM_V_at)mv $@-t $@ else stddef.h: $(top_builddir)/config.status rm -f $@ @@ -1682,9 +1718,8 @@ BUILT_SOURCES += $(STDINT_H) # doesn't have one that works with the given compiler. if GL_GENERATE_STDINT_H stdint.h: stdint.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -1711,9 +1746,8 @@ stdint.h: stdint.in.h $(top_builddir)/config.status -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ -e 's/@''GNULIBHEADERS_OVERRIDE_WINT_T''@/$(GNULIBHEADERS_OVERRIDE_WINT_T)/g' \ - < $(srcdir)/stdint.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/stdint.in.h > $@-t + $(AM_V_at)mv $@-t $@ else stdint.h: $(top_builddir)/config.status rm -f $@ @@ -1731,9 +1765,8 @@ BUILT_SOURCES += stdio.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -1745,6 +1778,7 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's/@''GNULIB_FGETC''@/$(GL_GNULIB_FGETC)/g' \ -e 's/@''GNULIB_FGETS''@/$(GL_GNULIB_FGETS)/g' \ -e 's/@''GNULIB_FOPEN''@/$(GL_GNULIB_FOPEN)/g' \ + -e 's/@''GNULIB_FOPEN_GNU''@/$(GL_GNULIB_FOPEN_GNU)/g' \ -e 's/@''GNULIB_FPRINTF''@/$(GL_GNULIB_FPRINTF)/g' \ -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GL_GNULIB_FPRINTF_POSIX)/g' \ -e 's/@''GNULIB_FPURGE''@/$(GL_GNULIB_FPURGE)/g' \ @@ -1820,6 +1854,7 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's|@''REPLACE_FDOPEN''@|$(REPLACE_FDOPEN)|g' \ -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ + -e 's|@''REPLACE_FOPEN_FOR_FOPEN_GNU''@|$(REPLACE_FOPEN_FOR_FOPEN_GNU)|g' \ -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ @@ -1850,11 +1885,18 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += stdio.h stdio.h-t +if GL_COND_OBJ_STDIO_READ +libgnu_a_SOURCES += stdio-read.c +endif +if GL_COND_OBJ_STDIO_WRITE +libgnu_a_SOURCES += stdio-write.c +endif + EXTRA_DIST += stdio.in.h ## end gnulib module stdio @@ -1867,9 +1909,8 @@ BUILT_SOURCES += stdlib.h # doesn't have one that works with the given compiler. stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -1877,12 +1918,14 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's/@''GNULIB__EXIT''@/$(GL_GNULIB__EXIT)/g' \ -e 's/@''GNULIB_ALIGNED_ALLOC''@/$(GL_GNULIB_ALIGNED_ALLOC)/g' \ -e 's/@''GNULIB_ATOLL''@/$(GL_GNULIB_ATOLL)/g' \ + -e 's/@''GNULIB_CALLOC_GNU''@/$(GL_GNULIB_CALLOC_GNU)/g' \ -e 's/@''GNULIB_CALLOC_POSIX''@/$(GL_GNULIB_CALLOC_POSIX)/g' \ -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GL_GNULIB_CANONICALIZE_FILE_NAME)/g' \ -e 's/@''GNULIB_FREE_POSIX''@/$(GL_GNULIB_FREE_POSIX)/g' \ -e 's/@''GNULIB_GETLOADAVG''@/$(GL_GNULIB_GETLOADAVG)/g' \ -e 's/@''GNULIB_GETSUBOPT''@/$(GL_GNULIB_GETSUBOPT)/g' \ -e 's/@''GNULIB_GRANTPT''@/$(GL_GNULIB_GRANTPT)/g' \ + -e 's/@''GNULIB_MALLOC_GNU''@/$(GL_GNULIB_MALLOC_GNU)/g' \ -e 's/@''GNULIB_MALLOC_POSIX''@/$(GL_GNULIB_MALLOC_POSIX)/g' \ -e 's/@''GNULIB_MBTOWC''@/$(GL_GNULIB_MBTOWC)/g' \ -e 's/@''GNULIB_MKDTEMP''@/$(GL_GNULIB_MKDTEMP)/g' \ @@ -1898,6 +1941,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's/@''GNULIB_QSORT_R''@/$(GL_GNULIB_QSORT_R)/g' \ -e 's/@''GNULIB_RANDOM''@/$(GL_GNULIB_RANDOM)/g' \ -e 's/@''GNULIB_RANDOM_R''@/$(GL_GNULIB_RANDOM_R)/g' \ + -e 's/@''GNULIB_REALLOC_GNU''@/$(GL_GNULIB_REALLOC_GNU)/g' \ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GL_GNULIB_REALLOC_POSIX)/g' \ -e 's/@''GNULIB_REALLOCARRAY''@/$(GL_GNULIB_REALLOCARRAY)/g' \ -e 's/@''GNULIB_REALPATH''@/$(GL_GNULIB_REALPATH)/g' \ @@ -1964,11 +2008,13 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ -e 's|@''REPLACE_ALIGNED_ALLOC''@|$(REPLACE_ALIGNED_ALLOC)|g' \ - -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ + -e 's|@''REPLACE_CALLOC_FOR_CALLOC_GNU''@|$(REPLACE_CALLOC_FOR_CALLOC_GNU)|g' \ + -e 's|@''REPLACE_CALLOC_FOR_CALLOC_POSIX''@|$(REPLACE_CALLOC_FOR_CALLOC_POSIX)|g' \ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \ -e 's|@''REPLACE_INITSTATE''@|$(REPLACE_INITSTATE)|g' \ - -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ + -e 's|@''REPLACE_MALLOC_FOR_MALLOC_GNU''@|$(REPLACE_MALLOC_FOR_MALLOC_GNU)|g' \ + -e 's|@''REPLACE_MALLOC_FOR_MALLOC_POSIX''@|$(REPLACE_MALLOC_FOR_MALLOC_POSIX)|g' \ -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ -e 's|@''REPLACE_POSIX_MEMALIGN''@|$(REPLACE_POSIX_MEMALIGN)|g' \ @@ -1978,7 +2024,8 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \ -e 's|@''REPLACE_RANDOM''@|$(REPLACE_RANDOM)|g' \ -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ - -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ + -e 's|@''REPLACE_REALLOC_FOR_REALLOC_GNU''@|$(REPLACE_REALLOC_FOR_REALLOC_GNU)|g' \ + -e 's|@''REPLACE_REALLOC_FOR_REALLOC_POSIX''@|$(REPLACE_REALLOC_FOR_REALLOC_POSIX)|g' \ -e 's|@''REPLACE_REALLOCARRAY''@|$(REPLACE_REALLOCARRAY)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ @@ -1994,9 +2041,9 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _Noreturn/r $(_NORETURN_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += stdlib.h stdlib.h-t EXTRA_DIST += stdlib.in.h @@ -2005,10 +2052,12 @@ EXTRA_DIST += stdlib.in.h ## begin gnulib module strcase - -EXTRA_DIST += strcasecmp.c strncasecmp.c - -EXTRA_libgnu_a_SOURCES += strcasecmp.c strncasecmp.c +if GL_COND_OBJ_STRCASECMP +libgnu_a_SOURCES += strcasecmp.c +endif +if GL_COND_OBJ_STRNCASECMP +libgnu_a_SOURCES += strncasecmp.c +endif ## end gnulib module strcase @@ -2039,19 +2088,19 @@ EXTRA_DIST += streq.h ## begin gnulib module strerror - -EXTRA_DIST += strerror.c - -EXTRA_libgnu_a_SOURCES += strerror.c +if GL_COND_OBJ_STRERROR +libgnu_a_SOURCES += strerror.c +endif ## end gnulib module strerror ## begin gnulib module strerror-override +if GL_COND_OBJ_STRERROR_OVERRIDE +libgnu_a_SOURCES += strerror-override.c +endif -EXTRA_DIST += strerror-override.c strerror-override.h - -EXTRA_libgnu_a_SOURCES += strerror-override.c +EXTRA_DIST += strerror-override.h ## end gnulib module strerror-override @@ -2062,9 +2111,8 @@ BUILT_SOURCES += string.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -2158,10 +2206,9 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - < $(srcdir)/string.in.h; \ - } > $@-t && \ - mv $@-t $@ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += string.h string.h-t EXTRA_DIST += string.in.h @@ -2175,9 +2222,8 @@ BUILT_SOURCES += strings.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. strings.h: strings.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_STRINGS_H''@|$(HAVE_STRINGS_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -2190,9 +2236,8 @@ strings.h: strings.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/strings.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/strings.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += strings.h strings.h-t EXTRA_DIST += strings.in.h @@ -2201,10 +2246,9 @@ EXTRA_DIST += strings.in.h ## begin gnulib module strsep - -EXTRA_DIST += strsep.c - -EXTRA_libgnu_a_SOURCES += strsep.c +if GL_COND_OBJ_STRSEP +libgnu_a_SOURCES += strsep.c +endif ## end gnulib module strsep @@ -2225,10 +2269,9 @@ libgnu_a_SOURCES += sys_socket.c # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/socket.h: sys_socket.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys' + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -2259,9 +2302,8 @@ sys/socket.h: sys_socket.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_socket.in.h; \ - } > $@-t && \ - mv -f $@-t $@ + $(srcdir)/sys_socket.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t MOSTLYCLEANDIRS += sys @@ -2276,16 +2318,16 @@ BUILT_SOURCES += sys/stat.h # We need the following in order to create when the system # has one that is incomplete. sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys' + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \ -e 's|@''WINDOWS_STAT_TIMESPEC''@|$(WINDOWS_STAT_TIMESPEC)|g' \ + -e 's/@''GNULIB_CHMOD''@/$(GL_GNULIB_CHMOD)/g' \ -e 's/@''GNULIB_FCHMODAT''@/$(GL_GNULIB_FCHMODAT)/g' \ -e 's/@''GNULIB_FSTAT''@/$(GL_GNULIB_FSTAT)/g' \ -e 's/@''GNULIB_FSTATAT''@/$(GL_GNULIB_FSTATAT)/g' \ @@ -2317,6 +2359,7 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \ -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \ -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \ + -e 's|@''REPLACE_CHMOD''@|$(REPLACE_CHMOD)|g' \ -e 's|@''REPLACE_FCHMODAT''@|$(REPLACE_FCHMODAT)|g' \ -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \ -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \ @@ -2332,9 +2375,8 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_stat.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/sys_stat.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t MOSTLYCLEANDIRS += sys @@ -2349,19 +2391,17 @@ BUILT_SOURCES += sys/types.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/types.h: sys_types.in.h $(top_builddir)/config.status - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys' + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \ -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ -e 's|@''WINDOWS_STAT_INODES''@|$(WINDOWS_STAT_INODES)|g' \ - < $(srcdir)/sys_types.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/sys_types.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sys/types.h sys/types.h-t EXTRA_DIST += sys_types.in.h @@ -2375,18 +2415,16 @@ BUILT_SOURCES += sys/uio.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/uio.h: sys_uio.in.h $(top_builddir)/config.status - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys' + $(AM_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_UIO_H''@|$(NEXT_SYS_UIO_H)|g' \ -e 's|@''HAVE_SYS_UIO_H''@|$(HAVE_SYS_UIO_H)|g' \ - < $(srcdir)/sys_uio.in.h; \ - } > $@-t && \ - mv -f $@-t $@ + $(srcdir)/sys_uio.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += sys/uio.h sys/uio.h-t MOSTLYCLEANDIRS += sys @@ -2407,9 +2445,8 @@ BUILT_SOURCES += time.h # We need the following in order to create when the system # doesn't have one that works with the given compiler. time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -2422,6 +2459,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's/@''GNULIB_STRPTIME''@/$(GL_GNULIB_STRPTIME)/g' \ -e 's/@''GNULIB_TIMEGM''@/$(GL_GNULIB_TIMEGM)/g' \ -e 's/@''GNULIB_TIMESPEC_GET''@/$(GL_GNULIB_TIMESPEC_GET)/g' \ + -e 's/@''GNULIB_TIMESPEC_GETRES''@/$(GL_GNULIB_TIMESPEC_GETRES)/g' \ -e 's/@''GNULIB_TIME_R''@/$(GL_GNULIB_TIME_R)/g' \ -e 's/@''GNULIB_TIME_RZ''@/$(GL_GNULIB_TIME_RZ)/g' \ -e 's/@''GNULIB_TZSET''@/$(GL_GNULIB_TZSET)/g' \ @@ -2431,6 +2469,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ -e 's|@''HAVE_TIMESPEC_GET''@|$(HAVE_TIMESPEC_GET)|g' \ + -e 's|@''HAVE_TIMESPEC_GETRES''@|$(HAVE_TIMESPEC_GETRES)|g' \ -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \ -e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|g' \ -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \ @@ -2449,9 +2488,8 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/time.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/time.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += time.h time.h-t EXTRA_DIST += time.in.h @@ -2460,19 +2498,19 @@ EXTRA_DIST += time.in.h ## begin gnulib module time_r - -EXTRA_DIST += time_r.c - -EXTRA_libgnu_a_SOURCES += time_r.c +if GL_COND_OBJ_TIME_R +libgnu_a_SOURCES += time_r.c +endif ## end gnulib module time_r ## begin gnulib module timegm +if GL_COND_OBJ_TIMEGM +libgnu_a_SOURCES += timegm.c +endif -EXTRA_DIST += mktime-internal.h timegm.c - -EXTRA_libgnu_a_SOURCES += timegm.c +EXTRA_DIST += mktime-internal.h ## end gnulib module timegm @@ -2484,9 +2522,8 @@ libgnu_a_SOURCES += unistd.c # We need the following in order to create an empty placeholder for # when the system doesn't have one. unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -2527,6 +2564,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's/@''GNULIB_GETOPT_POSIX''@/$(GL_GNULIB_GETOPT_POSIX)/g' \ -e 's/@''GNULIB_GETPAGESIZE''@/$(GL_GNULIB_GETPAGESIZE)/g' \ -e 's/@''GNULIB_GETPASS''@/$(GL_GNULIB_GETPASS)/g' \ + -e 's/@''GNULIB_GETPASS_GNU''@/$(GL_GNULIB_GETPASS_GNU)/g' \ -e 's/@''GNULIB_GETUSERSHELL''@/$(GL_GNULIB_GETUSERSHELL)/g' \ -e 's/@''GNULIB_GROUP_MEMBER''@/$(GL_GNULIB_GROUP_MEMBER)/g' \ -e 's/@''GNULIB_ISATTY''@/$(GL_GNULIB_ISATTY)/g' \ @@ -2628,6 +2666,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H sed -e 's|@''REPLACE_ACCESS''@|$(REPLACE_ACCESS)|g' \ -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ + -e 's|@''REPLACE_COPY_FILE_RANGE''@|$(REPLACE_COPY_FILE_RANGE)|g' \ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ -e 's|@''REPLACE_EXECL''@|$(REPLACE_EXECL)|g' \ @@ -2647,6 +2686,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ -e 's|@''REPLACE_GETPASS''@|$(REPLACE_GETPASS)|g' \ + -e 's|@''REPLACE_GETPASS_FOR_GETPASS_GNU''@|$(REPLACE_GETPASS_FOR_GETPASS_GNU)|g' \ -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ @@ -2672,9 +2712,9 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += unistd.h unistd.h-t EXTRA_DIST += unistd.in.h @@ -2690,10 +2730,9 @@ EXTRA_DIST += unlocked-io.h ## begin gnulib module unsetenv - -EXTRA_DIST += unsetenv.c - -EXTRA_libgnu_a_SOURCES += unsetenv.c +if GL_COND_OBJ_UNSETENV +libgnu_a_SOURCES += unsetenv.c +endif ## end gnulib module unsetenv @@ -2738,9 +2777,8 @@ BUILT_SOURCES += wchar.h # We need the following in order to create when the system # version does not work standalone. wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @@ -2855,9 +2893,9 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's|@''REPLACE_WCSTOK''@|$(REPLACE_WCSTOK)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += wchar.h wchar.h-t EXTRA_DIST += wchar.in.h @@ -2866,10 +2904,9 @@ EXTRA_DIST += wchar.in.h ## begin gnulib module wcrtomb - -EXTRA_DIST += wcrtomb.c - -EXTRA_libgnu_a_SOURCES += wcrtomb.c +if GL_COND_OBJ_WCRTOMB +libgnu_a_SOURCES += wcrtomb.c +endif ## end gnulib module wcrtomb @@ -2881,9 +2918,8 @@ libgnu_a_SOURCES += wctype-h.c # We need the following in order to create when the system # doesn't have one that works with the given compiler. wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @@ -2910,9 +2946,8 @@ wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/wctype.in.h; \ - } > $@-t && \ - mv $@-t $@ + $(srcdir)/wctype.in.h > $@-t + $(AM_V_at)mv $@-t $@ MOSTLYCLEANFILES += wctype.h wctype.h-t EXTRA_DIST += wctype.in.h @@ -2921,37 +2956,41 @@ EXTRA_DIST += wctype.in.h ## begin gnulib module windows-mutex +if GL_COND_OBJ_WINDOWS_MUTEX +libgnu_a_SOURCES += windows-mutex.c +endif -EXTRA_DIST += windows-initguard.h windows-mutex.c windows-mutex.h - -EXTRA_libgnu_a_SOURCES += windows-mutex.c +EXTRA_DIST += windows-initguard.h windows-mutex.h ## end gnulib module windows-mutex ## begin gnulib module windows-once +if GL_COND_OBJ_WINDOWS_ONCE +libgnu_a_SOURCES += windows-once.c +endif -EXTRA_DIST += windows-once.c windows-once.h - -EXTRA_libgnu_a_SOURCES += windows-once.c +EXTRA_DIST += windows-once.h ## end gnulib module windows-once ## begin gnulib module windows-recmutex +if GL_COND_OBJ_WINDOWS_RECMUTEX +libgnu_a_SOURCES += windows-recmutex.c +endif -EXTRA_DIST += windows-initguard.h windows-recmutex.c windows-recmutex.h - -EXTRA_libgnu_a_SOURCES += windows-recmutex.c +EXTRA_DIST += windows-initguard.h windows-recmutex.h ## end gnulib module windows-recmutex ## begin gnulib module windows-rwlock +if GL_COND_OBJ_WINDOWS_RWLOCK +libgnu_a_SOURCES += windows-rwlock.c +endif -EXTRA_DIST += windows-initguard.h windows-rwlock.c windows-rwlock.h - -EXTRA_libgnu_a_SOURCES += windows-rwlock.c +EXTRA_DIST += windows-initguard.h windows-rwlock.h ## end gnulib module windows-rwlock @@ -2992,3 +3031,7 @@ mostlyclean-local: mostlyclean-generic fi; \ done; \ : +distclean-local: distclean-gnulib-libobjs +distclean-gnulib-libobjs: + -rm -f @gl_LIBOBJDEPS@ +maintainer-clean-local: distclean-gnulib-libobjs diff --git a/gl/_Noreturn.h b/gl/_Noreturn.h index 6fed3c7..e914627 100644 --- a/gl/_Noreturn.h +++ b/gl/_Noreturn.h @@ -1,5 +1,5 @@ /* A C macro for declaring that a function does not return. - Copyright (C) 2011-2021 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published diff --git a/gl/af_alg.c b/gl/af_alg.c index 748af70..084bff6 100644 --- a/gl/af_alg.c +++ b/gl/af_alg.c @@ -1,5 +1,5 @@ /* af_alg.c - Compute message digests from file streams and buffers. - Copyright (C) 2018-2021 Free Software Foundation, Inc. + Copyright (C) 2018-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/af_alg.h b/gl/af_alg.h index f0fe7fc..ddd6568 100644 --- a/gl/af_alg.h +++ b/gl/af_alg.h @@ -1,5 +1,5 @@ /* af_alg.h - Compute message digests from file streams and buffers. - Copyright (C) 2018-2021 Free Software Foundation, Inc. + Copyright (C) 2018-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/alloca.in.h b/gl/alloca.in.h index 65c2d4d..e2b1461 100644 --- a/gl/alloca.in.h +++ b/gl/alloca.in.h @@ -1,6 +1,6 @@ /* Memory allocation on the stack. - Copyright (C) 1995, 1999, 2001-2004, 2006-2021 Free Software Foundation, + Copyright (C) 1995, 1999, 2001-2004, 2006-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify diff --git a/gl/arpa_inet.in.h b/gl/arpa_inet.in.h index 9968067..f5d7db2 100644 --- a/gl/arpa_inet.in.h +++ b/gl/arpa_inet.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 2005-2006, 2008-2021 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2008-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/asnprintf.c b/gl/asnprintf.c index c5367b2..0c5c76e 100644 --- a/gl/asnprintf.c +++ b/gl/asnprintf.c @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 1999, 2002, 2006, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 1999, 2002, 2006, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/asprintf.c b/gl/asprintf.c index 9c78c13..9c163f3 100644 --- a/gl/asprintf.c +++ b/gl/asprintf.c @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 1999, 2002, 2006-2007, 2009-2021 Free Software Foundation, + Copyright (C) 1999, 2002, 2006-2007, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify diff --git a/gl/attribute.h b/gl/attribute.h index eb36188..378d4f0 100644 --- a/gl/attribute.h +++ b/gl/attribute.h @@ -1,6 +1,6 @@ /* ATTRIBUTE_* macros for using attributes in GCC and similar compilers - Copyright 2020-2021 Free Software Foundation, Inc. + Copyright 2020-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/base64.c b/gl/base64.c index b204cb7..6b6e5b0 100644 --- a/gl/base64.c +++ b/gl/base64.c @@ -1,5 +1,5 @@ /* base64.c -- Encode binary data using printable characters. - Copyright (C) 1999-2001, 2004-2006, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 1999-2001, 2004-2006, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/base64.h b/gl/base64.h index e58ccfb..6b8b3dc 100644 --- a/gl/base64.h +++ b/gl/base64.h @@ -1,5 +1,5 @@ /* base64.h -- Encode binary data using printable characters. - Copyright (C) 2004-2006, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2004-2006, 2009-2022 Free Software Foundation, Inc. Written by Simon Josefsson. This file is free software: you can redistribute it and/or modify diff --git a/gl/basename-lgpl.c b/gl/basename-lgpl.c index 5dbd157..eb07e25 100644 --- a/gl/basename-lgpl.c +++ b/gl/basename-lgpl.c @@ -1,6 +1,6 @@ /* basename.c -- return the last element in a file name - Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2021 Free Software + Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify diff --git a/gl/basename-lgpl.h b/gl/basename-lgpl.h index d520c09..5569f21 100644 --- a/gl/basename-lgpl.h +++ b/gl/basename-lgpl.h @@ -1,6 +1,6 @@ /* Extract the last component (base name) of a file name. - Copyright (C) 1998, 2001, 2003-2006, 2009-2021 Free Software Foundation, + Copyright (C) 1998, 2001, 2003-2006, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify diff --git a/gl/basename.c b/gl/basename.c index 1181134..0e372ca 100644 --- a/gl/basename.c +++ b/gl/basename.c @@ -1,11 +1,11 @@ /* basename.c -- return the last element in a file name - Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2021 Free Software + Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, diff --git a/gl/btowc.c b/gl/btowc.c index b8239af..4af58bb 100644 --- a/gl/btowc.c +++ b/gl/btowc.c @@ -1,5 +1,5 @@ /* Convert unibyte character to wide character. - Copyright (C) 2008, 2010-2021 Free Software Foundation, Inc. + Copyright (C) 2008, 2010-2022 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This file is free software: you can redistribute it and/or modify diff --git a/gl/byteswap.in.h b/gl/byteswap.in.h index 113f878..f4746d3 100644 --- a/gl/byteswap.in.h +++ b/gl/byteswap.in.h @@ -1,5 +1,5 @@ /* byteswap.h - Byte swapping - Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2009-2022 Free Software Foundation, Inc. Written by Oskar Liljeblad , 2005. This file is free software: you can redistribute it and/or modify diff --git a/gl/calloc.c b/gl/calloc.c index 25064e9..0a934b3 100644 --- a/gl/calloc.c +++ b/gl/calloc.c @@ -1,6 +1,6 @@ /* calloc() function that is glibc compatible. This wrapper function is required at least on Tru64 UNIX 5.1 and mingw. - Copyright (C) 2004-2007, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2004-2007, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/cdefs.h b/gl/cdefs.h index ab57d4a..7b8ed5b 100644 --- a/gl/cdefs.h +++ b/gl/cdefs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2021 Free Software Foundation, Inc. +/* Copyright (C) 1992-2022 Free Software Foundation, Inc. Copyright The GNU Toolchain Authors. This file is part of the GNU C Library. @@ -41,7 +41,9 @@ Similarly for __has_builtin, etc. */ #if (defined __has_attribute \ && (!defined __clang_minor__ \ - || 3 < __clang_major__ + (5 <= __clang_minor__))) + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 3 < __clang_major__ + (5 <= __clang_minor__)))) # define __glibc_has_attribute(attr) __has_attribute (attr) #else # define __glibc_has_attribute(attr) 0 @@ -143,7 +145,8 @@ #define __bos0(ptr) __builtin_object_size (ptr, 0) /* Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. */ -#if __USE_FORTIFY_LEVEL == 3 && __glibc_clang_prereq (9, 0) +#if __USE_FORTIFY_LEVEL == 3 && (__glibc_clang_prereq (9, 0) \ + || __GNUC_PREREQ (12, 0)) # define __glibc_objsize0(__o) __builtin_dynamic_object_size (__o, 0) # define __glibc_objsize(__o) __builtin_dynamic_object_size (__o, 1) #else @@ -161,15 +164,15 @@ || (__builtin_constant_p (__l) && (__l) > 0)) /* Length is known to be safe at compile time if the __L * __S <= __OBJSZ - condition can be folded to a constant and if it is true. The -1 check is - redundant because since it implies that __glibc_safe_len_cond is true. */ + condition can be folded to a constant and if it is true, or unknown (-1) */ #define __glibc_safe_or_unknown_len(__l, __s, __osz) \ - (__glibc_unsigned_or_positive (__l) \ - && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \ - __s, __osz)) \ - && __glibc_safe_len_cond ((__SIZE_TYPE__) (__l), __s, __osz)) + ((__osz) == (__SIZE_TYPE__) -1 \ + || (__glibc_unsigned_or_positive (__l) \ + && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \ + (__s), (__osz))) \ + && __glibc_safe_len_cond ((__SIZE_TYPE__) (__l), (__s), (__osz)))) -/* Conversely, we know at compile time that the length is safe if the +/* Conversely, we know at compile time that the length is unsafe if the __L * __S <= __OBJSZ condition can be folded to a constant and if it is false. */ #define __glibc_unsafe_len(__l, __s, __osz) \ diff --git a/gl/cloexec.c b/gl/cloexec.c index 7defa93..812be01 100644 --- a/gl/cloexec.c +++ b/gl/cloexec.c @@ -1,6 +1,6 @@ /* cloexec.c - set or clear the close-on-exec descriptor flag - Copyright (C) 1991, 2004-2006, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 1991, 2004-2006, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/cloexec.h b/gl/cloexec.h index 97a3659..7a22d77 100644 --- a/gl/cloexec.h +++ b/gl/cloexec.h @@ -1,6 +1,6 @@ /* cloexec.c - set or clear the close-on-exec descriptor flag - Copyright (C) 2004, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2004, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/close.c b/gl/close.c index 5b9ab6c..44990ba 100644 --- a/gl/close.c +++ b/gl/close.c @@ -1,5 +1,5 @@ /* close replacement. - Copyright (C) 2008-2021 Free Software Foundation, Inc. + Copyright (C) 2008-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/dirname-lgpl.c b/gl/dirname-lgpl.c index 95f9c99..d54f6a9 100644 --- a/gl/dirname-lgpl.c +++ b/gl/dirname-lgpl.c @@ -1,6 +1,6 @@ /* dirname.c -- return all but the last element in a file name - Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2021 Free Software + Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify diff --git a/gl/dirname.c b/gl/dirname.c index d8b07d3..3d2aaf1 100644 --- a/gl/dirname.c +++ b/gl/dirname.c @@ -1,11 +1,11 @@ /* dirname.c -- return all but the last element in a file name - Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2021 Free Software + Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, diff --git a/gl/dirname.h b/gl/dirname.h index 25abc7b..e18a97e 100644 --- a/gl/dirname.h +++ b/gl/dirname.h @@ -1,6 +1,6 @@ /* Take file names apart into directory and base names. - Copyright (C) 1998, 2001, 2003-2006, 2009-2021 Free Software Foundation, + Copyright (C) 1998, 2001, 2003-2006, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify diff --git a/gl/dup2.c b/gl/dup2.c index 53e5552..1c766ab 100644 --- a/gl/dup2.c +++ b/gl/dup2.c @@ -1,6 +1,6 @@ /* Duplicate an open file descriptor to a specified file descriptor. - Copyright (C) 1999, 2004-2007, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 1999, 2004-2007, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/dynarray.h b/gl/dynarray.h index ec64273..ca6439d 100644 --- a/gl/dynarray.h +++ b/gl/dynarray.h @@ -1,5 +1,5 @@ /* Type-safe arrays which grow dynamically. - Copyright 2021 Free Software Foundation, Inc. + Copyright 2021-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/errno.in.h b/gl/errno.in.h index 3cad9e2..3ec1845 100644 --- a/gl/errno.in.h +++ b/gl/errno.in.h @@ -1,6 +1,6 @@ /* A POSIX-like . - Copyright (C) 2008-2021 Free Software Foundation, Inc. + Copyright (C) 2008-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/error.c b/gl/error.c index f89dcc5..272d45e 100644 --- a/gl/error.c +++ b/gl/error.c @@ -1,5 +1,5 @@ /* Error handler for noninteractive utilities - Copyright (C) 1990-1998, 2000-2007, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 1990-1998, 2000-2007, 2009-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. This file is free software: you can redistribute it and/or modify diff --git a/gl/error.h b/gl/error.h index 814715e..45ec2a5 100644 --- a/gl/error.h +++ b/gl/error.h @@ -1,5 +1,5 @@ /* Declaration for error-reporting function - Copyright (C) 1995-1997, 2003, 2006, 2008-2021 Free Software Foundation, + Copyright (C) 1995-1997, 2003, 2006, 2008-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/gl/exitfail.c b/gl/exitfail.c index ebc1f58..84fb0ef 100644 --- a/gl/exitfail.c +++ b/gl/exitfail.c @@ -1,6 +1,6 @@ /* Failure exit status - Copyright (C) 2002-2003, 2005-2007, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2005-2007, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/exitfail.h b/gl/exitfail.h index 4add9e0..865f096 100644 --- a/gl/exitfail.h +++ b/gl/exitfail.h @@ -1,6 +1,6 @@ /* Failure exit status - Copyright (C) 2002, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2002, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/fcntl.c b/gl/fcntl.c index c744eb9..f9753c4 100644 --- a/gl/fcntl.c +++ b/gl/fcntl.c @@ -1,6 +1,6 @@ /* Provide file descriptor control. - Copyright (C) 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/fcntl.in.h b/gl/fcntl.in.h index 26dedc3..9270ced 100644 --- a/gl/fcntl.in.h +++ b/gl/fcntl.in.h @@ -1,6 +1,6 @@ /* Like , but with non-working flags defined to 0. - Copyright (C) 2006-2021 Free Software Foundation, Inc. + Copyright (C) 2006-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -435,6 +435,10 @@ _GL_WARN_ON_USE (openat, "openat is not portable - " # define AT_EACCESS 4 #endif +/* Ignore this flag if not supported. */ +#ifndef AT_NO_AUTOMOUNT +# define AT_NO_AUTOMOUNT 0 +#endif #endif /* _@GUARD_PREFIX@_FCNTL_H */ #endif /* _@GUARD_PREFIX@_FCNTL_H */ diff --git a/gl/fd-hook.c b/gl/fd-hook.c index 75b1626..64a7a80 100644 --- a/gl/fd-hook.c +++ b/gl/fd-hook.c @@ -1,5 +1,5 @@ /* Hook for making file descriptor functions close(), ioctl() extensible. - Copyright (C) 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2009-2022 Free Software Foundation, Inc. Written by Bruno Haible , 2009. This file is free software: you can redistribute it and/or modify diff --git a/gl/fd-hook.h b/gl/fd-hook.h index 98e2a52..d6c4964 100644 --- a/gl/fd-hook.h +++ b/gl/fd-hook.h @@ -1,5 +1,5 @@ /* Hook for making file descriptor functions close(), ioctl() extensible. - Copyright (C) 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/fflush.c b/gl/fflush.c index 8fe9d26..69511cd 100644 --- a/gl/fflush.c +++ b/gl/fflush.c @@ -1,5 +1,5 @@ /* fflush.c -- allow flushing input streams - Copyright (C) 2007-2021 Free Software Foundation, Inc. + Copyright (C) 2007-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/filename.h b/gl/filename.h index dafe3df..ab77ca2 100644 --- a/gl/filename.h +++ b/gl/filename.h @@ -1,5 +1,5 @@ /* Basic filename support macros. - Copyright (C) 2001-2004, 2007-2021 Free Software Foundation, Inc. + Copyright (C) 2001-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/gl/float+.h b/gl/float+.h index ad891f6..9ab4520 100644 --- a/gl/float+.h +++ b/gl/float+.h @@ -1,5 +1,5 @@ /* Supplemental information about the floating-point formats. - Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc. Written by Bruno Haible , 2007. This file is free software: you can redistribute it and/or modify diff --git a/gl/float.c b/gl/float.c index dd1e84a..de85064 100644 --- a/gl/float.c +++ b/gl/float.c @@ -1,5 +1,5 @@ /* Auxiliary definitions for . - Copyright (C) 2011-2021 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This file is free software: you can redistribute it and/or modify diff --git a/gl/float.in.h b/gl/float.in.h index f52aba3..a418376 100644 --- a/gl/float.in.h +++ b/gl/float.in.h @@ -1,6 +1,6 @@ /* A correct . - Copyright (C) 2007-2021 Free Software Foundation, Inc. + Copyright (C) 2007-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/floor.c b/gl/floor.c index 1530300..3e4f8d0 100644 --- a/gl/floor.c +++ b/gl/floor.c @@ -1,9 +1,9 @@ /* Round towards negative infinity. - Copyright (C) 2007, 2010-2021 Free Software Foundation, Inc. + Copyright (C) 2007, 2010-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 3 of the + published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This file is distributed in the hope that it will be useful, diff --git a/gl/floorf.c b/gl/floorf.c index 587f73b..457ec75 100644 --- a/gl/floorf.c +++ b/gl/floorf.c @@ -1,9 +1,9 @@ /* Round towards negative infinity. - Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 3 of the + published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This file is distributed in the hope that it will be useful, diff --git a/gl/fopen.c b/gl/fopen.c index cebcdac..a5b3ae3 100644 --- a/gl/fopen.c +++ b/gl/fopen.c @@ -1,5 +1,5 @@ /* Open a stream to a file. - Copyright (C) 2007-2021 Free Software Foundation, Inc. + Copyright (C) 2007-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/fpurge.c b/gl/fpurge.c index 6b9c17a..21e3b86 100644 --- a/gl/fpurge.c +++ b/gl/fpurge.c @@ -1,5 +1,5 @@ /* Flushing buffers of a FILE stream. - Copyright (C) 2007-2021 Free Software Foundation, Inc. + Copyright (C) 2007-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/freading.c b/gl/freading.c index be4f561..93e96e0 100644 --- a/gl/freading.c +++ b/gl/freading.c @@ -1,5 +1,5 @@ /* Retrieve information about a FILE stream. - Copyright (C) 2007-2021 Free Software Foundation, Inc. + Copyright (C) 2007-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/freading.h b/gl/freading.h index 61cdbd2..74fed22 100644 --- a/gl/freading.h +++ b/gl/freading.h @@ -1,5 +1,5 @@ /* Retrieve information about a FILE stream. - Copyright (C) 2007-2021 Free Software Foundation, Inc. + Copyright (C) 2007-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/free.c b/gl/free.c index 780f03d..86ebe6c 100644 --- a/gl/free.c +++ b/gl/free.c @@ -1,6 +1,6 @@ /* Make free() preserve errno. - Copyright (C) 2003, 2006, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2003, 2006, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/fseek.c b/gl/fseek.c index d0df710..e9f9314 100644 --- a/gl/fseek.c +++ b/gl/fseek.c @@ -1,5 +1,5 @@ /* An fseek() function that, together with fflush(), is POSIX compliant. - Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/fseeko.c b/gl/fseeko.c index 3539a36..2ca2db8 100644 --- a/gl/fseeko.c +++ b/gl/fseeko.c @@ -1,5 +1,5 @@ /* An fseeko() function that, together with fflush(), is POSIX compliant. - Copyright (C) 2007-2021 Free Software Foundation, Inc. + Copyright (C) 2007-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/fstat.c b/gl/fstat.c index 512c688..3928c86 100644 --- a/gl/fstat.c +++ b/gl/fstat.c @@ -1,5 +1,5 @@ /* fstat() replacement. - Copyright (C) 2011-2021 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/fsusage.c b/gl/fsusage.c index 740cdc2..18f790f 100644 --- a/gl/fsusage.c +++ b/gl/fsusage.c @@ -1,11 +1,11 @@ /* fsusage.c -- return space usage of mounted file systems - Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2021 Free Software + Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 3 of the + published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This file is distributed in the hope that it will be useful, diff --git a/gl/fsusage.h b/gl/fsusage.h index b3f58d9..0443d19 100644 --- a/gl/fsusage.h +++ b/gl/fsusage.h @@ -1,11 +1,11 @@ /* fsusage.h -- declarations for file system space usage info - Copyright (C) 1991-1992, 1997, 2003-2006, 2009-2021 Free Software + Copyright (C) 1991-1992, 1997, 2003-2006, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 3 of the + published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This file is distributed in the hope that it will be useful, diff --git a/gl/ftell.c b/gl/ftell.c index a2479c6..3fbd9e9 100644 --- a/gl/ftell.c +++ b/gl/ftell.c @@ -1,5 +1,5 @@ /* An ftell() function that works around platform bugs. - Copyright (C) 2007-2021 Free Software Foundation, Inc. + Copyright (C) 2007-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/ftello.c b/gl/ftello.c index f701aa6..989614a 100644 --- a/gl/ftello.c +++ b/gl/ftello.c @@ -1,5 +1,5 @@ /* An ftello() function that works around platform bugs. - Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/gai_strerror.c b/gl/gai_strerror.c index 4874ef5..c7eedb2 100644 --- a/gl/gai_strerror.c +++ b/gl/gai_strerror.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 2001-2002, 2004-2006, 2008-2021 Free Software +/* Copyright (C) 1997, 2001-2002, 2004-2006, 2008-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell , 1997. diff --git a/gl/getaddrinfo.c b/gl/getaddrinfo.c index 0c42d1b..3922898 100644 --- a/gl/getaddrinfo.c +++ b/gl/getaddrinfo.c @@ -1,5 +1,5 @@ /* Get address information (partial implementation). - Copyright (C) 1997, 2001-2002, 2004-2021 Free Software Foundation, Inc. + Copyright (C) 1997, 2001-2002, 2004-2022 Free Software Foundation, Inc. Contributed by Simon Josefsson . This file is free software: you can redistribute it and/or modify diff --git a/gl/getdelim.c b/gl/getdelim.c index c690b10..9eb0483 100644 --- a/gl/getdelim.c +++ b/gl/getdelim.c @@ -1,5 +1,5 @@ /* getdelim.c --- Implementation of replacement getdelim function. - Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2021 Free Software + Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify diff --git a/gl/getdtablesize.c b/gl/getdtablesize.c index 5006c2d..793e0f8 100644 --- a/gl/getdtablesize.c +++ b/gl/getdtablesize.c @@ -1,5 +1,5 @@ /* getdtablesize() function: Return maximum possible file descriptor value + 1. - Copyright (C) 2008-2021 Free Software Foundation, Inc. + Copyright (C) 2008-2022 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This file is free software: you can redistribute it and/or modify diff --git a/gl/gethostname.c b/gl/gethostname.c index 028edc6..ce9bf41 100644 --- a/gl/gethostname.c +++ b/gl/gethostname.c @@ -1,6 +1,6 @@ /* gethostname emulation for SysV and POSIX.1. - Copyright (C) 1992, 2003, 2006, 2008-2021 Free Software Foundation, Inc. + Copyright (C) 1992, 2003, 2006, 2008-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/getline.c b/gl/getline.c index 47de1ba..34b9117 100644 --- a/gl/getline.c +++ b/gl/getline.c @@ -1,5 +1,5 @@ /* getline.c --- Implementation of replacement getline function. - Copyright (C) 2005-2007, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2005-2007, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/getloadavg.c b/gl/getloadavg.c index d42d0cd..37e8280 100644 --- a/gl/getloadavg.c +++ b/gl/getloadavg.c @@ -1,6 +1,6 @@ /* Get the system load averages. - Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2021 Free Software + Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2022 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with gnulib. @@ -8,7 +8,7 @@ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, diff --git a/gl/getopt-cdefs.in.h b/gl/getopt-cdefs.in.h index 33e3d4b..b6dd913 100644 --- a/gl/getopt-cdefs.in.h +++ b/gl/getopt-cdefs.in.h @@ -1,5 +1,5 @@ /* getopt-on-non-glibc compatibility macros. - Copyright (C) 1989-2021 Free Software Foundation, Inc. + Copyright (C) 1989-2022 Free Software Foundation, Inc. This file is part of gnulib. Unlike most of the getopt implementation, it is NOT shared with the GNU C Library. diff --git a/gl/getopt-core.h b/gl/getopt-core.h index ceb14d0..1c40ecc 100644 --- a/gl/getopt-core.h +++ b/gl/getopt-core.h @@ -1,5 +1,5 @@ /* Declarations for getopt (basic, portable features only). - Copyright (C) 1989-2021 Free Software Foundation, Inc. + Copyright (C) 1989-2022 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. diff --git a/gl/getopt-ext.h b/gl/getopt-ext.h index f82a8c6..d661fcc 100644 --- a/gl/getopt-ext.h +++ b/gl/getopt-ext.h @@ -1,5 +1,5 @@ /* Declarations for getopt (GNU extensions). - Copyright (C) 1989-2021 Free Software Foundation, Inc. + Copyright (C) 1989-2022 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. diff --git a/gl/getopt-pfx-core.h b/gl/getopt-pfx-core.h index b1733a3..3eead0e 100644 --- a/gl/getopt-pfx-core.h +++ b/gl/getopt-pfx-core.h @@ -1,5 +1,5 @@ /* getopt (basic, portable features) gnulib wrapper header. - Copyright (C) 1989-2021 Free Software Foundation, Inc. + Copyright (C) 1989-2022 Free Software Foundation, Inc. This file is part of gnulib. Unlike most of the getopt implementation, it is NOT shared with the GNU C Library. diff --git a/gl/getopt-pfx-ext.h b/gl/getopt-pfx-ext.h index b9a14ba..85a6cb5 100644 --- a/gl/getopt-pfx-ext.h +++ b/gl/getopt-pfx-ext.h @@ -1,5 +1,5 @@ /* getopt (GNU extensions) gnulib wrapper header. - Copyright (C) 1989-2021 Free Software Foundation, Inc. + Copyright (C) 1989-2022 Free Software Foundation, Inc. This file is part of gnulib. Unlike most of the getopt implementation, it is NOT shared with the GNU C Library. diff --git a/gl/getopt.c b/gl/getopt.c index 7f3aa5a..128dc7f 100644 --- a/gl/getopt.c +++ b/gl/getopt.c @@ -1,5 +1,5 @@ /* Getopt for GNU. - Copyright (C) 1987-2021 Free Software Foundation, Inc. + Copyright (C) 1987-2022 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. diff --git a/gl/getopt.in.h b/gl/getopt.in.h index bf884f0..9bc50ee 100644 --- a/gl/getopt.in.h +++ b/gl/getopt.in.h @@ -1,5 +1,5 @@ /* Declarations for getopt. - Copyright (C) 1989-2021 Free Software Foundation, Inc. + Copyright (C) 1989-2022 Free Software Foundation, Inc. This file is part of gnulib. Unlike most of the getopt implementation, it is NOT shared with the GNU C Library, which supplies a different version of diff --git a/gl/getopt1.c b/gl/getopt1.c index 5a92806..990eee1 100644 --- a/gl/getopt1.c +++ b/gl/getopt1.c @@ -1,5 +1,5 @@ /* getopt_long and getopt_long_only entry points for GNU getopt. - Copyright (C) 1987-2021 Free Software Foundation, Inc. + Copyright (C) 1987-2022 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. diff --git a/gl/getopt_int.h b/gl/getopt_int.h index 91254e4..ccdbb97 100644 --- a/gl/getopt_int.h +++ b/gl/getopt_int.h @@ -1,5 +1,5 @@ /* Internal declarations for getopt. - Copyright (C) 1989-2021 Free Software Foundation, Inc. + Copyright (C) 1989-2022 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. diff --git a/gl/getprogname.c b/gl/getprogname.c index 9a80281..62a4800 100644 --- a/gl/getprogname.c +++ b/gl/getprogname.c @@ -1,5 +1,5 @@ /* Program name management. - Copyright (C) 2016-2021 Free Software Foundation, Inc. + Copyright (C) 2016-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/gl/getprogname.h b/gl/getprogname.h index eb12dcd..9a35e58 100644 --- a/gl/getprogname.h +++ b/gl/getprogname.h @@ -1,5 +1,5 @@ /* Program name management. - Copyright (C) 2016-2021 Free Software Foundation, Inc. + Copyright (C) 2016-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/gl/gettext.h b/gl/gettext.h index f1c7a24..b3577a0 100644 --- a/gl/gettext.h +++ b/gl/gettext.h @@ -1,5 +1,5 @@ /* Convenience header for conditional use of GNU . - Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2021 Free Software + Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify @@ -138,7 +138,7 @@ #define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) -#ifdef __GNUC__ +#if defined __GNUC__ || defined __clang__ __inline #else #ifdef __cplusplus @@ -157,7 +157,7 @@ pgettext_aux (const char *domain, return translation; } -#ifdef __GNUC__ +#if defined __GNUC__ || defined __clang__ __inline #else #ifdef __cplusplus @@ -191,9 +191,8 @@ npgettext_aux (const char *domain, or may have security implications due to non-deterministic stack usage. */ #if (!defined GNULIB_NO_VLA \ - && (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ - /* || (__STDC_VERSION__ == 199901L && !defined __HP_cc) - || (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ )) + && defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__ \ + && !defined __STDC_NO_VLA__) # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1 #else # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0 @@ -208,7 +207,7 @@ npgettext_aux (const char *domain, #define dpgettext_expr(Domainname, Msgctxt, Msgid) \ dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) -#ifdef __GNUC__ +#if defined __GNUC__ || defined __clang__ __inline #else #ifdef __cplusplus @@ -255,7 +254,7 @@ dcpgettext_expr (const char *domain, #define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) -#ifdef __GNUC__ +#if defined __GNUC__ || defined __clang__ __inline #else #ifdef __cplusplus diff --git a/gl/gl_openssl.h b/gl/gl_openssl.h index ed98975..4c42ac8 100644 --- a/gl/gl_openssl.h +++ b/gl/gl_openssl.h @@ -1,6 +1,6 @@ /* Wrap openssl crypto hash routines in gnulib interface. -*- coding: utf-8 -*- - Copyright (C) 2013-2021 Free Software Foundation, Inc. + Copyright (C) 2013-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/glthread/lock.c b/gl/glthread/lock.c index 44335e3..b650c21 100644 --- a/gl/glthread/lock.c +++ b/gl/glthread/lock.c @@ -1,5 +1,5 @@ /* Locking in multithreaded situations. - Copyright (C) 2005-2021 Free Software Foundation, Inc. + Copyright (C) 2005-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/glthread/lock.h b/gl/glthread/lock.h index cc4c519..47eed8f 100644 --- a/gl/glthread/lock.h +++ b/gl/glthread/lock.h @@ -1,5 +1,5 @@ /* Locking in multithreaded situations. - Copyright (C) 2005-2021 Free Software Foundation, Inc. + Copyright (C) 2005-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/glthread/threadlib.c b/gl/glthread/threadlib.c index 793bc69..88a76ba 100644 --- a/gl/glthread/threadlib.c +++ b/gl/glthread/threadlib.c @@ -1,5 +1,5 @@ /* Multithreading primitives. - Copyright (C) 2005-2021 Free Software Foundation, Inc. + Copyright (C) 2005-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/hard-locale.c b/gl/hard-locale.c index 8b6802d..f7fbc47 100644 --- a/gl/hard-locale.c +++ b/gl/hard-locale.c @@ -1,6 +1,6 @@ /* hard-locale.c -- Determine whether a locale is hard. - Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2021 Free Software + Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify diff --git a/gl/hard-locale.h b/gl/hard-locale.h index eba6601..6066f4e 100644 --- a/gl/hard-locale.h +++ b/gl/hard-locale.h @@ -1,6 +1,6 @@ /* Determine whether a locale is hard. - Copyright (C) 1999, 2003-2004, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 1999, 2003-2004, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/ialloc.c b/gl/ialloc.c index 0137099..43c1043 100644 --- a/gl/ialloc.c +++ b/gl/ialloc.c @@ -1,6 +1,6 @@ /* malloc with idx_t rather than size_t - Copyright 2021 Free Software Foundation, Inc. + Copyright 2021-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/ialloc.h b/gl/ialloc.h index d4f54ce..37cf4bf 100644 --- a/gl/ialloc.h +++ b/gl/ialloc.h @@ -1,6 +1,6 @@ /* ialloc.h -- malloc with idx_t rather than size_t - Copyright 2021 Free Software Foundation, Inc. + Copyright 2021-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/idpriv-droptemp.c b/gl/idpriv-droptemp.c index 532413a..f327236 100644 --- a/gl/idpriv-droptemp.c +++ b/gl/idpriv-droptemp.c @@ -1,9 +1,9 @@ /* Dropping uid/gid privileges of the current process temporarily. - Copyright (C) 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2009-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, diff --git a/gl/idpriv.h b/gl/idpriv.h index 0f7e2f4..b97d192 100644 --- a/gl/idpriv.h +++ b/gl/idpriv.h @@ -1,9 +1,9 @@ /* Dropping uid/gid privileges of the current process. - Copyright (C) 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2009-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, diff --git a/gl/idx.h b/gl/idx.h index 54ad5d8..c3669dd 100644 --- a/gl/idx.h +++ b/gl/idx.h @@ -1,5 +1,5 @@ /* A type for indices and sizes. - Copyright (C) 2020-2021 Free Software Foundation, Inc. + Copyright (C) 2020-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/gl/inet_ntop.c b/gl/inet_ntop.c index 409e88c..2d401d2 100644 --- a/gl/inet_ntop.c +++ b/gl/inet_ntop.c @@ -1,6 +1,6 @@ /* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form - Copyright (C) 2005-2006, 2008-2021 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2008-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/intprops-internal.h b/gl/intprops-internal.h new file mode 100644 index 0000000..f6455f7 --- /dev/null +++ b/gl/intprops-internal.h @@ -0,0 +1,392 @@ +/* intprops-internal.h -- properties of integer types not visible to users + + Copyright (C) 2001-2022 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_INTPROPS_INTERNAL_H +#define _GL_INTPROPS_INTERNAL_H + +#include + +/* Return a value with the common real type of E and V and the value of V. + Do not evaluate E. */ +#define _GL_INT_CONVERT(e, v) ((1 ? 0 : (e)) + (v)) + +/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see + . */ +#define _GL_INT_NEGATE_CONVERT(e, v) ((1 ? 0 : (e)) - (v)) + +/* The extra casts in the following macros work around compiler bugs, + e.g., in Cray C 5.0.3.0. */ + +/* True if the real type T is signed. */ +#define _GL_TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) + +/* Return 1 if the real expression E, after promotion, has a + signed or floating type. Do not evaluate E. */ +#define _GL_EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) + + +/* Minimum and maximum values for integer types and expressions. */ + +/* The width in bits of the integer type or expression T. + Do not evaluate T. T must not be a bit-field expression. + Padding bits are not supported; this is checked at compile-time below. */ +#define _GL_TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) + +/* The maximum and minimum values for the type of the expression E, + after integer promotion. E is not evaluated. */ +#define _GL_INT_MINIMUM(e) \ + (_GL_EXPR_SIGNED (e) \ + ? ~ _GL_SIGNED_INT_MAXIMUM (e) \ + : _GL_INT_CONVERT (e, 0)) +#define _GL_INT_MAXIMUM(e) \ + (_GL_EXPR_SIGNED (e) \ + ? _GL_SIGNED_INT_MAXIMUM (e) \ + : _GL_INT_NEGATE_CONVERT (e, 1)) +#define _GL_SIGNED_INT_MAXIMUM(e) \ + (((_GL_INT_CONVERT (e, 1) << (_GL_TYPE_WIDTH (+ (e)) - 2)) - 1) * 2 + 1) + +/* Work around OpenVMS incompatibility with C99. */ +#if !defined LLONG_MAX && defined __INT64_MAX +# define LLONG_MAX __INT64_MAX +# define LLONG_MIN __INT64_MIN +#endif + +/* This include file assumes that signed types are two's complement without + padding bits; the above macros have undefined behavior otherwise. + If this is a problem for you, please let us know how to fix it for your host. + This assumption is tested by the intprops-tests module. */ + +/* Does the __typeof__ keyword work? This could be done by + 'configure', but for now it's easier to do it by hand. */ +#if (2 <= __GNUC__ \ + || (4 <= __clang_major__) \ + || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \ + || (0x5110 <= __SUNPRO_C && !__STDC__)) +# define _GL_HAVE___TYPEOF__ 1 +#else +# define _GL_HAVE___TYPEOF__ 0 +#endif + +/* Return 1 if the integer type or expression T might be signed. Return 0 + if it is definitely unsigned. T must not be a bit-field expression. + This macro does not evaluate its argument, and expands to an + integer constant expression. */ +#if _GL_HAVE___TYPEOF__ +# define _GL_SIGNED_TYPE_OR_EXPR(t) _GL_TYPE_SIGNED (__typeof__ (t)) +#else +# define _GL_SIGNED_TYPE_OR_EXPR(t) 1 +#endif + +/* Return 1 if - A would overflow in [MIN,MAX] arithmetic. + A should not have side effects, and A's type should be an + integer with minimum value MIN and maximum MAX. */ +#define _GL_INT_NEGATE_RANGE_OVERFLOW(a, min, max) \ + ((min) < 0 ? (a) < - (max) : 0 < (a)) + +/* True if __builtin_add_overflow (A, B, P) and __builtin_sub_overflow + (A, B, P) work when P is non-null. */ +#ifdef __EDG__ +/* EDG-based compilers like nvc 22.1 cannot add 64-bit signed to unsigned + . */ +# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0 +#elif defined __has_builtin +# define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow) +/* __builtin_{add,sub}_overflow exists but is not reliable in GCC 5.x and 6.x, + see . */ +#elif 7 <= __GNUC__ +# define _GL_HAS_BUILTIN_ADD_OVERFLOW 1 +#else +# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0 +#endif + +/* True if __builtin_mul_overflow (A, B, P) works when P is non-null. */ +#if defined __clang_major__ && __clang_major__ < 14 +/* Work around Clang bug . */ +# define _GL_HAS_BUILTIN_MUL_OVERFLOW 0 +#else +# define _GL_HAS_BUILTIN_MUL_OVERFLOW _GL_HAS_BUILTIN_ADD_OVERFLOW +#endif + +/* True if __builtin_add_overflow_p (A, B, C) works, and similarly for + __builtin_sub_overflow_p and __builtin_mul_overflow_p. */ +#ifdef __EDG__ +/* In EDG-based compilers like ICC 2021.3 and earlier, + __builtin_add_overflow_p etc. are not treated as integral constant + expressions even when all arguments are. */ +# define _GL_HAS_BUILTIN_OVERFLOW_P 0 +#elif defined __has_builtin +# define _GL_HAS_BUILTIN_OVERFLOW_P __has_builtin (__builtin_mul_overflow_p) +#else +# define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__) +#endif + +#if (!defined _GL_STDCKDINT_H && 202311 <= __STDC_VERSION__ \ + && ! (_GL_HAS_BUILTIN_ADD_OVERFLOW && _GL_HAS_BUILTIN_MUL_OVERFLOW)) +# include +#endif + +/* Store the low-order bits of A + B, A - B, A * B, respectively, into *R. + Return 1 if the result overflows. Arguments should not have side + effects and A, B and *R can be of any integer type other than char, + bool, a bit-precise integer type, or an enumeration type. */ +#if _GL_HAS_BUILTIN_ADD_OVERFLOW +# define _GL_INT_ADD_WRAPV(a, b, r) __builtin_add_overflow (a, b, r) +# define _GL_INT_SUBTRACT_WRAPV(a, b, r) __builtin_sub_overflow (a, b, r) +#elif defined ckd_add && defined ckd_sub && !defined _GL_STDCKDINT_H +# define _GL_INT_ADD_WRAPV(a, b, r) ckd_add (r, + (a), + (b)) +# define _GL_INT_SUBTRACT_WRAPV(a, b, r) ckd_sub (r, + (a), + (b)) +#else +# define _GL_INT_ADD_WRAPV(a, b, r) \ + _GL_INT_OP_WRAPV (a, b, r, +, _GL_INT_ADD_RANGE_OVERFLOW) +# define _GL_INT_SUBTRACT_WRAPV(a, b, r) \ + _GL_INT_OP_WRAPV (a, b, r, -, _GL_INT_SUBTRACT_RANGE_OVERFLOW) +#endif +#if _GL_HAS_BUILTIN_MUL_OVERFLOW +# if ((9 < __GNUC__ + (3 <= __GNUC_MINOR__) \ + || (__GNUC__ == 8 && 4 <= __GNUC_MINOR__)) \ + && !defined __EDG__) +# define _GL_INT_MULTIPLY_WRAPV(a, b, r) __builtin_mul_overflow (a, b, r) +# else + /* Work around GCC bug 91450. */ +# define _GL_INT_MULTIPLY_WRAPV(a, b, r) \ + ((!_GL_SIGNED_TYPE_OR_EXPR (*(r)) && _GL_EXPR_SIGNED (a) && _GL_EXPR_SIGNED (b) \ + && _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, 0, (__typeof__ (*(r))) -1)) \ + ? ((void) __builtin_mul_overflow (a, b, r), 1) \ + : __builtin_mul_overflow (a, b, r)) +# endif +#elif defined ckd_mul && !defined _GL_STDCKDINT_H +# define _GL_INT_MULTIPLY_WRAPV(a, b, r) ckd_mul (r, + (a), + (b)) +#else +# define _GL_INT_MULTIPLY_WRAPV(a, b, r) \ + _GL_INT_OP_WRAPV (a, b, r, *, _GL_INT_MULTIPLY_RANGE_OVERFLOW) +#endif + +/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See: + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193 + https://llvm.org/bugs/show_bug.cgi?id=25390 + For now, assume all versions of GCC-like compilers generate bogus + warnings for _Generic. This matters only for compilers that + lack relevant builtins. */ +#if __GNUC__ || defined __clang__ +# define _GL__GENERIC_BOGUS 1 +#else +# define _GL__GENERIC_BOGUS 0 +#endif + +/* Store the low-order bits of A B into *R, where OP specifies + the operation and OVERFLOW the overflow predicate. Return 1 if the + result overflows. Arguments should not have side effects, + and A, B and *R can be of any integer type other than char, bool, a + bit-precise integer type, or an enumeration type. */ +#if 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS +# define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \ + (_Generic \ + (*(r), \ + signed char: \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ + signed char, SCHAR_MIN, SCHAR_MAX), \ + unsigned char: \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ + unsigned char, 0, UCHAR_MAX), \ + short int: \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ + short int, SHRT_MIN, SHRT_MAX), \ + unsigned short int: \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ + unsigned short int, 0, USHRT_MAX), \ + int: \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ + int, INT_MIN, INT_MAX), \ + unsigned int: \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ + unsigned int, 0, UINT_MAX), \ + long int: \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ + long int, LONG_MIN, LONG_MAX), \ + unsigned long int: \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ + unsigned long int, 0, ULONG_MAX), \ + long long int: \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ + long long int, LLONG_MIN, LLONG_MAX), \ + unsigned long long int: \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ + unsigned long long int, 0, ULLONG_MAX))) +#else +/* Store the low-order bits of A B into *R, where OP specifies + the operation and OVERFLOW the overflow predicate. If *R is + signed, its type is ST with bounds SMIN..SMAX; otherwise its type + is UT with bounds U..UMAX. ST and UT are narrower than int. + Return 1 if the result overflows. Arguments should not have side + effects, and A, B and *R can be of any integer type other than + char, bool, a bit-precise integer type, or an enumeration type. */ +# if _GL_HAVE___TYPEOF__ +# define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \ + (_GL_TYPE_SIGNED (__typeof__ (*(r))) \ + ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, st, smin, smax) \ + : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, ut, 0, umax)) +# else +# define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \ + (overflow (a, b, smin, smax) \ + ? (overflow (a, b, 0, umax) \ + ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 1) \ + : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) < 0) \ + : (overflow (a, b, 0, umax) \ + ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) >= 0 \ + : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 0))) +# endif + +# define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \ + (sizeof *(r) == sizeof (signed char) \ + ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \ + signed char, SCHAR_MIN, SCHAR_MAX, \ + unsigned char, UCHAR_MAX) \ + : sizeof *(r) == sizeof (short int) \ + ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \ + short int, SHRT_MIN, SHRT_MAX, \ + unsigned short int, USHRT_MAX) \ + : sizeof *(r) == sizeof (int) \ + ? (_GL_EXPR_SIGNED (*(r)) \ + ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ + int, INT_MIN, INT_MAX) \ + : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ + unsigned int, 0, UINT_MAX)) \ + : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow)) +# ifdef LLONG_MAX +# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ + (sizeof *(r) == sizeof (long int) \ + ? (_GL_EXPR_SIGNED (*(r)) \ + ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ + long int, LONG_MIN, LONG_MAX) \ + : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ + unsigned long int, 0, ULONG_MAX)) \ + : (_GL_EXPR_SIGNED (*(r)) \ + ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ + long long int, LLONG_MIN, LLONG_MAX) \ + : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ + unsigned long long int, 0, ULLONG_MAX))) +# else +# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ + (_GL_EXPR_SIGNED (*(r)) \ + ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ + long int, LONG_MIN, LONG_MAX) \ + : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ + unsigned long int, 0, ULONG_MAX)) +# endif +#endif + +/* Store the low-order bits of A B into *R, where the operation + is given by OP. Use the unsigned type UT for calculation to avoid + overflow problems. *R's type is T, with extrema TMIN and TMAX. + T can be any signed integer type other than char, bool, a + bit-precise integer type, or an enumeration type. + Return 1 if the result overflows. */ +#define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \ + (overflow (a, b, tmin, tmax) \ + ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \ + : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0)) + +/* Return 1 if the integer expressions A - B and -A would overflow, + respectively. Arguments should not have side effects, + and can be any signed integer type other than char, bool, a + bit-precise integer type, or an enumeration type. + These macros are tuned for their last input argument being a constant. */ + +#if _GL_HAS_BUILTIN_OVERFLOW_P +# define _GL_INT_NEGATE_OVERFLOW(a) \ + __builtin_sub_overflow_p (0, a, (__typeof__ (- (a))) 0) +#else +# define _GL_INT_NEGATE_OVERFLOW(a) \ + _GL_INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a)) +#endif + +/* Return the low-order bits of A B, where the operation is given + by OP. Use the unsigned type UT for calculation to avoid undefined + behavior on signed integer overflow, and convert the result to type T. + UT is at least as wide as T and is no narrower than unsigned int, + T is two's complement, and there is no padding or trap representations. + Assume that converting UT to T yields the low-order bits, as is + done in all known two's-complement C compilers. E.g., see: + https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html + + According to the C standard, converting UT to T yields an + implementation-defined result or signal for values outside T's + range. However, code that works around this theoretical problem + runs afoul of a compiler bug in Oracle Studio 12.3 x86. See: + https://lists.gnu.org/r/bug-gnulib/2017-04/msg00049.html + As the compiler bug is real, don't try to work around the + theoretical problem. */ + +#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \ + ((t) ((ut) (a) op (ut) (b))) + +/* Return true if the numeric values A + B, A - B, A * B fall outside + the range TMIN..TMAX. Arguments should not have side effects + and can be any integer type other than char, bool, + a bit-precise integer type, or an enumeration type. + TMIN should be signed and nonpositive. + TMAX should be positive, and should be signed unless TMIN is zero. */ +#define _GL_INT_ADD_RANGE_OVERFLOW(a, b, tmin, tmax) \ + ((b) < 0 \ + ? (((tmin) \ + ? ((_GL_EXPR_SIGNED (_GL_INT_CONVERT (a, (tmin) - (b))) || (b) < (tmin)) \ + && (a) < (tmin) - (b)) \ + : (a) <= -1 - (b)) \ + || ((_GL_EXPR_SIGNED (a) ? 0 <= (a) : (tmax) < (a)) && (tmax) < (a) + (b))) \ + : (a) < 0 \ + ? (((tmin) \ + ? ((_GL_EXPR_SIGNED (_GL_INT_CONVERT (b, (tmin) - (a))) || (a) < (tmin)) \ + && (b) < (tmin) - (a)) \ + : (b) <= -1 - (a)) \ + || ((_GL_EXPR_SIGNED (_GL_INT_CONVERT (a, b)) || (tmax) < (b)) \ + && (tmax) < (a) + (b))) \ + : (tmax) < (b) || (tmax) - (b) < (a)) +#define _GL_INT_SUBTRACT_RANGE_OVERFLOW(a, b, tmin, tmax) \ + (((a) < 0) == ((b) < 0) \ + ? ((a) < (b) \ + ? !(tmin) || -1 - (tmin) < (b) - (a) - 1 \ + : (tmax) < (a) - (b)) \ + : (a) < 0 \ + ? ((!_GL_EXPR_SIGNED (_GL_INT_CONVERT ((a) - (tmin), b)) && (a) - (tmin) < 0) \ + || (a) - (tmin) < (b)) \ + : ((! (_GL_EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \ + && _GL_EXPR_SIGNED (_GL_INT_CONVERT ((tmax) + (b), a))) \ + && (tmax) <= -1 - (b)) \ + || (tmax) + (b) < (a))) +#define _GL_INT_MULTIPLY_RANGE_OVERFLOW(a, b, tmin, tmax) \ + ((b) < 0 \ + ? ((a) < 0 \ + ? (_GL_EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \ + ? (a) < (tmax) / (b) \ + : ((_GL_INT_NEGATE_OVERFLOW (b) \ + ? _GL_INT_CONVERT (b, tmax) >> (_GL_TYPE_WIDTH (+ (b)) - 1) \ + : (tmax) / -(b)) \ + <= -1 - (a))) \ + : _GL_INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (b, tmin)) && (b) == -1 \ + ? (_GL_EXPR_SIGNED (a) \ + ? 0 < (a) + (tmin) \ + : 0 < (a) && -1 - (tmin) < (a) - 1) \ + : (tmin) / (b) < (a)) \ + : (b) == 0 \ + ? 0 \ + : ((a) < 0 \ + ? (_GL_INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (a, tmin)) && (a) == -1 \ + ? (_GL_EXPR_SIGNED (b) ? 0 < (b) + (tmin) : -1 - (tmin) < (b) - 1) \ + : (tmin) / (a) < (b)) \ + : (tmax) / (b) < (a))) + +#endif /* _GL_INTPROPS_INTERNAL_H */ diff --git a/gl/intprops.h b/gl/intprops.h index 3fe64e8..f182ddc 100644 --- a/gl/intprops.h +++ b/gl/intprops.h @@ -1,6 +1,6 @@ /* intprops.h -- properties of integer types - Copyright (C) 2001-2021 Free Software Foundation, Inc. + Copyright (C) 2001-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published @@ -15,19 +15,10 @@ You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ - #ifndef _GL_INTPROPS_H #define _GL_INTPROPS_H -#include - -/* Return a value with the common real type of E and V and the value of V. - Do not evaluate E. */ -#define _GL_INT_CONVERT(e, v) ((1 ? 0 : (e)) + (v)) - -/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see - . */ -#define _GL_INT_NEGATE_CONVERT(e, v) ((1 ? 0 : (e)) - (v)) +#include "intprops-internal.h" /* The extra casts in the following macros work around compiler bugs, e.g., in Cray C 5.0.3.0. */ @@ -37,11 +28,11 @@ #define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) /* True if the real type T is signed. */ -#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) +#define TYPE_SIGNED(t) _GL_TYPE_SIGNED (t) /* Return 1 if the real expression E, after promotion, has a signed or floating type. Do not evaluate E. */ -#define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) +#define EXPR_SIGNED(e) _GL_EXPR_SIGNED (e) /* Minimum and maximum values for integer types and expressions. */ @@ -49,7 +40,7 @@ /* The width in bits of the integer type or expression T. Do not evaluate T. T must not be a bit-field expression. Padding bits are not supported; this is checked at compile-time below. */ -#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) +#define TYPE_WIDTH(t) _GL_TYPE_WIDTH (t) /* The maximum and minimum values for the integer type T. */ #define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t)) @@ -58,51 +49,6 @@ ? (t) -1 \ : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1))) -/* The maximum and minimum values for the type of the expression E, - after integer promotion. E is not evaluated. */ -#define _GL_INT_MINIMUM(e) \ - (EXPR_SIGNED (e) \ - ? ~ _GL_SIGNED_INT_MAXIMUM (e) \ - : _GL_INT_CONVERT (e, 0)) -#define _GL_INT_MAXIMUM(e) \ - (EXPR_SIGNED (e) \ - ? _GL_SIGNED_INT_MAXIMUM (e) \ - : _GL_INT_NEGATE_CONVERT (e, 1)) -#define _GL_SIGNED_INT_MAXIMUM(e) \ - (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH (+ (e)) - 2)) - 1) * 2 + 1) - -/* Work around OpenVMS incompatibility with C99. */ -#if !defined LLONG_MAX && defined __INT64_MAX -# define LLONG_MAX __INT64_MAX -# define LLONG_MIN __INT64_MIN -#endif - -/* This include file assumes that signed types are two's complement without - padding bits; the above macros have undefined behavior otherwise. - If this is a problem for you, please let us know how to fix it for your host. - This assumption is tested by the intprops-tests module. */ - -/* Does the __typeof__ keyword work? This could be done by - 'configure', but for now it's easier to do it by hand. */ -#if (2 <= __GNUC__ \ - || (4 <= __clang_major__) \ - || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \ - || (0x5110 <= __SUNPRO_C && !__STDC__)) -# define _GL_HAVE___TYPEOF__ 1 -#else -# define _GL_HAVE___TYPEOF__ 0 -#endif - -/* Return 1 if the integer type or expression T might be signed. Return 0 - if it is definitely unsigned. T must not be a bit-field expression. - This macro does not evaluate its argument, and expands to an - integer constant expression. */ -#if _GL_HAVE___TYPEOF__ -# define _GL_SIGNED_TYPE_OR_EXPR(t) TYPE_SIGNED (__typeof__ (t)) -#else -# define _GL_SIGNED_TYPE_OR_EXPR(t) 1 -#endif - /* Bound on length of the string representing an unsigned integer value representable in B bits. log10 (2.0) < 146/485. The smallest value of B where this bound is not tight is 2621. */ @@ -129,12 +75,11 @@ /* Range overflow checks. The INT__RANGE_OVERFLOW macros return 1 if the corresponding C - operators might not yield numerically correct answers due to - arithmetic overflow. They do not rely on undefined or - implementation-defined behavior. Their implementations are simple - and straightforward, but they are harder to use and may be less - efficient than the INT__WRAPV, INT__OK, and - INT__OVERFLOW macros described below. + operators overflow arithmetically when given the same arguments. + These macros do not rely on undefined or implementation-defined behavior. + Although their implementations are simple and straightforward, + they are harder to use and may be less efficient than the + INT__WRAPV, INT__OK, and INT__OVERFLOW macros described below. Example usage: @@ -181,9 +126,7 @@ /* Return 1 if - A would overflow in [MIN,MAX] arithmetic. See above for restrictions. */ #define INT_NEGATE_RANGE_OVERFLOW(a, min, max) \ - ((min) < 0 \ - ? (a) < - (max) \ - : 0 < (a)) + _GL_INT_NEGATE_RANGE_OVERFLOW (a, min, max) /* Return 1 if A * B would overflow in [MIN,MAX] arithmetic. See above for restrictions. Avoid && and || as they tickle @@ -227,40 +170,6 @@ ? (a) < (min) >> (b) \ : (max) >> (b) < (a)) -/* True if __builtin_add_overflow (A, B, P) and __builtin_sub_overflow - (A, B, P) work when P is non-null. */ -/* __builtin_{add,sub}_overflow exists but is not reliable in GCC 5.x and 6.x, - see . */ -#if 7 <= __GNUC__ && !defined __ICC -# define _GL_HAS_BUILTIN_ADD_OVERFLOW 1 -#elif defined __has_builtin -# define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow) -#else -# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0 -#endif - -/* True if __builtin_mul_overflow (A, B, P) works when P is non-null. */ -#ifdef __clang__ -/* Work around Clang bug . */ -# define _GL_HAS_BUILTIN_MUL_OVERFLOW 0 -#else -# define _GL_HAS_BUILTIN_MUL_OVERFLOW _GL_HAS_BUILTIN_ADD_OVERFLOW -#endif - -/* True if __builtin_add_overflow_p (A, B, C) works, and similarly for - __builtin_sub_overflow_p and __builtin_mul_overflow_p. */ -#if defined __clang__ || defined __ICC -/* Clang 11 lacks __builtin_mul_overflow_p, and even if it did it - would presumably run afoul of Clang bug 16404. ICC 2021.1's - __builtin_add_overflow_p etc. are not treated as integral constant - expressions even when all arguments are. */ -# define _GL_HAS_BUILTIN_OVERFLOW_P 0 -#elif defined __has_builtin -# define _GL_HAS_BUILTIN_OVERFLOW_P __has_builtin (__builtin_mul_overflow_p) -#else -# define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__) -#endif - /* The _GL*_OVERFLOW macros have the same restrictions as the *_RANGE_OVERFLOW macros, except that they do not assume that operands (e.g., A and B) have the same type as MIN and MAX. Instead, they assume @@ -347,13 +256,18 @@ Because the WRAPV macros convert the result, they report overflow in different circumstances than the OVERFLOW macros do. For example, in the typical case with 16-bit 'short' and 32-bit 'int', - if A, B and R are all of type 'short' then INT_ADD_OVERFLOW (A, B) + if A, B and *R are all of type 'short' then INT_ADD_OVERFLOW (A, B) returns false because the addition cannot overflow after A and B - are converted to 'int', whereas INT_ADD_WRAPV (A, B, &R) returns + are converted to 'int', whereas INT_ADD_WRAPV (A, B, R) returns true or false depending on whether the sum fits into 'short'. These macros are tuned for their last input argument being a constant. + A, B, and *R should be integers; they need not be the same type, + and they need not be all signed or all unsigned. + However, none of the integer types should be bit-precise, + and *R's type should not be char, bool, or an enumeration type. + Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B, A % B, and A << B would overflow, respectively. */ @@ -361,12 +275,7 @@ _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW) #define INT_SUBTRACT_OVERFLOW(a, b) \ _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW) -#if _GL_HAS_BUILTIN_OVERFLOW_P -# define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a) -#else -# define INT_NEGATE_OVERFLOW(a) \ - INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a)) -#endif +#define INT_NEGATE_OVERFLOW(a) _GL_INT_NEGATE_OVERFLOW (a) #define INT_MULTIPLY_OVERFLOW(a, b) \ _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW) #define INT_DIVIDE_OVERFLOW(a, b) \ @@ -388,224 +297,9 @@ /* Store the low-order bits of A + B, A - B, A * B, respectively, into *R. Return 1 if the result overflows. See above for restrictions. */ -#if _GL_HAS_BUILTIN_ADD_OVERFLOW -# define INT_ADD_WRAPV(a, b, r) __builtin_add_overflow (a, b, r) -# define INT_SUBTRACT_WRAPV(a, b, r) __builtin_sub_overflow (a, b, r) -#else -# define INT_ADD_WRAPV(a, b, r) \ - _GL_INT_OP_WRAPV (a, b, r, +, _GL_INT_ADD_RANGE_OVERFLOW) -# define INT_SUBTRACT_WRAPV(a, b, r) \ - _GL_INT_OP_WRAPV (a, b, r, -, _GL_INT_SUBTRACT_RANGE_OVERFLOW) -#endif -#if _GL_HAS_BUILTIN_MUL_OVERFLOW -# if ((9 < __GNUC__ + (3 <= __GNUC_MINOR__) \ - || (__GNUC__ == 8 && 4 <= __GNUC_MINOR__)) \ - && !defined __ICC) -# define INT_MULTIPLY_WRAPV(a, b, r) __builtin_mul_overflow (a, b, r) -# else - /* Work around GCC bug 91450. */ -# define INT_MULTIPLY_WRAPV(a, b, r) \ - ((!_GL_SIGNED_TYPE_OR_EXPR (*(r)) && EXPR_SIGNED (a) && EXPR_SIGNED (b) \ - && _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, 0, (__typeof__ (*(r))) -1)) \ - ? ((void) __builtin_mul_overflow (a, b, r), 1) \ - : __builtin_mul_overflow (a, b, r)) -# endif -#else -# define INT_MULTIPLY_WRAPV(a, b, r) \ - _GL_INT_OP_WRAPV (a, b, r, *, _GL_INT_MULTIPLY_RANGE_OVERFLOW) -#endif - -/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See: - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193 - https://llvm.org/bugs/show_bug.cgi?id=25390 - For now, assume all versions of GCC-like compilers generate bogus - warnings for _Generic. This matters only for compilers that - lack relevant builtins. */ -#if __GNUC__ || defined __clang__ -# define _GL__GENERIC_BOGUS 1 -#else -# define _GL__GENERIC_BOGUS 0 -#endif - -/* Store the low-order bits of A B into *R, where OP specifies - the operation and OVERFLOW the overflow predicate. Return 1 if the - result overflows. See above for restrictions. */ -#if 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS -# define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \ - (_Generic \ - (*(r), \ - signed char: \ - _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ - signed char, SCHAR_MIN, SCHAR_MAX), \ - unsigned char: \ - _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ - unsigned char, 0, UCHAR_MAX), \ - short int: \ - _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ - short int, SHRT_MIN, SHRT_MAX), \ - unsigned short int: \ - _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ - unsigned short int, 0, USHRT_MAX), \ - int: \ - _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ - int, INT_MIN, INT_MAX), \ - unsigned int: \ - _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ - unsigned int, 0, UINT_MAX), \ - long int: \ - _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ - long int, LONG_MIN, LONG_MAX), \ - unsigned long int: \ - _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ - unsigned long int, 0, ULONG_MAX), \ - long long int: \ - _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ - long long int, LLONG_MIN, LLONG_MAX), \ - unsigned long long int: \ - _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ - unsigned long long int, 0, ULLONG_MAX))) -#else -/* Store the low-order bits of A B into *R, where OP specifies - the operation and OVERFLOW the overflow predicate. If *R is - signed, its type is ST with bounds SMIN..SMAX; otherwise its type - is UT with bounds U..UMAX. ST and UT are narrower than int. - Return 1 if the result overflows. See above for restrictions. */ -# if _GL_HAVE___TYPEOF__ -# define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \ - (TYPE_SIGNED (__typeof__ (*(r))) \ - ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, st, smin, smax) \ - : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, ut, 0, umax)) -# else -# define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \ - (overflow (a, b, smin, smax) \ - ? (overflow (a, b, 0, umax) \ - ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 1) \ - : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) < 0) \ - : (overflow (a, b, 0, umax) \ - ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) >= 0 \ - : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 0))) -# endif - -# define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \ - (sizeof *(r) == sizeof (signed char) \ - ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \ - signed char, SCHAR_MIN, SCHAR_MAX, \ - unsigned char, UCHAR_MAX) \ - : sizeof *(r) == sizeof (short int) \ - ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \ - short int, SHRT_MIN, SHRT_MAX, \ - unsigned short int, USHRT_MAX) \ - : sizeof *(r) == sizeof (int) \ - ? (EXPR_SIGNED (*(r)) \ - ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ - int, INT_MIN, INT_MAX) \ - : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ - unsigned int, 0, UINT_MAX)) \ - : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow)) -# ifdef LLONG_MAX -# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ - (sizeof *(r) == sizeof (long int) \ - ? (EXPR_SIGNED (*(r)) \ - ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ - long int, LONG_MIN, LONG_MAX) \ - : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ - unsigned long int, 0, ULONG_MAX)) \ - : (EXPR_SIGNED (*(r)) \ - ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ - long long int, LLONG_MIN, LLONG_MAX) \ - : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ - unsigned long long int, 0, ULLONG_MAX))) -# else -# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ - (EXPR_SIGNED (*(r)) \ - ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ - long int, LONG_MIN, LONG_MAX) \ - : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ - unsigned long int, 0, ULONG_MAX)) -# endif -#endif - -/* Store the low-order bits of A B into *R, where the operation - is given by OP. Use the unsigned type UT for calculation to avoid - overflow problems. *R's type is T, with extrema TMIN and TMAX. - T must be a signed integer type. Return 1 if the result overflows. */ -#define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \ - (overflow (a, b, tmin, tmax) \ - ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \ - : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0)) - -/* Return the low-order bits of A B, where the operation is given - by OP. Use the unsigned type UT for calculation to avoid undefined - behavior on signed integer overflow, and convert the result to type T. - UT is at least as wide as T and is no narrower than unsigned int, - T is two's complement, and there is no padding or trap representations. - Assume that converting UT to T yields the low-order bits, as is - done in all known two's-complement C compilers. E.g., see: - https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html - - According to the C standard, converting UT to T yields an - implementation-defined result or signal for values outside T's - range. However, code that works around this theoretical problem - runs afoul of a compiler bug in Oracle Studio 12.3 x86. See: - https://lists.gnu.org/r/bug-gnulib/2017-04/msg00049.html - As the compiler bug is real, don't try to work around the - theoretical problem. */ - -#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \ - ((t) ((ut) (a) op (ut) (b))) - -/* Return true if the numeric values A + B, A - B, A * B fall outside - the range TMIN..TMAX. Arguments should be integer expressions - without side effects. TMIN should be signed and nonpositive. - TMAX should be positive, and should be signed unless TMIN is zero. */ -#define _GL_INT_ADD_RANGE_OVERFLOW(a, b, tmin, tmax) \ - ((b) < 0 \ - ? (((tmin) \ - ? ((EXPR_SIGNED (_GL_INT_CONVERT (a, (tmin) - (b))) || (b) < (tmin)) \ - && (a) < (tmin) - (b)) \ - : (a) <= -1 - (b)) \ - || ((EXPR_SIGNED (a) ? 0 <= (a) : (tmax) < (a)) && (tmax) < (a) + (b))) \ - : (a) < 0 \ - ? (((tmin) \ - ? ((EXPR_SIGNED (_GL_INT_CONVERT (b, (tmin) - (a))) || (a) < (tmin)) \ - && (b) < (tmin) - (a)) \ - : (b) <= -1 - (a)) \ - || ((EXPR_SIGNED (_GL_INT_CONVERT (a, b)) || (tmax) < (b)) \ - && (tmax) < (a) + (b))) \ - : (tmax) < (b) || (tmax) - (b) < (a)) -#define _GL_INT_SUBTRACT_RANGE_OVERFLOW(a, b, tmin, tmax) \ - (((a) < 0) == ((b) < 0) \ - ? ((a) < (b) \ - ? !(tmin) || -1 - (tmin) < (b) - (a) - 1 \ - : (tmax) < (a) - (b)) \ - : (a) < 0 \ - ? ((!EXPR_SIGNED (_GL_INT_CONVERT ((a) - (tmin), b)) && (a) - (tmin) < 0) \ - || (a) - (tmin) < (b)) \ - : ((! (EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \ - && EXPR_SIGNED (_GL_INT_CONVERT ((tmax) + (b), a))) \ - && (tmax) <= -1 - (b)) \ - || (tmax) + (b) < (a))) -#define _GL_INT_MULTIPLY_RANGE_OVERFLOW(a, b, tmin, tmax) \ - ((b) < 0 \ - ? ((a) < 0 \ - ? (EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \ - ? (a) < (tmax) / (b) \ - : ((INT_NEGATE_OVERFLOW (b) \ - ? _GL_INT_CONVERT (b, tmax) >> (TYPE_WIDTH (+ (b)) - 1) \ - : (tmax) / -(b)) \ - <= -1 - (a))) \ - : INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (b, tmin)) && (b) == -1 \ - ? (EXPR_SIGNED (a) \ - ? 0 < (a) + (tmin) \ - : 0 < (a) && -1 - (tmin) < (a) - 1) \ - : (tmin) / (b) < (a)) \ - : (b) == 0 \ - ? 0 \ - : ((a) < 0 \ - ? (INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (a, tmin)) && (a) == -1 \ - ? (EXPR_SIGNED (b) ? 0 < (b) + (tmin) : -1 - (tmin) < (b) - 1) \ - : (tmin) / (a) < (b)) \ - : (tmax) / (b) < (a))) +#define INT_ADD_WRAPV(a, b, r) _GL_INT_ADD_WRAPV (a, b, r) +#define INT_SUBTRACT_WRAPV(a, b, r) _GL_INT_SUBTRACT_WRAPV (a, b, r) +#define INT_MULTIPLY_WRAPV(a, b, r) _GL_INT_MULTIPLY_WRAPV (a, b, r) /* The following macros compute A + B, A - B, and A * B, respectively. If no overflow occurs, they set *R to the result and return 1; @@ -621,6 +315,8 @@ A, B, and *R should be integers; they need not be the same type, and they need not be all signed or all unsigned. + However, none of the integer types should be bit-precise, + and *R's type should not be char, bool, or an enumeration type. These macros work correctly on all known practical hosts, and do not rely on undefined behavior due to signed arithmetic overflow. @@ -632,8 +328,8 @@ These macros are tuned for B being a constant. */ -#define INT_ADD_OK(a, b, r) ! INT_ADD_WRAPV (a, b, r) -#define INT_SUBTRACT_OK(a, b, r) ! INT_SUBTRACT_WRAPV (a, b, r) -#define INT_MULTIPLY_OK(a, b, r) ! INT_MULTIPLY_WRAPV (a, b, r) +#define INT_ADD_OK(a, b, r) (! INT_ADD_WRAPV (a, b, r)) +#define INT_SUBTRACT_OK(a, b, r) (! INT_SUBTRACT_WRAPV (a, b, r)) +#define INT_MULTIPLY_OK(a, b, r) (! INT_MULTIPLY_WRAPV (a, b, r)) #endif /* _GL_INTPROPS_H */ diff --git a/gl/inttypes.in.h b/gl/inttypes.in.h index 41cb422..853eca0 100644 --- a/gl/inttypes.in.h +++ b/gl/inttypes.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006-2021 Free Software Foundation, Inc. +/* Copyright (C) 2006-2022 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Derek Price. This file is part of gnulib. diff --git a/gl/itold.c b/gl/itold.c index 7984866..fe4a384 100644 --- a/gl/itold.c +++ b/gl/itold.c @@ -1,5 +1,5 @@ /* Replacement for 'int' to 'long double' conversion routine. - Copyright (C) 2011-2021 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This file is free software: you can redistribute it and/or modify diff --git a/gl/langinfo.in.h b/gl/langinfo.in.h index 4873899..98aea6a 100644 --- a/gl/langinfo.in.h +++ b/gl/langinfo.in.h @@ -1,5 +1,5 @@ /* Substitute for and wrapper around . - Copyright (C) 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/lc-charset-dispatch.c b/gl/lc-charset-dispatch.c index 88a0bd3..66d78fd 100644 --- a/gl/lc-charset-dispatch.c +++ b/gl/lc-charset-dispatch.c @@ -1,5 +1,5 @@ /* Dispatching based on the current locale's character encoding. - Copyright (C) 2018-2021 Free Software Foundation, Inc. + Copyright (C) 2018-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/lc-charset-dispatch.h b/gl/lc-charset-dispatch.h index 59b485d..3867c32 100644 --- a/gl/lc-charset-dispatch.h +++ b/gl/lc-charset-dispatch.h @@ -1,5 +1,5 @@ /* Dispatching based on the current locale's character encoding. - Copyright (C) 2018-2021 Free Software Foundation, Inc. + Copyright (C) 2018-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/libc-config.h b/gl/libc-config.h index 886c11f..a56665b 100644 --- a/gl/libc-config.h +++ b/gl/libc-config.h @@ -1,6 +1,6 @@ /* System definitions for code taken from the GNU C Library - Copyright 2017-2021 Free Software Foundation, Inc. + Copyright 2017-2022 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -121,6 +121,7 @@ # undef __attr_dealloc # undef __attr_dealloc_free # undef __attribute__ +# undef __attribute_alloc_align__ # undef __attribute_alloc_size__ # undef __attribute_artificial__ # undef __attribute_const__ @@ -129,6 +130,7 @@ # undef __attribute_format_arg__ # undef __attribute_format_strfmon__ # undef __attribute_malloc__ +# undef __attribute_maybe_unused__ # undef __attribute_noinline__ # undef __attribute_nonstring__ # undef __attribute_pure__ @@ -142,16 +144,24 @@ # undef __extern_always_inline # undef __extern_inline # undef __flexarr +# undef __fortified_attr_access # undef __fortify_function # undef __glibc_c99_flexarr_available +# undef __glibc_fortify +# undef __glibc_fortify_n # undef __glibc_has_attribute # undef __glibc_has_builtin # undef __glibc_has_extension +# undef __glibc_likely # undef __glibc_macro_warning # undef __glibc_macro_warning1 # undef __glibc_objsize # undef __glibc_objsize0 +# undef __glibc_safe_len_cond +# undef __glibc_safe_or_unknown_len # undef __glibc_unlikely +# undef __glibc_unsafe_len +# undef __glibc_unsigned_or_positive # undef __inline # undef __ptr_t # undef __restrict @@ -159,6 +169,7 @@ # undef __va_arg_pack # undef __va_arg_pack_len # undef __warnattr +# undef __wur /* Include our copy of glibc . */ # include diff --git a/gl/limits.in.h b/gl/limits.in.h index 2ecafeb..b77bf75 100644 --- a/gl/limits.in.h +++ b/gl/limits.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright 2016-2021 Free Software Foundation, Inc. + Copyright 2016-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/localcharset.c b/gl/localcharset.c index 3c50858..17a4a1e 100644 --- a/gl/localcharset.c +++ b/gl/localcharset.c @@ -1,6 +1,6 @@ /* Determine a canonical name for the current locale's character encoding. - Copyright (C) 2000-2006, 2008-2021 Free Software Foundation, Inc. + Copyright (C) 2000-2006, 2008-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/localcharset.h b/gl/localcharset.h index 0ff4954..62efbf3 100644 --- a/gl/localcharset.h +++ b/gl/localcharset.h @@ -1,5 +1,5 @@ /* Determine a canonical name for the current locale's character encoding. - Copyright (C) 2000-2003, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2000-2003, 2009-2022 Free Software Foundation, Inc. This file is part of the GNU CHARSET Library. This file is free software: you can redistribute it and/or modify diff --git a/gl/locale.in.h b/gl/locale.in.h index 1063070..4aef74d 100644 --- a/gl/locale.in.h +++ b/gl/locale.in.h @@ -1,5 +1,5 @@ /* A POSIX . - Copyright (C) 2007-2021 Free Software Foundation, Inc. + Copyright (C) 2007-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/localeconv.c b/gl/localeconv.c index 25e95a1..ef26120 100644 --- a/gl/localeconv.c +++ b/gl/localeconv.c @@ -1,5 +1,5 @@ /* Query locale dependent information for formatting numbers. - Copyright (C) 2012-2021 Free Software Foundation, Inc. + Copyright (C) 2012-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/lseek.c b/gl/lseek.c index e9a96ad..1a9c49b 100644 --- a/gl/lseek.c +++ b/gl/lseek.c @@ -1,5 +1,5 @@ /* An lseek() function that detects pipes. - Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/m4/00gnulib.m4 b/gl/m4/00gnulib.m4 index 9ba1743..dea34e8 100644 --- a/gl/m4/00gnulib.m4 +++ b/gl/m4/00gnulib.m4 @@ -1,5 +1,5 @@ # 00gnulib.m4 serial 8 -dnl Copyright (C) 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/__inline.m4 b/gl/m4/__inline.m4 index b28cc6a..fbe2098 100644 --- a/gl/m4/__inline.m4 +++ b/gl/m4/__inline.m4 @@ -1,5 +1,5 @@ # Test for __inline keyword -dnl Copyright 2017-2021 Free Software Foundation, Inc. +dnl Copyright 2017-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/absolute-header.m4 b/gl/m4/absolute-header.m4 index 52d80d0..67d6507 100644 --- a/gl/m4/absolute-header.m4 +++ b/gl/m4/absolute-header.m4 @@ -1,5 +1,5 @@ # absolute-header.m4 serial 17 -dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/af_alg.m4 b/gl/m4/af_alg.m4 index 601cf67..9c7edf0 100644 --- a/gl/m4/af_alg.m4 +++ b/gl/m4/af_alg.m4 @@ -1,5 +1,5 @@ # af_alg.m4 serial 6 -dnl Copyright 2018-2021 Free Software Foundation, Inc. +dnl Copyright 2018-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/alloca.m4 b/gl/m4/alloca.m4 index ba2f679..dc6f47e 100644 --- a/gl/m4/alloca.m4 +++ b/gl/m4/alloca.m4 @@ -1,5 +1,5 @@ -# alloca.m4 serial 20 -dnl Copyright (C) 2002-2004, 2006-2007, 2009-2021 Free Software Foundation, +# alloca.m4 serial 21 +dnl Copyright (C) 2002-2004, 2006-2007, 2009-2022 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -26,17 +26,15 @@ AC_DEFUN([gl_FUNC_ALLOCA], AC_DEFINE([HAVE_ALLOCA], [1], [Define to 1 if you have 'alloca' after including , a header that may be supplied by this distribution.]) - ALLOCA_H=alloca.h + GL_GENERATE_ALLOCA_H=true else dnl alloca exists as a library function, i.e. it is slow and probably dnl a memory leak. Don't define HAVE_ALLOCA in this case. - ALLOCA_H= + GL_GENERATE_ALLOCA_H=false fi else - ALLOCA_H=alloca.h + GL_GENERATE_ALLOCA_H=true fi - AC_SUBST([ALLOCA_H]) - AM_CONDITIONAL([GL_GENERATE_ALLOCA_H], [test -n "$ALLOCA_H"]) if test $ac_cv_working_alloca_h = yes; then HAVE_ALLOCA_H=1 diff --git a/gl/m4/arpa_inet_h.m4 b/gl/m4/arpa_inet_h.m4 index a3ba256..057e13f 100644 --- a/gl/m4/arpa_inet_h.m4 +++ b/gl/m4/arpa_inet_h.m4 @@ -1,5 +1,5 @@ # arpa_inet_h.m4 serial 17 -dnl Copyright (C) 2006, 2008-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2006, 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/base64.m4 b/gl/m4/base64.m4 index ab95081..fed3398 100644 --- a/gl/m4/base64.m4 +++ b/gl/m4/base64.m4 @@ -1,5 +1,5 @@ # base64.m4 serial 4 -dnl Copyright (C) 2004, 2006, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2004, 2006, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/btowc.m4 b/gl/m4/btowc.m4 index d2b2fe8..45a61f5 100644 --- a/gl/m4/btowc.m4 +++ b/gl/m4/btowc.m4 @@ -1,5 +1,5 @@ # btowc.m4 serial 12 -dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/builtin-expect.m4 b/gl/m4/builtin-expect.m4 index c584116..b1fb12a 100644 --- a/gl/m4/builtin-expect.m4 +++ b/gl/m4/builtin-expect.m4 @@ -1,6 +1,6 @@ dnl Check for __builtin_expect. -dnl Copyright 2016-2021 Free Software Foundation, Inc. +dnl Copyright 2016-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/byteswap.m4 b/gl/m4/byteswap.m4 index 1083b4c..99aeb68 100644 --- a/gl/m4/byteswap.m4 +++ b/gl/m4/byteswap.m4 @@ -1,5 +1,5 @@ -# byteswap.m4 serial 4 -dnl Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc. +# byteswap.m4 serial 5 +dnl Copyright (C) 2005, 2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -10,10 +10,8 @@ AC_DEFUN([gl_BYTESWAP], [ dnl Prerequisites of lib/byteswap.in.h. AC_CHECK_HEADERS([byteswap.h], [ - BYTESWAP_H='' + GL_GENERATE_BYTESWAP_H=false ], [ - BYTESWAP_H='byteswap.h' + GL_GENERATE_BYTESWAP_H=true ]) - AC_SUBST([BYTESWAP_H]) - AM_CONDITIONAL([GL_GENERATE_BYTESWAP_H], [test -n "$BYTESWAP_H"]) ]) diff --git a/gl/m4/calloc.m4 b/gl/m4/calloc.m4 index fe12b15..c01520e 100644 --- a/gl/m4/calloc.m4 +++ b/gl/m4/calloc.m4 @@ -1,6 +1,6 @@ -# calloc.m4 serial 27 +# calloc.m4 serial 29 -# Copyright (C) 2004-2021 Free Software Foundation, Inc. +# Copyright (C) 2004-2022 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -58,8 +58,9 @@ AC_DEFUN([gl_FUNC_CALLOC_GNU], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_CALLOC_POSIX]) - if test $REPLACE_CALLOC = 0; then - _AC_FUNC_CALLOC_IF([], [REPLACE_CALLOC=1]) + REPLACE_CALLOC_FOR_CALLOC_GNU="$REPLACE_CALLOC_FOR_CALLOC_POSIX" + if test $REPLACE_CALLOC_FOR_CALLOC_GNU = 0; then + _AC_FUNC_CALLOC_IF([], [REPLACE_CALLOC_FOR_CALLOC_GNU=1]) fi ])# gl_FUNC_CALLOC_GNU @@ -72,8 +73,8 @@ AC_DEFUN([gl_FUNC_CALLOC_POSIX], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_MALLOC_POSIX]) - if test $REPLACE_MALLOC = 1; then - REPLACE_CALLOC=1 + if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then + REPLACE_CALLOC_FOR_CALLOC_POSIX=1 fi dnl Although in theory we should also test for size_t overflow, dnl in practice testing for ptrdiff_t overflow suffices diff --git a/gl/m4/close.m4 b/gl/m4/close.m4 index 77a5047..f95dbc9 100644 --- a/gl/m4/close.m4 +++ b/gl/m4/close.m4 @@ -1,5 +1,5 @@ # close.m4 serial 9 -dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/codeset.m4 b/gl/m4/codeset.m4 index 629f4ee..eb73260 100644 --- a/gl/m4/codeset.m4 +++ b/gl/m4/codeset.m4 @@ -1,5 +1,5 @@ # codeset.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2021 Free Software +dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2022 Free Software dnl Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/double-slash-root.m4 b/gl/m4/double-slash-root.m4 index c9bbcef..09ff5f0 100644 --- a/gl/m4/double-slash-root.m4 +++ b/gl/m4/double-slash-root.m4 @@ -1,5 +1,5 @@ # double-slash-root.m4 serial 4 -*- Autoconf -*- -dnl Copyright (C) 2006, 2008-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2006, 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/dup2.m4 b/gl/m4/dup2.m4 index 0753a32..7e777cd 100644 --- a/gl/m4/dup2.m4 +++ b/gl/m4/dup2.m4 @@ -1,5 +1,5 @@ #serial 27 -dnl Copyright (C) 2002, 2005, 2007, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2005, 2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/eealloc.m4 b/gl/m4/eealloc.m4 index 002f0c8..a6aa2f8 100644 --- a/gl/m4/eealloc.m4 +++ b/gl/m4/eealloc.m4 @@ -1,5 +1,5 @@ # eealloc.m4 serial 3 -dnl Copyright (C) 2003, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/environ.m4 b/gl/m4/environ.m4 index ae53291..583dac3 100644 --- a/gl/m4/environ.m4 +++ b/gl/m4/environ.m4 @@ -1,5 +1,5 @@ # environ.m4 serial 8 -dnl Copyright (C) 2001-2004, 2006-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2004, 2006-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/errno_h.m4 b/gl/m4/errno_h.m4 index 51dfe92..4be9780 100644 --- a/gl/m4/errno_h.m4 +++ b/gl/m4/errno_h.m4 @@ -1,5 +1,5 @@ -# errno_h.m4 serial 13 -dnl Copyright (C) 2004, 2006, 2008-2021 Free Software Foundation, Inc. +# errno_h.m4 serial 14 +dnl Copyright (C) 2004, 2006, 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -68,13 +68,11 @@ booboo [gl_cv_header_errno_h_complete=yes]) ]) if test $gl_cv_header_errno_h_complete = yes; then - ERRNO_H='' + GL_GENERATE_ERRNO_H=false else gl_NEXT_HEADERS([errno.h]) - ERRNO_H='errno.h' + GL_GENERATE_ERRNO_H=true fi - AC_SUBST([ERRNO_H]) - AM_CONDITIONAL([GL_GENERATE_ERRNO_H], [test -n "$ERRNO_H"]) gl_REPLACE_ERRNO_VALUE([EMULTIHOP]) gl_REPLACE_ERRNO_VALUE([ENOLINK]) gl_REPLACE_ERRNO_VALUE([EOVERFLOW]) @@ -88,7 +86,7 @@ booboo # Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE. AC_DEFUN([gl_REPLACE_ERRNO_VALUE], [ - if test -n "$ERRNO_H"; then + if $GL_GENERATE_ERRNO_H; then AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [ AC_EGREP_CPP([yes],[ #include diff --git a/gl/m4/error.m4 b/gl/m4/error.m4 index 8e3cf95..7a10344 100644 --- a/gl/m4/error.m4 +++ b/gl/m4/error.m4 @@ -1,6 +1,6 @@ #serial 15 -# Copyright (C) 1996-1998, 2001-2004, 2009-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-1998, 2001-2004, 2009-2022 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/exponentd.m4 b/gl/m4/exponentd.m4 index fb136f4..83ac08b 100644 --- a/gl/m4/exponentd.m4 +++ b/gl/m4/exponentd.m4 @@ -1,5 +1,5 @@ # exponentd.m4 serial 3 -dnl Copyright (C) 2007-2008, 2010-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2008, 2010-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/extensions.m4 b/gl/m4/extensions.m4 index 5792a95..0b3e4b5 100644 --- a/gl/m4/extensions.m4 +++ b/gl/m4/extensions.m4 @@ -1,7 +1,7 @@ # serial 22 -*- Autoconf -*- # Enable extensions on systems that normally disable them. -# Copyright (C) 2003, 2006-2021 Free Software Foundation, Inc. +# Copyright (C) 2003, 2006-2022 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/extern-inline.m4 b/gl/m4/extern-inline.m4 index a4ac5ea..8a12bdd 100644 --- a/gl/m4/extern-inline.m4 +++ b/gl/m4/extern-inline.m4 @@ -1,13 +1,28 @@ dnl 'extern inline' a la ISO C99. -dnl Copyright 2012-2021 Free Software Foundation, Inc. +dnl Copyright 2012-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_EXTERN_INLINE], [ - AH_VERBATIM([extern_inline], + AC_CACHE_CHECK([whether ctype.h defines __header_inline], + [gl_cv_have___header_inline], + [AC_PREPROC_IFELSE( + [AC_LANG_SOURCE([[#include + #ifndef __header_inline + #error " does not define __header_inline" + #endif + ]])], + [gl_cv_have___header_inline=yes], + [gl_cv_have___header_inline=no])]) + if test "$gl_cv_have___header_inline" = yes; then + AC_DEFINE([HAVE___HEADER_INLINE], [1], + [Define to 1 if ctype.h defines __header_inline.]) + fi + + AH_VERBATIM([HAVE___HEADER_INLINE_1], [/* Please see the Gnulib manual for how to use these macros. Suppress extern inline with HP-UX cc, as it appears to be broken; see @@ -54,7 +69,7 @@ AC_DEFUN([gl_EXTERN_INLINE], */ #if (((defined __APPLE__ && defined __MACH__) \ || defined __DragonFly__ || defined __FreeBSD__) \ - && (defined __header_inline \ + && (defined HAVE___HEADER_INLINE \ ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ && ! defined __clang__) \ : ((! defined _DONT_USE_CTYPE_INLINE_ \ diff --git a/gl/m4/fcntl-o.m4 b/gl/m4/fcntl-o.m4 index 7c459ad..4dcde9e 100644 --- a/gl/m4/fcntl-o.m4 +++ b/gl/m4/fcntl-o.m4 @@ -1,5 +1,5 @@ # fcntl-o.m4 serial 7 -dnl Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/fcntl.m4 b/gl/m4/fcntl.m4 index f626434..428e570 100644 --- a/gl/m4/fcntl.m4 +++ b/gl/m4/fcntl.m4 @@ -1,5 +1,5 @@ # fcntl.m4 serial 11 -dnl Copyright (C) 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/fcntl_h.m4 b/gl/m4/fcntl_h.m4 index aba4473..267f98b 100644 --- a/gl/m4/fcntl_h.m4 +++ b/gl/m4/fcntl_h.m4 @@ -1,6 +1,6 @@ # serial 20 # Configure fcntl.h. -dnl Copyright (C) 2006-2007, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/fflush.m4 b/gl/m4/fflush.m4 index 43266ef..e36f90e 100644 --- a/gl/m4/fflush.m4 +++ b/gl/m4/fflush.m4 @@ -1,6 +1,6 @@ # fflush.m4 serial 18 -# Copyright (C) 2007-2021 Free Software Foundation, Inc. +# Copyright (C) 2007-2022 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/float_h.m4 b/gl/m4/float_h.m4 index ba38a28..0e84572 100644 --- a/gl/m4/float_h.m4 +++ b/gl/m4/float_h.m4 @@ -1,5 +1,5 @@ -# float_h.m4 serial 12 -dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. +# float_h.m4 serial 13 +dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -8,18 +8,18 @@ AC_DEFUN([gl_FLOAT_H], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) - FLOAT_H= + GL_GENERATE_FLOAT_H=false REPLACE_FLOAT_LDBL=0 case "$host_os" in aix* | beos* | openbsd* | mirbsd* | irix*) - FLOAT_H=float.h + GL_GENERATE_FLOAT_H=true ;; freebsd* | dragonfly*) case "$host_cpu" in changequote(,)dnl i[34567]86 ) changequote([,])dnl - FLOAT_H=float.h + GL_GENERATE_FLOAT_H=true ;; x86_64 ) # On x86_64 systems, the C compiler may still be generating @@ -33,21 +33,21 @@ changequote([,])dnl #endif ]])], [], - [FLOAT_H=float.h]) + [GL_GENERATE_FLOAT_H=true]) ;; esac ;; linux*) case "$host_cpu" in powerpc*) - FLOAT_H=float.h + GL_GENERATE_FLOAT_H=true ;; esac ;; esac case "$host_os" in aix* | freebsd* | dragonfly* | linux*) - if test -n "$FLOAT_H"; then + if $GL_GENERATE_FLOAT_H; then REPLACE_FLOAT_LDBL=1 fi ;; @@ -95,14 +95,12 @@ int main () REPLACE_ITOLD=1 dnl We add the workaround to but also to , dnl to increase the chances that the fix function gets pulled in. - FLOAT_H=float.h + GL_GENERATE_FLOAT_H=true ;; esac - if test -n "$FLOAT_H"; then + if $GL_GENERATE_FLOAT_H; then gl_NEXT_HEADERS([float.h]) fi - AC_SUBST([FLOAT_H]) - AM_CONDITIONAL([GL_GENERATE_FLOAT_H], [test -n "$FLOAT_H"]) AC_SUBST([REPLACE_ITOLD]) ]) diff --git a/gl/m4/floorf.m4 b/gl/m4/floorf.m4 index f521437..e8f290b 100644 --- a/gl/m4/floorf.m4 +++ b/gl/m4/floorf.m4 @@ -1,5 +1,5 @@ # floorf.m4 serial 18 -dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/fopen.m4 b/gl/m4/fopen.m4 index 4ed7dce..50767f8 100644 --- a/gl/m4/fopen.m4 +++ b/gl/m4/fopen.m4 @@ -1,5 +1,5 @@ -# fopen.m4 serial 12 -dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. +# fopen.m4 serial 13 +dnl Copyright (C) 2007-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -136,11 +136,12 @@ int main () ]) rm -f conftest.x ]) + REPLACE_FOPEN_FOR_FOPEN_GNU="$REPLACE_FOPEN" case "$gl_cv_func_fopen_mode_x" in - *no) REPLACE_FOPEN=1 ;; + *no) REPLACE_FOPEN_FOR_FOPEN_GNU=1 ;; esac case "$gl_cv_func_fopen_mode_e" in - *no) REPLACE_FOPEN=1 ;; + *no) REPLACE_FOPEN_FOR_FOPEN_GNU=1 ;; esac ]) diff --git a/gl/m4/fpurge.m4 b/gl/m4/fpurge.m4 index 275c9d0..1a15454 100644 --- a/gl/m4/fpurge.m4 +++ b/gl/m4/fpurge.m4 @@ -1,5 +1,5 @@ # fpurge.m4 serial 12 -dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/freading.m4 b/gl/m4/freading.m4 index 6cc660f..81b17a6 100644 --- a/gl/m4/freading.m4 +++ b/gl/m4/freading.m4 @@ -1,5 +1,5 @@ # freading.m4 serial 2 -dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/free.m4 b/gl/m4/free.m4 index a7923b9..dfeecd2 100644 --- a/gl/m4/free.m4 +++ b/gl/m4/free.m4 @@ -1,5 +1,5 @@ # free.m4 serial 6 -# Copyright (C) 2003-2005, 2009-2021 Free Software Foundation, Inc. +# Copyright (C) 2003-2005, 2009-2022 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/fseek.m4 b/gl/m4/fseek.m4 index 2e90afc..bd4a55b 100644 --- a/gl/m4/fseek.m4 +++ b/gl/m4/fseek.m4 @@ -1,5 +1,5 @@ # fseek.m4 serial 4 -dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/fseeko.m4 b/gl/m4/fseeko.m4 index 531e442..e50fe39 100644 --- a/gl/m4/fseeko.m4 +++ b/gl/m4/fseeko.m4 @@ -1,5 +1,5 @@ # fseeko.m4 serial 20 -dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/fstat.m4 b/gl/m4/fstat.m4 index cdaca80..9e61bcc 100644 --- a/gl/m4/fstat.m4 +++ b/gl/m4/fstat.m4 @@ -1,5 +1,5 @@ # fstat.m4 serial 8 -dnl Copyright (C) 2011-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/fstypename.m4 b/gl/m4/fstypename.m4 index 895c4f0..6749922 100644 --- a/gl/m4/fstypename.m4 +++ b/gl/m4/fstypename.m4 @@ -6,7 +6,7 @@ dnl See if struct statfs has the f_fstypename member. dnl If so, define HAVE_STRUCT_STATFS_F_FSTYPENAME. dnl -# Copyright (C) 1998-1999, 2001, 2004, 2006, 2009-2021 Free Software +# Copyright (C) 1998-1999, 2001, 2004, 2006, 2009-2022 Free Software # Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/fsusage.m4 b/gl/m4/fsusage.m4 index d005579..06e6088 100644 --- a/gl/m4/fsusage.m4 +++ b/gl/m4/fsusage.m4 @@ -1,7 +1,7 @@ # serial 35 # Obtaining file system usage information. -# Copyright (C) 1997-1998, 2000-2001, 2003-2021 Free Software Foundation, Inc. +# Copyright (C) 1997-1998, 2000-2001, 2003-2022 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/ftell.m4 b/gl/m4/ftell.m4 index f9cc619..89f2d1b 100644 --- a/gl/m4/ftell.m4 +++ b/gl/m4/ftell.m4 @@ -1,5 +1,5 @@ # ftell.m4 serial 3 -dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/ftello.m4 b/gl/m4/ftello.m4 index 65bec39..919f39d 100644 --- a/gl/m4/ftello.m4 +++ b/gl/m4/ftello.m4 @@ -1,5 +1,5 @@ # ftello.m4 serial 14 -dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/getaddrinfo.m4 b/gl/m4/getaddrinfo.m4 index 3f8e04f..65a0fd0 100644 --- a/gl/m4/getaddrinfo.m4 +++ b/gl/m4/getaddrinfo.m4 @@ -1,5 +1,5 @@ # getaddrinfo.m4 serial 34 -dnl Copyright (C) 2004-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2004-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/getdelim.m4 b/gl/m4/getdelim.m4 index 244a731..0b63b55 100644 --- a/gl/m4/getdelim.m4 +++ b/gl/m4/getdelim.m4 @@ -1,6 +1,6 @@ # getdelim.m4 serial 15 -dnl Copyright (C) 2005-2007, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2005-2007, 2009-2022 Free Software Foundation, Inc. dnl dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/getdtablesize.m4 b/gl/m4/getdtablesize.m4 index 8fbc941..6134eaa 100644 --- a/gl/m4/getdtablesize.m4 +++ b/gl/m4/getdtablesize.m4 @@ -1,5 +1,5 @@ # getdtablesize.m4 serial 8 -dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/gethostname.m4 b/gl/m4/gethostname.m4 index 25e9eb2..11f22b2 100644 --- a/gl/m4/gethostname.m4 +++ b/gl/m4/gethostname.m4 @@ -1,5 +1,5 @@ # gethostname.m4 serial 15 -dnl Copyright (C) 2002, 2008-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/getline.m4 b/gl/m4/getline.m4 index 58b27c7..ca0301d 100644 --- a/gl/m4/getline.m4 +++ b/gl/m4/getline.m4 @@ -1,6 +1,6 @@ # getline.m4 serial 30 -dnl Copyright (C) 1998-2003, 2005-2007, 2009-2021 Free Software Foundation, +dnl Copyright (C) 1998-2003, 2005-2007, 2009-2022 Free Software Foundation, dnl Inc. dnl dnl This file is free software; the Free Software Foundation diff --git a/gl/m4/getloadavg.m4 b/gl/m4/getloadavg.m4 index bba2216..7bb8890 100644 --- a/gl/m4/getloadavg.m4 +++ b/gl/m4/getloadavg.m4 @@ -1,6 +1,6 @@ # Check for getloadavg. -# Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2021 Free Software +# Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2022 Free Software # Foundation, Inc. # This file is free software; the Free Software Foundation diff --git a/gl/m4/getopt.m4 b/gl/m4/getopt.m4 index bb95c5e..ff78ed5 100644 --- a/gl/m4/getopt.m4 +++ b/gl/m4/getopt.m4 @@ -1,5 +1,5 @@ -# getopt.m4 serial 47 -dnl Copyright (C) 2002-2006, 2008-2021 Free Software Foundation, Inc. +# getopt.m4 serial 48 +dnl Copyright (C) 2002-2006, 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -21,6 +21,8 @@ AC_DEFUN([gl_FUNC_GETOPT_POSIX], REPLACE_GETOPT=1 fi ]) + GL_GENERATE_GETOPT_H=false + GL_GENERATE_GETOPT_CDEFS_H=false if test $REPLACE_GETOPT = 1; then dnl Arrange for getopt.h to be created. gl_GETOPT_SUBSTITUTE_HEADER @@ -374,8 +376,6 @@ AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER], AC_DEFINE([__GETOPT_PREFIX], [[rpl_]], [Define to rpl_ if the getopt replacement functions and variables should be used.]) - GETOPT_H=getopt.h - GETOPT_CDEFS_H=getopt-cdefs.h - AC_SUBST([GETOPT_H]) - AC_SUBST([GETOPT_CDEFS_H]) + GL_GENERATE_GETOPT_H=true + GL_GENERATE_GETOPT_CDEFS_H=true ]) diff --git a/gl/m4/getprogname.m4 b/gl/m4/getprogname.m4 index 65917d6..b26146e 100644 --- a/gl/m4/getprogname.m4 +++ b/gl/m4/getprogname.m4 @@ -1,6 +1,6 @@ # getprogname.m4 - check for getprogname or replacements for it -# Copyright (C) 2016-2021 Free Software Foundation, Inc. +# Copyright (C) 2016-2022 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/gettext.m4 b/gl/m4/gettext.m4 index c7f5460..989d645 100644 --- a/gl/m4/gettext.m4 +++ b/gl/m4/gettext.m4 @@ -1,5 +1,5 @@ # gettext.m4 serial 71 (gettext-0.20.2) -dnl Copyright (C) 1995-2014, 2016, 2018-2021 Free Software Foundation, Inc. +dnl Copyright (C) 1995-2014, 2016, 2018-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/gl-openssl.m4 b/gl/m4/gl-openssl.m4 index c968eb6..d076f84 100644 --- a/gl/m4/gl-openssl.m4 +++ b/gl/m4/gl-openssl.m4 @@ -1,5 +1,5 @@ # gl-openssl.m4 serial 6 -dnl Copyright (C) 2013-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2013-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4 index 2471be2..9d0128a 100644 --- a/gl/m4/gnulib-cache.m4 +++ b/gl/m4/gnulib-cache.m4 @@ -1,8 +1,8 @@ -# Copyright (C) 2002-2021 Free Software Foundation, Inc. +# Copyright (C) 2002-2022 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This file is distributed in the hope that it will be useful, diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4 index 12b19db..30911d1 100644 --- a/gl/m4/gnulib-common.m4 +++ b/gl/m4/gnulib-common.m4 @@ -1,5 +1,5 @@ -# gnulib-common.m4 serial 67 -dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. +# gnulib-common.m4 serial 73 +dnl Copyright (C) 2007-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -69,7 +69,9 @@ AC_DEFUN([gl_COMMON_BODY], [ [/* Attributes. */ #if (defined __has_attribute \ && (!defined __clang_minor__ \ - || 3 < __clang_major__ + (5 <= __clang_minor__))) + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 3 < __clang_major__ + (5 <= __clang_minor__)))) # define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) #else # define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr @@ -104,6 +106,10 @@ AC_DEFUN([gl_COMMON_BODY], [ #endif #ifdef __has_c_attribute +# if ((defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 201710 \ + && _GL_GNUC_PREREQ (4, 6)) +# pragma GCC diagnostic ignored "-Wpedantic" +# endif # define _GL_HAS_C_ATTRIBUTE(attr) __has_c_attribute (__##attr##__) #else # define _GL_HAS_C_ATTRIBUTE(attr) 0 @@ -181,7 +187,12 @@ AC_DEFUN([gl_COMMON_BODY], [ #else # define _GL_ATTRIBUTE_DEALLOC(f, i) #endif -#define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1) +/* If gnulib's or has already defined this macro, continue + to use this earlier definition, since may not have been included + yet. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1) +#endif /* _GL_ATTRIBUTE_DEPRECATED: Declares that an entity is deprecated. The compiler may warn if the entity is used. */ @@ -813,6 +824,24 @@ AC_DEFUN([gl_CACHE_VAL_SILENT], ]) ]) +# gl_CONDITIONAL(conditional, condition) +# is like AM_CONDITIONAL(conditional, condition), except that it does not +# produce an error +# configure: error: conditional "..." was never defined. +# Usually this means the macro was only invoked conditionally. +# when only invoked conditionally. Instead, in that case, both the _TRUE +# and the _FALSE case are disabled. +AC_DEFUN([gl_CONDITIONAL], +[ + pushdef([AC_CONFIG_COMMANDS_PRE], [:])dnl + AM_CONDITIONAL([$1], [$2]) + popdef([AC_CONFIG_COMMANDS_PRE])dnl + if test -z "${[$1]_TRUE}" && test -z "${[$1]_FALSE}"; then + [$1]_TRUE='#' + [$1]_FALSE='#' + fi +]) + # gl_CC_ALLOW_WARNINGS # sets and substitutes a variable GL_CFLAG_ALLOW_WARNINGS, to a $(CC) option # that reverts a preceding '-Werror' option, if available. @@ -879,6 +908,102 @@ AC_DEFUN([gl_CXX_ALLOW_WARNINGS], AC_SUBST([GL_CXXFLAG_ALLOW_WARNINGS]) ]) +# gl_CC_GNULIB_WARNINGS +# sets and substitutes a variable GL_CFLAG_GNULIB_WARNINGS, to a $(CC) option +# set that enables or disables warnings as suitable for the Gnulib coding style. +AC_DEFUN([gl_CC_GNULIB_WARNINGS], +[ + AC_REQUIRE([gl_CC_ALLOW_WARNINGS]) + dnl Assume that the compiler supports -Wno-* options only if it also supports + dnl -Wno-error. + GL_CFLAG_GNULIB_WARNINGS='' + if test -n "$GL_CFLAG_ALLOW_WARNINGS"; then + dnl Enable these warning options: + dnl + dnl GCC clang + dnl -Wno-cast-qual >= 3 >= 3.9 + dnl -Wno-conversion >= 3 >= 3.9 + dnl -Wno-float-conversion >= 4.9 >= 3.9 + dnl -Wno-float-equal >= 3 >= 3.9 + dnl -Wimplicit-fallthrough >= 7 >= 3.9 + dnl -Wno-pedantic >= 4.8 >= 3.9 + dnl -Wno-sign-compare >= 3 >= 3.9 + dnl -Wno-sign-conversion >= 4.3 >= 3.9 + dnl -Wno-type-limits >= 4.3 >= 3.9 + dnl -Wno-undef >= 3 >= 3.9 + dnl -Wno-unsuffixed-float-constants >= 4.5 + dnl -Wno-unused-function >= 3 >= 3.9 + dnl -Wno-unused-parameter >= 3 >= 3.9 + dnl + cat > conftest.c <<\EOF + #if __GNUC__ >= 3 || (__clang_major__ + (__clang_minor__ >= 9) > 3) + -Wno-cast-qual + -Wno-conversion + -Wno-float-equal + -Wno-sign-compare + -Wno-undef + -Wno-unused-function + -Wno-unused-parameter + #endif + #if __GNUC__ + (__GNUC_MINOR__ >= 9) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3) + -Wno-float-conversion + #endif + #if __GNUC__ >= 7 || (__clang_major__ + (__clang_minor__ >= 9) > 3) + -Wimplicit-fallthrough + #endif + #if __GNUC__ + (__GNUC_MINOR__ >= 8) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3) + -Wno-pedantic + #endif + #if __GNUC__ + (__GNUC_MINOR__ >= 3) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3) + -Wno-sign-conversion + -Wno-type-limits + #endif + #if __GNUC__ + (__GNUC_MINOR__ >= 5) > 4 + -Wno-unsuffixed-float-constants + #endif +EOF + gl_command="$CC $CFLAGS $CPPFLAGS -E conftest.c > conftest.out" + if AC_TRY_EVAL([gl_command]); then + gl_options=`grep -v '#' conftest.out` + for word in $gl_options; do + GL_CFLAG_GNULIB_WARNINGS="$GL_CFLAG_GNULIB_WARNINGS $word" + done + fi + rm -f conftest.c conftest.out + fi + AC_SUBST([GL_CFLAG_GNULIB_WARNINGS]) +]) + +dnl gl_CONDITIONAL_HEADER([foo.h]) +dnl takes a shell variable GL_GENERATE_FOO_H (with value true or false) as input +dnl and produces +dnl - an AC_SUBSTed variable FOO_H that is either a file name or empty, based +dnl on whether GL_GENERATE_FOO_H is true or false, +dnl - an Automake conditional GL_GENERATE_FOO_H that evaluates to the value of +dnl the shell variable GL_GENERATE_FOO_H. +AC_DEFUN([gl_CONDITIONAL_HEADER], +[ + m4_pushdef([gl_header_name], AS_TR_SH(m4_toupper($1))) + m4_pushdef([gl_generate_var], [GL_GENERATE_]AS_TR_SH(m4_toupper($1))) + m4_pushdef([gl_generate_cond], [GL_GENERATE_]AS_TR_SH(m4_toupper($1))) + case "$gl_generate_var" in + false) gl_header_name='' ;; + true) + dnl It is OK to use a .h file in lib/ from within tests/, but not vice + dnl versa. + if test -z "$gl_header_name"; then + gl_header_name="${gl_source_base_prefix}$1" + fi + ;; + *) echo "*** gl_generate_var is not set correctly" 1>&2; exit 1 ;; + esac + AC_SUBST(gl_header_name) + gl_CONDITIONAL(gl_generate_cond, [$gl_generate_var]) + m4_popdef([gl_generate_cond]) + m4_popdef([gl_generate_var]) + m4_popdef([gl_header_name]) +]) + dnl Expands to some code for use in .c programs that, on native Windows, defines dnl the Microsoft deprecated alias function names to the underscore-prefixed dnl actual function names. With this macro, these function names are available diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 index 219b81e..a82c5de 100644 --- a/gl/m4/gnulib-comp.m4 +++ b/gl/m4/gnulib-comp.m4 @@ -1,9 +1,9 @@ # DO NOT EDIT! GENERATED AUTOMATICALLY! -# Copyright (C) 2002-2021 Free Software Foundation, Inc. +# Copyright (C) 2002-2022 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This file is distributed in the hope that it will be useful, @@ -42,7 +42,6 @@ AC_DEFUN([gl_EARLY], AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_PROG_AR_RANLIB]) - AC_REQUIRE([AM_PROG_CC_C_O]) # Code from module absolute-header: # Code from module alloca-opt: # Code from module arpa_inet: @@ -92,6 +91,7 @@ AC_DEFUN([gl_EARLY], # Code from module ftell: # Code from module ftello: AC_REQUIRE([gl_SET_LARGEFILE_SOURCE]) + # Code from module gen-header: # Code from module getaddrinfo: # Code from module getdelim: # Code from module getdtablesize: @@ -167,6 +167,7 @@ AC_DEFUN([gl_EARLY], # Code from module std-gnu11: # Code from module stdalign: # Code from module stdbool: + # Code from module stdckdint: # Code from module stddef: # Code from module stdint: # Code from module stdio: @@ -193,6 +194,7 @@ AC_DEFUN([gl_EARLY], # Code from module unistd: # Code from module unlocked-io-internal: # Code from module unsetenv: + # Code from module vararrays: # Code from module vasnprintf: # Code from module vasprintf: # Code from module verify: @@ -228,33 +230,38 @@ AC_DEFUN([gl_INIT], m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL]) gl_COMMON gl_source_base='gl' + gl_source_base_prefix= gl_FUNC_ALLOCA + gl_CONDITIONAL_HEADER([alloca.h]) + AC_PROG_MKDIR_P gl_ARPA_INET_H gl_ARPA_INET_H_REQUIRE_DEFAULTS AC_PROG_MKDIR_P gl_FUNC_BASE64 gl_FUNC_BTOWC - if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then - AC_LIBOBJ([btowc]) + gl_CONDITIONAL([GL_COND_OBJ_BTOWC], + [test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1]) + AM_COND_IF([GL_COND_OBJ_BTOWC], [ gl_PREREQ_BTOWC - fi + ]) gl_WCHAR_MODULE_INDICATOR([btowc]) gl___BUILTIN_EXPECT gl_BYTESWAP + gl_CONDITIONAL_HEADER([byteswap.h]) + AC_PROG_MKDIR_P gl_FUNC_CALLOC_GNU - if test $REPLACE_CALLOC = 1; then + if test $REPLACE_CALLOC_FOR_CALLOC_GNU = 1; then AC_LIBOBJ([calloc]) fi + gl_STDLIB_MODULE_INDICATOR([calloc-gnu]) gl_FUNC_CALLOC_POSIX - if test $REPLACE_CALLOC = 1; then + if test $REPLACE_CALLOC_FOR_CALLOC_POSIX = 1; then AC_LIBOBJ([calloc]) fi gl_STDLIB_MODULE_INDICATOR([calloc-posix]) gl_MODULE_INDICATOR_FOR_TESTS([cloexec]) gl_FUNC_CLOSE - if test $REPLACE_CLOSE = 1; then - AC_LIBOBJ([close]) - fi + gl_CONDITIONAL([GL_COND_OBJ_CLOSE], [test $REPLACE_CLOSE = 1]) gl_UNISTD_MODULE_INDICATOR([close]) gl_AF_ALG AC_REQUIRE([AC_C_RESTRICT]) @@ -262,18 +269,20 @@ AC_DEFUN([gl_INIT], gl_MODULE_INDICATOR([dirname]) gl_DOUBLE_SLASH_ROOT gl_FUNC_DUP2 - if test $REPLACE_DUP2 = 1; then - AC_LIBOBJ([dup2]) + gl_CONDITIONAL([GL_COND_OBJ_DUP2], [test $REPLACE_DUP2 = 1]) + AM_COND_IF([GL_COND_OBJ_DUP2], [ gl_PREREQ_DUP2 - fi + ]) gl_UNISTD_MODULE_INDICATOR([dup2]) AC_PROG_MKDIR_P gl_ENVIRON gl_UNISTD_MODULE_INDICATOR([environ]) gl_HEADER_ERRNO_H + gl_CONDITIONAL_HEADER([errno.h]) + AC_PROG_MKDIR_P gl_ERROR - AS_IF([test "$ac_cv_lib_error_at_line" = no], [ - AC_LIBOBJ([error]) + gl_CONDITIONAL([GL_COND_OBJ_ERROR], [test "$ac_cv_lib_error_at_line" = no]) + AM_COND_IF([GL_COND_OBJ_ERROR], [ gl_PREREQ_ERROR ]) m4_ifdef([AM_XGETTEXT_OPTION], @@ -281,30 +290,27 @@ AC_DEFUN([gl_INIT], AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])]) AC_REQUIRE([gl_EXTERN_INLINE]) gl_FUNC_FCNTL - if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then - AC_LIBOBJ([fcntl]) - fi + gl_CONDITIONAL([GL_COND_OBJ_FCNTL], + [test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1]) gl_FCNTL_MODULE_INDICATOR([fcntl]) gl_FCNTL_H gl_FCNTL_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P gl_FUNC_FFLUSH - if test $REPLACE_FFLUSH = 1; then - AC_LIBOBJ([fflush]) + gl_CONDITIONAL([GL_COND_OBJ_FFLUSH], [test $REPLACE_FFLUSH = 1]) + AM_COND_IF([GL_COND_OBJ_FFLUSH], [ gl_PREREQ_FFLUSH - fi + ]) gl_MODULE_INDICATOR([fflush]) gl_STDIO_MODULE_INDICATOR([fflush]) gl_FLOAT_H - if test $REPLACE_FLOAT_LDBL = 1; then - AC_LIBOBJ([float]) - fi - if test $REPLACE_ITOLD = 1; then - AC_LIBOBJ([itold]) - fi + gl_CONDITIONAL_HEADER([float.h]) + AC_PROG_MKDIR_P + gl_CONDITIONAL([GL_COND_OBJ_FLOAT], [test $REPLACE_FLOAT_LDBL = 1]) + gl_CONDITIONAL([GL_COND_OBJ_ITOLD], [test $REPLACE_ITOLD = 1]) gl_FUNC_FLOORF - if test $HAVE_DECL_FLOORF = 0 || test $REPLACE_FLOORF = 1; then - AC_LIBOBJ([floorf]) - fi + gl_CONDITIONAL([GL_COND_OBJ_FLOORF], + [test $HAVE_DECL_FLOORF = 0 || test $REPLACE_FLOORF = 1]) gl_MATH_MODULE_INDICATOR([floorf]) gl_FUNC_FOPEN if test $REPLACE_FOPEN = 1; then @@ -313,112 +319,112 @@ AC_DEFUN([gl_INIT], fi gl_STDIO_MODULE_INDICATOR([fopen]) gl_FUNC_FOPEN_GNU - if test $REPLACE_FOPEN = 1; then + if test $REPLACE_FOPEN_FOR_FOPEN_GNU = 1; then AC_LIBOBJ([fopen]) gl_PREREQ_FOPEN fi gl_MODULE_INDICATOR([fopen-gnu]) + gl_STDIO_MODULE_INDICATOR([fopen-gnu]) gl_FUNC_FPURGE - if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then - AC_LIBOBJ([fpurge]) - fi + gl_CONDITIONAL([GL_COND_OBJ_FPURGE], + [test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1]) gl_STDIO_MODULE_INDICATOR([fpurge]) gl_FUNC_FREADING gl_FUNC_FREE - if test $REPLACE_FREE = 1; then - AC_LIBOBJ([free]) + gl_CONDITIONAL([GL_COND_OBJ_FREE], [test $REPLACE_FREE = 1]) + AM_COND_IF([GL_COND_OBJ_FREE], [ gl_PREREQ_FREE - fi + ]) gl_STDLIB_MODULE_INDICATOR([free-posix]) gl_FUNC_FSEEK - if test $REPLACE_FSEEK = 1; then - AC_LIBOBJ([fseek]) - fi + gl_CONDITIONAL([GL_COND_OBJ_FSEEK], [test $REPLACE_FSEEK = 1]) gl_STDIO_MODULE_INDICATOR([fseek]) gl_FUNC_FSEEKO - if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then - AC_LIBOBJ([fseeko]) + gl_CONDITIONAL([GL_COND_OBJ_FSEEKO], + [test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1]) + AM_COND_IF([GL_COND_OBJ_FSEEKO], [ gl_PREREQ_FSEEKO - fi + ]) gl_STDIO_MODULE_INDICATOR([fseeko]) gl_FUNC_FSTAT - if test $REPLACE_FSTAT = 1; then - AC_LIBOBJ([fstat]) + gl_CONDITIONAL([GL_COND_OBJ_FSTAT], [test $REPLACE_FSTAT = 1]) + AM_COND_IF([GL_COND_OBJ_FSTAT], [ case "$host_os" in mingw*) AC_LIBOBJ([stat-w32]) ;; esac gl_PREREQ_FSTAT - fi + ]) gl_SYS_STAT_MODULE_INDICATOR([fstat]) gl_FSUSAGE - if test $gl_cv_fs_space = yes; then - AC_LIBOBJ([fsusage]) + gl_CONDITIONAL([GL_COND_OBJ_FSUSAGE], [test $gl_cv_fs_space = yes]) + AM_COND_IF([GL_COND_OBJ_FSUSAGE], [ gl_PREREQ_FSUSAGE_EXTRA - fi + ]) gl_FUNC_FTELL - if test $REPLACE_FTELL = 1; then - AC_LIBOBJ([ftell]) - fi + gl_CONDITIONAL([GL_COND_OBJ_FTELL], [test $REPLACE_FTELL = 1]) gl_STDIO_MODULE_INDICATOR([ftell]) gl_FUNC_FTELLO - if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then - AC_LIBOBJ([ftello]) + gl_CONDITIONAL([GL_COND_OBJ_FTELLO], + [test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1]) + AM_COND_IF([GL_COND_OBJ_FTELLO], [ gl_PREREQ_FTELLO - fi + ]) gl_STDIO_MODULE_INDICATOR([ftello]) gl_GETADDRINFO - if test $HAVE_GETADDRINFO = 0 || test $REPLACE_GETADDRINFO = 1; then - AC_LIBOBJ([getaddrinfo]) - fi - if test $HAVE_DECL_GAI_STRERROR = 0 || test $REPLACE_GAI_STRERROR = 1; then - AC_LIBOBJ([gai_strerror]) - fi + gl_CONDITIONAL([GL_COND_OBJ_GETADDRINFO], + [test $HAVE_GETADDRINFO = 0 || test $REPLACE_GETADDRINFO = 1]) + gl_CONDITIONAL([GL_COND_OBJ_GAI_STRERROR], + [test $HAVE_DECL_GAI_STRERROR = 0 || test $REPLACE_GAI_STRERROR = 1]) gl_NETDB_MODULE_INDICATOR([getaddrinfo]) gl_FUNC_GETDELIM - if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then - AC_LIBOBJ([getdelim]) + gl_CONDITIONAL([GL_COND_OBJ_GETDELIM], + [test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1]) + AM_COND_IF([GL_COND_OBJ_GETDELIM], [ gl_PREREQ_GETDELIM - fi + ]) gl_STDIO_MODULE_INDICATOR([getdelim]) gl_FUNC_GETDTABLESIZE - if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then - AC_LIBOBJ([getdtablesize]) + gl_CONDITIONAL([GL_COND_OBJ_GETDTABLESIZE], + [test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1]) + AM_COND_IF([GL_COND_OBJ_GETDTABLESIZE], [ gl_PREREQ_GETDTABLESIZE - fi + ]) gl_UNISTD_MODULE_INDICATOR([getdtablesize]) gl_FUNC_GETHOSTNAME - if test $HAVE_GETHOSTNAME = 0; then - AC_LIBOBJ([gethostname]) + gl_CONDITIONAL([GL_COND_OBJ_GETHOSTNAME], [test $HAVE_GETHOSTNAME = 0]) + AM_COND_IF([GL_COND_OBJ_GETHOSTNAME], [ gl_PREREQ_GETHOSTNAME - fi + ]) gl_UNISTD_MODULE_INDICATOR([gethostname]) gl_FUNC_GETLINE - if test $REPLACE_GETLINE = 1; then - AC_LIBOBJ([getline]) + gl_CONDITIONAL([GL_COND_OBJ_GETLINE], [test $REPLACE_GETLINE = 1]) + AM_COND_IF([GL_COND_OBJ_GETLINE], [ gl_PREREQ_GETLINE - fi + ]) gl_STDIO_MODULE_INDICATOR([getline]) AC_REQUIRE([AC_CANONICAL_HOST]) gl_GETLOADAVG - if test $HAVE_GETLOADAVG = 0; then - AC_LIBOBJ([getloadavg]) + gl_CONDITIONAL([GL_COND_OBJ_GETLOADAVG], [test $HAVE_GETLOADAVG = 0]) + AM_COND_IF([GL_COND_OBJ_GETLOADAVG], [ gl_PREREQ_GETLOADAVG - fi + ]) gl_STDLIB_MODULE_INDICATOR([getloadavg]) gl_FUNC_GETOPT_GNU dnl Because of the way gl_FUNC_GETOPT_GNU is implemented (the gl_getopt_required dnl mechanism), there is no need to do any AC_LIBOBJ or AC_SUBST here; they are dnl done in the getopt-posix module. gl_FUNC_GETOPT_POSIX - if test $REPLACE_GETOPT = 1; then - AC_LIBOBJ([getopt]) - AC_LIBOBJ([getopt1]) + gl_CONDITIONAL_HEADER([getopt.h]) + gl_CONDITIONAL_HEADER([getopt-cdefs.h]) + AC_PROG_MKDIR_P + gl_CONDITIONAL([GL_COND_OBJ_GETOPT], [test $REPLACE_GETOPT = 1]) + AM_COND_IF([GL_COND_OBJ_GETOPT], [ dnl Define the substituted variable GNULIB_UNISTD_H_GETOPT to 1. gl_UNISTD_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_GETOPT], [1]) - fi + ]) gl_UNISTD_MODULE_INDICATOR([getopt-posix]) gl_FUNC_GETPROGNAME dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac. @@ -432,77 +438,86 @@ AC_DEFUN([gl_INIT], gl_HOSTENT gl_IDPRIV gl_FUNC_INET_NTOP - if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then - AC_LIBOBJ([inet_ntop]) + gl_CONDITIONAL([GL_COND_OBJ_INET_NTOP], + [test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1]) + AM_COND_IF([GL_COND_OBJ_INET_NTOP], [ gl_PREREQ_INET_NTOP - fi + ]) gl_ARPA_INET_MODULE_INDICATOR([inet_ntop]) gl_INTTYPES_INCOMPLETE gl_INTTYPES_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P gl_LANGINFO_H gl_LANGINFO_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P AC_REQUIRE([gl_LARGEFILE]) gl___INLINE gl_LIMITS_H + gl_CONDITIONAL_HEADER([limits.h]) + AC_PROG_MKDIR_P gl_LOCALCHARSET dnl For backward compatibility. Some packages still use this. LOCALCHARSET_TESTS_ENVIRONMENT= AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT]) gl_LOCALE_H gl_LOCALE_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P gl_FUNC_LOCALECONV - if test $REPLACE_LOCALECONV = 1; then - AC_LIBOBJ([localeconv]) + gl_CONDITIONAL([GL_COND_OBJ_LOCALECONV], [test $REPLACE_LOCALECONV = 1]) + AM_COND_IF([GL_COND_OBJ_LOCALECONV], [ gl_PREREQ_LOCALECONV - fi + ]) gl_LOCALE_MODULE_INDICATOR([localeconv]) gl_LOCK gl_MODULE_INDICATOR([lock]) gl_FUNC_LSEEK - if test $REPLACE_LSEEK = 1; then - AC_LIBOBJ([lseek]) - fi + gl_CONDITIONAL([GL_COND_OBJ_LSEEK], [test $REPLACE_LSEEK = 1]) gl_UNISTD_MODULE_INDICATOR([lseek]) gl_FUNC_MALLOC_GNU - if test $REPLACE_MALLOC = 1; then + if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 1; then AC_LIBOBJ([malloc]) fi + gl_STDLIB_MODULE_INDICATOR([malloc-gnu]) AC_REQUIRE([gl_FUNC_MALLOC_POSIX]) - if test $REPLACE_MALLOC = 1; then + if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then AC_LIBOBJ([malloc]) fi gl_STDLIB_MODULE_INDICATOR([malloc-posix]) gl_MALLOCA gl_MATH_H gl_MATH_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P gl_FUNC_MBRTOWC - if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then - AC_LIBOBJ([mbrtowc]) + gl_CONDITIONAL([GL_COND_OBJ_MBRTOWC], + [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1]) + AM_COND_IF([GL_COND_OBJ_MBRTOWC], [ if test $REPLACE_MBSTATE_T = 1; then AC_LIBOBJ([lc-charset-dispatch]) AC_LIBOBJ([mbtowc-lock]) gl_PREREQ_MBTOWC_LOCK fi gl_PREREQ_MBRTOWC - fi + ]) gl_WCHAR_MODULE_INDICATOR([mbrtowc]) gl_FUNC_MBSINIT - if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then - AC_LIBOBJ([mbsinit]) + gl_CONDITIONAL([GL_COND_OBJ_MBSINIT], + [test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1]) + AM_COND_IF([GL_COND_OBJ_MBSINIT], [ gl_PREREQ_MBSINIT - fi + ]) gl_WCHAR_MODULE_INDICATOR([mbsinit]) gl_FUNC_MBTOWC - if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then - AC_LIBOBJ([mbtowc]) + gl_CONDITIONAL([GL_COND_OBJ_MBTOWC], + [test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1]) + AM_COND_IF([GL_COND_OBJ_MBTOWC], [ gl_PREREQ_MBTOWC - fi + ]) gl_STDLIB_MODULE_INDICATOR([mbtowc]) gl_FUNC_MEMCHR - if test $REPLACE_MEMCHR = 1; then - AC_LIBOBJ([memchr]) + gl_CONDITIONAL([GL_COND_OBJ_MEMCHR], [test $REPLACE_MEMCHR = 1]) + AM_COND_IF([GL_COND_OBJ_MEMCHR], [ gl_PREREQ_MEMCHR - fi + ]) gl_STRING_MODULE_INDICATOR([memchr]) gl_MINMAX gl_FUNC_MKTIME @@ -517,72 +532,74 @@ AC_DEFUN([gl_INIT], gl_PREREQ_MKTIME fi gl_MOUNTLIST - if test $gl_cv_list_mounted_fs = yes; then - AC_LIBOBJ([mountlist]) + gl_CONDITIONAL([GL_COND_OBJ_MOUNTLIST], [test $gl_cv_list_mounted_fs = yes]) + AM_COND_IF([GL_COND_OBJ_MOUNTLIST], [ gl_PREREQ_MOUNTLIST_EXTRA - fi + ]) AC_REQUIRE([gl_MSVC_INVAL]) - if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then - AC_LIBOBJ([msvc-inval]) - fi + gl_CONDITIONAL([GL_COND_OBJ_MSVC_INVAL], + [test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1]) AC_REQUIRE([gl_MSVC_NOTHROW]) - if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then - AC_LIBOBJ([msvc-nothrow]) - fi + gl_CONDITIONAL([GL_COND_OBJ_MSVC_NOTHROW], + [test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1]) gl_MODULE_INDICATOR([msvc-nothrow]) gl_MULTIARCH gl_NETDB_H gl_NETDB_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P gl_HEADER_NETINET_IN + gl_CONDITIONAL_HEADER([netinet/in.h]) AC_PROG_MKDIR_P gl_FUNC_NL_LANGINFO - if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then - AC_LIBOBJ([nl_langinfo]) - fi + gl_CONDITIONAL([GL_COND_OBJ_NL_LANGINFO], + [test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1]) + gl_CONDITIONAL([GL_COND_OBJ_NL_LANGINFO_LOCK], + [test $REPLACE_NL_LANGINFO = 1 && test $NL_LANGINFO_MTSAFE = 0]) if test $REPLACE_NL_LANGINFO = 1 && test $NL_LANGINFO_MTSAFE = 0; then - AC_LIBOBJ([nl_langinfo-lock]) gl_PREREQ_NL_LANGINFO_LOCK fi gl_LANGINFO_MODULE_INDICATOR([nl_langinfo]) gl_FUNC_OPEN - if test $REPLACE_OPEN = 1; then - AC_LIBOBJ([open]) + gl_CONDITIONAL([GL_COND_OBJ_OPEN], [test $REPLACE_OPEN = 1]) + AM_COND_IF([GL_COND_OBJ_OPEN], [ gl_PREREQ_OPEN - fi + ]) gl_FCNTL_MODULE_INDICATOR([open]) gl_PATHMAX gl_FUNC_REALLOC_GNU - if test $REPLACE_REALLOC = 1; then + if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 1; then AC_LIBOBJ([realloc]) fi + gl_STDLIB_MODULE_INDICATOR([realloc-gnu]) gl_FUNC_REALLOC_POSIX - if test $REPLACE_REALLOC = 1; then + if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then AC_LIBOBJ([realloc]) fi gl_STDLIB_MODULE_INDICATOR([realloc-posix]) gl_FUNC_REALLOCARRAY - if test $HAVE_REALLOCARRAY = 0 || test $REPLACE_REALLOCARRAY = 1; then - AC_LIBOBJ([reallocarray]) + gl_CONDITIONAL([GL_COND_OBJ_REALLOCARRAY], + [test $HAVE_REALLOCARRAY = 0 || test $REPLACE_REALLOCARRAY = 1]) + AM_COND_IF([GL_COND_OBJ_REALLOCARRAY], [ gl_PREREQ_REALLOCARRAY - fi + ]) gl_MODULE_INDICATOR([reallocarray]) gl_STDLIB_MODULE_INDICATOR([reallocarray]) gl_REGEX - if test $ac_use_included_regex = yes; then - AC_LIBOBJ([regex]) + gl_CONDITIONAL([GL_COND_OBJ_REGEX], [test $ac_use_included_regex = yes]) + AM_COND_IF([GL_COND_OBJ_REGEX], [ gl_PREREQ_REGEX - fi + ]) gl_SERVENT gl_FUNC_SETENV - if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then - AC_LIBOBJ([setenv]) - fi + gl_CONDITIONAL([GL_COND_OBJ_SETENV], + [test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1]) gl_STDLIB_MODULE_INDICATOR([setenv]) gl_FUNC_SETLOCALE_NULL - if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then - AC_LIBOBJ([setlocale-lock]) + gl_CONDITIONAL([GL_COND_OBJ_SETLOCALE_LOCK], + [test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0]) + AM_COND_IF([GL_COND_OBJ_SETLOCALE_LOCK], [ gl_PREREQ_SETLOCALE_LOCK - fi + ]) gl_LOCALE_MODULE_INDICATOR([setlocale_null]) gl_SIZE_MAX gl_FUNC_SNPRINTF @@ -593,25 +610,46 @@ AC_DEFUN([gl_INIT], gl_TYPE_SOCKLEN_T gt_TYPE_SSIZE_T gl_FUNC_STAT - if test $REPLACE_STAT = 1; then - AC_LIBOBJ([stat]) + gl_CONDITIONAL([GL_COND_OBJ_STAT], [test $REPLACE_STAT = 1]) + AM_COND_IF([GL_COND_OBJ_STAT], [ case "$host_os" in mingw*) AC_LIBOBJ([stat-w32]) ;; esac gl_PREREQ_STAT - fi + ]) gl_SYS_STAT_MODULE_INDICATOR([stat]) gl_STAT_TIME gl_STAT_BIRTHTIME gl_STDALIGN_H - AM_STDBOOL_H + gl_CONDITIONAL_HEADER([stdalign.h]) + AC_PROG_MKDIR_P + gl_STDBOOL_H + gl_CONDITIONAL_HEADER([stdbool.h]) + AC_PROG_MKDIR_P + AC_CHECK_HEADERS_ONCE([stdckdint.h]) + if test $ac_cv_header_stdckdint_h = yes; then + GL_GENERATE_STDCKDINT_H=false + else + GL_GENERATE_STDCKDINT_H=true + fi + gl_CONDITIONAL_HEADER([stdckdint.h]) + AC_PROG_MKDIR_P gl_STDDEF_H gl_STDDEF_H_REQUIRE_DEFAULTS + gl_CONDITIONAL_HEADER([stddef.h]) + AC_PROG_MKDIR_P gl_STDINT_H + gl_CONDITIONAL_HEADER([stdint.h]) + dnl Because of gl_REPLACE_LIMITS_H: + gl_CONDITIONAL_HEADER([limits.h]) + AC_PROG_MKDIR_P gl_STDIO_H gl_STDIO_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P + gl_CONDITIONAL([GL_COND_OBJ_STDIO_READ], [test $REPLACE_STDIO_READ_FUNCS = 1]) + gl_CONDITIONAL([GL_COND_OBJ_STDIO_WRITE], [test $REPLACE_STDIO_WRITE_FUNCS = 1]) dnl No need to create extra modules for these functions. Everyone who uses dnl likely needs them. gl_STDIO_MODULE_INDICATOR([fscanf]) @@ -637,15 +675,16 @@ AC_DEFUN([gl_INIT], gl_STDIO_MODULE_INDICATOR([fwrite]) gl_STDLIB_H gl_STDLIB_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P gl_STRCASE - if test $HAVE_STRCASECMP = 0; then - AC_LIBOBJ([strcasecmp]) + gl_CONDITIONAL([GL_COND_OBJ_STRCASECMP], [test $HAVE_STRCASECMP = 0]) + AM_COND_IF([GL_COND_OBJ_STRCASECMP], [ gl_PREREQ_STRCASECMP - fi - if test $HAVE_STRNCASECMP = 0; then - AC_LIBOBJ([strncasecmp]) + ]) + gl_CONDITIONAL([GL_COND_OBJ_STRNCASECMP], [test $HAVE_STRNCASECMP = 0]) + AM_COND_IF([GL_COND_OBJ_STRNCASECMP], [ gl_PREREQ_STRNCASECMP - fi + ]) gl_FUNC_STRCASESTR if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then AC_LIBOBJ([strcasestr]) @@ -658,26 +697,27 @@ AC_DEFUN([gl_INIT], fi gl_STRING_MODULE_INDICATOR([strcasestr]) gl_FUNC_STRERROR - if test $REPLACE_STRERROR = 1; then - AC_LIBOBJ([strerror]) - fi + gl_CONDITIONAL([GL_COND_OBJ_STRERROR], [test $REPLACE_STRERROR = 1]) gl_MODULE_INDICATOR([strerror]) gl_STRING_MODULE_INDICATOR([strerror]) AC_REQUIRE([gl_HEADER_ERRNO_H]) AC_REQUIRE([gl_FUNC_STRERROR_0]) - if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then - AC_LIBOBJ([strerror-override]) + gl_CONDITIONAL([GL_COND_OBJ_STRERROR_OVERRIDE], + [test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1]) + AM_COND_IF([GL_COND_OBJ_STRERROR_OVERRIDE], [ gl_PREREQ_SYS_H_WINSOCK2 - fi + ]) gl_STRING_H gl_STRING_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P gl_STRINGS_H gl_STRINGS_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P gl_FUNC_STRSEP - if test $HAVE_STRSEP = 0; then - AC_LIBOBJ([strsep]) + gl_CONDITIONAL([GL_COND_OBJ_STRSEP], [test $HAVE_STRSEP = 0]) + AM_COND_IF([GL_COND_OBJ_STRSEP], [ gl_PREREQ_STRSEP - fi + ]) gl_STRING_MODULE_INDICATOR([strsep]) gl_FUNC_STRSTR_SIMPLE if test $REPLACE_STRSTR = 1; then @@ -699,27 +739,33 @@ AC_DEFUN([gl_INIT], AC_REQUIRE([gl_THREADLIB]) gl_TIME_H gl_TIME_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P gl_TIME_R - if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then - AC_LIBOBJ([time_r]) + gl_CONDITIONAL([GL_COND_OBJ_TIME_R], + [test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1]) + AM_COND_IF([GL_COND_OBJ_TIME_R], [ gl_PREREQ_TIME_R - fi + ]) gl_TIME_MODULE_INDICATOR([time_r]) gl_FUNC_TIMEGM - if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then - AC_LIBOBJ([timegm]) + gl_CONDITIONAL([GL_COND_OBJ_TIMEGM], + [test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1]) + AM_COND_IF([GL_COND_OBJ_TIMEGM], [ gl_PREREQ_TIMEGM - fi + ]) gl_TIME_MODULE_INDICATOR([timegm]) gl_UNISTD_H gl_UNISTD_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P gl_FUNC_GLIBC_UNLOCKED_IO gl_FUNC_UNSETENV - if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then - AC_LIBOBJ([unsetenv]) + gl_CONDITIONAL([GL_COND_OBJ_UNSETENV], + [test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1]) + AM_COND_IF([GL_COND_OBJ_UNSETENV], [ gl_PREREQ_UNSETENV - fi + ]) gl_STDLIB_MODULE_INDICATOR([unsetenv]) + AC_C_VARARRAYS AC_REQUIRE([AC_C_RESTRICT]) gl_FUNC_VASNPRINTF gl_FUNC_VASPRINTF @@ -731,38 +777,29 @@ AC_DEFUN([gl_INIT], gl_STDIO_MODULE_INDICATOR([vsnprintf]) gl_WCHAR_H gl_WCHAR_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P gl_FUNC_WCRTOMB - if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then - AC_LIBOBJ([wcrtomb]) + gl_CONDITIONAL([GL_COND_OBJ_WCRTOMB], + [test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1]) + AM_COND_IF([GL_COND_OBJ_WCRTOMB], [ gl_PREREQ_WCRTOMB - fi + ]) gl_WCHAR_MODULE_INDICATOR([wcrtomb]) gl_WCTYPE_H gl_WCTYPE_H_REQUIRE_DEFAULTS + AC_PROG_MKDIR_P AC_REQUIRE([AC_CANONICAL_HOST]) - case "$host_os" in - mingw*) - AC_LIBOBJ([windows-mutex]) - ;; - esac + gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_MUTEX], + [case "$host_os" in mingw*) true;; *) false;; esac]) AC_REQUIRE([AC_CANONICAL_HOST]) - case "$host_os" in - mingw*) - AC_LIBOBJ([windows-once]) - ;; - esac + gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_ONCE], + [case "$host_os" in mingw*) true;; *) false;; esac]) AC_REQUIRE([AC_CANONICAL_HOST]) - case "$host_os" in - mingw*) - AC_LIBOBJ([windows-recmutex]) - ;; - esac + gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_RECMUTEX], + [case "$host_os" in mingw*) true;; *) false;; esac]) AC_REQUIRE([AC_CANONICAL_HOST]) - case "$host_os" in - mingw*) - AC_LIBOBJ([windows-rwlock]) - ;; - esac + gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_RWLOCK], + [case "$host_os" in mingw*) true;; *) false;; esac]) gl_XALLOC gl_MODULE_INDICATOR([xalloc]) gl_MODULE_INDICATOR([xalloc-die]) @@ -789,16 +826,28 @@ AC_DEFUN([gl_INIT], AC_CONFIG_COMMANDS_PRE([ gl_libobjs= gl_ltlibobjs= + gl_libobjdeps= if test -n "$gl_LIBOBJS"; then # Remove the extension. +changequote(,)dnl sed_drop_objext='s/\.o$//;s/\.obj$//' + sed_dirname1='s,//*,/,g' + sed_dirname2='s,\(.\)/$,\1,' + sed_dirname3='s,^[^/]*$,.,' + sed_dirname4='s,\(.\)/[^/]*$,\1,' + sed_basename1='s,.*/,,' +changequote([, ])dnl for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gl_libobjs="$gl_libobjs $i.$ac_objext" gl_ltlibobjs="$gl_ltlibobjs $i.lo" + i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"` + i_base=`echo "$i" | sed -e "$sed_basename1"` + gl_libobjdeps="$gl_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po" done fi AC_SUBST([gl_LIBOBJS], [$gl_libobjs]) AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs]) + AC_SUBST([gl_LIBOBJDEPS], [$gl_libobjdeps]) ]) gltests_libdeps= gltests_ltlibdeps= @@ -811,6 +860,7 @@ AC_DEFUN([gl_INIT], m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL]) gl_COMMON gl_source_base='tests' + gl_source_base_prefix= changequote(,)dnl gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS changequote([, ])dnl @@ -839,17 +889,30 @@ changequote([, ])dnl AC_CONFIG_COMMANDS_PRE([ gltests_libobjs= gltests_ltlibobjs= + gltests_libobjdeps= if test -n "$gltests_LIBOBJS"; then # Remove the extension. +changequote(,)dnl sed_drop_objext='s/\.o$//;s/\.obj$//' + sed_dirname1='s,//*,/,g' + sed_dirname2='s,\(.\)/$,\1,' + sed_dirname3='s,^[^/]*$,.,' + sed_dirname4='s,\(.\)/[^/]*$,\1,' + sed_basename1='s,.*/,,' +changequote([, ])dnl for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gltests_libobjs="$gltests_libobjs $i.$ac_objext" gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" + i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"` + i_base=`echo "$i" | sed -e "$sed_basename1"` + gltests_libobjdeps="$gltests_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po" done fi AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs]) AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs]) + AC_SUBST([gltests_LIBOBJDEPS], [$gltests_libobjdeps]) ]) + AC_REQUIRE([gl_CC_GNULIB_WARNINGS]) LIBGNU_LIBDEPS="$gl_libdeps" AC_SUBST([LIBGNU_LIBDEPS]) LIBGNU_LTLIBDEPS="$gl_ltlibdeps" @@ -1000,6 +1063,7 @@ AC_DEFUN([gl_FILE_LIST], [ lib/idpriv.h lib/idx.h lib/inet_ntop.c + lib/intprops-internal.h lib/intprops.h lib/inttypes.in.h lib/itold.c @@ -1080,9 +1144,12 @@ AC_DEFUN([gl_FILE_LIST], [ lib/stat.c lib/stdalign.in.h lib/stdbool.in.h + lib/stdckdint.in.h lib/stddef.in.h lib/stdint.in.h lib/stdio-impl.h + lib/stdio-read.c + lib/stdio-write.c lib/stdio.in.h lib/stdlib.in.h lib/str-two-way.h @@ -1285,6 +1352,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/ungetc.m4 m4/unistd_h.m4 m4/unlocked-io.m4 + m4/vararrays.m4 m4/vasnprintf.m4 m4/vasprintf.m4 m4/visibility.m4 diff --git a/gl/m4/gnulib-tool.m4 b/gl/m4/gnulib-tool.m4 index 3d56d83..8428901 100644 --- a/gl/m4/gnulib-tool.m4 +++ b/gl/m4/gnulib-tool.m4 @@ -1,5 +1,5 @@ -# gnulib-tool.m4 serial 2 -dnl Copyright (C) 2004-2005, 2009-2021 Free Software Foundation, Inc. +# gnulib-tool.m4 serial 4 +dnl Copyright (C) 2004-2005, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -44,6 +44,12 @@ AC_DEFUN([gl_LGPL], []) dnl Usage: gl_MAKEFILE_NAME([FILENAME]) AC_DEFUN([gl_MAKEFILE_NAME], []) +dnl Usage: gl_TESTS_MAKEFILE_NAME([FILENAME]) +AC_DEFUN([gl_TESTS_MAKEFILE_NAME], []) + +dnl Usage: gl_AUTOMAKE_SUBDIR +AC_DEFUN([gl_AUTOMAKE_SUBDIR], []) + dnl Usage: gl_LIBTOOL AC_DEFUN([gl_LIBTOOL], []) diff --git a/gl/m4/host-cpu-c-abi.m4 b/gl/m4/host-cpu-c-abi.m4 index 64e28b1..b922324 100644 --- a/gl/m4/host-cpu-c-abi.m4 +++ b/gl/m4/host-cpu-c-abi.m4 @@ -1,5 +1,5 @@ -# host-cpu-c-abi.m4 serial 14 -dnl Copyright (C) 2002-2021 Free Software Foundation, Inc. +# host-cpu-c-abi.m4 serial 15 +dnl Copyright (C) 2002-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -382,6 +382,9 @@ EOF #ifndef __ia64__ #undef __ia64__ #endif +#ifndef __loongarch64__ +#undef __loongarch64__ +#endif #ifndef __m68k__ #undef __m68k__ #endif diff --git a/gl/m4/hostent.m4 b/gl/m4/hostent.m4 index f1390a3..69fc5ac 100644 --- a/gl/m4/hostent.m4 +++ b/gl/m4/hostent.m4 @@ -1,5 +1,5 @@ # hostent.m4 serial 4 -dnl Copyright (C) 2008, 2010-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2008, 2010-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/iconv.m4 b/gl/m4/iconv.m4 index d0e61de..2065c97 100644 --- a/gl/m4/iconv.m4 +++ b/gl/m4/iconv.m4 @@ -1,5 +1,5 @@ -# iconv.m4 serial 24 -dnl Copyright (C) 2000-2002, 2007-2014, 2016-2021 Free Software Foundation, +# iconv.m4 serial 26 +dnl Copyright (C) 2000-2002, 2007-2014, 2016-2022 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -234,12 +234,6 @@ AC_DEFUN([AM_ICONV_LINK], dnl Define AM_ICONV using AC_DEFUN_ONCE, in order to avoid warnings like dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". -dnl This is tricky because of the way 'aclocal' is implemented: -dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. -dnl Otherwise aclocal's initial scan pass would miss the macro definition. -dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. -dnl Otherwise aclocal would emit many "Use of uninitialized value $1" -dnl warnings. AC_DEFUN_ONCE([AM_ICONV], [ AM_ICONV_LINK @@ -280,4 +274,20 @@ size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, si ICONV_CONST="const" fi ]) + + dnl A summary result, for those packages which want to print a summary at the + dnl end of the configuration. + if test "$am_func_iconv" = yes; then + if test -n "$LIBICONV"; then + am_cv_func_iconv_summary='yes, in libiconv' + else + am_cv_func_iconv_summary='yes, in libc' + fi + else + if test "$am_cv_func_iconv" = yes; then + am_cv_func_iconv_summary='not working, consider installing GNU libiconv' + else + am_cv_func_iconv_summary='no, consider installing GNU libiconv' + fi + fi ]) diff --git a/gl/m4/idpriv.m4 b/gl/m4/idpriv.m4 index d96fdd1..b3b1c7b 100644 --- a/gl/m4/idpriv.m4 +++ b/gl/m4/idpriv.m4 @@ -1,5 +1,5 @@ # idpriv.m4 serial 1 -dnl Copyright (C) 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4 index bdd542b..a9247f6 100644 --- a/gl/m4/include_next.m4 +++ b/gl/m4/include_next.m4 @@ -1,5 +1,5 @@ # include_next.m4 serial 26 -dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -193,9 +193,9 @@ AC_DEFUN([gl_NEXT_HEADERS_INTERNAL], if test AS_VAR_GET([gl_header_exists]) = yes; then AS_VAR_POPDEF([gl_header_exists]) ]) - gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME) - AS_VAR_COPY([gl_header], [gl_cv_absolute_]AS_TR_SH(gl_HEADER_NAME)) - AS_VAR_SET([gl_next_header], ['"'$gl_header'"']) + gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME) + AS_VAR_COPY([gl_header], [gl_cv_absolute_]AS_TR_SH(gl_HEADER_NAME)) + AS_VAR_SET([gl_next_header], ['"'$gl_header'"']) m4_if([$2], [check], [else AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) diff --git a/gl/m4/inet_ntop.m4 b/gl/m4/inet_ntop.m4 index 171f53e..c335cae 100644 --- a/gl/m4/inet_ntop.m4 +++ b/gl/m4/inet_ntop.m4 @@ -1,5 +1,5 @@ # inet_ntop.m4 serial 21 -dnl Copyright (C) 2005-2006, 2008-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2005-2006, 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/intl-thread-locale.m4 b/gl/m4/intl-thread-locale.m4 index 890fec0..d5d5b26 100644 --- a/gl/m4/intl-thread-locale.m4 +++ b/gl/m4/intl-thread-locale.m4 @@ -1,5 +1,5 @@ # intl-thread-locale.m4 serial 9 -dnl Copyright (C) 2015-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2015-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/intlmacosx.m4 b/gl/m4/intlmacosx.m4 index 4ae0d12..ecc88d6 100644 --- a/gl/m4/intlmacosx.m4 +++ b/gl/m4/intlmacosx.m4 @@ -1,5 +1,5 @@ # intlmacosx.m4 serial 8 (gettext-0.20.2) -dnl Copyright (C) 2004-2014, 2016, 2019-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2004-2014, 2016, 2019-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/intmax_t.m4 b/gl/m4/intmax_t.m4 index 63c4b41..8a15dab 100644 --- a/gl/m4/intmax_t.m4 +++ b/gl/m4/intmax_t.m4 @@ -1,5 +1,5 @@ # intmax_t.m4 serial 9 -dnl Copyright (C) 1997-2004, 2006-2007, 2009-2021 Free Software Foundation, +dnl Copyright (C) 1997-2004, 2006-2007, 2009-2022 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/inttypes.m4 b/gl/m4/inttypes.m4 index 64b1de5..df25a21 100644 --- a/gl/m4/inttypes.m4 +++ b/gl/m4/inttypes.m4 @@ -1,5 +1,5 @@ -# inttypes.m4 serial 35 -dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. +# inttypes.m4 serial 36 +dnl Copyright (C) 2006-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -36,7 +36,7 @@ AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE], AC_DEFUN([gl_INTTYPES_PRI_SCN], [ PRIPTR_PREFIX= - if test -n "$STDINT_H"; then + if $GL_GENERATE_STDINT_H; then dnl Using the gnulib . It defines intptr_t to 'long' or dnl 'long long', depending on _WIN64. AC_COMPILE_IFELSE( diff --git a/gl/m4/inttypes_h.m4 b/gl/m4/inttypes_h.m4 index 672a93e..6e9eebf 100644 --- a/gl/m4/inttypes_h.m4 +++ b/gl/m4/inttypes_h.m4 @@ -1,5 +1,5 @@ # inttypes_h.m4 serial 10 -dnl Copyright (C) 1997-2004, 2006, 2008-2021 Free Software Foundation, Inc. +dnl Copyright (C) 1997-2004, 2006, 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/langinfo_h.m4 b/gl/m4/langinfo_h.m4 index 87959f7..563c8c4 100644 --- a/gl/m4/langinfo_h.m4 +++ b/gl/m4/langinfo_h.m4 @@ -1,5 +1,5 @@ # langinfo_h.m4 serial 12 -dnl Copyright (C) 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/largefile.m4 b/gl/m4/largefile.m4 index fbde5e6..ec9677c 100644 --- a/gl/m4/largefile.m4 +++ b/gl/m4/largefile.m4 @@ -1,7 +1,7 @@ # Enable large files on systems where this is not the default. # Enable support for files on Linux file systems with 64-bit inode numbers. -# Copyright 1992-1996, 1998-2021 Free Software Foundation, Inc. +# Copyright 1992-1996, 1998-2022 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -10,8 +10,10 @@ # It does not set _LARGEFILE_SOURCE=1 on HP-UX/ia64 32-bit, although this # setting of _LARGEFILE_SOURCE is needed so that declares fseeko # and ftello in C++ mode as well. +# Fixed in Autoconf 2.72, which has AC_SYS_YEAR2038. AC_DEFUN([gl_SET_LARGEFILE_SOURCE], [ + m4_ifndef([AC_SYS_YEAR2038], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_FUNC_FSEEKO case "$host_os" in @@ -20,9 +22,10 @@ AC_DEFUN([gl_SET_LARGEFILE_SOURCE], [Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2).]) ;; esac + ]) ]) -# Work around a problem in Autoconf through at least 2.71 on glibc 2.34+ +# Work around a problem in Autoconf through 2.71 on glibc 2.34+ # with _TIME_BITS. Also, work around a problem in autoconf <= 2.69: # AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5, # or configures them incorrectly in some cases. @@ -43,6 +46,7 @@ m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES], ]) ])# m4_version_prereq 2.70 +m4_ifndef([AC_SYS_YEAR2038], [ # _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, # CACHE-VAR, @@ -118,6 +122,7 @@ AS_IF([test "$enable_largefile" != no], [64], [gl_YEAR2038_BODY([])])]) ])# AC_SYS_LARGEFILE +])# m4_ifndef AC_SYS_YEAR2038 # Enable large files on systems where this is implemented by Gnulib, not by the # system headers. diff --git a/gl/m4/lib-ld.m4 b/gl/m4/lib-ld.m4 index 076358d..934207a 100644 --- a/gl/m4/lib-ld.m4 +++ b/gl/m4/lib-ld.m4 @@ -1,5 +1,5 @@ # lib-ld.m4 serial 10 -dnl Copyright (C) 1996-2003, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 1996-2003, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/lib-link.m4 b/gl/m4/lib-link.m4 index 787efab..3b75bcd 100644 --- a/gl/m4/lib-link.m4 +++ b/gl/m4/lib-link.m4 @@ -1,5 +1,5 @@ -# lib-link.m4 serial 32 -dnl Copyright (C) 2001-2021 Free Software Foundation, Inc. +# lib-link.m4 serial 33 +dnl Copyright (C) 2001-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -196,8 +196,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" ]) AC_ARG_WITH(PACK[-prefix], -[[ --with-]]PACK[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib - --without-]]PACK[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], +[[ --with-]]PACK[[-prefix[=DIR] search for ]]PACKLIBS[[ in DIR/include and DIR/lib + --without-]]PACK[[-prefix don't search for ]]PACKLIBS[[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no diff --git a/gl/m4/lib-prefix.m4 b/gl/m4/lib-prefix.m4 index 3c94db0..999f712 100644 --- a/gl/m4/lib-prefix.m4 +++ b/gl/m4/lib-prefix.m4 @@ -1,5 +1,5 @@ -# lib-prefix.m4 serial 19 -dnl Copyright (C) 2001-2005, 2008-2021 Free Software Foundation, Inc. +# lib-prefix.m4 serial 20 +dnl Copyright (C) 2001-2005, 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -174,7 +174,7 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB], AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf], [AC_EGREP_CPP([Extensible Linking Format], - [#ifdef __ELF__ + [#if defined __ELF__ || (defined __linux__ && defined __EDG__) Extensible Linking Format #endif ], diff --git a/gl/m4/limits-h.m4 b/gl/m4/limits-h.m4 index 00c9fe9..5d5a5bf 100644 --- a/gl/m4/limits-h.m4 +++ b/gl/m4/limits-h.m4 @@ -1,6 +1,6 @@ dnl Check whether limits.h has needed features. -dnl Copyright 2016-2021 Free Software Foundation, Inc. +dnl Copyright 2016-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -27,18 +27,15 @@ AC_DEFUN_ONCE([gl_LIMITS_H], [gl_cv_header_limits_width=yes], [gl_cv_header_limits_width=no])]) if test "$gl_cv_header_limits_width" = yes; then - LIMITS_H= + GL_GENERATE_LIMITS_H=false else - LIMITS_H=limits.h + GL_GENERATE_LIMITS_H=true fi - AC_SUBST([LIMITS_H]) - AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"]) ]) dnl Unconditionally enables the replacement of . AC_DEFUN([gl_REPLACE_LIMITS_H], [ AC_REQUIRE([gl_LIMITS_H]) - LIMITS_H='limits.h' - AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"]) + GL_GENERATE_LIMITS_H=true ]) diff --git a/gl/m4/localcharset.m4 b/gl/m4/localcharset.m4 index 04389fc..f5dbbd4 100644 --- a/gl/m4/localcharset.m4 +++ b/gl/m4/localcharset.m4 @@ -1,5 +1,5 @@ # localcharset.m4 serial 8 -dnl Copyright (C) 2002, 2004, 2006, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2004, 2006, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/locale-fr.m4 b/gl/m4/locale-fr.m4 index b61df7e..3753891 100644 --- a/gl/m4/locale-fr.m4 +++ b/gl/m4/locale-fr.m4 @@ -1,5 +1,5 @@ # locale-fr.m4 serial 20 -dnl Copyright (C) 2003, 2005-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2005-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/locale-ja.m4 b/gl/m4/locale-ja.m4 index cd94288..73a5d1a 100644 --- a/gl/m4/locale-ja.m4 +++ b/gl/m4/locale-ja.m4 @@ -1,5 +1,5 @@ # locale-ja.m4 serial 15 -dnl Copyright (C) 2003, 2005-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2005-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/locale-zh.m4 b/gl/m4/locale-zh.m4 index 1228be8..c997971 100644 --- a/gl/m4/locale-zh.m4 +++ b/gl/m4/locale-zh.m4 @@ -1,5 +1,5 @@ # locale-zh.m4 serial 15 -dnl Copyright (C) 2003, 2005-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2005-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/locale_h.m4 b/gl/m4/locale_h.m4 index 444a381..ca5d0d0 100644 --- a/gl/m4/locale_h.m4 +++ b/gl/m4/locale_h.m4 @@ -1,5 +1,5 @@ # locale_h.m4 serial 28 -dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/localeconv.m4 b/gl/m4/localeconv.m4 index e29c7c3..09c1a1a 100644 --- a/gl/m4/localeconv.m4 +++ b/gl/m4/localeconv.m4 @@ -1,5 +1,5 @@ # localeconv.m4 serial 1 -dnl Copyright (C) 2012-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2012-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/lock.m4 b/gl/m4/lock.m4 index d68c12d..c4cbf07 100644 --- a/gl/m4/lock.m4 +++ b/gl/m4/lock.m4 @@ -1,5 +1,5 @@ # lock.m4 serial 14 -dnl Copyright (C) 2005-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2005-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/lseek.m4 b/gl/m4/lseek.m4 index faab09b..0583511 100644 --- a/gl/m4/lseek.m4 +++ b/gl/m4/lseek.m4 @@ -1,5 +1,5 @@ # lseek.m4 serial 12 -dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/malloc.m4 b/gl/m4/malloc.m4 index 972e808..6b76c1e 100644 --- a/gl/m4/malloc.m4 +++ b/gl/m4/malloc.m4 @@ -1,5 +1,5 @@ -# malloc.m4 serial 27 -dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. +# malloc.m4 serial 28 +dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -43,8 +43,9 @@ AC_DEFUN([gl_FUNC_MALLOC_GNU], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_MALLOC_POSIX]) - if test $REPLACE_MALLOC = 0; then - _AC_FUNC_MALLOC_IF([], [REPLACE_MALLOC=1]) + REPLACE_MALLOC_FOR_MALLOC_GNU="$REPLACE_MALLOC_FOR_MALLOC_POSIX" + if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 0; then + _AC_FUNC_MALLOC_IF([], [REPLACE_MALLOC_FOR_MALLOC_GNU=1]) fi ]) @@ -56,7 +57,7 @@ AC_DEFUN([gl_FUNC_MALLOC_PTRDIFF], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([gl_CHECK_MALLOC_PTRDIFF]) - test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC=1 + test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC_FOR_MALLOC_POSIX=1 ]) # Test whether malloc, realloc, calloc refuse to create objects @@ -109,7 +110,7 @@ AC_DEFUN([gl_FUNC_MALLOC_POSIX], AC_DEFINE([HAVE_MALLOC_POSIX], [1], [Define if malloc, realloc, and calloc set errno on allocation failure.]) else - REPLACE_MALLOC=1 + REPLACE_MALLOC_FOR_MALLOC_POSIX=1 fi ]) diff --git a/gl/m4/malloca.m4 b/gl/m4/malloca.m4 index 06ed2c6..77eb96a 100644 --- a/gl/m4/malloca.m4 +++ b/gl/m4/malloca.m4 @@ -1,5 +1,5 @@ # malloca.m4 serial 2 -dnl Copyright (C) 2003-2004, 2006-2007, 2009-2021 Free Software Foundation, +dnl Copyright (C) 2003-2004, 2006-2007, 2009-2022 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/math_h.m4 b/gl/m4/math_h.m4 index b3a10c3..a08526a 100644 --- a/gl/m4/math_h.m4 +++ b/gl/m4/math_h.m4 @@ -1,5 +1,5 @@ # math_h.m4 serial 125 -dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/mbrtowc.m4 b/gl/m4/mbrtowc.m4 index 1d4e73d..ec8716b 100644 --- a/gl/m4/mbrtowc.m4 +++ b/gl/m4/mbrtowc.m4 @@ -1,5 +1,5 @@ # mbrtowc.m4 serial 38 -*- coding: utf-8 -*- -dnl Copyright (C) 2001-2002, 2004-2005, 2008-2021 Free Software Foundation, +dnl Copyright (C) 2001-2002, 2004-2005, 2008-2022 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/mbsinit.m4 b/gl/m4/mbsinit.m4 index dc6e10d..ebd2d4f 100644 --- a/gl/m4/mbsinit.m4 +++ b/gl/m4/mbsinit.m4 @@ -1,5 +1,5 @@ # mbsinit.m4 serial 9 -dnl Copyright (C) 2008, 2010-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2008, 2010-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/mbstate_t.m4 b/gl/m4/mbstate_t.m4 index e7fe358..a6eba1b 100644 --- a/gl/m4/mbstate_t.m4 +++ b/gl/m4/mbstate_t.m4 @@ -1,5 +1,5 @@ # mbstate_t.m4 serial 14 -dnl Copyright (C) 2000-2002, 2008-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2000-2002, 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/mbtowc.m4 b/gl/m4/mbtowc.m4 index 7fc74c9..2827e83 100644 --- a/gl/m4/mbtowc.m4 +++ b/gl/m4/mbtowc.m4 @@ -1,5 +1,5 @@ # mbtowc.m4 serial 3 -dnl Copyright (C) 2011-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/memchr.m4 b/gl/m4/memchr.m4 index ca08192..c7489d8 100644 --- a/gl/m4/memchr.m4 +++ b/gl/m4/memchr.m4 @@ -1,5 +1,5 @@ # memchr.m4 serial 18 -dnl Copyright (C) 2002-2004, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2004, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/minmax.m4 b/gl/m4/minmax.m4 index e21a687..b976739 100644 --- a/gl/m4/minmax.m4 +++ b/gl/m4/minmax.m4 @@ -1,5 +1,5 @@ # minmax.m4 serial 4 -dnl Copyright (C) 2005, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/mktime.m4 b/gl/m4/mktime.m4 index 721189a..431b17d 100644 --- a/gl/m4/mktime.m4 +++ b/gl/m4/mktime.m4 @@ -1,5 +1,5 @@ -# serial 36 -dnl Copyright (C) 2002-2003, 2005-2007, 2009-2021 Free Software Foundation, +# serial 37 +dnl Copyright (C) 2002-2003, 2005-2007, 2009-2022 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -82,7 +82,8 @@ spring_forward_gap () instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ - putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + if (putenv ("TZ=PST8PDT,M4.1.0,M10.5.0") != 0) + return -1; tm.tm_year = 98; tm.tm_mon = 3; @@ -170,7 +171,8 @@ year_2050_test () instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ - putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + if (putenv ("TZ=PST8PDT,M4.1.0,M10.5.0") != 0) + return -1; t = mktime (&tm); @@ -181,6 +183,25 @@ year_2050_test () || (0 < t && answer - 120 <= t && t <= answer + 120)); } +static int +indiana_test () +{ + if (putenv ("TZ=America/Indiana/Indianapolis") != 0) + return -1; + struct tm tm; + tm.tm_year = 1986 - 1900; tm.tm_mon = 4 - 1; tm.tm_mday = 28; + tm.tm_hour = 16; tm.tm_min = 24; tm.tm_sec = 50; tm.tm_isdst = 0; + time_t std = mktime (&tm); + if (! (std == 515107490 || std == 515107503)) + return 1; + + /* This platform supports TZDB, either without or with leap seconds. + Return true if GNU Bug#48085 is absent. */ + tm.tm_isdst = 1; + time_t dst = mktime (&tm); + return std - dst == 60 * 60; +} + int main () { @@ -236,7 +257,7 @@ main () result |= 16; if (! spring_forward_gap ()) result |= 32; - if (! year_2050_test ()) + if (! year_2050_test () || ! indiana_test ()) result |= 64; return result; }]])], diff --git a/gl/m4/mmap-anon.m4 b/gl/m4/mmap-anon.m4 index e47aa2d..a4580ff 100644 --- a/gl/m4/mmap-anon.m4 +++ b/gl/m4/mmap-anon.m4 @@ -1,5 +1,5 @@ # mmap-anon.m4 serial 12 -dnl Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/mode_t.m4 b/gl/m4/mode_t.m4 index 3bd4b89..e08d27a 100644 --- a/gl/m4/mode_t.m4 +++ b/gl/m4/mode_t.m4 @@ -1,5 +1,5 @@ # mode_t.m4 serial 2 -dnl Copyright (C) 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/mountlist.m4 b/gl/m4/mountlist.m4 index 49029ed..a3f72df 100644 --- a/gl/m4/mountlist.m4 +++ b/gl/m4/mountlist.m4 @@ -1,5 +1,5 @@ # serial 15 -dnl Copyright (C) 2002-2006, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/msvc-inval.m4 b/gl/m4/msvc-inval.m4 index 3ba5b4e..b32cf6e 100644 --- a/gl/m4/msvc-inval.m4 +++ b/gl/m4/msvc-inval.m4 @@ -1,5 +1,5 @@ # msvc-inval.m4 serial 1 -dnl Copyright (C) 2011-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/msvc-nothrow.m4 b/gl/m4/msvc-nothrow.m4 index aae25ce..16ceb1f 100644 --- a/gl/m4/msvc-nothrow.m4 +++ b/gl/m4/msvc-nothrow.m4 @@ -1,5 +1,5 @@ # msvc-nothrow.m4 serial 1 -dnl Copyright (C) 2011-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/multiarch.m4 b/gl/m4/multiarch.m4 index f1678d9..5d94276 100644 --- a/gl/m4/multiarch.m4 +++ b/gl/m4/multiarch.m4 @@ -1,5 +1,5 @@ # multiarch.m4 serial 9 -dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/netdb_h.m4 b/gl/m4/netdb_h.m4 index eb7c3b8..d6a9d70 100644 --- a/gl/m4/netdb_h.m4 +++ b/gl/m4/netdb_h.m4 @@ -1,5 +1,5 @@ # netdb_h.m4 serial 15 -dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/netinet_in_h.m4 b/gl/m4/netinet_in_h.m4 index c555596..de26fe8 100644 --- a/gl/m4/netinet_in_h.m4 +++ b/gl/m4/netinet_in_h.m4 @@ -1,5 +1,5 @@ -# netinet_in_h.m4 serial 5 -dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. +# netinet_in_h.m4 serial 6 +dnl Copyright (C) 2006-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -14,9 +14,9 @@ AC_DEFUN([gl_HEADER_NETINET_IN], [gl_cv_header_netinet_in_h_selfcontained=no]) ]) if test $gl_cv_header_netinet_in_h_selfcontained = yes; then - NETINET_IN_H='' + GL_GENERATE_NETINET_IN_H=false else - NETINET_IN_H='netinet/in.h' + GL_GENERATE_NETINET_IN_H=true AC_CHECK_HEADERS([netinet/in.h]) gl_CHECK_NEXT_HEADERS([netinet/in.h]) if test $ac_cv_header_netinet_in_h = yes; then @@ -26,6 +26,4 @@ AC_DEFUN([gl_HEADER_NETINET_IN], fi AC_SUBST([HAVE_NETINET_IN_H]) fi - AC_SUBST([NETINET_IN_H]) - AM_CONDITIONAL([GL_GENERATE_NETINET_IN_H], [test -n "$NETINET_IN_H"]) ]) diff --git a/gl/m4/nl_langinfo.m4 b/gl/m4/nl_langinfo.m4 index 6ad32c8..d20a09c 100644 --- a/gl/m4/nl_langinfo.m4 +++ b/gl/m4/nl_langinfo.m4 @@ -1,5 +1,5 @@ # nl_langinfo.m4 serial 8 -dnl Copyright (C) 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/nls.m4 b/gl/m4/nls.m4 index f4f6b80..7c11c90 100644 --- a/gl/m4/nls.m4 +++ b/gl/m4/nls.m4 @@ -1,5 +1,5 @@ # nls.m4 serial 6 (gettext-0.20.2) -dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019-2021 Free +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019-2022 Free dnl Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/nocrash.m4 b/gl/m4/nocrash.m4 index 27412cd..91f00c1 100644 --- a/gl/m4/nocrash.m4 +++ b/gl/m4/nocrash.m4 @@ -1,5 +1,5 @@ # nocrash.m4 serial 5 -dnl Copyright (C) 2005, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/off_t.m4 b/gl/m4/off_t.m4 index bdec43c..0890ada 100644 --- a/gl/m4/off_t.m4 +++ b/gl/m4/off_t.m4 @@ -1,5 +1,5 @@ # off_t.m4 serial 1 -dnl Copyright (C) 2012-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2012-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/open-cloexec.m4 b/gl/m4/open-cloexec.m4 index 542a90f..16cd5ec 100644 --- a/gl/m4/open-cloexec.m4 +++ b/gl/m4/open-cloexec.m4 @@ -1,6 +1,6 @@ # Test whether O_CLOEXEC is defined. -dnl Copyright 2017-2021 Free Software Foundation, Inc. +dnl Copyright 2017-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/open-slash.m4 b/gl/m4/open-slash.m4 index e619039..4fbf491 100644 --- a/gl/m4/open-slash.m4 +++ b/gl/m4/open-slash.m4 @@ -1,5 +1,5 @@ # open-slash.m4 serial 2 -dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/open.m4 b/gl/m4/open.m4 index c634386..f82fd6c 100644 --- a/gl/m4/open.m4 +++ b/gl/m4/open.m4 @@ -1,5 +1,5 @@ # open.m4 serial 15 -dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/pathmax.m4 b/gl/m4/pathmax.m4 index e67c656..44add99 100644 --- a/gl/m4/pathmax.m4 +++ b/gl/m4/pathmax.m4 @@ -1,5 +1,5 @@ # pathmax.m4 serial 11 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2021 Free Software Foundation, +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2022 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/pid_t.m4 b/gl/m4/pid_t.m4 index b7650a1..cb26f36 100644 --- a/gl/m4/pid_t.m4 +++ b/gl/m4/pid_t.m4 @@ -1,5 +1,5 @@ # pid_t.m4 serial 4 -dnl Copyright (C) 2020-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2020-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/po.m4 b/gl/m4/po.m4 index 66bea3e..ace6f96 100644 --- a/gl/m4/po.m4 +++ b/gl/m4/po.m4 @@ -1,5 +1,5 @@ # po.m4 serial 31 (gettext-0.20.2) -dnl Copyright (C) 1995-2014, 2016, 2018-2021 Free Software Foundation, Inc. +dnl Copyright (C) 1995-2014, 2016, 2018-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/printf.m4 b/gl/m4/printf.m4 index 284c7c5..667452e 100644 --- a/gl/m4/printf.m4 +++ b/gl/m4/printf.m4 @@ -1,5 +1,5 @@ # printf.m4 serial 73 -dnl Copyright (C) 2003, 2007-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2007-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/progtest.m4 b/gl/m4/progtest.m4 index 9e8823c..4a5b0b4 100644 --- a/gl/m4/progtest.m4 +++ b/gl/m4/progtest.m4 @@ -1,5 +1,5 @@ # progtest.m4 serial 9 (gettext-0.21.1) -dnl Copyright (C) 1996-2003, 2005, 2008-2021 Free Software Foundation, Inc. +dnl Copyright (C) 1996-2003, 2005, 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/pthread_rwlock_rdlock.m4 b/gl/m4/pthread_rwlock_rdlock.m4 index a5fbead..8ad7839 100644 --- a/gl/m4/pthread_rwlock_rdlock.m4 +++ b/gl/m4/pthread_rwlock_rdlock.m4 @@ -1,5 +1,5 @@ # pthread_rwlock_rdlock.m4 serial 4 -dnl Copyright (C) 2017-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2017-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/realloc.m4 b/gl/m4/realloc.m4 index 0abc418..86e57c2 100644 --- a/gl/m4/realloc.m4 +++ b/gl/m4/realloc.m4 @@ -1,5 +1,5 @@ -# realloc.m4 serial 24 -dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. +# realloc.m4 serial 26 +dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -43,8 +43,8 @@ AC_DEFUN([gl_FUNC_REALLOC_GNU], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_REALLOC_POSIX]) - if test $REPLACE_REALLOC = 0; then - _AC_FUNC_REALLOC_IF([], [REPLACE_REALLOC=1]) + if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 0; then + _AC_FUNC_REALLOC_IF([], [REPLACE_REALLOC_FOR_REALLOC_GNU=1]) fi ])# gl_FUNC_REALLOC_GNU @@ -57,7 +57,7 @@ AC_DEFUN([gl_FUNC_REALLOC_POSIX], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_MALLOC_POSIX]) - if test $REPLACE_MALLOC = 1; then - REPLACE_REALLOC=1 + if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then + REPLACE_REALLOC_FOR_REALLOC_POSIX=1 fi ]) diff --git a/gl/m4/reallocarray.m4 b/gl/m4/reallocarray.m4 index 9d8a626..f39ab6e 100644 --- a/gl/m4/reallocarray.m4 +++ b/gl/m4/reallocarray.m4 @@ -1,5 +1,5 @@ # reallocarray.m4 serial 3 -dnl Copyright (C) 2017-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2017-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/regex.m4 b/gl/m4/regex.m4 index 1c7e562..4734298 100644 --- a/gl/m4/regex.m4 +++ b/gl/m4/regex.m4 @@ -1,6 +1,6 @@ # serial 73 -# Copyright (C) 1996-2001, 2003-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2022 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/servent.m4 b/gl/m4/servent.m4 index 9bc3bcd..c1b7d15 100644 --- a/gl/m4/servent.m4 +++ b/gl/m4/servent.m4 @@ -1,5 +1,5 @@ # servent.m4 serial 4 -dnl Copyright (C) 2008, 2010-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2008, 2010-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/setenv.m4 b/gl/m4/setenv.m4 index f79a278..2000039 100644 --- a/gl/m4/setenv.m4 +++ b/gl/m4/setenv.m4 @@ -1,5 +1,5 @@ # setenv.m4 serial 30 -dnl Copyright (C) 2001-2004, 2006-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2004, 2006-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/setlocale_null.m4 b/gl/m4/setlocale_null.m4 index 2c958ed..09ea50e 100644 --- a/gl/m4/setlocale_null.m4 +++ b/gl/m4/setlocale_null.m4 @@ -1,5 +1,5 @@ # setlocale_null.m4 serial 5 -dnl Copyright (C) 2019-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2019-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/sha1.m4 b/gl/m4/sha1.m4 index fdba7a6..0d7abc7 100644 --- a/gl/m4/sha1.m4 +++ b/gl/m4/sha1.m4 @@ -1,5 +1,5 @@ # sha1.m4 serial 12 -dnl Copyright (C) 2002-2006, 2008-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/size_max.m4 b/gl/m4/size_max.m4 index 1d41ce9..1d6abae 100644 --- a/gl/m4/size_max.m4 +++ b/gl/m4/size_max.m4 @@ -1,5 +1,5 @@ # size_max.m4 serial 12 -dnl Copyright (C) 2003, 2005-2006, 2008-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2005-2006, 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/snprintf.m4 b/gl/m4/snprintf.m4 index 8520994..7420591 100644 --- a/gl/m4/snprintf.m4 +++ b/gl/m4/snprintf.m4 @@ -1,5 +1,5 @@ # snprintf.m4 serial 7 -dnl Copyright (C) 2002-2004, 2007-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2004, 2007-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/socketlib.m4 b/gl/m4/socketlib.m4 index 0f8a082..b8bd0af 100644 --- a/gl/m4/socketlib.m4 +++ b/gl/m4/socketlib.m4 @@ -1,5 +1,5 @@ # socketlib.m4 serial 3 -dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/sockets.m4 b/gl/m4/sockets.m4 index 02b43b6..aa04acc 100644 --- a/gl/m4/sockets.m4 +++ b/gl/m4/sockets.m4 @@ -1,5 +1,5 @@ # sockets.m4 serial 7 -dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/socklen.m4 b/gl/m4/socklen.m4 index eca1d1b..1390ac4 100644 --- a/gl/m4/socklen.m4 +++ b/gl/m4/socklen.m4 @@ -1,5 +1,5 @@ # socklen.m4 serial 11 -dnl Copyright (C) 2005-2007, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2005-2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/sockpfaf.m4 b/gl/m4/sockpfaf.m4 index 17e14c7..b1c4068 100644 --- a/gl/m4/sockpfaf.m4 +++ b/gl/m4/sockpfaf.m4 @@ -1,5 +1,5 @@ # sockpfaf.m4 serial 10 -dnl Copyright (C) 2004, 2006, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2004, 2006, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/ssize_t.m4 b/gl/m4/ssize_t.m4 index f0ed509..03b2b89 100644 --- a/gl/m4/ssize_t.m4 +++ b/gl/m4/ssize_t.m4 @@ -1,5 +1,5 @@ # ssize_t.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2001-2003, 2006, 2010-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2003, 2006, 2010-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/stat-time.m4 b/gl/m4/stat-time.m4 index df1c2a7..342857d 100644 --- a/gl/m4/stat-time.m4 +++ b/gl/m4/stat-time.m4 @@ -1,6 +1,6 @@ # Checks for stat-related time functions. -# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2021 Free Software +# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2022 Free Software # Foundation, Inc. # This file is free software; the Free Software Foundation diff --git a/gl/m4/stat.m4 b/gl/m4/stat.m4 index 9bcdb72..916eb88 100644 --- a/gl/m4/stat.m4 +++ b/gl/m4/stat.m4 @@ -1,6 +1,6 @@ # serial 18 -# Copyright (C) 2009-2021 Free Software Foundation, Inc. +# Copyright (C) 2009-2022 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/std-gnu11.m4 b/gl/m4/std-gnu11.m4 index 7b1a042..5ca1860 100644 --- a/gl/m4/std-gnu11.m4 +++ b/gl/m4/std-gnu11.m4 @@ -9,7 +9,7 @@ m4_version_prereq([2.70], [], [ -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2022 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gl/m4/stdalign.m4 b/gl/m4/stdalign.m4 index e22d7f7..78577cb 100644 --- a/gl/m4/stdalign.m4 +++ b/gl/m4/stdalign.m4 @@ -1,6 +1,6 @@ # Check for stdalign.h that conforms to C11. -dnl Copyright 2011-2021 Free Software Foundation, Inc. +dnl Copyright 2011-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -49,11 +49,8 @@ AC_DEFUN([gl_STDALIGN_H], [gl_cv_header_working_stdalign_h=no])]) if test $gl_cv_header_working_stdalign_h = yes; then - STDALIGN_H='' + GL_GENERATE_STDALIGN_H=false else - STDALIGN_H='stdalign.h' + GL_GENERATE_STDALIGN_H=true fi - - AC_SUBST([STDALIGN_H]) - AM_CONDITIONAL([GL_GENERATE_STDALIGN_H], [test -n "$STDALIGN_H"]) ]) diff --git a/gl/m4/stdbool.m4 b/gl/m4/stdbool.m4 index 3169779..c67908a 100644 --- a/gl/m4/stdbool.m4 +++ b/gl/m4/stdbool.m4 @@ -1,15 +1,15 @@ # Check for stdbool.h that conforms to C99. -dnl Copyright (C) 2002-2006, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. -#serial 8 +#serial 9 # Prepare for substituting if it is not supported. -AC_DEFUN([AM_STDBOOL_H], +AC_DEFUN([gl_STDBOOL_H], [ AC_REQUIRE([AC_CHECK_HEADER_STDBOOL]) AC_REQUIRE([AC_CANONICAL_HOST]) @@ -22,20 +22,18 @@ AC_DEFUN([AM_STDBOOL_H], case "$host_os" in solaris*) if test -z "$GCC"; then - STDBOOL_H='stdbool.h' + GL_GENERATE_STDBOOL_H=true else - STDBOOL_H='' + GL_GENERATE_STDBOOL_H=false fi ;; *) - STDBOOL_H='' + GL_GENERATE_STDBOOL_H=false ;; esac else - STDBOOL_H='stdbool.h' + GL_GENERATE_STDBOOL_H=true fi - AC_SUBST([STDBOOL_H]) - AM_CONDITIONAL([GL_GENERATE_STDBOOL_H], [test -n "$STDBOOL_H"]) if test "$ac_cv_type__Bool" = yes; then HAVE__BOOL=1 @@ -45,78 +43,76 @@ AC_DEFUN([AM_STDBOOL_H], AC_SUBST([HAVE__BOOL]) ]) -# AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future. -AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H]) - -# This version of the macro is needed in autoconf <= 2.68. +m4_version_prereq([2.72], [], [ AC_DEFUN([AC_CHECK_HEADER_STDBOOL], - [AC_CACHE_CHECK([for stdbool.h that conforms to C99], + [AC_CHECK_TYPES([_Bool]) + AC_CACHE_CHECK([for stdbool.h that conforms to C99 or later], [ac_cv_header_stdbool_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( - [[ - #include - - #ifdef __cplusplus - typedef bool Bool; - #else - typedef _Bool Bool; - #ifndef bool - "error: bool is not defined" - #endif - #ifndef false - "error: false is not defined" - #endif - #if false - "error: false is not 0" - #endif - #ifndef true - "error: true is not defined" - #endif - #if true != 1 - "error: true is not 1" - #endif + [[#include + + /* "true" and "false" should be usable in #if expressions and + integer constant expressions, and "bool" should be a valid + type name. + + Although C 1999 requires bool, true, and false to be macros, + C 2023 and C++ 2011 overrule that, so do not test for that. + Although C 1999 requires __bool_true_false_are_defined and + _Bool, C 2023 says they are obsolescent, so do not require + them. */ + + #if !true + #error "'true' is not true" + #endif + #if true != 1 + #error "'true' is not equal to 1" #endif + char b[true == 1 ? 1 : -1]; + char c[true]; - #ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" + #if false + #error "'false' is not false" + #endif + #if false != 0 + #error "'false' is not equal to 0" #endif + char d[false == 0 ? 1 : -1]; + + enum { e = false, f = true, g = false * true, h = true * 256 }; + + char i[(bool) 0.5 == true ? 1 : -1]; + char j[(bool) 0.0 == false ? 1 : -1]; + char k[sizeof (bool) > 0 ? 1 : -1]; + + struct sb { bool s: 1; bool t; } s; + char l[sizeof s.t > 0 ? 1 : -1]; - struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s; - - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - /* See body of main program for 'e'. */ - char f[(Bool) 0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ - Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; - char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; + bool m[h]; + char n[sizeof m == h * sizeof m[0] ? 1 : -1]; + char o[-1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html */ - Bool q = true; - Bool *pq = &q; - bool *qq = &q; + bool p = true; + bool *pp = &p; ]], [[ - bool e = &s; - *pq |= q; *pq |= ! q; - *qq |= q; *qq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p + !q + !pq + !qq); + bool ps = &s; + *pp |= p; + *pp |= ! p; + + /* Refer to every declared value, so they cannot be + discarded as unused. */ + return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !j + !k + + !l + !m + !n + !o + !p + !pp + !ps); ]])], [ac_cv_header_stdbool_h=yes], [ac_cv_header_stdbool_h=no])]) - AC_CHECK_TYPES([_Bool]) -]) +])# AC_CHECK_HEADER_STDBOOL + +]) # m4_version_prereq 2.72 diff --git a/gl/m4/stddef_h.m4 b/gl/m4/stddef_h.m4 index 1303d2e..abfd203 100644 --- a/gl/m4/stddef_h.m4 +++ b/gl/m4/stddef_h.m4 @@ -1,5 +1,5 @@ -# stddef_h.m4 serial 11 -dnl Copyright (C) 2009-2021 Free Software Foundation, Inc. +# stddef_h.m4 serial 12 +dnl Copyright (C) 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -14,7 +14,7 @@ AC_DEFUN_ONCE([gl_STDDEF_H], dnl Persuade OpenBSD to declare max_align_t. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - STDDEF_H= + GL_GENERATE_STDDEF_H=false dnl Test whether the type max_align_t exists and whether its alignment dnl "is as great as is supported by the implementation in all contexts". @@ -41,12 +41,12 @@ AC_DEFUN_ONCE([gl_STDDEF_H], ]) if test $gl_cv_type_max_align_t = no; then HAVE_MAX_ALIGN_T=0 - STDDEF_H=stddef.h + GL_GENERATE_STDDEF_H=true fi if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 - STDDEF_H=stddef.h + GL_GENERATE_STDDEF_H=true fi AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions], @@ -58,12 +58,10 @@ AC_DEFUN_ONCE([gl_STDDEF_H], [gl_cv_decl_null_works=no])]) if test $gl_cv_decl_null_works = no; then REPLACE_NULL=1 - STDDEF_H=stddef.h + GL_GENERATE_STDDEF_H=true fi - AC_SUBST([STDDEF_H]) - AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"]) - if test -n "$STDDEF_H"; then + if $GL_GENERATE_STDDEF_H; then gl_NEXT_HEADERS([stddef.h]) fi ]) diff --git a/gl/m4/stdint.m4 b/gl/m4/stdint.m4 index 2eb1652..c3f0894 100644 --- a/gl/m4/stdint.m4 +++ b/gl/m4/stdint.m4 @@ -1,5 +1,5 @@ -# stdint.m4 serial 60 -dnl Copyright (C) 2001-2021 Free Software Foundation, Inc. +# stdint.m4 serial 61 +dnl Copyright (C) 2001-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -296,7 +296,7 @@ static const char *macro_values[] = HAVE_C99_STDINT_H=0 HAVE_SYS_BITYPES_H=0 HAVE_SYS_INTTYPES_H=0 - STDINT_H=stdint.h + GL_GENERATE_STDINT_H=true case "$gl_cv_header_working_stdint_h" in *yes) HAVE_C99_STDINT_H=1 @@ -341,7 +341,7 @@ int32_t i32 = INT32_C (0x7fffffff); ]])], [gl_cv_header_stdint_width=yes])]) if test "$gl_cv_header_stdint_width" = yes; then - STDINT_H= + GL_GENERATE_STDINT_H=false fi ;; *) @@ -364,8 +364,6 @@ int32_t i32 = INT32_C (0x7fffffff); AC_SUBST([HAVE_C99_STDINT_H]) AC_SUBST([HAVE_SYS_BITYPES_H]) AC_SUBST([HAVE_SYS_INTTYPES_H]) - AC_SUBST([STDINT_H]) - AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"]) ]) dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES) diff --git a/gl/m4/stdint_h.m4 b/gl/m4/stdint_h.m4 index 18aa50a..b8684b6 100644 --- a/gl/m4/stdint_h.m4 +++ b/gl/m4/stdint_h.m4 @@ -1,5 +1,5 @@ # stdint_h.m4 serial 9 -dnl Copyright (C) 1997-2004, 2006, 2008-2021 Free Software Foundation, Inc. +dnl Copyright (C) 1997-2004, 2006, 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4 index e704383..42e9607 100644 --- a/gl/m4/stdio_h.m4 +++ b/gl/m4/stdio_h.m4 @@ -1,5 +1,5 @@ -# stdio_h.m4 serial 56 -dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. +# stdio_h.m4 serial 59 +dnl Copyright (C) 2007-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -40,41 +40,32 @@ AC_DEFUN_ONCE([gl_STDIO_H], attribute "__gnu_printf__" instead of "__printf__"]) fi - dnl This ifdef is necessary to avoid an error "missing file lib/stdio-read.c" - dnl "expected source file, required through AC_LIBSOURCES, not found". It is - dnl also an optimization, to avoid performing a configure check whose result - dnl is not used. But it does not make the test of GNULIB_STDIO_H_NONBLOCKING - dnl or GNULIB_NONBLOCKING redundant. + dnl This ifdef is an optimization, to avoid performing a configure check whose + dnl result is not used. But it does not make the test of + dnl GNULIB_STDIO_H_NONBLOCKING or GNULIB_NONBLOCKING redundant. m4_ifdef([gl_NONBLOCKING_IO], [ gl_NONBLOCKING_IO if test $gl_cv_have_nonblocking != yes; then REPLACE_STDIO_READ_FUNCS=1 - AC_LIBOBJ([stdio-read]) fi ]) - dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c" - dnl "expected source file, required through AC_LIBSOURCES, not found". It is - dnl also an optimization, to avoid performing a configure check whose result - dnl is not used. But it does not make the test of GNULIB_STDIO_H_SIGPIPE or - dnl GNULIB_SIGPIPE redundant. + dnl This ifdef is an optimization, to avoid performing a configure check whose + dnl result is not used. But it does not make the test of + dnl GNULIB_STDIO_H_SIGPIPE or GNULIB_SIGPIPE redundant. m4_ifdef([gl_SIGNAL_SIGPIPE], [ gl_SIGNAL_SIGPIPE if test $gl_cv_header_signal_h_SIGPIPE != yes; then REPLACE_STDIO_WRITE_FUNCS=1 - AC_LIBOBJ([stdio-write]) fi ]) - dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c" - dnl "expected source file, required through AC_LIBSOURCES, not found". It is - dnl also an optimization, to avoid performing a configure check whose result - dnl is not used. But it does not make the test of GNULIB_STDIO_H_NONBLOCKING - dnl or GNULIB_NONBLOCKING redundant. + dnl This ifdef is an optimization, to avoid performing a configure check whose + dnl result is not used. But it does not make the test of + dnl GNULIB_STDIO_H_NONBLOCKING or GNULIB_NONBLOCKING redundant. m4_ifdef([gl_NONBLOCKING_IO], [ gl_NONBLOCKING_IO if test $gl_cv_have_nonblocking != yes; then REPLACE_STDIO_WRITE_FUNCS=1 - AC_LIBOBJ([stdio-write]) fi ]) @@ -119,6 +110,7 @@ AC_DEFUN([gl_STDIO_H_REQUIRE_DEFAULTS], gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FGETC]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FGETS]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FOPEN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FOPEN_GNU]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPRINTF]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPRINTF_POSIX]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPURGE]) @@ -202,6 +194,7 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS], REPLACE_FDOPEN=0; AC_SUBST([REPLACE_FDOPEN]) REPLACE_FFLUSH=0; AC_SUBST([REPLACE_FFLUSH]) REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN]) + REPLACE_FOPEN_FOR_FOPEN_GNU=0; AC_SUBST([REPLACE_FOPEN_FOR_FOPEN_GNU]) REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF]) REPLACE_FPURGE=0; AC_SUBST([REPLACE_FPURGE]) REPLACE_FREOPEN=0; AC_SUBST([REPLACE_FREOPEN]) diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4 index 9c1d1c7..9e20969 100644 --- a/gl/m4/stdlib_h.m4 +++ b/gl/m4/stdlib_h.m4 @@ -1,5 +1,5 @@ -# stdlib_h.m4 serial 63 -dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. +# stdlib_h.m4 serial 66 +dnl Copyright (C) 2007-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -68,12 +68,14 @@ AC_DEFUN([gl_STDLIB_H_REQUIRE_DEFAULTS], gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB__EXIT]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ALIGNED_ALLOC]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ATOLL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CALLOC_GNU]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CALLOC_POSIX]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CANONICALIZE_FILE_NAME]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREE_POSIX]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOADAVG]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSUBOPT]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GRANTPT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MALLOC_GNU]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MALLOC_POSIX]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBTOWC]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKDTEMP]) @@ -90,6 +92,7 @@ AC_DEFUN([gl_STDLIB_H_REQUIRE_DEFAULTS], gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM_R]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOCARRAY]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOC_GNU]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOC_POSIX]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALPATH]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RPMATCH]) @@ -164,11 +167,13 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT]) HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV]) REPLACE_ALIGNED_ALLOC=0; AC_SUBST([REPLACE_ALIGNED_ALLOC]) - REPLACE_CALLOC=0; AC_SUBST([REPLACE_CALLOC]) + REPLACE_CALLOC_FOR_CALLOC_GNU=0; AC_SUBST([REPLACE_CALLOC_FOR_CALLOC_GNU]) + REPLACE_CALLOC_FOR_CALLOC_POSIX=0; AC_SUBST([REPLACE_CALLOC_FOR_CALLOC_POSIX]) REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME]) REPLACE_FREE=0; AC_SUBST([REPLACE_FREE]) REPLACE_INITSTATE=0; AC_SUBST([REPLACE_INITSTATE]) - REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC]) + REPLACE_MALLOC_FOR_MALLOC_GNU=0; AC_SUBST([REPLACE_MALLOC_FOR_MALLOC_GNU]) + REPLACE_MALLOC_FOR_MALLOC_POSIX=0; AC_SUBST([REPLACE_MALLOC_FOR_MALLOC_POSIX]) REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC]) REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) REPLACE_POSIX_MEMALIGN=0; AC_SUBST([REPLACE_POSIX_MEMALIGN]) @@ -178,7 +183,8 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], REPLACE_QSORT_R=0; AC_SUBST([REPLACE_QSORT_R]) REPLACE_RANDOM=0; AC_SUBST([REPLACE_RANDOM]) REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R]) - REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC]) + REPLACE_REALLOC_FOR_REALLOC_GNU=0; AC_SUBST([REPLACE_REALLOC_FOR_REALLOC_GNU]) + REPLACE_REALLOC_FOR_REALLOC_POSIX=0; AC_SUBST([REPLACE_REALLOC_FOR_REALLOC_POSIX]) REPLACE_REALLOCARRAY=0; AC_SUBST([REPLACE_REALLOCARRAY]) REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) diff --git a/gl/m4/strcase.m4 b/gl/m4/strcase.m4 index ea88283..d1ffaba 100644 --- a/gl/m4/strcase.m4 +++ b/gl/m4/strcase.m4 @@ -1,5 +1,5 @@ # strcase.m4 serial 12 -dnl Copyright (C) 2002, 2005-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2005-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/strcasestr.m4 b/gl/m4/strcasestr.m4 index 6939144..6344b7e 100644 --- a/gl/m4/strcasestr.m4 +++ b/gl/m4/strcasestr.m4 @@ -1,5 +1,5 @@ # strcasestr.m4 serial 28 -dnl Copyright (C) 2005, 2007-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2007-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/strerror.m4 b/gl/m4/strerror.m4 index 438ba92..4716649 100644 --- a/gl/m4/strerror.m4 +++ b/gl/m4/strerror.m4 @@ -1,5 +1,5 @@ -# strerror.m4 serial 22 -dnl Copyright (C) 2002, 2007-2021 Free Software Foundation, Inc. +# strerror.m4 serial 23 +dnl Copyright (C) 2002, 2007-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -13,7 +13,7 @@ AC_DEFUN([gl_FUNC_STRERROR], m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [ AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS]) ]) - if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then + if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then AC_CACHE_CHECK([for working strerror function], [gl_cv_func_working_strerror], [AC_RUN_IFELSE( diff --git a/gl/m4/string_h.m4 b/gl/m4/string_h.m4 index e88ac9c..9e09b96 100644 --- a/gl/m4/string_h.m4 +++ b/gl/m4/string_h.m4 @@ -1,6 +1,6 @@ # Configure a GNU-like replacement for . -# Copyright (C) 2007-2021 Free Software Foundation, Inc. +# Copyright (C) 2007-2022 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/strings_h.m4 b/gl/m4/strings_h.m4 index 69de32a..6965b7c 100644 --- a/gl/m4/strings_h.m4 +++ b/gl/m4/strings_h.m4 @@ -1,7 +1,7 @@ # Configure a replacement for . # serial 9 -# Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. +# Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/strsep.m4 b/gl/m4/strsep.m4 index 8743f05..602f96a 100644 --- a/gl/m4/strsep.m4 +++ b/gl/m4/strsep.m4 @@ -1,5 +1,5 @@ # strsep.m4 serial 11 -dnl Copyright (C) 2002-2004, 2007, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2004, 2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/strstr.m4 b/gl/m4/strstr.m4 index a32e9c1..6cc2072 100644 --- a/gl/m4/strstr.m4 +++ b/gl/m4/strstr.m4 @@ -1,5 +1,5 @@ # strstr.m4 serial 24 -dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/sys_socket_h.m4 b/gl/m4/sys_socket_h.m4 index 5676a0d..ba3ae68 100644 --- a/gl/m4/sys_socket_h.m4 +++ b/gl/m4/sys_socket_h.m4 @@ -1,5 +1,5 @@ -# sys_socket_h.m4 serial 28 -dnl Copyright (C) 2005-2021 Free Software Foundation, Inc. +# sys_socket_h.m4 serial 29 +dnl Copyright (C) 2005-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -22,6 +22,7 @@ AC_DEFUN_ONCE([gl_SYS_SOCKET_H], ;; esac + GL_GENERATE_SYS_SOCKET_H=false AC_CACHE_CHECK([whether is self-contained], [gl_cv_header_sys_socket_h_selfcontained], [ @@ -44,7 +45,7 @@ AC_DEFUN_ONCE([gl_SYS_SOCKET_H], [gl_cv_header_sys_socket_h_shut=no]) ]) if test $gl_cv_header_sys_socket_h_shut = no; then - SYS_SOCKET_H='sys/socket.h' + GL_GENERATE_SYS_SOCKET_H=true fi fi fi @@ -83,7 +84,7 @@ AC_DEFUN_ONCE([gl_SYS_SOCKET_H], fi if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \ || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then - SYS_SOCKET_H='sys/socket.h' + GL_GENERATE_SYS_SOCKET_H=true fi gl_PREREQ_SYS_H_WINSOCK2 diff --git a/gl/m4/sys_stat_h.m4 b/gl/m4/sys_stat_h.m4 index ac91d42..2adbfde 100644 --- a/gl/m4/sys_stat_h.m4 +++ b/gl/m4/sys_stat_h.m4 @@ -1,5 +1,5 @@ -# sys_stat_h.m4 serial 41 -*- Autoconf -*- -dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. +# sys_stat_h.m4 serial 42 -*- Autoconf -*- +dnl Copyright (C) 2006-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -46,7 +46,7 @@ AC_DEFUN_ONCE([gl_SYS_STAT_H], dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include - ]], [fchmodat fstat fstatat futimens getumask lchmod lstat + ]], [chmod fchmodat fstat fstatat futimens getumask lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat]) AC_REQUIRE([AC_C_RESTRICT]) @@ -72,6 +72,7 @@ AC_DEFUN([gl_SYS_STAT_H_REQUIRE_DEFAULTS], [ m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_STAT_H_MODULE_INDICATOR_DEFAULTS], [ gl_UNISTD_H_REQUIRE_DEFAULTS dnl for REPLACE_FCHDIR + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CHMOD]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCHMODAT]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSTAT]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSTATAT]) @@ -112,6 +113,7 @@ AC_DEFUN([gl_SYS_STAT_H_DEFAULTS], HAVE_MKNOD=1; AC_SUBST([HAVE_MKNOD]) HAVE_MKNODAT=1; AC_SUBST([HAVE_MKNODAT]) HAVE_UTIMENSAT=1; AC_SUBST([HAVE_UTIMENSAT]) + REPLACE_CHMOD=0; AC_SUBST([REPLACE_CHMOD]) REPLACE_FCHMODAT=0; AC_SUBST([REPLACE_FCHMODAT]) REPLACE_FSTAT=0; AC_SUBST([REPLACE_FSTAT]) REPLACE_FSTATAT=0; AC_SUBST([REPLACE_FSTATAT]) diff --git a/gl/m4/sys_types_h.m4 b/gl/m4/sys_types_h.m4 index 6dd6fee..a5bef22 100644 --- a/gl/m4/sys_types_h.m4 +++ b/gl/m4/sys_types_h.m4 @@ -1,5 +1,5 @@ # sys_types_h.m4 serial 13 -dnl Copyright (C) 2011-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/sys_uio_h.m4 b/gl/m4/sys_uio_h.m4 index fa176e0..36f55ea 100644 --- a/gl/m4/sys_uio_h.m4 +++ b/gl/m4/sys_uio_h.m4 @@ -1,5 +1,5 @@ # sys_uio_h.m4 serial 3 -dnl Copyright (C) 2011-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/threadlib.m4 b/gl/m4/threadlib.m4 index 6b43bbd..ecb4970 100644 --- a/gl/m4/threadlib.m4 +++ b/gl/m4/threadlib.m4 @@ -1,5 +1,5 @@ # threadlib.m4 serial 32 -dnl Copyright (C) 2005-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2005-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/time_h.m4 b/gl/m4/time_h.m4 index b57474b..98d7b6e 100644 --- a/gl/m4/time_h.m4 +++ b/gl/m4/time_h.m4 @@ -1,8 +1,8 @@ # Configure a more-standard replacement for . -# Copyright (C) 2000-2001, 2003-2007, 2009-2021 Free Software Foundation, Inc. +# Copyright (C) 2000-2001, 2003-2007, 2009-2022 Free Software Foundation, Inc. -# serial 18 +# serial 19 # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -133,6 +133,7 @@ AC_DEFUN([gl_TIME_H_REQUIRE_DEFAULTS], gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRPTIME]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMEGM]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMESPEC_GET]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMESPEC_GETRES]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME_R]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME_RZ]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TZSET]) @@ -151,6 +152,7 @@ AC_DEFUN([gl_TIME_H_DEFAULTS], HAVE_STRPTIME=1; AC_SUBST([HAVE_STRPTIME]) HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM]) HAVE_TIMESPEC_GET=1; AC_SUBST([HAVE_TIMESPEC_GET]) + HAVE_TIMESPEC_GETRES=1; AC_SUBST([HAVE_TIMESPEC_GETRES]) dnl Even GNU libc does not have timezone_t yet. HAVE_TIMEZONE_T=0; AC_SUBST([HAVE_TIMEZONE_T]) dnl If another module says to replace or to not replace, do that. diff --git a/gl/m4/time_r.m4 b/gl/m4/time_r.m4 index 2d49b64..8a1ad9d 100644 --- a/gl/m4/time_r.m4 +++ b/gl/m4/time_r.m4 @@ -1,6 +1,6 @@ dnl Reentrant time functions: localtime_r, gmtime_r. -dnl Copyright (C) 2003, 2006-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2006-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/timegm.m4 b/gl/m4/timegm.m4 index 58123be..f189394 100644 --- a/gl/m4/timegm.m4 +++ b/gl/m4/timegm.m4 @@ -1,5 +1,5 @@ # timegm.m4 serial 13 -dnl Copyright (C) 2003, 2007, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/ungetc.m4 b/gl/m4/ungetc.m4 index dd5d1dd..12a1099 100644 --- a/gl/m4/ungetc.m4 +++ b/gl/m4/ungetc.m4 @@ -1,5 +1,5 @@ # ungetc.m4 serial 10 -dnl Copyright (C) 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4 index 0ce4ea4..4c66ccc 100644 --- a/gl/m4/unistd_h.m4 +++ b/gl/m4/unistd_h.m4 @@ -1,5 +1,5 @@ -# unistd_h.m4 serial 89 -dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. +# unistd_h.m4 serial 90 +dnl Copyright (C) 2006-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -112,6 +112,7 @@ AC_DEFUN([gl_UNISTD_H_REQUIRE_DEFAULTS], gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETOPT_POSIX]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPAGESIZE]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPASS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPASS_GNU]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETUSERSHELL]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GROUP_MEMBER]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISATTY]) @@ -170,98 +171,100 @@ AC_DEFUN([gl_UNISTD_H_REQUIRE_DEFAULTS], AC_DEFUN([gl_UNISTD_H_DEFAULTS], [ dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN]) - HAVE_COPY_FILE_RANGE=1; AC_SUBST([HAVE_COPY_FILE_RANGE]) - HAVE_DUP3=1; AC_SUBST([HAVE_DUP3]) - HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS]) - HAVE_EXECVPE=1; AC_SUBST([HAVE_EXECVPE]) - HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT]) - HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR]) - HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT]) - HAVE_FDATASYNC=1; AC_SUBST([HAVE_FDATASYNC]) - HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) - HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) - HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE]) - HAVE_GETENTROPY=1; AC_SUBST([HAVE_GETENTROPY]) - HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS]) - HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) - HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN]) - HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) - HAVE_GETPASS=1; AC_SUBST([HAVE_GETPASS]) - HAVE_GROUP_MEMBER=1; AC_SUBST([HAVE_GROUP_MEMBER]) - HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN]) - HAVE_LINK=1; AC_SUBST([HAVE_LINK]) - HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT]) - HAVE_PIPE=1; AC_SUBST([HAVE_PIPE]) - HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2]) - HAVE_PREAD=1; AC_SUBST([HAVE_PREAD]) - HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE]) - HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) - HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT]) - HAVE_SETHOSTNAME=1; AC_SUBST([HAVE_SETHOSTNAME]) - HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) - HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) - HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) - HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT]) - HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP]) - HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) - HAVE_DECL_EXECVPE=1; AC_SUBST([HAVE_DECL_EXECVPE]) - HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR]) - HAVE_DECL_FDATASYNC=1; AC_SUBST([HAVE_DECL_FDATASYNC]) - HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME]) - HAVE_DECL_GETLOGIN=1; AC_SUBST([HAVE_DECL_GETLOGIN]) - HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) - HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) - HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) - HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME]) - HAVE_DECL_TRUNCATE=1; AC_SUBST([HAVE_DECL_TRUNCATE]) - HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) - HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) - HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) - REPLACE_ACCESS=0; AC_SUBST([REPLACE_ACCESS]) - REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) - REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) - REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) - REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) - REPLACE_EXECL=0; AC_SUBST([REPLACE_EXECL]) - REPLACE_EXECLE=0; AC_SUBST([REPLACE_EXECLE]) - REPLACE_EXECLP=0; AC_SUBST([REPLACE_EXECLP]) - REPLACE_EXECV=0; AC_SUBST([REPLACE_EXECV]) - REPLACE_EXECVE=0; AC_SUBST([REPLACE_EXECVE]) - REPLACE_EXECVP=0; AC_SUBST([REPLACE_EXECVP]) - REPLACE_EXECVPE=0; AC_SUBST([REPLACE_EXECVPE]) - REPLACE_FACCESSAT=0; AC_SUBST([REPLACE_FACCESSAT]) - REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) - REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE]) - REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) - REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME]) - REPLACE_GETDTABLESIZE=0; AC_SUBST([REPLACE_GETDTABLESIZE]) - REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) - REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) - REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) - REPLACE_GETPASS=0; AC_SUBST([REPLACE_GETPASS]) - REPLACE_ISATTY=0; AC_SUBST([REPLACE_ISATTY]) - REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) - REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) - REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT]) - REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) - REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD]) - REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE]) - REPLACE_READ=0; AC_SUBST([REPLACE_READ]) - REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK]) - REPLACE_READLINKAT=0; AC_SUBST([REPLACE_READLINKAT]) - REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR]) - REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) - REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) - REPLACE_SYMLINKAT=0; AC_SUBST([REPLACE_SYMLINKAT]) - REPLACE_TRUNCATE=0; AC_SUBST([REPLACE_TRUNCATE]) - REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R]) - REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK]) - REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) - REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP]) - REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE]) - UNISTD_H_HAVE_SYS_RANDOM_H=0; AC_SUBST([UNISTD_H_HAVE_SYS_RANDOM_H]) - UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H]) + HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN]) + HAVE_COPY_FILE_RANGE=1; AC_SUBST([HAVE_COPY_FILE_RANGE]) + HAVE_DUP3=1; AC_SUBST([HAVE_DUP3]) + HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS]) + HAVE_EXECVPE=1; AC_SUBST([HAVE_EXECVPE]) + HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT]) + HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR]) + HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT]) + HAVE_FDATASYNC=1; AC_SUBST([HAVE_FDATASYNC]) + HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) + HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) + HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE]) + HAVE_GETENTROPY=1; AC_SUBST([HAVE_GETENTROPY]) + HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS]) + HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) + HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN]) + HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) + HAVE_GETPASS=1; AC_SUBST([HAVE_GETPASS]) + HAVE_GROUP_MEMBER=1; AC_SUBST([HAVE_GROUP_MEMBER]) + HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN]) + HAVE_LINK=1; AC_SUBST([HAVE_LINK]) + HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT]) + HAVE_PIPE=1; AC_SUBST([HAVE_PIPE]) + HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2]) + HAVE_PREAD=1; AC_SUBST([HAVE_PREAD]) + HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE]) + HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) + HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT]) + HAVE_SETHOSTNAME=1; AC_SUBST([HAVE_SETHOSTNAME]) + HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) + HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) + HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) + HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT]) + HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP]) + HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) + HAVE_DECL_EXECVPE=1; AC_SUBST([HAVE_DECL_EXECVPE]) + HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR]) + HAVE_DECL_FDATASYNC=1; AC_SUBST([HAVE_DECL_FDATASYNC]) + HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME]) + HAVE_DECL_GETLOGIN=1; AC_SUBST([HAVE_DECL_GETLOGIN]) + HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) + HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) + HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) + HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME]) + HAVE_DECL_TRUNCATE=1; AC_SUBST([HAVE_DECL_TRUNCATE]) + HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) + HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) + HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) + REPLACE_ACCESS=0; AC_SUBST([REPLACE_ACCESS]) + REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) + REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) + REPLACE_COPY_FILE_RANGE=0; AC_SUBST([REPLACE_COPY_FILE_RANGE]) + REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) + REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) + REPLACE_EXECL=0; AC_SUBST([REPLACE_EXECL]) + REPLACE_EXECLE=0; AC_SUBST([REPLACE_EXECLE]) + REPLACE_EXECLP=0; AC_SUBST([REPLACE_EXECLP]) + REPLACE_EXECV=0; AC_SUBST([REPLACE_EXECV]) + REPLACE_EXECVE=0; AC_SUBST([REPLACE_EXECVE]) + REPLACE_EXECVP=0; AC_SUBST([REPLACE_EXECVP]) + REPLACE_EXECVPE=0; AC_SUBST([REPLACE_EXECVPE]) + REPLACE_FACCESSAT=0; AC_SUBST([REPLACE_FACCESSAT]) + REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) + REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE]) + REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) + REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME]) + REPLACE_GETDTABLESIZE=0; AC_SUBST([REPLACE_GETDTABLESIZE]) + REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) + REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) + REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) + REPLACE_GETPASS=0; AC_SUBST([REPLACE_GETPASS]) + REPLACE_GETPASS_FOR_GETPASS_GNU=0; AC_SUBST([REPLACE_GETPASS_FOR_GETPASS_GNU]) + REPLACE_ISATTY=0; AC_SUBST([REPLACE_ISATTY]) + REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) + REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) + REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT]) + REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) + REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD]) + REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE]) + REPLACE_READ=0; AC_SUBST([REPLACE_READ]) + REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK]) + REPLACE_READLINKAT=0; AC_SUBST([REPLACE_READLINKAT]) + REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR]) + REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) + REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) + REPLACE_SYMLINKAT=0; AC_SUBST([REPLACE_SYMLINKAT]) + REPLACE_TRUNCATE=0; AC_SUBST([REPLACE_TRUNCATE]) + REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R]) + REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK]) + REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) + REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP]) + REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE]) + UNISTD_H_HAVE_SYS_RANDOM_H=0; AC_SUBST([UNISTD_H_HAVE_SYS_RANDOM_H]) + UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H]) UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS]) ]) diff --git a/gl/m4/unlocked-io.m4 b/gl/m4/unlocked-io.m4 index b689020..d42c95c 100644 --- a/gl/m4/unlocked-io.m4 +++ b/gl/m4/unlocked-io.m4 @@ -1,6 +1,6 @@ # unlocked-io.m4 serial 16 -# Copyright (C) 1998-2006, 2009-2021 Free Software Foundation, Inc. +# Copyright (C) 1998-2006, 2009-2022 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/vararrays.m4 b/gl/m4/vararrays.m4 new file mode 100644 index 0000000..28e22a4 --- /dev/null +++ b/gl/m4/vararrays.m4 @@ -0,0 +1,72 @@ +# Check for variable-length arrays. + +# serial 6 + +# From Paul Eggert + +# Copyright (C) 2001, 2009-2022 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +m4_version_prereq([2.70], [], [ + +# AC_C_VARARRAYS +# -------------- +# Check whether the C compiler supports variable-length arrays. +AC_DEFUN([AC_C_VARARRAYS], +[ + AC_CACHE_CHECK([for variable-length arrays], + ac_cv_c_vararrays, + [AC_EGREP_CPP([defined], + [#ifdef __STDC_NO_VLA__ + defined + #endif + ], + [ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[/* Test for VLA support. This test is partly inspired + from examples in the C standard. Use at least two VLA + functions to detect the GCC 3.4.3 bug described in: + https://lists.gnu.org/archive/html/bug-gnulib/2014-08/msg00014.html + */ + #ifdef __STDC_NO_VLA__ + syntax error; + #else + extern int n; + int B[100]; + int fvla (int m, int C[m][m]); + + int + simple (int count, int all[static count]) + { + return all[count - 1]; + } + + int + fvla (int m, int C[m][m]) + { + typedef int VLA[m][m]; + VLA x; + int D[m]; + static int (*q)[m] = &B; + int (*s)[n] = q; + return C && &x[0][0] == &D[0] && &D[0] == s[0]; + } + #endif + ]])], + [ac_cv_c_vararrays=yes], + [ac_cv_c_vararrays=no])])]) + if test "$ac_cv_c_vararrays" = yes; then + dnl This is for compatibility with Autoconf 2.61-2.69. + AC_DEFINE([HAVE_C_VARARRAYS], 1, + [Define to 1 if C supports variable-length arrays.]) + elif test "$ac_cv_c_vararrays" = no; then + AC_DEFINE([__STDC_NO_VLA__], 1, + [Define to 1 if C does not support variable-length arrays, and + if the compiler does not already define this.]) + fi +]) + +]) diff --git a/gl/m4/vasnprintf.m4 b/gl/m4/vasnprintf.m4 index 483bba9..afdece7 100644 --- a/gl/m4/vasnprintf.m4 +++ b/gl/m4/vasnprintf.m4 @@ -1,5 +1,5 @@ # vasnprintf.m4 serial 38 -dnl Copyright (C) 2002-2004, 2006-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2004, 2006-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/vasprintf.m4 b/gl/m4/vasprintf.m4 index a26de84..b92977b 100644 --- a/gl/m4/vasprintf.m4 +++ b/gl/m4/vasprintf.m4 @@ -1,5 +1,5 @@ # vasprintf.m4 serial 6 -dnl Copyright (C) 2002-2003, 2006-2007, 2009-2021 Free Software Foundation, +dnl Copyright (C) 2002-2003, 2006-2007, 2009-2022 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gl/m4/visibility.m4 b/gl/m4/visibility.m4 index d161bd7..4a212a4 100644 --- a/gl/m4/visibility.m4 +++ b/gl/m4/visibility.m4 @@ -1,5 +1,5 @@ # visibility.m4 serial 8 -dnl Copyright (C) 2005, 2008, 2010-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2008, 2010-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/vsnprintf.m4 b/gl/m4/vsnprintf.m4 index 5f5375e..02b448f 100644 --- a/gl/m4/vsnprintf.m4 +++ b/gl/m4/vsnprintf.m4 @@ -1,5 +1,5 @@ # vsnprintf.m4 serial 7 -dnl Copyright (C) 2002-2004, 2007-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2004, 2007-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/warn-on-use.m4 b/gl/m4/warn-on-use.m4 index 04edfe8..d43355a 100644 --- a/gl/m4/warn-on-use.m4 +++ b/gl/m4/warn-on-use.m4 @@ -1,5 +1,5 @@ # warn-on-use.m4 serial 9 -dnl Copyright (C) 2010-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2010-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/wchar_h.m4 b/gl/m4/wchar_h.m4 index 9529cdd..4baba1a 100644 --- a/gl/m4/wchar_h.m4 +++ b/gl/m4/wchar_h.m4 @@ -1,6 +1,6 @@ dnl A placeholder for ISO C99 , for platforms that have issues. -dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/wchar_t.m4 b/gl/m4/wchar_t.m4 index 34db10e..268e3e5 100644 --- a/gl/m4/wchar_t.m4 +++ b/gl/m4/wchar_t.m4 @@ -1,5 +1,5 @@ # wchar_t.m4 serial 4 (gettext-0.18.2) -dnl Copyright (C) 2002-2003, 2008-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2003, 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/wcrtomb.m4 b/gl/m4/wcrtomb.m4 index cd96f11..fee21d7 100644 --- a/gl/m4/wcrtomb.m4 +++ b/gl/m4/wcrtomb.m4 @@ -1,5 +1,5 @@ # wcrtomb.m4 serial 17 -dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/wctype_h.m4 b/gl/m4/wctype_h.m4 index 7d74212..702cb39 100644 --- a/gl/m4/wctype_h.m4 +++ b/gl/m4/wctype_h.m4 @@ -2,7 +2,7 @@ dnl A placeholder for ISO C99 , for platforms that lack it. -dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/wint_t.m4 b/gl/m4/wint_t.m4 index a49c508..adc5866 100644 --- a/gl/m4/wint_t.m4 +++ b/gl/m4/wint_t.m4 @@ -1,5 +1,5 @@ # wint_t.m4 serial 11 -dnl Copyright (C) 2003, 2007-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2007-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/xalloc.m4 b/gl/m4/xalloc.m4 index 8fabf1c..17a9c06 100644 --- a/gl/m4/xalloc.m4 +++ b/gl/m4/xalloc.m4 @@ -1,5 +1,5 @@ # xalloc.m4 serial 18 -dnl Copyright (C) 2002-2006, 2009-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/xsize.m4 b/gl/m4/xsize.m4 index 64e8a4f..0109049 100644 --- a/gl/m4/xsize.m4 +++ b/gl/m4/xsize.m4 @@ -1,5 +1,5 @@ # xsize.m4 serial 5 -dnl Copyright (C) 2003-2004, 2008-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2003-2004, 2008-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/m4/year2038.m4 b/gl/m4/year2038.m4 index da0f8d7..2e4427e 100644 --- a/gl/m4/year2038.m4 +++ b/gl/m4/year2038.m4 @@ -1,5 +1,5 @@ -# year2038.m4 serial 7 -dnl Copyright (C) 2017-2021 Free Software Foundation, Inc. +# year2038.m4 serial 8 +dnl Copyright (C) 2017-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -7,6 +7,12 @@ dnl with or without modifications, as long as this notice is preserved. dnl Attempt to ensure that 'time_t' can go past the year 2038 and that dnl the functions 'time', 'stat', etc. work with post-2038 timestamps. +m4_ifdef([AC_SYS_YEAR2038], [ + AC_DEFUN([gl_YEAR2038_EARLY]) + AC_DEFUN([gl_YEAR2038], [AC_SYS_YEAR2038]) + AC_DEFUN([gl_YEAR2038_BODY], [_AC_SYS_YEAR2038]) +], [ + AC_DEFUN([gl_YEAR2038_EARLY], [ AC_REQUIRE([AC_CANONICAL_HOST]) @@ -122,3 +128,5 @@ AC_DEFUN([gl_YEAR2038], [ gl_YEAR2038_BODY([require-year2038-safe]) ]) + +]) # m4_ifndef AC_SYS_YEAR2038 diff --git a/gl/m4/zzgnulib.m4 b/gl/m4/zzgnulib.m4 index b953384..fd73a20 100644 --- a/gl/m4/zzgnulib.m4 +++ b/gl/m4/zzgnulib.m4 @@ -1,5 +1,5 @@ # zzgnulib.m4 serial 1 -dnl Copyright (C) 2020-2021 Free Software Foundation, Inc. +dnl Copyright (C) 2020-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gl/malloc.c b/gl/malloc.c index 0d8b359..f334dd6 100644 --- a/gl/malloc.c +++ b/gl/malloc.c @@ -1,6 +1,6 @@ /* malloc() function that is glibc compatible. - Copyright (C) 1997-1998, 2006-2007, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 1997-1998, 2006-2007, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/malloc/.deps/.dirstamp b/gl/malloc/.deps/.dirstamp new file mode 100644 index 0000000..e69de29 diff --git a/gl/malloc/.deps/dynarray-skeleton.Po b/gl/malloc/.deps/dynarray-skeleton.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/gl/malloc/.deps/dynarray-skeleton.Po @@ -0,0 +1 @@ +# dummy diff --git a/gl/malloc/.deps/dynarray_at_failure.Po b/gl/malloc/.deps/dynarray_at_failure.Po new file mode 100644 index 0000000..a5b1cb9 --- /dev/null +++ b/gl/malloc/.deps/dynarray_at_failure.Po @@ -0,0 +1,232 @@ +malloc/dynarray_at_failure.o: malloc/dynarray_at_failure.c libc-config.h \ + ../config.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features-time64.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/wordsize.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/timesize.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdc-predef.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/cdefs.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/long-double.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno-base.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/error_t.h \ + cdefs.h stdlib.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdlib.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/libc-header-start.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stddef.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitflags.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitstatus.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/floatn.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/floatn-common.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/locale_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__locale_t.h \ + sys/types.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/types.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/typesizes.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/time64.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clock_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clockid_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/time_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/timer_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdint-intn.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/endian.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/endian.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/endianness.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/byteswap.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uintn-identity.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/select.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/select.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/sigset_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__sigset_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timeval.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timespec.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthreadtypes.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/thread-shared-types.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + alloca.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-float.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/__stddef_max_align_t.h \ + dynarray.h malloc/dynarray.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdbool.h \ + string.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/string.h \ + strings.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/strings.h \ + stdio.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdio.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdarg.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__fpos_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__mbstate_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__fpos64_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__FILE.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/FILE.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_FILE.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/cookie_io_functions_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdio_lim.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdio.h + +libc-config.h: + +../config.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features-time64.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/wordsize.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/timesize.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdc-predef.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/cdefs.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/long-double.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno-base.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/error_t.h: + +cdefs.h: + +stdlib.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdlib.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/libc-header-start.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stddef.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitflags.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitstatus.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/floatn.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/floatn-common.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/locale_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__locale_t.h: + +sys/types.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/types.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/typesizes.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/time64.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clock_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clockid_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/time_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/timer_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdint-intn.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/endian.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/endian.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/endianness.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/byteswap.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uintn-identity.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/select.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/select.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/sigset_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__sigset_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timeval.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timespec.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthreadtypes.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/thread-shared-types.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +alloca.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-float.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/__stddef_max_align_t.h: + +dynarray.h: + +malloc/dynarray.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdbool.h: + +string.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/string.h: + +strings.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/strings.h: + +stdio.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdio.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdarg.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__fpos_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__mbstate_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__fpos64_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__FILE.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/FILE.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_FILE.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/cookie_io_functions_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdio_lim.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdio.h: diff --git a/gl/malloc/.deps/dynarray_emplace_enlarge.Po b/gl/malloc/.deps/dynarray_emplace_enlarge.Po new file mode 100644 index 0000000..652de97 --- /dev/null +++ b/gl/malloc/.deps/dynarray_emplace_enlarge.Po @@ -0,0 +1,231 @@ +malloc/dynarray_emplace_enlarge.o: malloc/dynarray_emplace_enlarge.c \ + libc-config.h ../config.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features-time64.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/wordsize.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/timesize.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdc-predef.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/cdefs.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/long-double.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno-base.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/error_t.h \ + cdefs.h dynarray.h malloc/dynarray.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdbool.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stddef.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/__stddef_max_align_t.h \ + string.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/string.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/libc-header-start.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/locale_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__locale_t.h \ + strings.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/strings.h \ + intprops.h limits.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/limits.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/limits.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/posix1_lim.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/local_lim.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/limits.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthread_stack_min-dynamic.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthread_stack_min.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/posix2_lim.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/xopen_lim.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uio_lim.h \ + stdlib.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdlib.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitflags.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitstatus.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/floatn.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/floatn-common.h \ + sys/types.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/types.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/typesizes.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/time64.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clock_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clockid_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/time_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/timer_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdint-intn.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/endian.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/endian.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/endianness.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/byteswap.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uintn-identity.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/select.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/select.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/sigset_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__sigset_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timeval.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timespec.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthreadtypes.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/thread-shared-types.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + alloca.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-float.h + +libc-config.h: + +../config.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features-time64.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/wordsize.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/timesize.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdc-predef.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/cdefs.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/long-double.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno-base.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/error_t.h: + +cdefs.h: + +dynarray.h: + +malloc/dynarray.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdbool.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stddef.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/__stddef_max_align_t.h: + +string.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/string.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/libc-header-start.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/locale_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__locale_t.h: + +strings.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/strings.h: + +intprops.h: + +limits.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/limits.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/limits.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/posix1_lim.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/local_lim.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/limits.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthread_stack_min-dynamic.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthread_stack_min.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/posix2_lim.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/xopen_lim.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uio_lim.h: + +stdlib.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdlib.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitflags.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitstatus.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/floatn.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/floatn-common.h: + +sys/types.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/types.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/typesizes.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/time64.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clock_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clockid_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/time_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/timer_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdint-intn.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/endian.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/endian.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/endianness.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/byteswap.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uintn-identity.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/select.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/select.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/sigset_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__sigset_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timeval.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timespec.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthreadtypes.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/thread-shared-types.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +alloca.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-float.h: diff --git a/gl/malloc/.deps/dynarray_finalize.Po b/gl/malloc/.deps/dynarray_finalize.Po new file mode 100644 index 0000000..d7356c0 --- /dev/null +++ b/gl/malloc/.deps/dynarray_finalize.Po @@ -0,0 +1,196 @@ +malloc/dynarray_finalize.o: malloc/dynarray_finalize.c libc-config.h \ + ../config.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features-time64.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/wordsize.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/timesize.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdc-predef.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/cdefs.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/long-double.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno-base.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/error_t.h \ + cdefs.h dynarray.h malloc/dynarray.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdbool.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stddef.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/__stddef_max_align_t.h \ + string.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/string.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/libc-header-start.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/locale_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__locale_t.h \ + strings.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/strings.h \ + stdlib.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdlib.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitflags.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitstatus.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/floatn.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/floatn-common.h \ + sys/types.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/types.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/typesizes.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/time64.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clock_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clockid_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/time_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/timer_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdint-intn.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/endian.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/endian.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/endianness.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/byteswap.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uintn-identity.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/select.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/select.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/sigset_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__sigset_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timeval.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timespec.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthreadtypes.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/thread-shared-types.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + alloca.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-float.h + +libc-config.h: + +../config.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features-time64.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/wordsize.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/timesize.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdc-predef.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/cdefs.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/long-double.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno-base.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/error_t.h: + +cdefs.h: + +dynarray.h: + +malloc/dynarray.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdbool.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stddef.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/__stddef_max_align_t.h: + +string.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/string.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/libc-header-start.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/locale_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__locale_t.h: + +strings.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/strings.h: + +stdlib.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdlib.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitflags.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitstatus.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/floatn.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/floatn-common.h: + +sys/types.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/types.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/typesizes.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/time64.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clock_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clockid_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/time_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/timer_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdint-intn.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/endian.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/endian.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/endianness.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/byteswap.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uintn-identity.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/select.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/select.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/sigset_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__sigset_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timeval.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timespec.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthreadtypes.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/thread-shared-types.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +alloca.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-float.h: diff --git a/gl/malloc/.deps/dynarray_resize.Po b/gl/malloc/.deps/dynarray_resize.Po new file mode 100644 index 0000000..6ad6711 --- /dev/null +++ b/gl/malloc/.deps/dynarray_resize.Po @@ -0,0 +1,231 @@ +malloc/dynarray_resize.o: malloc/dynarray_resize.c libc-config.h \ + ../config.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features-time64.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/wordsize.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/timesize.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdc-predef.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/cdefs.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/long-double.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno-base.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/error_t.h \ + cdefs.h dynarray.h malloc/dynarray.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdbool.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stddef.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/__stddef_max_align_t.h \ + string.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/string.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/libc-header-start.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/locale_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__locale_t.h \ + strings.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/strings.h \ + intprops.h limits.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/limits.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/limits.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/posix1_lim.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/local_lim.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/limits.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthread_stack_min-dynamic.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthread_stack_min.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/posix2_lim.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/xopen_lim.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uio_lim.h \ + stdlib.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdlib.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitflags.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitstatus.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/floatn.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/floatn-common.h \ + sys/types.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/types.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/typesizes.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/time64.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clock_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clockid_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/time_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/timer_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdint-intn.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/endian.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/endian.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/endianness.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/byteswap.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uintn-identity.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/select.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/select.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/sigset_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__sigset_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timeval.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timespec.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthreadtypes.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/thread-shared-types.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_mutex.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_rwlock.h \ + alloca.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-float.h + +libc-config.h: + +../config.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features-time64.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/wordsize.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/timesize.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdc-predef.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/cdefs.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/long-double.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno-base.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/error_t.h: + +cdefs.h: + +dynarray.h: + +malloc/dynarray.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdbool.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stddef.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/__stddef_max_align_t.h: + +string.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/string.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/libc-header-start.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/locale_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__locale_t.h: + +strings.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/strings.h: + +intprops.h: + +limits.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/limits.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/limits.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/posix1_lim.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/local_lim.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/limits.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthread_stack_min-dynamic.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthread_stack_min.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/posix2_lim.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/xopen_lim.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uio_lim.h: + +stdlib.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdlib.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitflags.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitstatus.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/floatn.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/floatn-common.h: + +sys/types.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/types.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/typesizes.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/time64.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clock_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clockid_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/time_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/timer_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdint-intn.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/endian.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/endian.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/endianness.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/byteswap.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uintn-identity.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/select.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/select.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/sigset_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__sigset_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timeval.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timespec.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthreadtypes.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/thread-shared-types.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_mutex.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_rwlock.h: + +alloca.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-float.h: diff --git a/gl/malloc/.deps/dynarray_resize_clear.Po b/gl/malloc/.deps/dynarray_resize_clear.Po new file mode 100644 index 0000000..207fa9d --- /dev/null +++ b/gl/malloc/.deps/dynarray_resize_clear.Po @@ -0,0 +1,91 @@ +malloc/dynarray_resize_clear.o: malloc/dynarray_resize_clear.c \ + libc-config.h ../config.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features-time64.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/wordsize.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/timesize.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdc-predef.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/cdefs.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/long-double.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno-base.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/error_t.h \ + cdefs.h dynarray.h malloc/dynarray.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdbool.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stddef.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/__stddef_max_align_t.h \ + string.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/string.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/libc-header-start.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/locale_t.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__locale_t.h \ + strings.h \ + /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/strings.h + +libc-config.h: + +../config.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features-time64.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/wordsize.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/timesize.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdc-predef.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/cdefs.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/long-double.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno-base.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/error_t.h: + +cdefs.h: + +dynarray.h: + +malloc/dynarray.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdbool.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stddef.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/__stddef_max_align_t.h: + +string.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/string.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/libc-header-start.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/locale_t.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__locale_t.h: + +strings.h: + +/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/strings.h: diff --git a/gl/malloc/.dirstamp b/gl/malloc/.dirstamp new file mode 100644 index 0000000..e69de29 diff --git a/gl/malloc/dynarray-skeleton.c b/gl/malloc/dynarray-skeleton.c index 48210e3..bad548a 100644 --- a/gl/malloc/dynarray-skeleton.c +++ b/gl/malloc/dynarray-skeleton.c @@ -1,5 +1,5 @@ /* Type-safe arrays which grow dynamically. - Copyright (C) 2017-2021 Free Software Foundation, Inc. + Copyright (C) 2017-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/gl/malloc/dynarray.h b/gl/malloc/dynarray.h index 638c33f..f16fd95 100644 --- a/gl/malloc/dynarray.h +++ b/gl/malloc/dynarray.h @@ -1,5 +1,5 @@ /* Type-safe arrays which grow dynamically. Shared definitions. - Copyright (C) 2017-2021 Free Software Foundation, Inc. + Copyright (C) 2017-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/gl/malloc/dynarray_at_failure.c b/gl/malloc/dynarray_at_failure.c index 8dd6850..062ab70 100644 --- a/gl/malloc/dynarray_at_failure.c +++ b/gl/malloc/dynarray_at_failure.c @@ -1,5 +1,5 @@ /* Report an dynamic array index out of bounds condition. - Copyright (C) 2017-2021 Free Software Foundation, Inc. + Copyright (C) 2017-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/gl/malloc/dynarray_emplace_enlarge.c b/gl/malloc/dynarray_emplace_enlarge.c index 0f8baf9..0cff2e7 100644 --- a/gl/malloc/dynarray_emplace_enlarge.c +++ b/gl/malloc/dynarray_emplace_enlarge.c @@ -1,5 +1,5 @@ /* Increase the size of a dynamic array in preparation of an emplace operation. - Copyright (C) 2017-2021 Free Software Foundation, Inc. + Copyright (C) 2017-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/gl/malloc/dynarray_finalize.c b/gl/malloc/dynarray_finalize.c index c33da41..3f360c3 100644 --- a/gl/malloc/dynarray_finalize.c +++ b/gl/malloc/dynarray_finalize.c @@ -1,5 +1,5 @@ /* Copy the dynamically-allocated area to an explicitly-sized heap allocation. - Copyright (C) 2017-2021 Free Software Foundation, Inc. + Copyright (C) 2017-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/gl/malloc/dynarray_resize.c b/gl/malloc/dynarray_resize.c index 5a57166..8d1922e 100644 --- a/gl/malloc/dynarray_resize.c +++ b/gl/malloc/dynarray_resize.c @@ -1,5 +1,5 @@ /* Increase the size of a dynamic array. - Copyright (C) 2017-2021 Free Software Foundation, Inc. + Copyright (C) 2017-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/gl/malloc/dynarray_resize_clear.c b/gl/malloc/dynarray_resize_clear.c index 9c43b00..8cf1b0d 100644 --- a/gl/malloc/dynarray_resize_clear.c +++ b/gl/malloc/dynarray_resize_clear.c @@ -1,5 +1,5 @@ /* Increase the size of a dynamic array and clear the new part. - Copyright (C) 2017-2021 Free Software Foundation, Inc. + Copyright (C) 2017-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/gl/malloca.c b/gl/malloca.c index b488423..183783a 100644 --- a/gl/malloca.c +++ b/gl/malloca.c @@ -1,5 +1,5 @@ /* Safe automatic memory allocation. - Copyright (C) 2003, 2006-2007, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2003, 2006-2007, 2009-2022 Free Software Foundation, Inc. Written by Bruno Haible , 2003, 2018. This file is free software: you can redistribute it and/or modify @@ -21,8 +21,9 @@ /* Specification. */ #include "malloca.h" +#include + #include "idx.h" -#include "intprops.h" #include "verify.h" /* The speed critical point in this file is freea() applied to an alloca() @@ -50,17 +51,16 @@ mmalloca (size_t n) uintptr_t alignment2_mask = 2 * sa_alignment_max - 1; int plus = sizeof (small_t) + alignment2_mask; idx_t nplus; - if (!INT_ADD_WRAPV (n, plus, &nplus) && !xalloc_oversized (nplus, 1)) + if (!ckd_add (&nplus, n, plus) && !xalloc_oversized (nplus, 1)) { char *mem = (char *) malloc (nplus); if (mem != NULL) { uintptr_t umem = (uintptr_t)mem, umemplus; - /* The INT_ADD_WRAPV avoids signed integer overflow on + /* The ckd_add avoids signed integer overflow on theoretical platforms where UINTPTR_MAX <= INT_MAX. */ - INT_ADD_WRAPV (umem, sizeof (small_t) + sa_alignment_max - 1, - &umemplus); + ckd_add (&umemplus, umem, sizeof (small_t) + sa_alignment_max - 1); idx_t offset = ((umemplus & ~alignment2_mask) + sa_alignment_max - umem); void *vp = mem + offset; diff --git a/gl/malloca.h b/gl/malloca.h index 7eb63d2..7ec235f 100644 --- a/gl/malloca.h +++ b/gl/malloca.h @@ -1,5 +1,5 @@ /* Safe automatic memory allocation. - Copyright (C) 2003-2007, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2003-2007, 2009-2022 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This file is free software: you can redistribute it and/or modify diff --git a/gl/math.c b/gl/math.c index 3ffd1d7..1502a1f 100644 --- a/gl/math.c +++ b/gl/math.c @@ -1,6 +1,6 @@ /* Inline functions for . - Copyright (C) 2012-2021 Free Software Foundation, Inc. + Copyright (C) 2012-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/math.in.h b/gl/math.in.h index c87cc12..a74a95d 100644 --- a/gl/math.in.h +++ b/gl/math.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 2002-2003, 2007-2021 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2007-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -2433,6 +2433,7 @@ _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool) # define isfinite rpl_isfinite +# define GNULIB_NAMESPACE_LACKS_ISFINITE 1 # else _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool) # endif @@ -2467,6 +2468,7 @@ _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool) # define isinf rpl_isinf +# define GNULIB_NAMESPACE_LACKS_ISINF 1 # else _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool) # endif @@ -2594,6 +2596,7 @@ _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool) # define isnan rpl_isnan +# define GNULIB_NAMESPACE_LACKS_ISNAN 1 # else _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool) # endif @@ -2677,6 +2680,7 @@ _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool) # define signbit rpl_signbit +# define GNULIB_NAMESPACE_LACKS_SIGNBIT 1 # else _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, signbit, bool) # endif diff --git a/gl/mbrtowc-impl-utf8.h b/gl/mbrtowc-impl-utf8.h index 330fb10..8e5ac14 100644 --- a/gl/mbrtowc-impl-utf8.h +++ b/gl/mbrtowc-impl-utf8.h @@ -1,5 +1,5 @@ /* Convert multibyte character to wide character. - Copyright (C) 1999-2002, 2005-2021 Free Software Foundation, Inc. + Copyright (C) 1999-2002, 2005-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/mbrtowc-impl.h b/gl/mbrtowc-impl.h index bc3e688..65538e7 100644 --- a/gl/mbrtowc-impl.h +++ b/gl/mbrtowc-impl.h @@ -1,5 +1,5 @@ /* Convert multibyte character to wide character. - Copyright (C) 1999-2002, 2005-2021 Free Software Foundation, Inc. + Copyright (C) 1999-2002, 2005-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/mbrtowc.c b/gl/mbrtowc.c index 8832f6e..4b164ed 100644 --- a/gl/mbrtowc.c +++ b/gl/mbrtowc.c @@ -1,5 +1,5 @@ /* Convert multibyte character to wide character. - Copyright (C) 1999-2002, 2005-2021 Free Software Foundation, Inc. + Copyright (C) 1999-2002, 2005-2022 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This file is free software: you can redistribute it and/or modify diff --git a/gl/mbsinit.c b/gl/mbsinit.c index f440155..9621def 100644 --- a/gl/mbsinit.c +++ b/gl/mbsinit.c @@ -1,5 +1,5 @@ /* Test for initial conversion state. - Copyright (C) 2008-2021 Free Software Foundation, Inc. + Copyright (C) 2008-2022 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This file is free software: you can redistribute it and/or modify diff --git a/gl/mbtowc-impl.h b/gl/mbtowc-impl.h index 30d715d..2b27baf 100644 --- a/gl/mbtowc-impl.h +++ b/gl/mbtowc-impl.h @@ -1,5 +1,5 @@ /* Convert multibyte character to wide character. - Copyright (C) 2011-2021 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This file is free software: you can redistribute it and/or modify diff --git a/gl/mbtowc-lock.c b/gl/mbtowc-lock.c index 0f7ae6c..06d3224 100644 --- a/gl/mbtowc-lock.c +++ b/gl/mbtowc-lock.c @@ -1,5 +1,5 @@ /* Return the internal lock used by mbrtowc and mbrtoc32. - Copyright (C) 2019-2021 Free Software Foundation, Inc. + Copyright (C) 2019-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/mbtowc-lock.h b/gl/mbtowc-lock.h index d31b0b6..ecfd44e 100644 --- a/gl/mbtowc-lock.h +++ b/gl/mbtowc-lock.h @@ -1,5 +1,5 @@ /* Use the internal lock used by mbrtowc and mbrtoc32. - Copyright (C) 2019-2021 Free Software Foundation, Inc. + Copyright (C) 2019-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/mbtowc.c b/gl/mbtowc.c index 47b431a..a9a7995 100644 --- a/gl/mbtowc.c +++ b/gl/mbtowc.c @@ -1,5 +1,5 @@ /* Convert multibyte character to wide character. - Copyright (C) 2011-2021 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This file is free software: you can redistribute it and/or modify diff --git a/gl/memchr.c b/gl/memchr.c index 56fd59d..0ca7b30 100644 --- a/gl/memchr.c +++ b/gl/memchr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2021 +/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2022 Free Software Foundation, Inc. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), diff --git a/gl/memchr.valgrind b/gl/memchr.valgrind index 4f16481..cb0f351 100644 --- a/gl/memchr.valgrind +++ b/gl/memchr.valgrind @@ -1,6 +1,6 @@ # Suppress a valgrind message about use of uninitialized memory in memchr(). -# Copyright (C) 2009-2021 Free Software Foundation, Inc. +# Copyright (C) 2009-2022 Free Software Foundation, Inc. # # This file is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as diff --git a/gl/minmax.h b/gl/minmax.h index a03361b..b4b1345 100644 --- a/gl/minmax.h +++ b/gl/minmax.h @@ -1,5 +1,5 @@ /* MIN, MAX macros. - Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2021 Free Software + Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify diff --git a/gl/mktime-internal.h b/gl/mktime-internal.h index 7386625..170764e 100644 --- a/gl/mktime-internal.h +++ b/gl/mktime-internal.h @@ -1,5 +1,5 @@ /* Internals of mktime and related functions - Copyright 2016-2021 Free Software Foundation, Inc. + Copyright 2016-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Paul Eggert . diff --git a/gl/mktime.c b/gl/mktime.c index ae721c7..7dc9d67 100644 --- a/gl/mktime.c +++ b/gl/mktime.c @@ -1,5 +1,5 @@ /* Convert a 'struct tm' to a time_t value. - Copyright (C) 1993-2021 Free Software Foundation, Inc. + Copyright (C) 1993-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Paul Eggert . @@ -429,8 +429,13 @@ __mktime_internal (struct tm *tp, time with the right value, and use its UTC offset. Heuristic: probe the adjacent timestamps in both directions, - looking for the desired isdst. This should work for all real - time zone histories in the tz database. */ + looking for the desired isdst. If none is found within a + reasonable duration bound, assume a one-hour DST difference. + This should work for all real time zone histories in the tz + database. */ + + /* +1 if we wanted standard time but got DST, -1 if the reverse. */ + int dst_difference = (isdst == 0) - (tm.tm_isdst == 0); /* Distance between probes when looking for a DST boundary. In tzdata2003a, the shortest period of DST is 601200 seconds @@ -441,12 +446,14 @@ __mktime_internal (struct tm *tp, periods when probing. */ int stride = 601200; - /* The longest period of DST in tzdata2003a is 536454000 seconds - (e.g., America/Jujuy starting 1946-10-01 01:00). The longest - period of non-DST is much longer, but it makes no real sense - to search for more than a year of non-DST, so use the DST - max. */ - int duration_max = 536454000; + /* In TZDB 2021e, the longest period of DST (or of non-DST), in + which the DST (or adjacent DST) difference is not one hour, + is 457243209 seconds: e.g., America/Cambridge_Bay with leap + seconds, starting 1965-10-31 00:00 in a switch from + double-daylight time (-05) to standard time (-07), and + continuing to 1980-04-27 02:00 in a switch from standard time + (-07) to daylight time (-06). */ + int duration_max = 457243209; /* Search in both directions, so the maximum distance is half the duration; add the stride to avoid off-by-1 problems. */ @@ -483,6 +490,11 @@ __mktime_internal (struct tm *tp, } } + /* No unusual DST offset was found nearby. Assume one-hour DST. */ + t += 60 * 60 * dst_difference; + if (mktime_min <= t && t <= mktime_max && convert_time (convert, t, &tm)) + goto offset_found; + __set_errno (EOVERFLOW); return -1; } diff --git a/gl/mountlist.c b/gl/mountlist.c index 352b35f..fac5c45 100644 --- a/gl/mountlist.c +++ b/gl/mountlist.c @@ -1,10 +1,10 @@ /* mountlist.c -- return a list of mounted file systems - Copyright (C) 1991-1992, 1997-2021 Free Software Foundation, Inc. + Copyright (C) 1991-1992, 1997-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, diff --git a/gl/mountlist.h b/gl/mountlist.h index fbad124..6edac12 100644 --- a/gl/mountlist.h +++ b/gl/mountlist.h @@ -1,11 +1,11 @@ /* mountlist.h -- declarations for list of mounted file systems - Copyright (C) 1991-1992, 1998, 2000-2005, 2009-2021 Free Software + Copyright (C) 1991-1992, 1998, 2000-2005, 2009-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, diff --git a/gl/msvc-inval.c b/gl/msvc-inval.c index a23dac9..d6651ca 100644 --- a/gl/msvc-inval.c +++ b/gl/msvc-inval.c @@ -1,5 +1,5 @@ /* Invalid parameter handler for MSVC runtime libraries. - Copyright (C) 2011-2021 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/msvc-inval.h b/gl/msvc-inval.h index e115a35..1230b89 100644 --- a/gl/msvc-inval.h +++ b/gl/msvc-inval.h @@ -1,5 +1,5 @@ /* Invalid parameter handler for MSVC runtime libraries. - Copyright (C) 2011-2021 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/msvc-nothrow.c b/gl/msvc-nothrow.c index d3c1f54..aa06964 100644 --- a/gl/msvc-nothrow.c +++ b/gl/msvc-nothrow.c @@ -1,6 +1,6 @@ /* Wrappers that don't throw invalid parameter notifications with MSVC runtime libraries. - Copyright (C) 2011-2021 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/msvc-nothrow.h b/gl/msvc-nothrow.h index 057b5dd..5345155 100644 --- a/gl/msvc-nothrow.h +++ b/gl/msvc-nothrow.h @@ -1,6 +1,6 @@ /* Wrappers that don't throw invalid parameter notifications with MSVC runtime libraries. - Copyright (C) 2011-2021 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/netdb.in.h b/gl/netdb.in.h index eb5c960..e05cf4b 100644 --- a/gl/netdb.in.h +++ b/gl/netdb.in.h @@ -1,5 +1,5 @@ /* Provide a netdb.h header file for systems lacking it (read: MinGW). - Copyright (C) 2008-2021 Free Software Foundation, Inc. + Copyright (C) 2008-2022 Free Software Foundation, Inc. Written by Simon Josefsson. This file is free software: you can redistribute it and/or modify diff --git a/gl/netinet_in.in.h b/gl/netinet_in.in.h index 21f3a64..e23807c 100644 --- a/gl/netinet_in.in.h +++ b/gl/netinet_in.in.h @@ -1,5 +1,5 @@ /* Substitute for . - Copyright (C) 2007-2021 Free Software Foundation, Inc. + Copyright (C) 2007-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/nl_langinfo-lock.c b/gl/nl_langinfo-lock.c index fcdf56d..c36882d 100644 --- a/gl/nl_langinfo-lock.c +++ b/gl/nl_langinfo-lock.c @@ -1,5 +1,5 @@ /* Return the internal lock used by nl_langinfo. - Copyright (C) 2019-2021 Free Software Foundation, Inc. + Copyright (C) 2019-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/nl_langinfo.c b/gl/nl_langinfo.c index b481f20..3fa4782 100644 --- a/gl/nl_langinfo.c +++ b/gl/nl_langinfo.c @@ -1,6 +1,6 @@ /* nl_langinfo() replacement: query locale dependent information. - Copyright (C) 2007-2021 Free Software Foundation, Inc. + Copyright (C) 2007-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/open.c b/gl/open.c index 372cda8..170bff1 100644 --- a/gl/open.c +++ b/gl/open.c @@ -1,5 +1,5 @@ /* Open a descriptor to a file. - Copyright (C) 2007-2021 Free Software Foundation, Inc. + Copyright (C) 2007-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/pathmax.h b/gl/pathmax.h index 716f4a9..19b93d7 100644 --- a/gl/pathmax.h +++ b/gl/pathmax.h @@ -1,5 +1,5 @@ /* Define PATH_MAX somehow. Requires sys/types.h. - Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2021 Free Software + Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify diff --git a/gl/printf-args.c b/gl/printf-args.c index b822682..669c24a 100644 --- a/gl/printf-args.c +++ b/gl/printf-args.c @@ -1,5 +1,5 @@ /* Decomposed printf argument list. - Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2021 Free Software + Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify diff --git a/gl/printf-args.h b/gl/printf-args.h index c8d9174..553fe96 100644 --- a/gl/printf-args.h +++ b/gl/printf-args.h @@ -1,5 +1,5 @@ /* Decomposed printf argument list. - Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2021 Free Software + Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify diff --git a/gl/printf-parse.c b/gl/printf-parse.c index f21cc17..aab02dc 100644 --- a/gl/printf-parse.c +++ b/gl/printf-parse.c @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 1999-2000, 2002-2003, 2006-2021 Free Software Foundation, Inc. + Copyright (C) 1999-2000, 2002-2003, 2006-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/printf-parse.h b/gl/printf-parse.h index 77b7409..b12ccea 100644 --- a/gl/printf-parse.h +++ b/gl/printf-parse.h @@ -1,5 +1,5 @@ /* Parse printf format string. - Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2021 Free Software + Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify diff --git a/gl/realloc.c b/gl/realloc.c index af03f0c..c878381 100644 --- a/gl/realloc.c +++ b/gl/realloc.c @@ -1,6 +1,6 @@ /* realloc() function that is glibc compatible. - Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2021 Free Software + Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify diff --git a/gl/reallocarray.c b/gl/reallocarray.c index 1fb2f3c..70c1b47 100644 --- a/gl/reallocarray.c +++ b/gl/reallocarray.c @@ -1,6 +1,6 @@ /* reallocarray function that is glibc compatible. - Copyright (C) 2017-2021 Free Software Foundation, Inc. + Copyright (C) 2017-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -19,16 +19,15 @@ #include +#include #include #include -#include "intprops.h" - void * reallocarray (void *ptr, size_t nmemb, size_t size) { size_t nbytes; - if (INT_MULTIPLY_WRAPV (nmemb, size, &nbytes)) + if (ckd_mul (&nbytes, nmemb, size)) { errno = ENOMEM; return NULL; diff --git a/gl/regcomp.c b/gl/regcomp.c index 887e5b5..122c3de 100644 --- a/gl/regcomp.c +++ b/gl/regcomp.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2021 Free Software Foundation, Inc. + Copyright (C) 2002-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -27,14 +27,10 @@ static void re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, char *fastmap); static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len); -#ifdef RE_ENABLE_I18N static void free_charset (re_charset_t *cset); -#endif /* RE_ENABLE_I18N */ static void free_workarea_compile (regex_t *preg); static reg_errcode_t create_initial_state (re_dfa_t *dfa); -#ifdef RE_ENABLE_I18N static void optimize_utf8 (re_dfa_t *dfa); -#endif static reg_errcode_t analyze (regex_t *preg); static reg_errcode_t preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), @@ -89,7 +85,6 @@ static reg_errcode_t parse_bracket_element (bracket_elem_t *elem, static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token); -#ifdef RE_ENABLE_I18N static reg_errcode_t build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, Idx *equiv_class_alloc, @@ -100,14 +95,6 @@ static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, Idx *char_class_alloc, const char *class_name, reg_syntax_t syntax); -#else /* not RE_ENABLE_I18N */ -static reg_errcode_t build_equiv_class (bitset_t sbcset, - const unsigned char *name); -static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, - bitset_t sbcset, - const char *class_name, - reg_syntax_t syntax); -#endif /* not RE_ENABLE_I18N */ static bin_tree_t *build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, const char *class_name, @@ -279,8 +266,7 @@ re_compile_fastmap (struct re_pattern_buffer *bufp) } weak_alias (__re_compile_fastmap, re_compile_fastmap) -static inline void -__attribute__ ((always_inline)) +static __always_inline void re_set_fastmap (char *fastmap, bool icase, int ch) { fastmap[ch] = 1; @@ -306,7 +292,6 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, if (type == CHARACTER) { re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c); -#ifdef RE_ENABLE_I18N if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) { unsigned char buf[MB_LEN_MAX]; @@ -327,7 +312,6 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, != (size_t) -1)) re_set_fastmap (fastmap, false, buf[0]); } -#endif } else if (type == SIMPLE_BRACKET) { @@ -341,13 +325,12 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, re_set_fastmap (fastmap, icase, ch); } } -#ifdef RE_ENABLE_I18N else if (type == COMPLEX_BRACKET) { re_charset_t *cset = dfa->nodes[node].opr.mbcset; Idx i; -# ifdef _LIBC +#ifdef _LIBC /* See if we have to try all bytes which start multiple collation elements. e.g. In da_DK, we want to catch 'a' since "aa" is a valid @@ -363,7 +346,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, if (table[i] < 0) re_set_fastmap (fastmap, icase, i); } -# endif /* _LIBC */ +#endif /* _LIBC */ /* See if we have to start the match at all multibyte characters, i.e. where we would not find an invalid sequence. This only @@ -371,9 +354,9 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, sets, the SIMPLE_BRACKET again suffices. */ if (dfa->mb_cur_max > 1 && (cset->nchar_classes || cset->non_match || cset->nranges -# ifdef _LIBC +#ifdef _LIBC || cset->nequiv_classes -# endif /* _LIBC */ +#endif /* _LIBC */ )) { unsigned char c = 0; @@ -406,12 +389,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, } } } -#endif /* RE_ENABLE_I18N */ - else if (type == OP_PERIOD -#ifdef RE_ENABLE_I18N - || type == OP_UTF8_PERIOD -#endif /* RE_ENABLE_I18N */ - || type == END_OF_RE) + else if (type == OP_PERIOD || type == OP_UTF8_PERIOD || type == END_OF_RE) { memset (fastmap, '\1', sizeof (char) * SBC_MAX); if (type == END_OF_RE) @@ -550,7 +528,6 @@ regerror (int errcode, const regex_t *__restrict preg, char *__restrict errbuf, weak_alias (__regerror, regerror) -#ifdef RE_ENABLE_I18N /* This static array is used for the map to single-byte characters when UTF-8 is used. Otherwise we would allocate memory just to initialize it the same all the time. UTF-8 is the preferred encoding so this is @@ -558,25 +535,24 @@ weak_alias (__regerror, regerror) static const bitset_t utf8_sb_map = { /* Set the first 128 bits. */ -# if (defined __GNUC__ || __clang_major__ >= 4) && !defined __STRICT_ANSI__ +#if (defined __GNUC__ || __clang_major__ >= 4) && !defined __STRICT_ANSI__ [0 ... 0x80 / BITSET_WORD_BITS - 1] = BITSET_WORD_MAX -# else -# if 4 * BITSET_WORD_BITS < ASCII_CHARS -# error "bitset_word_t is narrower than 32 bits" -# elif 3 * BITSET_WORD_BITS < ASCII_CHARS +#else +# if 4 * BITSET_WORD_BITS < ASCII_CHARS +# error "bitset_word_t is narrower than 32 bits" +# elif 3 * BITSET_WORD_BITS < ASCII_CHARS BITSET_WORD_MAX, BITSET_WORD_MAX, BITSET_WORD_MAX, -# elif 2 * BITSET_WORD_BITS < ASCII_CHARS +# elif 2 * BITSET_WORD_BITS < ASCII_CHARS BITSET_WORD_MAX, BITSET_WORD_MAX, -# elif 1 * BITSET_WORD_BITS < ASCII_CHARS +# elif 1 * BITSET_WORD_BITS < ASCII_CHARS BITSET_WORD_MAX, -# endif +# endif (BITSET_WORD_MAX >> (SBC_MAX % BITSET_WORD_BITS == 0 ? 0 : BITSET_WORD_BITS - SBC_MAX % BITSET_WORD_BITS)) -# endif -}; #endif +}; static void @@ -614,10 +590,8 @@ free_dfa_content (re_dfa_t *dfa) re_free (entry->array); } re_free (dfa->state_table); -#ifdef RE_ENABLE_I18N if (dfa->sb_char != utf8_sb_map) re_free (dfa->sb_char); -#endif re_free (dfa->subexp_map); #ifdef DEBUG re_free (dfa->re_str); @@ -796,11 +770,9 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length, if (__glibc_unlikely (err != REG_NOERROR)) goto re_compile_internal_free_return; -#ifdef RE_ENABLE_I18N /* If possible, do searching in single byte encoding to speed things up. */ if (dfa->is_utf8 && !(syntax & RE_ICASE) && preg->translate == NULL) optimize_utf8 (dfa); -#endif /* Then create the initial state of the dfa. */ err = create_initial_state (dfa); @@ -830,11 +802,7 @@ init_dfa (re_dfa_t *dfa, size_t pat_len) #ifndef _LIBC const char *codeset_name; #endif -#ifdef RE_ENABLE_I18N size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t)); -#else - size_t max_i18n_object_size = 0; -#endif size_t max_object_size = MAX (sizeof (struct re_state_table_entry), MAX (sizeof (re_token_t), @@ -886,7 +854,6 @@ init_dfa (re_dfa_t *dfa, size_t pat_len) dfa->map_notascii = 0; #endif -#ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { if (dfa->is_utf8) @@ -906,14 +873,13 @@ init_dfa (re_dfa_t *dfa, size_t pat_len) wint_t wch = __btowc (ch); if (wch != WEOF) dfa->sb_char[i] |= (bitset_word_t) 1 << j; -# ifndef _LIBC +#ifndef _LIBC if (isascii (ch) && wch != ch) dfa->map_notascii = 1; -# endif +#endif } } } -#endif if (__glibc_unlikely (dfa->nodes == NULL || dfa->state_table == NULL)) return REG_ESPACE; @@ -933,8 +899,6 @@ init_word_char (re_dfa_t *dfa) dfa->word_ops_used = 1; if (__glibc_likely (dfa->map_notascii == 0)) { - /* Avoid uint32_t and uint64_t as some non-GCC platforms lack - them, an issue when this code is used in Gnulib. */ bitset_word_t bits0 = 0x00000000; bitset_word_t bits1 = 0x03ff0000; bitset_word_t bits2 = 0x87fffffe; @@ -1074,7 +1038,6 @@ create_initial_state (re_dfa_t *dfa) return REG_NOERROR; } -#ifdef RE_ENABLE_I18N /* If it is possible to do searching in single byte encoding instead of UTF-8 to speed things up, set dfa->mb_cur_max to 1, clear is_utf8 and change DFA nodes where needed. */ @@ -1154,7 +1117,6 @@ optimize_utf8 (re_dfa_t *dfa) dfa->is_utf8 = 0; dfa->has_mb_node = dfa->nbackref > 0 || has_period; } -#endif /* Analyze the structure tree, and calculate "first", "next", "edest", "eclosure", and "inveclosure". */ @@ -1792,7 +1754,6 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) token->opr.c = c; token->word_char = 0; -#ifdef RE_ENABLE_I18N token->mb_partial = 0; if (input->mb_cur_max > 1 && !re_string_first_byte (input, re_string_cur_idx (input))) @@ -1801,7 +1762,6 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) token->mb_partial = 1; return 1; } -#endif if (c == '\\') { unsigned char c2; @@ -1814,7 +1774,6 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) c2 = re_string_peek_byte_case (input, 1); token->opr.c = c2; token->type = CHARACTER; -#ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1) { wint_t wc = re_string_wchar_at (input, @@ -1822,7 +1781,6 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; } else -#endif token->word_char = IS_WORD_CHAR (c2) != 0; switch (c2) @@ -1928,14 +1886,12 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) } token->type = CHARACTER; -#ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1) { wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input)); token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; } else -#endif token->word_char = IS_WORD_CHAR (token->opr.c); switch (c) @@ -2027,14 +1983,12 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax) c = re_string_peek_byte (input, 0); token->opr.c = c; -#ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1 && !re_string_first_byte (input, re_string_cur_idx (input))) { token->type = CHARACTER; return 1; } -#endif /* RE_ENABLE_I18N */ if (c == '\\' && (syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) && re_string_cur_idx (input) + 1 < re_string_length (input)) @@ -2084,15 +2038,25 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax) } switch (c) { - case '-': - token->type = OP_CHARSET_RANGE; - break; case ']': token->type = OP_CLOSE_BRACKET; break; case '^': token->type = OP_NON_MATCH_LIST; break; + case '-': + /* In V7 Unix grep and Unix awk and mawk, [...---...] + (3 adjacent minus signs) stands for a single minus sign. + Support that without breaking anything else. */ + if (! (re_string_cur_idx (input) + 2 < re_string_length (input) + && re_string_peek_byte (input, 1) == '-' + && re_string_peek_byte (input, 2) == '-')) + { + token->type = OP_CHARSET_RANGE; + break; + } + re_string_skip_bytes (input, 2); + FALLTHROUGH; default: token->type = CHARACTER; } @@ -2256,7 +2220,6 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, *err = REG_ESPACE; return NULL; } -#ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { while (!re_string_eoi (regexp) @@ -2273,7 +2236,6 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, } } } -#endif break; case OP_OPEN_SUBEXP: @@ -2666,40 +2628,30 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa, #ifndef _LIBC -# ifdef RE_ENABLE_I18N /* Convert the byte B to the corresponding wide character. In a unibyte locale, treat B as itself. In a multibyte locale, return WEOF if B is an encoding error. */ static wint_t -parse_byte (unsigned char b, re_charset_t *mbcset) +parse_byte (unsigned char b, re_dfa_t const *dfa) { - return mbcset == NULL ? b : __btowc (b); + return dfa->mb_cur_max > 1 ? __btowc (b) : b; } -# endif - /* Local function for parse_bracket_exp only used in case of NOT _LIBC. - Build the range expression which starts from START_ELEM, and ends - at END_ELEM. The result are written to MBCSET and SBCSET. - RANGE_ALLOC is the allocated size of mbcset->range_starts, and - mbcset->range_ends, is a pointer argument since we may - update it. */ +/* Local function for parse_bracket_exp used in _LIBC environment. + Build the range expression which starts from START_ELEM, and ends + at END_ELEM. The result are written to MBCSET and SBCSET. + RANGE_ALLOC is the allocated size of mbcset->range_starts, and + mbcset->range_ends, is a pointer argument since we may + update it. */ static reg_errcode_t -# ifdef RE_ENABLE_I18N -build_range_exp (const reg_syntax_t syntax, - bitset_t sbcset, - re_charset_t *mbcset, - Idx *range_alloc, - const bracket_elem_t *start_elem, - const bracket_elem_t *end_elem) -# else /* not RE_ENABLE_I18N */ -build_range_exp (const reg_syntax_t syntax, - bitset_t sbcset, - const bracket_elem_t *start_elem, - const bracket_elem_t *end_elem) -# endif /* not RE_ENABLE_I18N */ +build_range_exp (bitset_t sbcset, re_charset_t *mbcset, Idx *range_alloc, + bracket_elem_t *start_elem, bracket_elem_t *end_elem, + re_dfa_t *dfa, reg_syntax_t syntax, uint_fast32_t nrules, + const unsigned char *collseqmb, const char *collseqwc, + int_fast32_t table_size, const void *symb_table, + const unsigned char *extra) { - unsigned int start_ch, end_ch; /* Equivalence Classes and Character Classes can't be a range start/end. */ if (__glibc_unlikely (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS @@ -2715,110 +2667,88 @@ build_range_exp (const reg_syntax_t syntax, && strlen ((char *) end_elem->opr.name) > 1))) return REG_ECOLLATE; -# ifdef RE_ENABLE_I18N - { - wchar_t wc; - wint_t start_wc; - wint_t end_wc; - + unsigned int start_ch = ((start_elem->type == SB_CHAR) ? start_elem->opr.ch : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] - : 0)); + : 0)), end_ch = ((end_elem->type == SB_CHAR) ? end_elem->opr.ch : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] : 0)); + wint_t start_wc = ((start_elem->type == SB_CHAR || start_elem->type == COLL_SYM) - ? parse_byte (start_ch, mbcset) : start_elem->opr.wch); + ? parse_byte (start_ch, dfa) : start_elem->opr.wch), end_wc = ((end_elem->type == SB_CHAR || end_elem->type == COLL_SYM) - ? parse_byte (end_ch, mbcset) : end_elem->opr.wch); - if (start_wc == WEOF || end_wc == WEOF) - return REG_ECOLLATE; - else if (__glibc_unlikely ((syntax & RE_NO_EMPTY_RANGES) - && start_wc > end_wc)) - return REG_ERANGE; - - /* Got valid collation sequence values, add them as a new entry. - However, for !_LIBC we have no collation elements: if the - character set is single byte, the single byte character set - that we build below suffices. parse_bracket_exp passes - no MBCSET if dfa->mb_cur_max == 1. */ - if (mbcset) - { - /* Check the space of the arrays. */ - if (__glibc_unlikely (*range_alloc == mbcset->nranges)) - { - /* There is not enough space, need realloc. */ - wchar_t *new_array_start, *new_array_end; - Idx new_nranges; - - /* +1 in case of mbcset->nranges is 0. */ - new_nranges = 2 * mbcset->nranges + 1; - /* Use realloc since mbcset->range_starts and mbcset->range_ends - are NULL if *range_alloc == 0. */ - new_array_start = re_realloc (mbcset->range_starts, wchar_t, - new_nranges); - new_array_end = re_realloc (mbcset->range_ends, wchar_t, - new_nranges); + ? parse_byte (end_ch, dfa) : end_elem->opr.wch); - if (__glibc_unlikely (new_array_start == NULL - || new_array_end == NULL)) - { - re_free (new_array_start); - re_free (new_array_end); - return REG_ESPACE; - } + if (start_wc == WEOF || end_wc == WEOF) + return REG_ECOLLATE; + else if (__glibc_unlikely ((syntax & RE_NO_EMPTY_RANGES) + && start_wc > end_wc)) + return REG_ERANGE; - mbcset->range_starts = new_array_start; - mbcset->range_ends = new_array_end; - *range_alloc = new_nranges; - } + /* Got valid collation sequence values, add them as a new entry. + However, for !_LIBC we have no collation elements: if the + character set is single byte, the single byte character set + that we build below suffices. parse_bracket_exp passes + no MBCSET if dfa->mb_cur_max == 1. */ + if (dfa->mb_cur_max > 1) + { + /* Check the space of the arrays. */ + if (__glibc_unlikely (*range_alloc == mbcset->nranges)) + { + /* There is not enough space, need realloc. */ + wchar_t *new_array_start, *new_array_end; + Idx new_nranges; - mbcset->range_starts[mbcset->nranges] = start_wc; - mbcset->range_ends[mbcset->nranges++] = end_wc; - } + /* +1 in case of mbcset->nranges is 0. */ + new_nranges = 2 * mbcset->nranges + 1; + /* Use realloc since mbcset->range_starts and mbcset->range_ends + are NULL if *range_alloc == 0. */ + new_array_start = re_realloc (mbcset->range_starts, wchar_t, + new_nranges); + new_array_end = re_realloc (mbcset->range_ends, wchar_t, + new_nranges); + + if (__glibc_unlikely (new_array_start == NULL + || new_array_end == NULL)) + { + re_free (new_array_start); + re_free (new_array_end); + return REG_ESPACE; + } + + mbcset->range_starts = new_array_start; + mbcset->range_ends = new_array_end; + *range_alloc = new_nranges; + } + + mbcset->range_starts[mbcset->nranges] = start_wc; + mbcset->range_ends[mbcset->nranges++] = end_wc; + } + + /* Build the table for single byte characters. */ + for (wchar_t wc = 0; wc < SBC_MAX; ++wc) + { + if (start_wc <= wc && wc <= end_wc) + bitset_set (sbcset, wc); + } - /* Build the table for single byte characters. */ - for (wc = 0; wc < SBC_MAX; ++wc) - { - if (start_wc <= wc && wc <= end_wc) - bitset_set (sbcset, wc); - } - } -# else /* not RE_ENABLE_I18N */ - { - unsigned int ch; - start_ch = ((start_elem->type == SB_CHAR ) ? start_elem->opr.ch - : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] - : 0)); - end_ch = ((end_elem->type == SB_CHAR ) ? end_elem->opr.ch - : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] - : 0)); - if (start_ch > end_ch) - return REG_ERANGE; - /* Build the table for single byte characters. */ - for (ch = 0; ch < SBC_MAX; ++ch) - if (start_ch <= ch && ch <= end_ch) - bitset_set (sbcset, ch); - } -# endif /* not RE_ENABLE_I18N */ return REG_NOERROR; } #endif /* not _LIBC */ #ifndef _LIBC -/* Helper function for parse_bracket_exp only used in case of NOT _LIBC.. +/* Helper function for parse_bracket_exp only used in case of NOT _LIBC. Build the collating element which is represented by NAME. The result are written to MBCSET and SBCSET. COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a pointer argument since we may update it. */ static reg_errcode_t -# ifdef RE_ENABLE_I18N build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset, - Idx *coll_sym_alloc, const unsigned char *name) -# else /* not RE_ENABLE_I18N */ -build_collating_symbol (bitset_t sbcset, const unsigned char *name) -# endif /* not RE_ENABLE_I18N */ + Idx *coll_sym_alloc, const unsigned char *name, + uint_fast32_t nrules, int_fast32_t table_size, + const void *symb_table, const unsigned char *extra) { size_t name_len = strlen ((const char *) name); if (__glibc_unlikely (name_len != 1)) @@ -2831,271 +2761,280 @@ build_collating_symbol (bitset_t sbcset, const unsigned char *name) } #endif /* not _LIBC */ -/* This function parse bracket expression like "[abc]", "[a-c]", - "[[.a-a.]]" etc. */ - -static bin_tree_t * -parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, - reg_syntax_t syntax, reg_errcode_t *err) -{ #ifdef _LIBC - const unsigned char *collseqmb; - const char *collseqwc; - uint32_t nrules; - int32_t table_size; - const int32_t *symb_table; - const unsigned char *extra; - - /* Local function for parse_bracket_exp used in _LIBC environment. - Seek the collating symbol entry corresponding to NAME. - Return the index of the symbol in the SYMB_TABLE, - or -1 if not found. */ - - auto inline int32_t - __attribute__ ((always_inline)) - seek_collating_symbol_entry (const unsigned char *name, size_t name_len) - { - int32_t elem; - - for (elem = 0; elem < table_size; elem++) - if (symb_table[2 * elem] != 0) - { - int32_t idx = symb_table[2 * elem + 1]; - /* Skip the name of collating element name. */ - idx += 1 + extra[idx]; - if (/* Compare the length of the name. */ - name_len == extra[idx] - /* Compare the name. */ - && memcmp (name, &extra[idx + 1], name_len) == 0) - /* Yep, this is the entry. */ - return elem; - } - return -1; - } +/* Local function for parse_bracket_exp used in _LIBC environment. + Seek the collating symbol entry corresponding to NAME. + Return the index of the symbol in the SYMB_TABLE, + or -1 if not found. */ + +static __always_inline int32_t +seek_collating_symbol_entry (const unsigned char *name, size_t name_len, + const int32_t *symb_table, + int_fast32_t table_size, + const unsigned char *extra) +{ + int_fast32_t elem; - /* Local function for parse_bracket_exp used in _LIBC environment. - Look up the collation sequence value of BR_ELEM. - Return the value if succeeded, UINT_MAX otherwise. */ + for (elem = 0; elem < table_size; elem++) + if (symb_table[2 * elem] != 0) + { + int32_t idx = symb_table[2 * elem + 1]; + /* Skip the name of collating element name. */ + idx += 1 + extra[idx]; + if (/* Compare the length of the name. */ + name_len == extra[idx] + /* Compare the name. */ + && memcmp (name, &extra[idx + 1], name_len) == 0) + /* Yep, this is the entry. */ + return elem; + } + return -1; +} - auto inline unsigned int - __attribute__ ((always_inline)) - lookup_collation_sequence_value (bracket_elem_t *br_elem) +/* Local function for parse_bracket_exp used in _LIBC environment. + Look up the collation sequence value of BR_ELEM. + Return the value if succeeded, UINT_MAX otherwise. */ + +static __always_inline unsigned int +lookup_collation_sequence_value (bracket_elem_t *br_elem, uint32_t nrules, + const unsigned char *collseqmb, + const char *collseqwc, + int_fast32_t table_size, + const int32_t *symb_table, + const unsigned char *extra) +{ + if (br_elem->type == SB_CHAR) { - if (br_elem->type == SB_CHAR) - { - /* - if (MB_CUR_MAX == 1) - */ - if (nrules == 0) - return collseqmb[br_elem->opr.ch]; - else - { - wint_t wc = __btowc (br_elem->opr.ch); - return __collseq_table_lookup (collseqwc, wc); - } - } - else if (br_elem->type == MB_CHAR) + /* if (MB_CUR_MAX == 1) */ + if (nrules == 0) + return collseqmb[br_elem->opr.ch]; + else { - if (nrules != 0) - return __collseq_table_lookup (collseqwc, br_elem->opr.wch); + wint_t wc = __btowc (br_elem->opr.ch); + return __collseq_table_lookup (collseqwc, wc); } - else if (br_elem->type == COLL_SYM) + } + else if (br_elem->type == MB_CHAR) + { + if (nrules != 0) + return __collseq_table_lookup (collseqwc, br_elem->opr.wch); + } + else if (br_elem->type == COLL_SYM) + { + size_t sym_name_len = strlen ((char *) br_elem->opr.name); + if (nrules != 0) { - size_t sym_name_len = strlen ((char *) br_elem->opr.name); - if (nrules != 0) + int32_t elem, idx; + elem = seek_collating_symbol_entry (br_elem->opr.name, + sym_name_len, + symb_table, table_size, + extra); + if (elem != -1) { - int32_t elem, idx; - elem = seek_collating_symbol_entry (br_elem->opr.name, - sym_name_len); - if (elem != -1) - { - /* We found the entry. */ - idx = symb_table[2 * elem + 1]; - /* Skip the name of collating element name. */ - idx += 1 + extra[idx]; - /* Skip the byte sequence of the collating element. */ - idx += 1 + extra[idx]; - /* Adjust for the alignment. */ - idx = (idx + 3) & ~3; - /* Skip the multibyte collation sequence value. */ - idx += sizeof (unsigned int); - /* Skip the wide char sequence of the collating element. */ - idx += sizeof (unsigned int) * - (1 + *(unsigned int *) (extra + idx)); - /* Return the collation sequence value. */ - return *(unsigned int *) (extra + idx); - } - else if (sym_name_len == 1) - { - /* No valid character. Match it as a single byte - character. */ - return collseqmb[br_elem->opr.name[0]]; - } + /* We found the entry. */ + idx = symb_table[2 * elem + 1]; + /* Skip the name of collating element name. */ + idx += 1 + extra[idx]; + /* Skip the byte sequence of the collating element. */ + idx += 1 + extra[idx]; + /* Adjust for the alignment. */ + idx = (idx + 3) & ~3; + /* Skip the multibyte collation sequence value. */ + idx += sizeof (unsigned int); + /* Skip the wide char sequence of the collating element. */ + idx += sizeof (unsigned int) * + (1 + *(unsigned int *) (extra + idx)); + /* Return the collation sequence value. */ + return *(unsigned int *) (extra + idx); } else if (sym_name_len == 1) - return collseqmb[br_elem->opr.name[0]]; + { + /* No valid character. Match it as a single byte + character. */ + return collseqmb[br_elem->opr.name[0]]; + } } - return UINT_MAX; + else if (sym_name_len == 1) + return collseqmb[br_elem->opr.name[0]]; } + return UINT_MAX; +} - /* Local function for parse_bracket_exp used in _LIBC environment. - Build the range expression which starts from START_ELEM, and ends - at END_ELEM. The result are written to MBCSET and SBCSET. - RANGE_ALLOC is the allocated size of mbcset->range_starts, and - mbcset->range_ends, is a pointer argument since we may - update it. */ +/* Local function for parse_bracket_exp used in _LIBC environment. + Build the range expression which starts from START_ELEM, and ends + at END_ELEM. The result are written to MBCSET and SBCSET. + RANGE_ALLOC is the allocated size of mbcset->range_starts, and + mbcset->range_ends, is a pointer argument since we may + update it. */ + +static __always_inline reg_errcode_t +build_range_exp (bitset_t sbcset, re_charset_t *mbcset, Idx *range_alloc, + bracket_elem_t *start_elem, bracket_elem_t *end_elem, + re_dfa_t *dfa, reg_syntax_t syntax, uint32_t nrules, + const unsigned char *collseqmb, const char *collseqwc, + int_fast32_t table_size, const int32_t *symb_table, + const unsigned char *extra) +{ + unsigned int ch; + uint32_t start_collseq; + uint32_t end_collseq; - auto inline reg_errcode_t - __attribute__ ((always_inline)) - build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc, - bracket_elem_t *start_elem, bracket_elem_t *end_elem) - { - unsigned int ch; - uint32_t start_collseq; - uint32_t end_collseq; - - /* Equivalence Classes and Character Classes can't be a range - start/end. */ - if (__glibc_unlikely (start_elem->type == EQUIV_CLASS - || start_elem->type == CHAR_CLASS - || end_elem->type == EQUIV_CLASS - || end_elem->type == CHAR_CLASS)) - return REG_ERANGE; + /* Equivalence Classes and Character Classes can't be a range + start/end. */ + if (__glibc_unlikely (start_elem->type == EQUIV_CLASS + || start_elem->type == CHAR_CLASS + || end_elem->type == EQUIV_CLASS + || end_elem->type == CHAR_CLASS)) + return REG_ERANGE; - /* FIXME: Implement rational ranges here, too. */ - start_collseq = lookup_collation_sequence_value (start_elem); - end_collseq = lookup_collation_sequence_value (end_elem); - /* Check start/end collation sequence values. */ - if (__glibc_unlikely (start_collseq == UINT_MAX - || end_collseq == UINT_MAX)) - return REG_ECOLLATE; - if (__glibc_unlikely ((syntax & RE_NO_EMPTY_RANGES) - && start_collseq > end_collseq)) - return REG_ERANGE; + /* FIXME: Implement rational ranges here, too. */ + start_collseq = lookup_collation_sequence_value (start_elem, nrules, collseqmb, collseqwc, + table_size, symb_table, extra); + end_collseq = lookup_collation_sequence_value (end_elem, nrules, collseqmb, collseqwc, + table_size, symb_table, extra); + /* Check start/end collation sequence values. */ + if (__glibc_unlikely (start_collseq == UINT_MAX + || end_collseq == UINT_MAX)) + return REG_ECOLLATE; + if (__glibc_unlikely ((syntax & RE_NO_EMPTY_RANGES) + && start_collseq > end_collseq)) + return REG_ERANGE; - /* Got valid collation sequence values, add them as a new entry. - However, if we have no collation elements, and the character set - is single byte, the single byte character set that we - build below suffices. */ - if (nrules > 0 || dfa->mb_cur_max > 1) + /* Got valid collation sequence values, add them as a new entry. + However, if we have no collation elements, and the character set + is single byte, the single byte character set that we + build below suffices. */ + if (nrules > 0 || dfa->mb_cur_max > 1) + { + /* Check the space of the arrays. */ + if (__glibc_unlikely (*range_alloc == mbcset->nranges)) { - /* Check the space of the arrays. */ - if (__glibc_unlikely (*range_alloc == mbcset->nranges)) - { - /* There is not enough space, need realloc. */ - uint32_t *new_array_start; - uint32_t *new_array_end; - Idx new_nranges; - - /* +1 in case of mbcset->nranges is 0. */ - new_nranges = 2 * mbcset->nranges + 1; - new_array_start = re_realloc (mbcset->range_starts, uint32_t, - new_nranges); - new_array_end = re_realloc (mbcset->range_ends, uint32_t, - new_nranges); - - if (__glibc_unlikely (new_array_start == NULL - || new_array_end == NULL)) - return REG_ESPACE; + /* There is not enough space, need realloc. */ + uint32_t *new_array_start; + uint32_t *new_array_end; + int new_nranges; - mbcset->range_starts = new_array_start; - mbcset->range_ends = new_array_end; - *range_alloc = new_nranges; - } + /* +1 in case of mbcset->nranges is 0. */ + new_nranges = 2 * mbcset->nranges + 1; + new_array_start = re_realloc (mbcset->range_starts, uint32_t, + new_nranges); + new_array_end = re_realloc (mbcset->range_ends, uint32_t, + new_nranges); - mbcset->range_starts[mbcset->nranges] = start_collseq; - mbcset->range_ends[mbcset->nranges++] = end_collseq; - } + if (__glibc_unlikely (new_array_start == NULL + || new_array_end == NULL)) + return REG_ESPACE; - /* Build the table for single byte characters. */ - for (ch = 0; ch < SBC_MAX; ch++) - { - uint32_t ch_collseq; - /* - if (MB_CUR_MAX == 1) - */ - if (nrules == 0) - ch_collseq = collseqmb[ch]; - else - ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch)); - if (start_collseq <= ch_collseq && ch_collseq <= end_collseq) - bitset_set (sbcset, ch); + mbcset->range_starts = new_array_start; + mbcset->range_ends = new_array_end; + *range_alloc = new_nranges; } - return REG_NOERROR; + + mbcset->range_starts[mbcset->nranges] = start_collseq; + mbcset->range_ends[mbcset->nranges++] = end_collseq; } - /* Local function for parse_bracket_exp used in _LIBC environment. - Build the collating element which is represented by NAME. - The result are written to MBCSET and SBCSET. - COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a - pointer argument since we may update it. */ + /* Build the table for single byte characters. */ + for (ch = 0; ch < SBC_MAX; ch++) + { + uint32_t ch_collseq; + /* if (MB_CUR_MAX == 1) */ + if (nrules == 0) + ch_collseq = collseqmb[ch]; + else + ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch)); + if (start_collseq <= ch_collseq && ch_collseq <= end_collseq) + bitset_set (sbcset, ch); + } + return REG_NOERROR; +} - auto inline reg_errcode_t - __attribute__ ((always_inline)) - build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset, - Idx *coll_sym_alloc, const unsigned char *name) +/* Local function for parse_bracket_exp used in _LIBC environment. + Build the collating element which is represented by NAME. + The result are written to MBCSET and SBCSET. + COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a + pointer argument since we may update it. */ + +static __always_inline reg_errcode_t +build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset, + Idx *coll_sym_alloc, const unsigned char *name, + uint_fast32_t nrules, int_fast32_t table_size, + const int32_t *symb_table, const unsigned char *extra) +{ + int32_t elem, idx; + size_t name_len = strlen ((const char *) name); + if (nrules != 0) { - int32_t elem, idx; - size_t name_len = strlen ((const char *) name); - if (nrules != 0) + elem = seek_collating_symbol_entry (name, name_len, symb_table, + table_size, extra); + if (elem != -1) { - elem = seek_collating_symbol_entry (name, name_len); - if (elem != -1) - { - /* We found the entry. */ - idx = symb_table[2 * elem + 1]; - /* Skip the name of collating element name. */ - idx += 1 + extra[idx]; - } - else if (name_len == 1) - { - /* No valid character, treat it as a normal - character. */ - bitset_set (sbcset, name[0]); - return REG_NOERROR; - } - else - return REG_ECOLLATE; - - /* Got valid collation sequence, add it as a new entry. */ - /* Check the space of the arrays. */ - if (__glibc_unlikely (*coll_sym_alloc == mbcset->ncoll_syms)) - { - /* Not enough, realloc it. */ - /* +1 in case of mbcset->ncoll_syms is 0. */ - Idx new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1; - /* Use realloc since mbcset->coll_syms is NULL - if *alloc == 0. */ - int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t, - new_coll_sym_alloc); - if (__glibc_unlikely (new_coll_syms == NULL)) - return REG_ESPACE; - mbcset->coll_syms = new_coll_syms; - *coll_sym_alloc = new_coll_sym_alloc; - } - mbcset->coll_syms[mbcset->ncoll_syms++] = idx; + /* We found the entry. */ + idx = symb_table[2 * elem + 1]; + /* Skip the name of collating element name. */ + idx += 1 + extra[idx]; + } + else if (name_len == 1) + { + /* No valid character, treat it as a normal + character. */ + bitset_set (sbcset, name[0]); return REG_NOERROR; } else + return REG_ECOLLATE; + + /* Got valid collation sequence, add it as a new entry. */ + /* Check the space of the arrays. */ + if (__glibc_unlikely (*coll_sym_alloc == mbcset->ncoll_syms)) { - if (__glibc_unlikely (name_len != 1)) - return REG_ECOLLATE; - else - { - bitset_set (sbcset, name[0]); - return REG_NOERROR; - } + /* Not enough, realloc it. */ + /* +1 in case of mbcset->ncoll_syms is 0. */ + int new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1; + /* Use realloc since mbcset->coll_syms is NULL + if *alloc == 0. */ + int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t, + new_coll_sym_alloc); + if (__glibc_unlikely (new_coll_syms == NULL)) + return REG_ESPACE; + mbcset->coll_syms = new_coll_syms; + *coll_sym_alloc = new_coll_sym_alloc; } + mbcset->coll_syms[mbcset->ncoll_syms++] = idx; + return REG_NOERROR; } -#endif + else + { + if (__glibc_unlikely (name_len != 1)) + return REG_ECOLLATE; + else + { + bitset_set (sbcset, name[0]); + return REG_NOERROR; + } + } +} +#endif /* _LIBC */ + +/* This function parse bracket expression like "[abc]", "[a-c]", + "[[.a-a.]]" etc. */ + +static bin_tree_t * +parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, + reg_syntax_t syntax, reg_errcode_t *err) +{ + const unsigned char *collseqmb = NULL; + const char *collseqwc = NULL; + uint_fast32_t nrules = 0; + int_fast32_t table_size = 0; + const void *symb_table = NULL; + const unsigned char *extra = NULL; re_token_t br_token; re_bitset_ptr_t sbcset; -#ifdef RE_ENABLE_I18N re_charset_t *mbcset; Idx coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0; Idx equiv_class_alloc = 0, char_class_alloc = 0; -#endif /* not RE_ENABLE_I18N */ bool non_match = false; bin_tree_t *work_tree; int token_len; @@ -3111,26 +3050,17 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, */ collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB); - symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_SYMB_TABLEMB); + symb_table = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_TABLEMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); } #endif sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); -#ifdef RE_ENABLE_I18N mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); -#endif /* RE_ENABLE_I18N */ -#ifdef RE_ENABLE_I18N if (__glibc_unlikely (sbcset == NULL || mbcset == NULL)) -#else - if (__glibc_unlikely (sbcset == NULL)) -#endif /* RE_ENABLE_I18N */ { re_free (sbcset); -#ifdef RE_ENABLE_I18N re_free (mbcset); -#endif *err = REG_ESPACE; return NULL; } @@ -3143,9 +3073,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, } if (token->type == OP_NON_MATCH_LIST) { -#ifdef RE_ENABLE_I18N mbcset->non_match = 1; -#endif /* not RE_ENABLE_I18N */ non_match = true; if (syntax & RE_HAT_LISTS_NOT_NEWLINE) bitset_set (sbcset, '\n'); @@ -3228,18 +3156,10 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, token_len = peek_token_bracket (token, regexp, syntax); -#ifdef _LIBC *err = build_range_exp (sbcset, mbcset, &range_alloc, - &start_elem, &end_elem); -#else -# ifdef RE_ENABLE_I18N - *err = build_range_exp (syntax, sbcset, - dfa->mb_cur_max > 1 ? mbcset : NULL, - &range_alloc, &start_elem, &end_elem); -# else - *err = build_range_exp (syntax, sbcset, &start_elem, &end_elem); -# endif -#endif /* RE_ENABLE_I18N */ + &start_elem, &end_elem, + dfa, syntax, nrules, collseqmb, collseqwc, + table_size, symb_table, extra); if (__glibc_unlikely (*err != REG_NOERROR)) goto parse_bracket_exp_free_return; } @@ -3250,7 +3170,6 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, case SB_CHAR: bitset_set (sbcset, start_elem.opr.ch); break; -#ifdef RE_ENABLE_I18N case MB_CHAR: /* Check whether the array has enough space. */ if (__glibc_unlikely (mbchar_alloc == mbcset->nmbchars)) @@ -3268,30 +3187,24 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, } mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch; break; -#endif /* RE_ENABLE_I18N */ case EQUIV_CLASS: *err = build_equiv_class (sbcset, -#ifdef RE_ENABLE_I18N mbcset, &equiv_class_alloc, -#endif /* RE_ENABLE_I18N */ start_elem.opr.name); if (__glibc_unlikely (*err != REG_NOERROR)) goto parse_bracket_exp_free_return; break; case COLL_SYM: *err = build_collating_symbol (sbcset, -#ifdef RE_ENABLE_I18N mbcset, &coll_sym_alloc, -#endif /* RE_ENABLE_I18N */ - start_elem.opr.name); + start_elem.opr.name, + nrules, table_size, symb_table, extra); if (__glibc_unlikely (*err != REG_NOERROR)) goto parse_bracket_exp_free_return; break; case CHAR_CLASS: *err = build_charclass (regexp->trans, sbcset, -#ifdef RE_ENABLE_I18N mbcset, &char_class_alloc, -#endif /* RE_ENABLE_I18N */ (const char *) start_elem.opr.name, syntax); if (__glibc_unlikely (*err != REG_NOERROR)) @@ -3317,7 +3230,6 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, if (non_match) bitset_not (sbcset); -#ifdef RE_ENABLE_I18N /* Ensure only single byte characters are set. */ if (dfa->mb_cur_max > 1) bitset_mask (sbcset, dfa->sb_char); @@ -3361,11 +3273,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, } } else -#endif /* not RE_ENABLE_I18N */ { -#ifdef RE_ENABLE_I18N free_charset (mbcset); -#endif /* Build a tree for simple bracket. */ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; @@ -3379,9 +3288,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, *err = REG_ESPACE; parse_bracket_exp_free_return: re_free (sbcset); -#ifdef RE_ENABLE_I18N free_charset (mbcset); -#endif /* RE_ENABLE_I18N */ return NULL; } @@ -3392,7 +3299,6 @@ parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, re_token_t *token, int token_len, re_dfa_t *dfa, reg_syntax_t syntax, bool accept_hyphen) { -#ifdef RE_ENABLE_I18N int cur_char_size; cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp)); if (cur_char_size > 1) @@ -3402,7 +3308,6 @@ parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, re_string_skip_bytes (regexp, cur_char_size); return REG_NOERROR; } -#endif /* RE_ENABLE_I18N */ re_string_skip_bytes (regexp, token_len); /* Skip a token. */ if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS || token->type == OP_OPEN_EQUIV_CLASS) @@ -3475,12 +3380,8 @@ parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, is a pointer argument since we may update it. */ static reg_errcode_t -#ifdef RE_ENABLE_I18N build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, Idx *equiv_class_alloc, const unsigned char *name) -#else /* not RE_ENABLE_I18N */ -build_equiv_class (bitset_t sbcset, const unsigned char *name) -#endif /* not RE_ENABLE_I18N */ { #ifdef _LIBC uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); @@ -3560,14 +3461,9 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name) is a pointer argument since we may update it. */ static reg_errcode_t -#ifdef RE_ENABLE_I18N build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, re_charset_t *mbcset, Idx *char_class_alloc, const char *class_name, reg_syntax_t syntax) -#else /* not RE_ENABLE_I18N */ -build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, - const char *class_name, reg_syntax_t syntax) -#endif /* not RE_ENABLE_I18N */ { int i; const char *name = class_name; @@ -3578,7 +3474,6 @@ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0)) name = "alpha"; -#ifdef RE_ENABLE_I18N /* Check the space of the arrays. */ if (__glibc_unlikely (*char_class_alloc == mbcset->nchar_classes)) { @@ -3594,7 +3489,6 @@ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, *char_class_alloc = new_char_class_alloc; } mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name); -#endif /* RE_ENABLE_I18N */ #define BUILD_CHARCLASS_LOOP(ctype_func) \ do { \ @@ -3649,10 +3543,8 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, reg_errcode_t *err) { re_bitset_ptr_t sbcset; -#ifdef RE_ENABLE_I18N re_charset_t *mbcset; Idx alloc = 0; -#endif /* not RE_ENABLE_I18N */ reg_errcode_t ret; bin_tree_t *tree; @@ -3662,7 +3554,6 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, *err = REG_ESPACE; return NULL; } -#ifdef RE_ENABLE_I18N mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); if (__glibc_unlikely (mbcset == NULL)) { @@ -3671,21 +3562,14 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, return NULL; } mbcset->non_match = non_match; -#endif /* RE_ENABLE_I18N */ /* We don't care the syntax in this case. */ - ret = build_charclass (trans, sbcset, -#ifdef RE_ENABLE_I18N - mbcset, &alloc, -#endif /* RE_ENABLE_I18N */ - class_name, 0); + ret = build_charclass (trans, sbcset, mbcset, &alloc, class_name, 0); if (__glibc_unlikely (ret != REG_NOERROR)) { re_free (sbcset); -#ifdef RE_ENABLE_I18N free_charset (mbcset); -#endif /* RE_ENABLE_I18N */ *err = ret; return NULL; } @@ -3697,11 +3581,9 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, if (non_match) bitset_not (sbcset); -#ifdef RE_ENABLE_I18N /* Ensure only single byte characters are set. */ if (dfa->mb_cur_max > 1) bitset_mask (sbcset, dfa->sb_char); -#endif /* Build a tree for simple bracket. */ re_token_t br_token = { .type = SIMPLE_BRACKET, .opr.sbcset = sbcset }; @@ -3709,7 +3591,6 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, if (__glibc_unlikely (tree == NULL)) goto build_word_op_espace; -#ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { bin_tree_t *mbc_tree; @@ -3730,15 +3611,10 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, free_charset (mbcset); return tree; } -#else /* not RE_ENABLE_I18N */ - return tree; -#endif /* not RE_ENABLE_I18N */ build_word_op_espace: re_free (sbcset); -#ifdef RE_ENABLE_I18N free_charset (mbcset); -#endif /* RE_ENABLE_I18N */ *err = REG_ESPACE; return NULL; } @@ -3771,21 +3647,19 @@ fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax) return num; } -#ifdef RE_ENABLE_I18N static void free_charset (re_charset_t *cset) { re_free (cset->mbchars); -# ifdef _LIBC +#ifdef _LIBC re_free (cset->coll_syms); re_free (cset->equiv_classes); -# endif +#endif re_free (cset->range_starts); re_free (cset->range_ends); re_free (cset->char_classes); re_free (cset); } -#endif /* RE_ENABLE_I18N */ /* Functions for binary tree operation. */ @@ -3851,13 +3725,10 @@ mark_opt_subexp (void *extra, bin_tree_t *node) static void free_token (re_token_t *node) { -#ifdef RE_ENABLE_I18N if (node->type == COMPLEX_BRACKET && node->duplicated == 0) free_charset (node->opr.mbcset); - else -#endif /* RE_ENABLE_I18N */ - if (node->type == SIMPLE_BRACKET && node->duplicated == 0) - re_free (node->opr.sbcset); + else if (node->type == SIMPLE_BRACKET && node->duplicated == 0) + re_free (node->opr.sbcset); } /* Worker function for tree walking. Free the allocated memory inside NODE diff --git a/gl/regex.c b/gl/regex.c index d328639..ff11767 100644 --- a/gl/regex.c +++ b/gl/regex.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2021 Free Software Foundation, Inc. + Copyright (C) 2002-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . diff --git a/gl/regex.h b/gl/regex.h index adb6976..a7e0bd0 100644 --- a/gl/regex.h +++ b/gl/regex.h @@ -1,6 +1,6 @@ /* Definitions for data structures and routines for the regular expression library. - Copyright (C) 1985, 1989-2021 Free Software Foundation, Inc. + Copyright (C) 1985, 1989-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/gl/regex_internal.c b/gl/regex_internal.c index aefcfa2..0e6919f 100644 --- a/gl/regex_internal.c +++ b/gl/regex_internal.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2021 Free Software Foundation, Inc. + Copyright (C) 2002-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -30,10 +30,8 @@ static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa, re_hashval_t hash); static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len); -#ifdef RE_ENABLE_I18N static void build_wcs_buffer (re_string_t *pstr); static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr); -#endif /* RE_ENABLE_I18N */ static void build_upper_buffer (re_string_t *pstr); static void re_string_translate_buffer (re_string_t *pstr); static unsigned int re_string_context_at (const re_string_t *input, Idx idx, @@ -91,7 +89,6 @@ re_string_construct (re_string_t *pstr, const char *str, Idx len, if (icase) { -#ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) { while (1) @@ -109,16 +106,13 @@ re_string_construct (re_string_t *pstr, const char *str, Idx len, } } else -#endif /* RE_ENABLE_I18N */ build_upper_buffer (pstr); } else { -#ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) build_wcs_buffer (pstr); else -#endif /* RE_ENABLE_I18N */ { if (trans != NULL) re_string_translate_buffer (pstr); @@ -139,7 +133,6 @@ static reg_errcode_t __attribute_warn_unused_result__ re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len) { -#ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { wint_t *new_wcs; @@ -162,7 +155,6 @@ re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len) pstr->offsets = new_offsets; } } -#endif /* RE_ENABLE_I18N */ if (pstr->mbs_allocated) { unsigned char *new_mbs = re_realloc (pstr->mbs, unsigned char, @@ -194,7 +186,6 @@ re_string_construct_common (const char *str, Idx len, re_string_t *pstr, pstr->raw_stop = pstr->stop; } -#ifdef RE_ENABLE_I18N /* Build wide character buffer PSTR->WCS. If the byte sequence of the string are: @@ -530,7 +521,6 @@ re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc) *last_wc = wc; return rawbuf_idx; } -#endif /* RE_ENABLE_I18N */ /* Build the buffer PSTR->MBS, and apply the translation if we need. This function is used in case of REG_ICASE. */ @@ -585,10 +575,8 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) else { /* Reset buffer. */ -#ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); -#endif /* RE_ENABLE_I18N */ pstr->len = pstr->raw_len; pstr->stop = pstr->raw_stop; pstr->valid_len = 0; @@ -608,7 +596,6 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) if (__glibc_likely (offset < pstr->valid_raw_len)) { /* Yes, move them to the front of the buffer. */ -#ifdef RE_ENABLE_I18N if (__glibc_unlikely (pstr->offsets_needed)) { Idx low = 0, high = pstr->valid_len, mid; @@ -672,15 +659,12 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) } } else -#endif { pstr->tip_context = re_string_context_at (pstr, offset - 1, eflags); -#ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) memmove (pstr->wcs, pstr->wcs + offset, (pstr->valid_len - offset) * sizeof (wint_t)); -#endif /* RE_ENABLE_I18N */ if (__glibc_unlikely (pstr->mbs_allocated)) memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); @@ -691,7 +675,6 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) } else { -#ifdef RE_ENABLE_I18N /* No, skip all characters until IDX. */ Idx prev_valid_len = pstr->valid_len; @@ -701,9 +684,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) pstr->stop = pstr->raw_stop - idx + offset; pstr->offsets_needed = 0; } -#endif pstr->valid_len = 0; -#ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { Idx wcs_idx; @@ -787,7 +768,6 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) pstr->valid_raw_len = pstr->valid_len; } else -#endif /* RE_ENABLE_I18N */ { int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1]; pstr->valid_raw_len = 0; @@ -807,7 +787,6 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) pstr->stop -= offset; /* Then build the buffers. */ -#ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { if (pstr->icase) @@ -820,7 +799,6 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) build_wcs_buffer (pstr); } else -#endif /* RE_ENABLE_I18N */ if (__glibc_unlikely (pstr->mbs_allocated)) { if (pstr->icase) @@ -846,28 +824,22 @@ re_string_peek_byte_case (const re_string_t *pstr, Idx idx) if (__glibc_likely (!pstr->mbs_allocated)) return re_string_peek_byte (pstr, idx); -#ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1 && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx)) return re_string_peek_byte (pstr, idx); -#endif off = pstr->cur_idx + idx; -#ifdef RE_ENABLE_I18N if (pstr->offsets_needed) off = pstr->offsets[off]; -#endif ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; -#ifdef RE_ENABLE_I18N /* Ensure that e.g. for tr_TR.UTF-8 BACKSLASH DOTLESS SMALL LETTER I this function returns CAPITAL LETTER I instead of first byte of DOTLESS SMALL LETTER I. The latter would confuse the parser, since peek_byte_case doesn't advance cur_idx in any way. */ if (pstr->offsets_needed && !isascii (ch)) return re_string_peek_byte (pstr, idx); -#endif return ch; } @@ -878,7 +850,6 @@ re_string_fetch_byte_case (re_string_t *pstr) if (__glibc_likely (!pstr->mbs_allocated)) return re_string_fetch_byte (pstr); -#ifdef RE_ENABLE_I18N if (pstr->offsets_needed) { Idx off; @@ -904,7 +875,6 @@ re_string_fetch_byte_case (re_string_t *pstr) re_string_char_size_at (pstr, pstr->cur_idx)); return ch; } -#endif return pstr->raw_mbs[pstr->raw_mbs_idx + pstr->cur_idx++]; } @@ -912,10 +882,8 @@ re_string_fetch_byte_case (re_string_t *pstr) static void re_string_destruct (re_string_t *pstr) { -#ifdef RE_ENABLE_I18N re_free (pstr->wcs); re_free (pstr->offsets); -#endif /* RE_ENABLE_I18N */ if (pstr->mbs_allocated) re_free (pstr->mbs); } @@ -933,7 +901,6 @@ re_string_context_at (const re_string_t *input, Idx idx, int eflags) if (__glibc_unlikely (idx == input->len)) return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF : CONTEXT_NEWLINE | CONTEXT_ENDBUF); -#ifdef RE_ENABLE_I18N if (input->mb_cur_max > 1) { wint_t wc; @@ -953,7 +920,6 @@ re_string_context_at (const re_string_t *input, Idx idx, int eflags) ? CONTEXT_NEWLINE : 0); } else -#endif { c = re_string_byte_at (input, idx); if (bitset_contain (input->word_char, c)) @@ -1430,32 +1396,28 @@ re_dfa_add_node (re_dfa_t *dfa, re_token_t token) if (__glibc_unlikely (new_nodes == NULL)) return -1; dfa->nodes = new_nodes; + dfa->nodes_alloc = new_nodes_alloc; new_nexts = re_realloc (dfa->nexts, Idx, new_nodes_alloc); + if (new_nexts != NULL) + dfa->nexts = new_nexts; new_indices = re_realloc (dfa->org_indices, Idx, new_nodes_alloc); + if (new_indices != NULL) + dfa->org_indices = new_indices; new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc); + if (new_edests != NULL) + dfa->edests = new_edests; new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc); + if (new_eclosures != NULL) + dfa->eclosures = new_eclosures; if (__glibc_unlikely (new_nexts == NULL || new_indices == NULL || new_edests == NULL || new_eclosures == NULL)) - { - re_free (new_nexts); - re_free (new_indices); - re_free (new_edests); - re_free (new_eclosures); - return -1; - } - dfa->nexts = new_nexts; - dfa->org_indices = new_indices; - dfa->edests = new_edests; - dfa->eclosures = new_eclosures; - dfa->nodes_alloc = new_nodes_alloc; + return -1; } dfa->nodes[dfa->nodes_len] = token; dfa->nodes[dfa->nodes_len].constraint = 0; -#ifdef RE_ENABLE_I18N dfa->nodes[dfa->nodes_len].accept_mb = ((token.type == OP_PERIOD && dfa->mb_cur_max > 1) || token.type == COMPLEX_BRACKET); -#endif dfa->nexts[dfa->nodes_len] = -1; re_node_set_init_empty (dfa->edests + dfa->nodes_len); re_node_set_init_empty (dfa->eclosures + dfa->nodes_len); @@ -1651,9 +1613,7 @@ create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, re_token_type_t type = node->type; if (type == CHARACTER && !node->constraint) continue; -#ifdef RE_ENABLE_I18N newstate->accept_mb |= node->accept_mb; -#endif /* RE_ENABLE_I18N */ /* If the state has the halt node, the state is a halt state. */ if (type == END_OF_RE) @@ -1705,9 +1665,7 @@ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, if (type == CHARACTER && !constraint) continue; -#ifdef RE_ENABLE_I18N newstate->accept_mb |= node->accept_mb; -#endif /* RE_ENABLE_I18N */ /* If the state has the halt node, the state is a halt state. */ if (type == END_OF_RE) diff --git a/gl/regex_internal.h b/gl/regex_internal.h index 1245e78..57a455b 100644 --- a/gl/regex_internal.h +++ b/gl/regex_internal.h @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2021 Free Software Foundation, Inc. + Copyright (C) 2002-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -116,10 +116,6 @@ # define gettext_noop(String) String #endif -#if (defined MB_CUR_MAX && HAVE_WCTYPE_H && HAVE_ISWCTYPE) || _LIBC -# define RE_ENABLE_I18N -#endif - /* Number of ASCII characters. */ #define ASCII_CHARS 0x80 @@ -150,6 +146,11 @@ # define __regfree regfree #endif /* not _LIBC */ +/* Types related to integers. Unless protected by #ifdef _LIBC, the + regex code should avoid exact-width types like int32_t and uint64_t + as some non-GCC platforms lack them, an issue when this code is + used in Gnulib. */ + #ifndef SSIZE_MAX # define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) #endif @@ -246,10 +247,8 @@ typedef enum SIMPLE_BRACKET = 3, OP_BACK_REF = 4, OP_PERIOD = 5, -#ifdef RE_ENABLE_I18N COMPLEX_BRACKET = 6, OP_UTF8_PERIOD = 7, -#endif /* RE_ENABLE_I18N */ /* We define EPSILON_BIT as a macro so that OP_OPEN_SUBEXP is used when the debugger shows values of this enum type. */ @@ -287,30 +286,29 @@ typedef enum } re_token_type_t; -#ifdef RE_ENABLE_I18N typedef struct { /* Multibyte characters. */ wchar_t *mbchars; +#ifdef _LIBC /* Collating symbols. */ -# ifdef _LIBC int32_t *coll_syms; -# endif +#endif +#ifdef _LIBC /* Equivalence classes. */ -# ifdef _LIBC int32_t *equiv_classes; -# endif +#endif /* Range expressions. */ -# ifdef _LIBC +#ifdef _LIBC uint32_t *range_starts; uint32_t *range_ends; -# else /* not _LIBC */ +#else wchar_t *range_starts; wchar_t *range_ends; -# endif /* not _LIBC */ +#endif /* Character classes. */ wctype_t *char_classes; @@ -333,7 +331,6 @@ typedef struct /* # of character classes. */ Idx nchar_classes; } re_charset_t; -#endif /* RE_ENABLE_I18N */ typedef struct { @@ -341,9 +338,7 @@ typedef struct { unsigned char c; /* for CHARACTER */ re_bitset_ptr_t sbcset; /* for SIMPLE_BRACKET */ -#ifdef RE_ENABLE_I18N re_charset_t *mbcset; /* for COMPLEX_BRACKET */ -#endif /* RE_ENABLE_I18N */ Idx idx; /* for BACK_REF */ re_context_type ctx_type; /* for ANCHOR */ } opr; @@ -355,12 +350,10 @@ typedef struct unsigned int constraint : 10; /* context constraint */ unsigned int duplicated : 1; unsigned int opt_subexp : 1; -#ifdef RE_ENABLE_I18N unsigned int accept_mb : 1; /* These 2 bits can be moved into the union if needed (e.g. if running out of bits; move opr.c to opr.c.c and move the flags to opr.c.flags). */ unsigned int mb_partial : 1; -#endif unsigned int word_char : 1; } re_token_t; @@ -375,12 +368,10 @@ struct re_string_t REG_ICASE, upper cases of the string are stored, otherwise MBS points the same address that RAW_MBS points. */ unsigned char *mbs; -#ifdef RE_ENABLE_I18N /* Store the wide character string which is corresponding to MBS. */ wint_t *wcs; Idx *offsets; mbstate_t cur_state; -#endif /* Index in RAW_MBS. Each character mbs[i] corresponds to raw_mbs[raw_mbs_idx + i]. */ Idx raw_mbs_idx; @@ -779,7 +770,6 @@ bitset_mask (bitset_t dest, const bitset_t src) dest[bitset_i] &= src[bitset_i]; } -#ifdef RE_ENABLE_I18N /* Functions for re_string. */ static int __attribute__ ((pure, unused)) @@ -803,15 +793,15 @@ re_string_wchar_at (const re_string_t *pstr, Idx idx) return (wint_t) pstr->wcs[idx]; } -# ifdef _LIBC -# include -# endif +#ifdef _LIBC +# include +#endif static int __attribute__ ((pure, unused)) re_string_elem_size_at (const re_string_t *pstr, Idx idx) { -# ifdef _LIBC +#ifdef _LIBC const unsigned char *p, *extra; const int32_t *table, *indirect; uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); @@ -827,11 +817,10 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx) findidx (table, indirect, extra, &p, pstr->len - idx); return p - pstr->mbs - idx; } - else -# endif /* _LIBC */ - return 1; +#endif /* _LIBC */ + + return 1; } -#endif /* RE_ENABLE_I18N */ #ifdef _LIBC # if __GNUC__ >= 7 diff --git a/gl/regexec.c b/gl/regexec.c index 6aeba3c..521cb02 100644 --- a/gl/regexec.c +++ b/gl/regexec.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2021 Free Software Foundation, Inc. + Copyright (C) 2002-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -67,11 +67,9 @@ static reg_errcode_t set_regs (const regex_t *preg, bool fl_backtrack); static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs); -#ifdef RE_ENABLE_I18N static int sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx node_idx, Idx str_idx, Idx max_str_idx); -#endif /* RE_ENABLE_I18N */ static reg_errcode_t sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx); static reg_errcode_t build_sifted_states (const re_match_context_t *mctx, @@ -123,10 +121,8 @@ static re_dfastate_t *transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t *pstate); #endif -#ifdef RE_ENABLE_I18N static reg_errcode_t transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate); -#endif /* RE_ENABLE_I18N */ static reg_errcode_t transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes); static reg_errcode_t get_subexp (re_match_context_t *mctx, @@ -156,14 +152,12 @@ static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, Idx cur_str, Idx subexp_num, int type); static bool build_trtable (const re_dfa_t *dfa, re_dfastate_t *state); -#ifdef RE_ENABLE_I18N static int check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, const re_string_t *input, Idx idx); -# ifdef _LIBC +#ifdef _LIBC static unsigned int find_collation_sequence_value (const unsigned char *mbs, size_t name_len); -# endif /* _LIBC */ -#endif /* RE_ENABLE_I18N */ +#endif static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, re_node_set *states_node, @@ -779,12 +773,10 @@ re_search_internal (const regex_t *preg, const char *string, Idx length, if (__glibc_unlikely (err != REG_NOERROR)) goto free_return; -#ifdef RE_ENABLE_I18N - /* Don't consider this char as a possible match start if it part, - yet isn't the head, of a multibyte character. */ + /* Don't consider this char as a possible match start if it part, + yet isn't the head, of a multibyte character. */ if (!sb && !re_string_first_byte (&mctx.input, 0)) continue; -#endif /* It seems to be appropriate one, then use the matcher. */ /* We assume that the matching starts from 0. */ @@ -858,7 +850,6 @@ re_search_internal (const regex_t *preg, const char *string, Idx length, for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) if (pmatch[reg_idx].rm_so != -1) { -#ifdef RE_ENABLE_I18N if (__glibc_unlikely (mctx.input.offsets_needed != 0)) { pmatch[reg_idx].rm_so = @@ -870,9 +861,6 @@ re_search_internal (const regex_t *preg, const char *string, Idx length, ? mctx.input.valid_raw_len : mctx.input.offsets[pmatch[reg_idx].rm_eo]); } -#else - DEBUG_ASSERT (mctx.input.offsets_needed == 0); -#endif pmatch[reg_idx].rm_so += match_first; pmatch[reg_idx].rm_eo += match_first; } @@ -996,8 +984,7 @@ prune_impossible_nodes (re_match_context_t *mctx) We must select appropriate initial state depending on the context, since initial states may have constraints like "\<", "^", etc.. */ -static inline re_dfastate_t * -__attribute__ ((always_inline)) +static __always_inline re_dfastate_t * acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx, Idx idx) { @@ -1261,12 +1248,9 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs, Idx naccepted = 0; re_token_type_t type = dfa->nodes[node].type; -#ifdef RE_ENABLE_I18N if (dfa->nodes[node].accept_mb) naccepted = check_node_accept_bytes (dfa, node, &mctx->input, *pidx); - else -#endif /* RE_ENABLE_I18N */ - if (type == OP_BACK_REF) + else if (type == OP_BACK_REF) { Idx subexp_idx = dfa->nodes[node].opr.idx + 1; if (subexp_idx < nregs) @@ -1324,8 +1308,8 @@ push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, re_node_set *eps_via_nodes) { reg_errcode_t err; - Idx num = fs->num++; - if (fs->num == fs->alloc) + Idx num = fs->num; + if (num == fs->alloc) { struct re_fail_stack_ent_t *new_array; new_array = re_realloc (fs->stack, struct re_fail_stack_ent_t, @@ -1340,6 +1324,7 @@ push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, fs->stack[num].regs = re_malloc (regmatch_t, 2 * nregs); if (fs->stack[num].regs == NULL) return REG_ESPACE; + fs->num = num + 1; memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs); memcpy (fs->stack[num].regs + nregs, prevregs, sizeof (regmatch_t) * nregs); err = re_node_set_init_copy (&fs->stack[num].eps_via_nodes, eps_via_nodes); @@ -1634,12 +1619,10 @@ build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, bool ok; DEBUG_ASSERT (!IS_EPSILON_NODE (dfa->nodes[prev_node].type)); -#ifdef RE_ENABLE_I18N /* If the node may accept "multi byte". */ if (dfa->nodes[prev_node].accept_mb) naccepted = sift_states_iter_mb (mctx, sctx, prev_node, str_idx, sctx->last_str_idx); -#endif /* RE_ENABLE_I18N */ /* We don't check backreferences here. See update_cur_sifted_state(). */ @@ -1688,6 +1671,7 @@ clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx) if (top < next_state_log_idx) { + DEBUG_ASSERT (mctx->state_log != NULL); memset (mctx->state_log + top + 1, '\0', sizeof (re_dfastate_t *) * (next_state_log_idx - top)); mctx->state_log_top = next_state_log_idx; @@ -2176,7 +2160,6 @@ sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, } -#ifdef RE_ENABLE_I18N static int sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, Idx node_idx, Idx str_idx, Idx max_str_idx) @@ -2196,8 +2179,6 @@ sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, 'naccepted' bytes input. */ return naccepted; } -#endif /* RE_ENABLE_I18N */ - /* Functions for state transition. */ @@ -2215,7 +2196,6 @@ transit_state (reg_errcode_t *err, re_match_context_t *mctx, re_dfastate_t **trtable; unsigned char ch; -#ifdef RE_ENABLE_I18N /* If the current state can accept multibyte. */ if (__glibc_unlikely (state->accept_mb)) { @@ -2223,7 +2203,6 @@ transit_state (reg_errcode_t *err, re_match_context_t *mctx, if (__glibc_unlikely (*err != REG_NOERROR)) return NULL; } -#endif /* RE_ENABLE_I18N */ /* Then decide the next state with the single byte. */ #if 0 @@ -2444,7 +2423,6 @@ transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, } #endif -#ifdef RE_ENABLE_I18N static reg_errcode_t transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) { @@ -2512,7 +2490,6 @@ transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) } return REG_NOERROR; } -#endif /* RE_ENABLE_I18N */ static reg_errcode_t transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) @@ -3002,9 +2979,7 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, const re_dfa_t *const dfa = mctx->dfa; bool ok; Idx cur_idx; -#ifdef RE_ENABLE_I18N reg_errcode_t err = REG_NOERROR; -#endif re_node_set union_set; re_node_set_init_empty (&union_set); for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx) @@ -3013,7 +2988,6 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, Idx cur_node = cur_nodes->elems[cur_idx]; DEBUG_ASSERT (!IS_EPSILON_NODE (dfa->nodes[cur_node].type)); -#ifdef RE_ENABLE_I18N /* If the node may accept "multi byte". */ if (dfa->nodes[cur_node].accept_mb) { @@ -3051,7 +3025,7 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, } } } -#endif /* RE_ENABLE_I18N */ + if (naccepted || check_node_accept (mctx, dfa->nodes + cur_node, str_idx)) { @@ -3475,18 +3449,15 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, } else if (type == OP_PERIOD) { -#ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) bitset_merge (accepts, dfa->sb_char); else -#endif bitset_set_all (accepts); if (!(dfa->syntax & RE_DOT_NEWLINE)) bitset_clear (accepts, '\n'); if (dfa->syntax & RE_DOT_NOT_NULL) bitset_clear (accepts, '\0'); } -#ifdef RE_ENABLE_I18N else if (type == OP_UTF8_PERIOD) { if (ASCII_CHARS % BITSET_WORD_BITS == 0) @@ -3498,7 +3469,6 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, if (dfa->syntax & RE_DOT_NOT_NULL) bitset_clear (accepts, '\0'); } -#endif else continue; @@ -3529,12 +3499,10 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, bitset_empty (accepts); continue; } -#ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j])); else -#endif for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= dfa->word_char[j]); if (!any_set) @@ -3548,12 +3516,10 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, bitset_empty (accepts); continue; } -#ifdef RE_ENABLE_I18N if (dfa->mb_cur_max > 1) for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j])); else -#endif for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= ~dfa->word_char[j]); if (!any_set) @@ -3630,7 +3596,6 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, return -1; } -#ifdef RE_ENABLE_I18N /* Check how many bytes the node 'dfa->nodes[node_idx]' accepts. Return the number of the bytes the node accepts. STR_IDX is the current index of the input string. @@ -3639,9 +3604,9 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, one collating element like '.', '[a-z]', opposite to the other nodes can only accept one byte. */ -# ifdef _LIBC -# include -# endif +#ifdef _LIBC +# include +#endif static int check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, @@ -3725,12 +3690,12 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, if (node->type == COMPLEX_BRACKET) { const re_charset_t *cset = node->opr.mbcset; -# ifdef _LIBC +#ifdef _LIBC const unsigned char *pin = ((const unsigned char *) re_string_get_buffer (input) + str_idx); Idx j; uint32_t nrules; -# endif /* _LIBC */ +#endif int match_len = 0; wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars) ? re_string_wchar_at (input, str_idx) : 0); @@ -3753,7 +3718,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, } } -# ifdef _LIBC +#ifdef _LIBC nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { @@ -3842,7 +3807,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, } } else -# endif /* _LIBC */ +#endif /* _LIBC */ { /* match with range expression? */ for (i = 0; i < cset->nranges; ++i) @@ -3868,7 +3833,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, return 0; } -# ifdef _LIBC +#ifdef _LIBC static unsigned int find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) { @@ -3926,8 +3891,7 @@ find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) return UINT_MAX; } } -# endif /* _LIBC */ -#endif /* RE_ENABLE_I18N */ +#endif /* _LIBC */ /* Check whether the node accepts the byte which is IDX-th byte of the INPUT. */ @@ -3950,12 +3914,10 @@ check_node_accept (const re_match_context_t *mctx, const re_token_t *node, return false; break; -#ifdef RE_ENABLE_I18N case OP_UTF8_PERIOD: if (ch >= ASCII_CHARS) return false; FALLTHROUGH; -#endif case OP_PERIOD: if ((ch == '\n' && !(mctx->dfa->syntax & RE_DOT_NEWLINE)) || (ch == '\0' && (mctx->dfa->syntax & RE_DOT_NOT_NULL))) @@ -4016,7 +3978,6 @@ extend_buffers (re_match_context_t *mctx, int min_len) /* Then reconstruct the buffers. */ if (pstr->icase) { -#ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) { ret = build_wcs_upper_buffer (pstr); @@ -4024,16 +3985,13 @@ extend_buffers (re_match_context_t *mctx, int min_len) return ret; } else -#endif /* RE_ENABLE_I18N */ build_upper_buffer (pstr); } else { -#ifdef RE_ENABLE_I18N if (pstr->mb_cur_max > 1) build_wcs_buffer (pstr); else -#endif /* RE_ENABLE_I18N */ { if (pstr->trans != NULL) re_string_translate_buffer (pstr); diff --git a/gl/setenv.c b/gl/setenv.c index 3ad3477..ebfd4e5 100644 --- a/gl/setenv.c +++ b/gl/setenv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995-2003, 2005-2021 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995-2003, 2005-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. This file is free software: you can redistribute it and/or modify diff --git a/gl/setlocale-lock.c b/gl/setlocale-lock.c index 53e231c..4e7540e 100644 --- a/gl/setlocale-lock.c +++ b/gl/setlocale-lock.c @@ -1,5 +1,5 @@ /* Return the internal lock used by setlocale_null_r. - Copyright (C) 2019-2021 Free Software Foundation, Inc. + Copyright (C) 2019-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/setlocale_null.c b/gl/setlocale_null.c index dbfda25..778429b 100644 --- a/gl/setlocale_null.c +++ b/gl/setlocale_null.c @@ -1,5 +1,5 @@ /* Query the name of the current global locale. - Copyright (C) 2019-2021 Free Software Foundation, Inc. + Copyright (C) 2019-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/setlocale_null.h b/gl/setlocale_null.h index 00c42e2..d1921b0 100644 --- a/gl/setlocale_null.h +++ b/gl/setlocale_null.h @@ -1,5 +1,5 @@ /* Query the name of the current global locale. - Copyright (C) 2019-2021 Free Software Foundation, Inc. + Copyright (C) 2019-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/sha1-stream.c b/gl/sha1-stream.c index fbf8c7b..0ba0435 100644 --- a/gl/sha1-stream.c +++ b/gl/sha1-stream.c @@ -1,7 +1,7 @@ /* sha1.c - Functions to compute SHA1 message digest of files or memory blocks according to the NIST specification FIPS-180-1. - Copyright (C) 2000-2001, 2003-2006, 2008-2021 Free Software Foundation, Inc. + Copyright (C) 2000-2001, 2003-2006, 2008-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/sha1.c b/gl/sha1.c index 52b1020..79e50ba 100644 --- a/gl/sha1.c +++ b/gl/sha1.c @@ -1,7 +1,7 @@ /* sha1.c - Functions to compute SHA1 message digest of files or memory blocks according to the NIST specification FIPS-180-1. - Copyright (C) 2000-2001, 2003-2006, 2008-2021 Free Software Foundation, Inc. + Copyright (C) 2000-2001, 2003-2006, 2008-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/sha1.h b/gl/sha1.h index e12a23c..bc3470a 100644 --- a/gl/sha1.h +++ b/gl/sha1.h @@ -1,6 +1,6 @@ /* Declarations of functions and data types used for SHA1 sum library functions. - Copyright (C) 2000-2001, 2003, 2005-2006, 2008-2021 Free Software + Copyright (C) 2000-2001, 2003, 2005-2006, 2008-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify @@ -23,6 +23,9 @@ # include # if HAVE_OPENSSL_SHA1 +# ifndef OPENSSL_API_COMPAT +# define OPENSSL_API_COMPAT 0x10101000L /* FIXME: Use OpenSSL 1.1+ API. */ +# endif # include # endif diff --git a/gl/size_max.h b/gl/size_max.h index 1186ba9..dee2b8e 100644 --- a/gl/size_max.h +++ b/gl/size_max.h @@ -1,5 +1,5 @@ /* size_max.h -- declare SIZE_MAX through system headers - Copyright (C) 2005-2006, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2022 Free Software Foundation, Inc. Written by Simon Josefsson. This file is free software: you can redistribute it and/or modify diff --git a/gl/snprintf.c b/gl/snprintf.c index a589cf1..3d87854 100644 --- a/gl/snprintf.c +++ b/gl/snprintf.c @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 2004, 2006-2021 Free Software Foundation, Inc. + Copyright (C) 2004, 2006-2022 Free Software Foundation, Inc. Written by Simon Josefsson and Paul Eggert. This file is free software: you can redistribute it and/or modify diff --git a/gl/sockets.c b/gl/sockets.c index f7846b3..31b4302 100644 --- a/gl/sockets.c +++ b/gl/sockets.c @@ -1,6 +1,6 @@ /* sockets.c --- wrappers for Windows socket functions - Copyright (C) 2008-2021 Free Software Foundation, Inc. + Copyright (C) 2008-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/sockets.h b/gl/sockets.h index e70c2bb..75e49fc 100644 --- a/gl/sockets.h +++ b/gl/sockets.h @@ -1,6 +1,6 @@ /* sockets.h - wrappers for Windows socket functions - Copyright (C) 2008-2021 Free Software Foundation, Inc. + Copyright (C) 2008-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/stat-time.c b/gl/stat-time.c index 7b92792..3d48a2b 100644 --- a/gl/stat-time.c +++ b/gl/stat-time.c @@ -1,6 +1,6 @@ /* stat-related time functions. - Copyright (C) 2012-2021 Free Software Foundation, Inc. + Copyright (C) 2012-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/stat-time.h b/gl/stat-time.h index 6b2cc68..6b0088e 100644 --- a/gl/stat-time.h +++ b/gl/stat-time.h @@ -1,6 +1,6 @@ /* stat-related time functions. - Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/stat-w32.c b/gl/stat-w32.c index 4164199..c1a2923 100644 --- a/gl/stat-w32.c +++ b/gl/stat-w32.c @@ -1,5 +1,5 @@ /* Core of implementation of fstat and stat for native Windows. - Copyright (C) 2017-2021 Free Software Foundation, Inc. + Copyright (C) 2017-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/stat-w32.h b/gl/stat-w32.h index 5b56c09..0f79d61 100644 --- a/gl/stat-w32.h +++ b/gl/stat-w32.h @@ -1,5 +1,5 @@ /* Core of implementation of fstat and stat for native Windows. - Copyright (C) 2017-2021 Free Software Foundation, Inc. + Copyright (C) 2017-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/stat.c b/gl/stat.c index bc9a767..574489a 100644 --- a/gl/stat.c +++ b/gl/stat.c @@ -1,5 +1,5 @@ /* Work around platform bugs in stat. - Copyright (C) 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/stdalign.in.h b/gl/stdalign.in.h index 592d58e..3b117df 100644 --- a/gl/stdalign.in.h +++ b/gl/stdalign.in.h @@ -1,6 +1,6 @@ /* A substitute for ISO C11 . - Copyright 2011-2021 Free Software Foundation, Inc. + Copyright 2011-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/stdbool.in.h b/gl/stdbool.in.h index 2a1992d..2fa4672 100644 --- a/gl/stdbool.in.h +++ b/gl/stdbool.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2003, 2006-2021 Free Software Foundation, Inc. +/* Copyright (C) 2001-2003, 2006-2022 Free Software Foundation, Inc. Written by Bruno Haible , 2001. This file is free software: you can redistribute it and/or modify @@ -58,27 +58,11 @@ /* 7.16. Boolean type and values */ -/* BeOS already #defines false 0, true 1. We use the same - definitions below, but temporarily we have to #undef them. */ -#if defined __BEOS__ && !defined __HAIKU__ -# include /* defines bool but not _Bool */ -# undef false -# undef true -#endif - #ifdef __cplusplus # define _Bool bool # define bool bool #else -# if defined __BEOS__ && !defined __HAIKU__ - /* A compiler known to have 'bool'. */ - /* If the compiler already has both 'bool' and '_Bool', we can assume they - are the same types. */ -# if !@HAVE__BOOL@ -typedef bool _Bool; -# endif -# else -# if !defined __GNUC__ +# if !defined __GNUC__ /* If @HAVE__BOOL@: Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when the built-in _Bool type is used. See @@ -98,10 +82,10 @@ typedef bool _Bool; "Invalid enumerator. (badenum)" with HP-UX cc on Tru64. The only benefit of the enum, debuggability, is not important with these compilers. So use 'signed char' and no enum. */ -# define _Bool signed char -# else +# define _Bool signed char +# else /* With this compiler, trust the _Bool type if the compiler has it. */ -# if !@HAVE__BOOL@ +# if !@HAVE__BOOL@ /* For the sake of symbolic names in gdb, define true and false as enum constants, not only as macros. It is tempting to write @@ -112,7 +96,6 @@ typedef bool _Bool; (see ISO C 99 6.3.1.1.(2)). So add a negative value to the enum; this ensures that '_Bool' promotes to 'int'. */ typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; -# endif # endif # endif # define bool _Bool diff --git a/gl/stdckdint.in.h b/gl/stdckdint.in.h new file mode 100644 index 0000000..90fa62e --- /dev/null +++ b/gl/stdckdint.in.h @@ -0,0 +1,37 @@ +/* stdckdint.h -- checked integer arithmetic + + Copyright 2022 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_STDCKDINT_H +#define _GL_STDCKDINT_H + +#include "intprops-internal.h" + +#include + +/* Store into *R the low-order bits of A + B, A - B, A * B, respectively. + Return 1 if the result overflows, 0 otherwise. + A, B, and *R can have any integer type other than char, bool, a + bit-precise integer type, or an enumeration type. + + These are like the standard macros introduced in C23, except that + arguments should not have side effects. */ + +#define ckd_add(r, a, b) ((bool) _GL_INT_ADD_WRAPV (a, b, r)) +#define ckd_sub(r, a, b) ((bool) _GL_INT_SUBTRACT_WRAPV (a, b, r)) +#define ckd_mul(r, a, b) ((bool) _GL_INT_MULTIPLY_WRAPV (a, b, r)) + +#endif /* _GL_STDCKDINT_H */ diff --git a/gl/stddef.in.h b/gl/stddef.in.h index 42290d4..5c9a747 100644 --- a/gl/stddef.in.h +++ b/gl/stddef.in.h @@ -1,6 +1,6 @@ /* A substitute for POSIX 2008 , for platforms that have issues. - Copyright (C) 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/stdint.in.h b/gl/stdint.in.h index 85c5418..eaa7874 100644 --- a/gl/stdint.in.h +++ b/gl/stdint.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2002, 2004-2021 Free Software Foundation, Inc. +/* Copyright (C) 2001-2002, 2004-2022 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. diff --git a/gl/stdio-impl.h b/gl/stdio-impl.h index 3fa94b4..ed32e69 100644 --- a/gl/stdio-impl.h +++ b/gl/stdio-impl.h @@ -1,5 +1,5 @@ /* Implementation details of FILE streams. - Copyright (C) 2007-2008, 2010-2021 Free Software Foundation, Inc. + Copyright (C) 2007-2008, 2010-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/stdio-read.c b/gl/stdio-read.c new file mode 100644 index 0000000..85efa0d --- /dev/null +++ b/gl/stdio-read.c @@ -0,0 +1,168 @@ +/* POSIX compatible FILE stream read function. + Copyright (C) 2008-2022 Free Software Foundation, Inc. + Written by Bruno Haible , 2011. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +/* Replace these functions only if module 'nonblocking' is requested. */ +#if GNULIB_NONBLOCKING + +/* On native Windows platforms, when read() is called on a non-blocking pipe + with an empty buffer, ReadFile() fails with error GetLastError() = + ERROR_NO_DATA, and read() in consequence fails with error EINVAL. This + read() function is at the basis of the function which fills the buffer of + a FILE stream. */ + +# if defined _WIN32 && ! defined __CYGWIN__ + +# include +# include + +# define WIN32_LEAN_AND_MEAN /* avoid including junk */ +# include + +# if GNULIB_MSVC_NOTHROW +# include "msvc-nothrow.h" +# else +# include +# endif + +/* Don't assume that UNICODE is not defined. */ +# undef GetNamedPipeHandleState +# define GetNamedPipeHandleState GetNamedPipeHandleStateA + +# define CALL_WITH_ERRNO_FIX(RETTYPE, EXPRESSION, FAILED) \ + if (ferror (stream)) \ + return (EXPRESSION); \ + else \ + { \ + RETTYPE ret; \ + SetLastError (0); \ + ret = (EXPRESSION); \ + if (FAILED) \ + { \ + if (GetLastError () == ERROR_NO_DATA && ferror (stream)) \ + { \ + int fd = fileno (stream); \ + if (fd >= 0) \ + { \ + HANDLE h = (HANDLE) _get_osfhandle (fd); \ + if (GetFileType (h) == FILE_TYPE_PIPE) \ + { \ + /* h is a pipe or socket. */ \ + DWORD state; \ + if (GetNamedPipeHandleState (h, &state, NULL, NULL, \ + NULL, NULL, 0) \ + && (state & PIPE_NOWAIT) != 0) \ + /* h is a pipe in non-blocking mode. \ + Change errno from EINVAL to EAGAIN. */ \ + errno = EAGAIN; \ + } \ + } \ + } \ + } \ + return ret; \ + } + +/* Enable this function definition only if gnulib's has prepared it. + Otherwise we get a function definition conflict with mingw64's . */ +# if GNULIB_SCANF +int +scanf (const char *format, ...) +{ + int retval; + va_list args; + + va_start (args, format); + retval = vfscanf (stdin, format, args); + va_end (args); + + return retval; +} +# endif + +/* Enable this function definition only if gnulib's has prepared it. + Otherwise we get a function definition conflict with mingw64's . */ +# if GNULIB_FSCANF +int +fscanf (FILE *stream, const char *format, ...) +{ + int retval; + va_list args; + + va_start (args, format); + retval = vfscanf (stream, format, args); + va_end (args); + + return retval; +} +# endif + +/* Enable this function definition only if gnulib's has prepared it. + Otherwise we get a function definition conflict with mingw64's . */ +# if GNULIB_VSCANF +int +vscanf (const char *format, va_list args) +{ + return vfscanf (stdin, format, args); +} +# endif + +/* Enable this function definition only if gnulib's has prepared it. + Otherwise we get a function definition conflict with mingw64's . */ +# if GNULIB_VFSCANF +int +vfscanf (FILE *stream, const char *format, va_list args) +#undef vfscanf +{ + CALL_WITH_ERRNO_FIX (int, vfscanf (stream, format, args), ret == EOF) +} +# endif + +int +getchar (void) +{ + return fgetc (stdin); +} + +int +fgetc (FILE *stream) +#undef fgetc +{ + CALL_WITH_ERRNO_FIX (int, fgetc (stream), ret == EOF) +} + +char * +fgets (char *s, int n, FILE *stream) +#undef fgets +{ + CALL_WITH_ERRNO_FIX (char *, fgets (s, n, stream), ret == NULL) +} + +/* We intentionally don't bother to fix gets. */ + +size_t +fread (void *ptr, size_t s, size_t n, FILE *stream) +#undef fread +{ + CALL_WITH_ERRNO_FIX (size_t, fread (ptr, s, n, stream), ret < n) +} + +# endif +#endif diff --git a/gl/stdio-write.c b/gl/stdio-write.c new file mode 100644 index 0000000..82facf5 --- /dev/null +++ b/gl/stdio-write.c @@ -0,0 +1,206 @@ +/* POSIX compatible FILE stream write function. + Copyright (C) 2008-2022 Free Software Foundation, Inc. + Written by Bruno Haible , 2008. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +/* Replace these functions only if module 'nonblocking' or module 'sigpipe' is + requested. */ +#if GNULIB_NONBLOCKING || GNULIB_SIGPIPE + +/* On native Windows platforms, SIGPIPE does not exist. When write() is + called on a pipe with no readers, WriteFile() fails with error + GetLastError() = ERROR_NO_DATA, and write() in consequence fails with + error EINVAL. This write() function is at the basis of the function + which flushes the buffer of a FILE stream. */ + +# if defined _WIN32 && ! defined __CYGWIN__ + +# include +# include +# include + +# define WIN32_LEAN_AND_MEAN /* avoid including junk */ +# include + +# if GNULIB_MSVC_NOTHROW +# include "msvc-nothrow.h" +# else +# include +# endif + +/* Don't assume that UNICODE is not defined. */ +# undef GetNamedPipeHandleState +# define GetNamedPipeHandleState GetNamedPipeHandleStateA + +# if GNULIB_NONBLOCKING +# define CLEAR_ERRNO \ + errno = 0; +# define HANDLE_ENOSPC \ + if (errno == ENOSPC && ferror (stream)) \ + { \ + int fd = fileno (stream); \ + if (fd >= 0) \ + { \ + HANDLE h = (HANDLE) _get_osfhandle (fd); \ + if (GetFileType (h) == FILE_TYPE_PIPE) \ + { \ + /* h is a pipe or socket. */ \ + DWORD state; \ + if (GetNamedPipeHandleState (h, &state, NULL, NULL, \ + NULL, NULL, 0) \ + && (state & PIPE_NOWAIT) != 0) \ + /* h is a pipe in non-blocking mode. \ + Change errno from ENOSPC to EAGAIN. */ \ + errno = EAGAIN; \ + } \ + } \ + } \ + else +# else +# define CLEAR_ERRNO +# define HANDLE_ENOSPC +# endif + +# if GNULIB_SIGPIPE +# define CLEAR_LastError \ + SetLastError (0); +# define HANDLE_ERROR_NO_DATA \ + if (GetLastError () == ERROR_NO_DATA && ferror (stream)) \ + { \ + int fd = fileno (stream); \ + if (fd >= 0 \ + && GetFileType ((HANDLE) _get_osfhandle (fd)) \ + == FILE_TYPE_PIPE) \ + { \ + /* Try to raise signal SIGPIPE. */ \ + raise (SIGPIPE); \ + /* If it is currently blocked or ignored, change errno from \ + EINVAL to EPIPE. */ \ + errno = EPIPE; \ + } \ + } \ + else +# else +# define CLEAR_LastError +# define HANDLE_ERROR_NO_DATA +# endif + +# define CALL_WITH_SIGPIPE_EMULATION(RETTYPE, EXPRESSION, FAILED) \ + if (ferror (stream)) \ + return (EXPRESSION); \ + else \ + { \ + RETTYPE ret; \ + CLEAR_ERRNO \ + CLEAR_LastError \ + ret = (EXPRESSION); \ + if (FAILED) \ + { \ + HANDLE_ENOSPC \ + HANDLE_ERROR_NO_DATA \ + ; \ + } \ + return ret; \ + } + +# if !REPLACE_PRINTF_POSIX /* avoid collision with printf.c */ +int +printf (const char *format, ...) +{ + int retval; + va_list args; + + va_start (args, format); + retval = vfprintf (stdout, format, args); + va_end (args); + + return retval; +} +# endif + +# if !REPLACE_FPRINTF_POSIX /* avoid collision with fprintf.c */ +int +fprintf (FILE *stream, const char *format, ...) +{ + int retval; + va_list args; + + va_start (args, format); + retval = vfprintf (stream, format, args); + va_end (args); + + return retval; +} +# endif + +# if !REPLACE_VPRINTF_POSIX /* avoid collision with vprintf.c */ +int +vprintf (const char *format, va_list args) +{ + return vfprintf (stdout, format, args); +} +# endif + +# if !REPLACE_VFPRINTF_POSIX /* avoid collision with vfprintf.c */ +int +vfprintf (FILE *stream, const char *format, va_list args) +#undef vfprintf +{ + CALL_WITH_SIGPIPE_EMULATION (int, vfprintf (stream, format, args), ret == EOF) +} +# endif + +int +putchar (int c) +{ + return fputc (c, stdout); +} + +int +fputc (int c, FILE *stream) +#undef fputc +{ + CALL_WITH_SIGPIPE_EMULATION (int, fputc (c, stream), ret == EOF) +} + +int +fputs (const char *string, FILE *stream) +#undef fputs +{ + CALL_WITH_SIGPIPE_EMULATION (int, fputs (string, stream), ret == EOF) +} + +int +puts (const char *string) +#undef puts +{ + FILE *stream = stdout; + CALL_WITH_SIGPIPE_EMULATION (int, puts (string), ret == EOF) +} + +size_t +fwrite (const void *ptr, size_t s, size_t n, FILE *stream) +#undef fwrite +{ + CALL_WITH_SIGPIPE_EMULATION (size_t, fwrite (ptr, s, n, stream), ret < n) +} + +# endif +#endif diff --git a/gl/stdio.in.h b/gl/stdio.in.h index 0ca2c8e..7b36dac 100644 --- a/gl/stdio.in.h +++ b/gl/stdio.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 2004, 2007-2021 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -399,7 +399,8 @@ _GL_CXXALIASWARN (fileno); #endif #if @GNULIB_FOPEN@ -# if @REPLACE_FOPEN@ +# if (@GNULIB_FOPEN@ && @REPLACE_FOPEN@) \ + || (@GNULIB_FOPEN_GNU@ && @REPLACE_FOPEN_FOR_FOPEN_GNU@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fopen # define fopen rpl_fopen diff --git a/gl/stdlib.in.h b/gl/stdlib.in.h index 0855112..a86643c 100644 --- a/gl/stdlib.in.h +++ b/gl/stdlib.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 1995, 2001-2004, 2006-2021 Free Software Foundation, Inc. + Copyright (C) 1995, 2001-2004, 2006-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -184,7 +184,11 @@ _GL_WARN_ON_USE (_Exit, "_Exit is unportable - " # undef free # define free rpl_free # endif +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_FUNCDECL_RPL (free, void, (void *ptr) throw ()); +# else _GL_FUNCDECL_RPL (free, void, (void *ptr)); +# endif _GL_CXXALIAS_RPL (free, void, (void *ptr)); # else _GL_CXXALIAS_SYS (free, void, (void *ptr)); @@ -260,7 +264,8 @@ _GL_WARN_ON_USE (atoll, "atoll is unportable - " #endif #if @GNULIB_CALLOC_POSIX@ -# if @REPLACE_CALLOC@ +# if (@GNULIB_CALLOC_POSIX@ && @REPLACE_CALLOC_FOR_CALLOC_POSIX@) \ + || (@GNULIB_CALLOC_GNU@ && @REPLACE_CALLOC_FOR_CALLOC_GNU@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef calloc # define calloc rpl_calloc @@ -474,7 +479,8 @@ _GL_WARN_ON_USE (grantpt, "grantpt is not portable - " by never specifying a zero size), so it does not need malloc or realloc to be redefined. */ #if @GNULIB_MALLOC_POSIX@ -# if @REPLACE_MALLOC@ +# if (@GNULIB_MALLOC_POSIX@ && @REPLACE_MALLOC_FOR_MALLOC_POSIX@) \ + || (@GNULIB_MALLOC_GNU@ && @REPLACE_MALLOC_FOR_MALLOC_GNU@) # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ || _GL_USE_STDLIB_ALLOC) # undef malloc @@ -828,29 +834,35 @@ _GL_CXXALIASWARN (putenv); /* Sort an array of NMEMB elements, starting at address BASE, each element occupying SIZE bytes, in ascending order according to the comparison function COMPARE. */ +# ifdef __cplusplus +extern "C" { +# endif +# if !GNULIB_defined_qsort_r_fn_types +typedef int (*_gl_qsort_r_compar_fn) (void const *, void const *, void *); +# define GNULIB_defined_qsort_r_fn_types 1 +# endif +# ifdef __cplusplus +} +# endif # if @REPLACE_QSORT_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef qsort_r # define qsort_r rpl_qsort_r # endif _GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg) _GL_ARG_NONNULL ((1, 4))); _GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg)); # else # if !@HAVE_QSORT_R@ _GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg) _GL_ARG_NONNULL ((1, 4))); # endif _GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg)); # endif _GL_CXXALIASWARN (qsort_r); @@ -1101,7 +1113,8 @@ _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " #if @GNULIB_REALLOC_POSIX@ -# if @REPLACE_REALLOC@ +# if (@GNULIB_REALLOC_POSIX@ && @REPLACE_REALLOC_FOR_REALLOC_POSIX@) \ + || (@GNULIB_REALLOC_GNU@ && @REPLACE_REALLOC_FOR_REALLOC_GNU@) # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ || _GL_USE_STDLIB_ALLOC) # undef realloc diff --git a/gl/str-two-way.h b/gl/str-two-way.h index fc2db03..b00017c 100644 --- a/gl/str-two-way.h +++ b/gl/str-two-way.h @@ -1,5 +1,5 @@ /* Byte-wise substring search, using the Two-Way algorithm. - Copyright (C) 2008-2021 Free Software Foundation, Inc. + Copyright (C) 2008-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Eric Blake , 2008. @@ -231,7 +231,7 @@ critical_factorization (const unsigned char *needle, size_t needle_len, most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. */ -static RETURN_TYPE +static RETURN_TYPE _GL_ATTRIBUTE_PURE two_way_short_needle (const unsigned char *haystack, size_t haystack_len, const unsigned char *needle, size_t needle_len) { @@ -325,7 +325,7 @@ two_way_short_needle (const unsigned char *haystack, size_t haystack_len, If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and sublinear performance is not possible. */ -static RETURN_TYPE +static RETURN_TYPE _GL_ATTRIBUTE_PURE two_way_long_needle (const unsigned char *haystack, size_t haystack_len, const unsigned char *needle, size_t needle_len) { diff --git a/gl/strcasecmp.c b/gl/strcasecmp.c index c714270..a85a2b1 100644 --- a/gl/strcasecmp.c +++ b/gl/strcasecmp.c @@ -1,5 +1,5 @@ /* Case-insensitive string comparison function. - Copyright (C) 1998-1999, 2005-2007, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 1998-1999, 2005-2007, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/strcasestr.c b/gl/strcasestr.c index 1935967..b36f409 100644 --- a/gl/strcasestr.c +++ b/gl/strcasestr.c @@ -1,5 +1,5 @@ /* Case-insensitive searching in a string. - Copyright (C) 2005-2021 Free Software Foundation, Inc. + Copyright (C) 2005-2022 Free Software Foundation, Inc. Written by Bruno Haible , 2005. This file is free software: you can redistribute it and/or modify diff --git a/gl/streq.h b/gl/streq.h index adabd15..49f73c1 100644 --- a/gl/streq.h +++ b/gl/streq.h @@ -1,5 +1,5 @@ /* Optimized string comparison. - Copyright (C) 2001-2002, 2007, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2007, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/strerror-override.c b/gl/strerror-override.c index e76d55d..6be1afd 100644 --- a/gl/strerror-override.c +++ b/gl/strerror-override.c @@ -1,6 +1,6 @@ /* strerror-override.c --- POSIX compatible system error routine - Copyright (C) 2010-2021 Free Software Foundation, Inc. + Copyright (C) 2010-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/strerror-override.h b/gl/strerror-override.h index 9cfc5ad..d010d27 100644 --- a/gl/strerror-override.h +++ b/gl/strerror-override.h @@ -1,6 +1,6 @@ /* strerror-override.h --- POSIX compatible system error routine - Copyright (C) 2010-2021 Free Software Foundation, Inc. + Copyright (C) 2010-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/strerror.c b/gl/strerror.c index 83926df..67c5216 100644 --- a/gl/strerror.c +++ b/gl/strerror.c @@ -1,6 +1,6 @@ /* strerror.c --- POSIX compatible system error routine - Copyright (C) 2007-2021 Free Software Foundation, Inc. + Copyright (C) 2007-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/string.in.h b/gl/string.in.h index afe7350..3996da9 100644 --- a/gl/string.in.h +++ b/gl/string.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 1995-1996, 2001-2021 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 2001-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -112,13 +112,43 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ -/* Declare 'free' if needed for _GL_ATTRIBUTE_DEALLOC_FREE. */ -_GL_EXTERN_C void free (void *); +/* Make _GL_ATTRIBUTE_DEALLOC_FREE work, even though may not have + been included yet. */ #if @GNULIB_FREE_POSIX@ # if (@REPLACE_FREE@ && !defined free \ && !(defined __cplusplus && defined GNULIB_NAMESPACE)) -# define free rpl_free +/* We can't do '#define free rpl_free' here. */ +_GL_EXTERN_C void rpl_free (void *); +# undef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) +# else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) throw (); +# else _GL_EXTERN_C void free (void *); +# endif +# endif +# endif +#else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) throw (); +# else +_GL_EXTERN_C void free (void *); +# endif # endif #endif @@ -216,10 +246,11 @@ _GL_CXXALIAS_SYS_CAST2 (memchr, void const *, (void const *__s, int __c, size_t __n)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n) throw ()); _GL_CXXALIASWARN1 (memchr, void const *, - (void const *__s, int __c, size_t __n)); + (void const *__s, int __c, size_t __n) throw ()); # elif __GLIBC__ >= 2 _GL_CXXALIASWARN (memchr); # endif @@ -301,9 +332,10 @@ _GL_CXXALIAS_SYS_CAST2 (memrchr, void *, (void const *, int, size_t), void const *, (void const *, int, size_t)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t)); -_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t) throw ()); +_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t) throw ()); # else _GL_CXXALIASWARN (memrchr); # endif @@ -331,9 +363,11 @@ _GL_CXXALIAS_SYS_CAST2 (rawmemchr, void *, (void const *__s, int __c_in), void const *, (void const *__s, int __c_in)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in)); -_GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in) throw ()); +_GL_CXXALIASWARN1 (rawmemchr, void const *, + (void const *__s, int __c_in) throw ()); # else _GL_CXXALIASWARN (rawmemchr); # endif @@ -435,9 +469,11 @@ _GL_CXXALIAS_SYS_CAST2 (strchrnul, char const *, (char const *__s, int __c_in)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in)); -_GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in) throw ()); +_GL_CXXALIASWARN1 (strchrnul, char const *, + (char const *__s, int __c_in) throw ()); # else _GL_CXXALIASWARN (strchrnul); # endif @@ -549,22 +585,35 @@ _GL_WARN_ON_USE (strncat, "strncat is unportable - " # undef strndup # define strndup rpl_strndup # endif -_GL_FUNCDECL_RPL (strndup, char *, (char const *__s, size_t __n) - _GL_ARG_NONNULL ((1))); +_GL_FUNCDECL_RPL (strndup, char *, + (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n)); # else -# if ! @HAVE_DECL_STRNDUP@ -_GL_FUNCDECL_SYS (strndup, char *, (char const *__s, size_t __n) - _GL_ARG_NONNULL ((1))); +# if !@HAVE_DECL_STRNDUP@ || (__GNUC__ >= 11 && !defined strndup) +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); # endif _GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n)); # endif _GL_CXXALIASWARN (strndup); -#elif defined GNULIB_POSIXCHECK -# undef strndup -# if HAVE_RAW_DECL_STRNDUP +#else +# if __GNUC__ >= 11 && !defined strndup +/* For -Wmismatched-dealloc: Associate strndup with free or rpl_free. */ +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# if defined GNULIB_POSIXCHECK +# undef strndup +# if HAVE_RAW_DECL_STRNDUP _GL_WARN_ON_USE (strndup, "strndup is unportable - " "use gnulib module strndup for portability"); +# endif # endif #endif @@ -624,10 +673,11 @@ _GL_CXXALIAS_SYS_CAST2 (strpbrk, char *, (char const *__s, char const *__accept), const char *, (char const *__s, char const *__accept)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept) throw ()); _GL_CXXALIASWARN1 (strpbrk, char const *, - (char const *__s, char const *__accept)); + (char const *__s, char const *__accept) throw ()); # elif __GLIBC__ >= 2 _GL_CXXALIASWARN (strpbrk); # endif @@ -732,10 +782,12 @@ _GL_CXXALIAS_SYS_CAST2 (strstr, const char *, (const char *haystack, const char *needle)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strstr, char *, + (char *haystack, const char *needle) throw ()); _GL_CXXALIASWARN1 (strstr, const char *, - (const char *haystack, const char *needle)); + (const char *haystack, const char *needle) throw ()); # elif __GLIBC__ >= 2 _GL_CXXALIASWARN (strstr); # endif @@ -781,10 +833,12 @@ _GL_CXXALIAS_SYS_CAST2 (strcasestr, const char *, (const char *haystack, const char *needle)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strcasestr, char *, + (char *haystack, const char *needle) throw ()); _GL_CXXALIASWARN1 (strcasestr, const char *, - (const char *haystack, const char *needle)); + (const char *haystack, const char *needle) throw ()); # else _GL_CXXALIASWARN (strcasestr); # endif diff --git a/gl/strings.in.h b/gl/strings.in.h index 07aed18..2c31d2e 100644 --- a/gl/strings.in.h +++ b/gl/strings.in.h @@ -1,6 +1,6 @@ /* A substitute . - Copyright (C) 2007-2021 Free Software Foundation, Inc. + Copyright (C) 2007-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/stripslash.c b/gl/stripslash.c index 99bfbe6..aee89b7 100644 --- a/gl/stripslash.c +++ b/gl/stripslash.c @@ -1,6 +1,6 @@ /* stripslash.c -- remove redundant trailing slashes from a file name - Copyright (C) 1990, 2001, 2003-2006, 2009-2021 Free Software Foundation, + Copyright (C) 1990, 2001, 2003-2006, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify diff --git a/gl/strncasecmp.c b/gl/strncasecmp.c index ccc0170..35d215b 100644 --- a/gl/strncasecmp.c +++ b/gl/strncasecmp.c @@ -1,5 +1,5 @@ /* strncasecmp.c -- case insensitive string comparator - Copyright (C) 1998-1999, 2005-2007, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 1998-1999, 2005-2007, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/strsep.c b/gl/strsep.c index 3bd89f4..c05d7eb 100644 --- a/gl/strsep.c +++ b/gl/strsep.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004, 2007, 2009-2021 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2007, 2009-2022 Free Software Foundation, Inc. Written by Yoann Vandoorselaere . diff --git a/gl/strstr.c b/gl/strstr.c index 2f62ce4..6236915 100644 --- a/gl/strstr.c +++ b/gl/strstr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2021 Free Software +/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/gl/sys-limits.h b/gl/sys-limits.h index 2d9784d..d154f0b 100644 --- a/gl/sys-limits.h +++ b/gl/sys-limits.h @@ -1,6 +1,6 @@ /* System call limits - Copyright 2018-2021 Free Software Foundation, Inc. + Copyright 2018-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/sys_socket.c b/gl/sys_socket.c index d90b32c..0bfd60f 100644 --- a/gl/sys_socket.c +++ b/gl/sys_socket.c @@ -1,6 +1,6 @@ /* Inline functions for . - Copyright (C) 2012-2021 Free Software Foundation, Inc. + Copyright (C) 2012-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/sys_socket.in.h b/gl/sys_socket.in.h index 0a2c57d..acdf7ee 100644 --- a/gl/sys_socket.in.h +++ b/gl/sys_socket.in.h @@ -1,6 +1,6 @@ /* Provide a sys/socket header file for systems lacking it (read: MinGW) and for systems where it is incomplete. - Copyright (C) 2005-2021 Free Software Foundation, Inc. + Copyright (C) 2005-2022 Free Software Foundation, Inc. Written by Simon Josefsson. This file is free software: you can redistribute it and/or modify diff --git a/gl/sys_stat.in.h b/gl/sys_stat.in.h index babe3db..714c3cb 100644 --- a/gl/sys_stat.in.h +++ b/gl/sys_stat.in.h @@ -1,5 +1,5 @@ /* Provide a more complete sys/stat.h header file. - Copyright (C) 2005-2021 Free Software Foundation, Inc. + Copyright (C) 2005-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -391,7 +391,33 @@ struct stat #endif -#if @GNULIB_MDA_CHMOD@ +#if @GNULIB_CHMOD@ +# if @REPLACE_CHMOD@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chmod +# define chmod rpl_chmod +# endif +_GL_FUNCDECL_RPL (chmod, int, (const char *filename, mode_t mode) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (chmod, int, (const char *filename, mode_t mode)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chmod +# define chmod _chmod +# endif +/* Need to cast, because in mingw the last argument is 'int mode'. */ +_GL_CXXALIAS_MDA_CAST (chmod, int, (const char *filename, mode_t mode)); +# else +_GL_CXXALIAS_SYS (chmod, int, (const char *filename, mode_t mode)); +# endif +_GL_CXXALIASWARN (chmod); +#elif defined GNULIB_POSIXCHECK +# undef chmod +# if HAVE_RAW_DECL_CHMOD +_GL_WARN_ON_USE (chmod, "chmod has portability problems - " + "use gnulib module chmod for portability"); +# endif +#elif @GNULIB_MDA_CHMOD@ /* On native Windows, map 'chmod' to '_chmod', so that -loldnames is not required. In C++ with GNULIB_NAMESPACE, avoid differences between platforms by defining GNULIB_NAMESPACE::chmod always. */ diff --git a/gl/sys_types.in.h b/gl/sys_types.in.h index 2079d72..698e88d 100644 --- a/gl/sys_types.in.h +++ b/gl/sys_types.in.h @@ -1,6 +1,6 @@ /* Provide a more complete sys/types.h. - Copyright (C) 2011-2021 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/sys_uio.in.h b/gl/sys_uio.in.h index 507ab01..788d461 100644 --- a/gl/sys_uio.in.h +++ b/gl/sys_uio.in.h @@ -1,5 +1,5 @@ /* Substitute for . - Copyright (C) 2011-2021 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/time.in.h b/gl/time.in.h index a73fe59..6d4c771 100644 --- a/gl/time.in.h +++ b/gl/time.in.h @@ -1,6 +1,6 @@ /* A more-standard . - Copyright (C) 2007-2021 Free Software Foundation, Inc. + Copyright (C) 2007-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -120,6 +120,17 @@ _GL_CXXALIAS_SYS (timespec_get, int, (struct timespec *ts, int base)); _GL_CXXALIASWARN (timespec_get); # endif +/* Set *TS to the current time resolution, and return BASE. + Upon failure, return 0. */ +# if @GNULIB_TIMESPEC_GETRES@ +# if ! @HAVE_TIMESPEC_GETRES@ +_GL_FUNCDECL_SYS (timespec_getres, int, (struct timespec *ts, int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (timespec_getres, int, (struct timespec *ts, int base)); +_GL_CXXALIASWARN (timespec_getres); +# endif + /* Sleep for at least RQTP seconds unless interrupted, If interrupted, return -1 and store the remaining time into RMTP. See . */ diff --git a/gl/time_r.c b/gl/time_r.c index 88d3c1c..d4b2275 100644 --- a/gl/time_r.c +++ b/gl/time_r.c @@ -1,6 +1,6 @@ /* Reentrant time functions like localtime_r. - Copyright (C) 2003, 2006-2007, 2010-2021 Free Software Foundation, Inc. + Copyright (C) 2003, 2006-2007, 2010-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/timegm.c b/gl/timegm.c index 7e723e1..a1b19ef 100644 --- a/gl/timegm.c +++ b/gl/timegm.c @@ -1,6 +1,6 @@ /* Convert UTC calendar time to simple time. Like mktime but assumes UTC. - Copyright (C) 1994-2021 Free Software Foundation, Inc. + Copyright (C) 1994-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/gl/unistd.c b/gl/unistd.c index 0763456..95978e6 100644 --- a/gl/unistd.c +++ b/gl/unistd.c @@ -1,6 +1,6 @@ /* Inline functions for . - Copyright (C) 2012-2021 Free Software Foundation, Inc. + Copyright (C) 2012-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/unistd.in.h b/gl/unistd.in.h index 73c882f..57df09e 100644 --- a/gl/unistd.in.h +++ b/gl/unistd.in.h @@ -1,5 +1,5 @@ /* Substitute for and wrapper around . - Copyright (C) 2003-2021 Free Software Foundation, Inc. + Copyright (C) 2003-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -415,16 +415,30 @@ _GL_CXXALIASWARN (close); #if @GNULIB_COPY_FILE_RANGE@ -# if !@HAVE_COPY_FILE_RANGE@ +# if @REPLACE_COPY_FILE_RANGE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef copy_file_range +# define copy_file_range rpl_copy_file_range +# endif +_GL_FUNCDECL_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos, + int ofd, off_t *opos, + size_t len, unsigned flags)); +_GL_CXXALIAS_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos, + int ofd, off_t *opos, + size_t len, unsigned flags)); +# else +# if !@HAVE_COPY_FILE_RANGE@ _GL_FUNCDECL_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, int ofd, off_t *opos, size_t len, unsigned flags)); +# endif _GL_CXXALIAS_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, int ofd, off_t *opos, size_t len, unsigned flags)); # endif _GL_CXXALIASWARN (copy_file_range); #elif defined GNULIB_POSIXCHECK +# undef copy_file_range # if HAVE_RAW_DECL_COPY_FILE_RANGE _GL_WARN_ON_USE (copy_file_range, "copy_file_range is unportable - " @@ -1409,7 +1423,8 @@ _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " Read a password from /dev/tty or stdin. Function getpass() from module 'getpass-gnu': Read a password of arbitrary length from /dev/tty or stdin. */ -# if @REPLACE_GETPASS@ +# if (@GNULIB_GETPASS@ && @REPLACE_GETPASS@) \ + || (@GNULIB_GETPASS_GNU@ && @REPLACE_GETPASS_FOR_GETPASS_GNU@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getpass # define getpass rpl_getpass diff --git a/gl/unlocked-io.h b/gl/unlocked-io.h index ca184b3..7461d74 100644 --- a/gl/unlocked-io.h +++ b/gl/unlocked-io.h @@ -1,10 +1,10 @@ /* Prefer faster, non-thread-safe stdio functions if available. - Copyright (C) 2001-2004, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2001-2004, 2009-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, diff --git a/gl/unsetenv.c b/gl/unsetenv.c index b2e910e..07eac6f 100644 --- a/gl/unsetenv.c +++ b/gl/unsetenv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995-2002, 2005-2021 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995-2002, 2005-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. This file is free software: you can redistribute it and/or modify diff --git a/gl/vasnprintf.c b/gl/vasnprintf.c index d9b669d..285c674 100644 --- a/gl/vasnprintf.c +++ b/gl/vasnprintf.c @@ -1,5 +1,5 @@ /* vsprintf with automatic memory allocation. - Copyright (C) 1999, 2002-2021 Free Software Foundation, Inc. + Copyright (C) 1999, 2002-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -915,8 +915,7 @@ divide (mpn_t a, mpn_t b, mpn_t *q) q_ptr[q_len++] = 1; } keep_q: - if (tmp_roomptr != NULL) - free (tmp_roomptr); + free (tmp_roomptr); q->limbs = q_ptr; q->nlimbs = q_len; return roomptr; @@ -1873,11 +1872,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, free (a.arg); if (PRINTF_FETCHARGS (args, &a) < 0) - { - CLEANUP (); - errno = EINVAL; - return NULL; - } + goto fail_1_with_EINVAL; { size_t buf_neededlength; @@ -1913,19 +1908,12 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, buf_malloced = buf; } - if (resultbuf != NULL) - { - result = resultbuf; - allocated = *lengthp; - } - else - { - result = NULL; - allocated = 0; - } + result = resultbuf; + allocated = (resultbuf != NULL ? *lengthp : 0); length = 0; /* Invariants: - result is either == resultbuf or == NULL or malloc-allocated. + result is either == resultbuf or malloc-allocated. + If result == NULL, resultbuf is == NULL as well. If length > 0, then result != NULL. */ /* Ensures that allocated >= needed. Aborts through a jump to @@ -1942,7 +1930,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, memory_size = xtimes (allocated, sizeof (DCHAR_T)); \ if (size_overflow_p (memory_size)) \ oom_statement \ - if (result == resultbuf || result == NULL) \ + if (result == resultbuf) \ memory = (DCHAR_T *) malloc (memory_size); \ else \ memory = (DCHAR_T *) realloc (result, memory_size); \ @@ -2112,15 +2100,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, if (count == 0) break; if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } + goto fail_with_EILSEQ; arg_end += count; characters++; } @@ -2137,15 +2117,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, if (count == 0) break; if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } + goto fail_with_EILSEQ; arg_end += count; characters++; } @@ -2191,14 +2163,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, converted, &converted_len); # endif if (converted == NULL) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - return NULL; - } + goto fail_with_errno; if (converted != result + length) { ENSURE_ALLOCATION_ELSE (xsum (length, converted_len), @@ -2237,15 +2202,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, if (count == 0) break; if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } + goto fail_with_EILSEQ; arg_end += count; characters++; } @@ -2262,15 +2219,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, if (count == 0) break; if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } + goto fail_with_EILSEQ; arg_end += count; characters++; } @@ -2316,14 +2265,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, converted, &converted_len); # endif if (converted == NULL) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - return NULL; - } + goto fail_with_errno; if (converted != result + length) { ENSURE_ALLOCATION_ELSE (xsum (length, converted_len), @@ -2362,15 +2304,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, if (count == 0) break; if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } + goto fail_with_EILSEQ; arg_end += count; characters++; } @@ -2387,15 +2321,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, if (count == 0) break; if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } + goto fail_with_EILSEQ; arg_end += count; characters++; } @@ -2441,14 +2367,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, converted, &converted_len); # endif if (converted == NULL) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - return NULL; - } + goto fail_with_errno; if (converted != result + length) { ENSURE_ALLOCATION_ELSE (xsum (length, converted_len), @@ -2590,16 +2509,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, /* Found the terminating NUL. */ break; if (count < 0) - { - /* Invalid or incomplete multibyte character. */ - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } + /* Invalid or incomplete multibyte character. */ + goto fail_with_EILSEQ; arg_end += count; characters++; } @@ -2626,16 +2537,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, /* Found the terminating NUL. */ break; if (count < 0) - { - /* Invalid or incomplete multibyte character. */ - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } + /* Invalid or incomplete multibyte character. */ + goto fail_with_EILSEQ; arg_end += count; characters++; } @@ -2752,16 +2655,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, break; count = local_wcrtomb (cbuf, *arg_end, &state); if (count < 0) - { - /* Cannot convert. */ - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } + /* Cannot convert. */ + goto fail_with_EILSEQ; if (precision < (unsigned int) count) break; arg_end++; @@ -2793,16 +2688,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, break; count = local_wcrtomb (cbuf, *arg_end, &state); if (count < 0) - { - /* Cannot convert. */ - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } + /* Cannot convert. */ + goto fail_with_EILSEQ; arg_end++; characters += count; } @@ -2859,12 +2746,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, if (tmpdst == NULL) { free (tmpsrc); - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - return NULL; + goto fail_with_errno; } free (tmpsrc); # endif @@ -2938,16 +2820,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, abort (); count = local_wcrtomb (cbuf, *arg, &state); if (count <= 0) - { - /* Cannot convert. */ - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } + /* Cannot convert. */ + goto fail_with_EILSEQ; ENSURE_ALLOCATION (xsum (length, count)); memcpy (result + length, cbuf, count); length += count; @@ -3083,14 +2957,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, NULL, NULL, &tmpdst_len); if (tmpdst == NULL) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - return NULL; - } + goto fail_with_errno; # endif if (has_width) @@ -5463,13 +5330,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, errno = EINVAL; } - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - - return NULL; + goto fail_with_errno; } #if USE_SNPRINTF @@ -5603,14 +5464,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, NULL, NULL, &tmpdst_len); if (tmpdst == NULL) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - return NULL; - } + goto fail_with_errno; ENSURE_ALLOCATION_ELSE (xsum (length, tmpdst_len), { free (tmpdst); goto out_of_memory; }); DCHAR_CPY (result + length, tmpdst, tmpdst_len); @@ -5835,25 +5689,40 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, #if USE_SNPRINTF overflow: - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); errno = EOVERFLOW; - return NULL; + goto fail_with_errno; #endif out_of_memory: - if (!(result == resultbuf || result == NULL)) + errno = ENOMEM; + goto fail_with_errno; + +#if ENABLE_UNISTDIO || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL) || ENABLE_WCHAR_FALLBACK) && HAVE_WCHAR_T) + fail_with_EILSEQ: + errno = EILSEQ; + goto fail_with_errno; +#endif + + fail_with_errno: + if (result != resultbuf) free (result); if (buf_malloced != NULL) free (buf_malloced); - out_of_memory_1: CLEANUP (); - errno = ENOMEM; return NULL; } + + out_of_memory_1: + errno = ENOMEM; + goto fail_1_with_errno; + + fail_1_with_EINVAL: + errno = EINVAL; + goto fail_1_with_errno; + + fail_1_with_errno: + CLEANUP (); + return NULL; } #undef MAX_ROOM_NEEDED diff --git a/gl/vasnprintf.h b/gl/vasnprintf.h index 9b02cdf..27cf54c 100644 --- a/gl/vasnprintf.h +++ b/gl/vasnprintf.h @@ -1,5 +1,5 @@ /* vsprintf with automatic memory allocation. - Copyright (C) 2002-2004, 2007-2021 Free Software Foundation, Inc. + Copyright (C) 2002-2004, 2007-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/vasprintf.c b/gl/vasprintf.c index fe8b14f..218275f 100644 --- a/gl/vasprintf.c +++ b/gl/vasprintf.c @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 1999, 2002, 2006-2021 Free Software Foundation, Inc. + Copyright (C) 1999, 2002, 2006-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/verify.h b/gl/verify.h index a8ca59b..47b6ee6 100644 --- a/gl/verify.h +++ b/gl/verify.h @@ -1,6 +1,6 @@ /* Compile-time assert-like macros. - Copyright (C) 2005-2006, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -34,7 +34,7 @@ #ifndef __cplusplus # if (201112L <= __STDC_VERSION__ \ || (!defined __STRICT_ANSI__ \ - && (4 < __GNUC__ + (6 <= __GNUC_MINOR__) || 4 <= __clang_major__))) + && (4 < __GNUC__ + (6 <= __GNUC_MINOR__) || 5 <= __clang_major__))) # define _GL_HAVE__STATIC_ASSERT 1 # endif # if (202000L <= __STDC_VERSION__ \ @@ -215,6 +215,9 @@ template # define _GL_VERIFY(R, DIAGNOSTIC, ...) \ extern int (*_GL_GENSYM (_gl_verify_function) (void)) \ [_GL_VERIFY_TRUE (R, DIAGNOSTIC)] +# if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) +# pragma GCC diagnostic ignored "-Wnested-externs" +# endif #endif /* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */ @@ -300,13 +303,16 @@ template # define assume(R) ((R) ? (void) 0 : __builtin_unreachable ()) #elif 1200 <= _MSC_VER # define assume(R) __assume (R) +#elif 202311L <= __STDC_VERSION__ +# include +# define assume(R) ((R) ? (void) 0 : unreachable ()) #elif (defined GCC_LINT || defined lint) && _GL_HAS_BUILTIN_TRAP /* Doing it this way helps various packages when configured with --enable-gcc-warnings, which compiles with -Dlint. It's nicer - when 'assume' silences warnings even with older GCCs. */ + if 'assume' silences warnings with GCC 3.4 through GCC 4.4.7 (2012). */ # define assume(R) ((R) ? (void) 0 : __builtin_trap ()) #else - /* Some tools grok NOTREACHED, e.g., Oracle Studio 12.6. */ + /* Some older tools grok NOTREACHED, e.g., Oracle Studio 12.6 (2017). */ # define assume(R) ((R) ? (void) 0 : /*NOTREACHED*/ (void) 0) #endif diff --git a/gl/vsnprintf.c b/gl/vsnprintf.c index 4a0a3dc..80999e9 100644 --- a/gl/vsnprintf.c +++ b/gl/vsnprintf.c @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 2004, 2006-2021 Free Software Foundation, Inc. + Copyright (C) 2004, 2006-2022 Free Software Foundation, Inc. Written by Simon Josefsson and Yoann Vandoorselaere . This file is free software: you can redistribute it and/or modify diff --git a/gl/w32sock.h b/gl/w32sock.h index 635a1b2..17db3f1 100644 --- a/gl/w32sock.h +++ b/gl/w32sock.h @@ -1,6 +1,6 @@ /* w32sock.h --- internal auxiliary functions for Windows socket functions - Copyright (C) 2008-2021 Free Software Foundation, Inc. + Copyright (C) 2008-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/wchar.in.h b/gl/wchar.in.h index 20315dd..835ddbe 100644 --- a/gl/wchar.in.h +++ b/gl/wchar.in.h @@ -1,6 +1,6 @@ /* A substitute for ISO C99 , for platforms that have issues. - Copyright (C) 2007-2021 Free Software Foundation, Inc. + Copyright (C) 2007-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -175,13 +175,43 @@ typedef int rpl_mbstate_t; # endif #endif -/* Declare 'free' if needed for _GL_ATTRIBUTE_DEALLOC_FREE. */ -_GL_EXTERN_C void free (void *); +/* Make _GL_ATTRIBUTE_DEALLOC_FREE work, even though may not have + been included yet. */ #if @GNULIB_FREE_POSIX@ # if (@REPLACE_FREE@ && !defined free \ && !(defined __cplusplus && defined GNULIB_NAMESPACE)) -# define free rpl_free +/* We can't do '#define free rpl_free' here. */ +_GL_EXTERN_C void rpl_free (void *); +# undef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) +# else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) throw (); +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +# endif +#else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) throw (); +# else _GL_EXTERN_C void free (void *); +# endif # endif #endif diff --git a/gl/wcrtomb.c b/gl/wcrtomb.c index 5c9fd79..e14d802 100644 --- a/gl/wcrtomb.c +++ b/gl/wcrtomb.c @@ -1,5 +1,5 @@ /* Convert wide character to multibyte character. - Copyright (C) 2008-2021 Free Software Foundation, Inc. + Copyright (C) 2008-2022 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This file is free software: you can redistribute it and/or modify diff --git a/gl/wctype-h.c b/gl/wctype-h.c index 150221d..1278143 100644 --- a/gl/wctype-h.c +++ b/gl/wctype-h.c @@ -1,6 +1,6 @@ /* Inline functions for . - Copyright (C) 2012-2021 Free Software Foundation, Inc. + Copyright (C) 2012-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/wctype.in.h b/gl/wctype.in.h index 652d811..98cafee 100644 --- a/gl/wctype.in.h +++ b/gl/wctype.in.h @@ -1,6 +1,6 @@ /* A substitute for ISO C99 , for platforms that lack it. - Copyright (C) 2006-2021 Free Software Foundation, Inc. + Copyright (C) 2006-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/windows-initguard.h b/gl/windows-initguard.h index 7999b23..a29d7e9 100644 --- a/gl/windows-initguard.h +++ b/gl/windows-initguard.h @@ -1,5 +1,5 @@ /* Init guards, somewhat like spinlocks (native Windows implementation). - Copyright (C) 2005-2021 Free Software Foundation, Inc. + Copyright (C) 2005-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/windows-mutex.c b/gl/windows-mutex.c index 2edfeaa..28e429c 100644 --- a/gl/windows-mutex.c +++ b/gl/windows-mutex.c @@ -1,5 +1,5 @@ /* Plain mutexes (native Windows implementation). - Copyright (C) 2005-2021 Free Software Foundation, Inc. + Copyright (C) 2005-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/windows-mutex.h b/gl/windows-mutex.h index 5ecf9f8..7aedfdf 100644 --- a/gl/windows-mutex.h +++ b/gl/windows-mutex.h @@ -1,5 +1,5 @@ /* Plain mutexes (native Windows implementation). - Copyright (C) 2005-2021 Free Software Foundation, Inc. + Copyright (C) 2005-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/windows-once.c b/gl/windows-once.c index 8dcd37c..deea548 100644 --- a/gl/windows-once.c +++ b/gl/windows-once.c @@ -1,5 +1,5 @@ /* Once-only control (native Windows implementation). - Copyright (C) 2005-2021 Free Software Foundation, Inc. + Copyright (C) 2005-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/windows-once.h b/gl/windows-once.h index 58632f9..85534c9 100644 --- a/gl/windows-once.h +++ b/gl/windows-once.h @@ -1,5 +1,5 @@ /* Once-only control (native Windows implementation). - Copyright (C) 2005-2021 Free Software Foundation, Inc. + Copyright (C) 2005-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/windows-recmutex.c b/gl/windows-recmutex.c index cfc94b4..d8087ac 100644 --- a/gl/windows-recmutex.c +++ b/gl/windows-recmutex.c @@ -1,5 +1,5 @@ /* Plain recursive mutexes (native Windows implementation). - Copyright (C) 2005-2021 Free Software Foundation, Inc. + Copyright (C) 2005-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/windows-recmutex.h b/gl/windows-recmutex.h index 174fe73..746e75c 100644 --- a/gl/windows-recmutex.h +++ b/gl/windows-recmutex.h @@ -1,5 +1,5 @@ /* Plain recursive mutexes (native Windows implementation). - Copyright (C) 2005-2021 Free Software Foundation, Inc. + Copyright (C) 2005-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/windows-rwlock.c b/gl/windows-rwlock.c index d63936c..d186e03 100644 --- a/gl/windows-rwlock.c +++ b/gl/windows-rwlock.c @@ -1,5 +1,5 @@ /* Read-write locks (native Windows implementation). - Copyright (C) 2005-2021 Free Software Foundation, Inc. + Copyright (C) 2005-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/windows-rwlock.h b/gl/windows-rwlock.h index 280c9f2..65c5ab4 100644 --- a/gl/windows-rwlock.h +++ b/gl/windows-rwlock.h @@ -1,5 +1,5 @@ /* Read-write locks (native Windows implementation). - Copyright (C) 2005-2021 Free Software Foundation, Inc. + Copyright (C) 2005-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/xalloc-die.c b/gl/xalloc-die.c index 1bf0a9e..5b947f1 100644 --- a/gl/xalloc-die.c +++ b/gl/xalloc-die.c @@ -1,11 +1,11 @@ /* Report a memory allocation failure and exit. - Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2021 Free Software + Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, diff --git a/gl/xalloc-oversized.h b/gl/xalloc-oversized.h index 4184f33..aefa6fd 100644 --- a/gl/xalloc-oversized.h +++ b/gl/xalloc-oversized.h @@ -1,6 +1,6 @@ /* xalloc-oversized.h -- memory allocation size checking - Copyright (C) 1990-2000, 2003-2004, 2006-2021 Free Software Foundation, Inc. + Copyright (C) 1990-2000, 2003-2004, 2006-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/xalloc.h b/gl/xalloc.h index 7f2c3fb..9f4bf8d 100644 --- a/gl/xalloc.h +++ b/gl/xalloc.h @@ -1,10 +1,10 @@ /* xalloc.h -- malloc with out-of-memory checking - Copyright (C) 1990-2000, 2003-2004, 2006-2021 Free Software Foundation, Inc. + Copyright (C) 1990-2000, 2003-2004, 2006-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, diff --git a/gl/xmalloc.c b/gl/xmalloc.c index d5def0b..3c3cb20 100644 --- a/gl/xmalloc.c +++ b/gl/xmalloc.c @@ -1,10 +1,10 @@ /* xmalloc.c -- malloc with out of memory checking - Copyright (C) 1990-2000, 2002-2006, 2008-2021 Free Software Foundation, Inc. + Copyright (C) 1990-2000, 2002-2006, 2008-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -22,9 +22,9 @@ #include "xalloc.h" #include "ialloc.h" -#include "intprops.h" #include "minmax.h" +#include #include #include @@ -195,7 +195,7 @@ x2nrealloc (void *p, size_t *pn, size_t s) else { /* Set N = floor (1.5 * N) + 1 to make progress even if N == 0. */ - if (INT_ADD_WRAPV (n, (n >> 1) + 1, &n)) + if (ckd_add (&n, n, (n >> 1) + 1)) xalloc_die (); } @@ -236,7 +236,7 @@ xpalloc (void *pa, idx_t *pn, idx_t n_incr_min, ptrdiff_t n_max, idx_t s) N_MAX, and what the C language can represent safely. */ idx_t n; - if (INT_ADD_WRAPV (n0, n0 >> 1, &n)) + if (ckd_add (&n, n0, n0 >> 1)) n = IDX_MAX; if (0 <= n_max && n_max < n) n = n_max; @@ -251,7 +251,7 @@ xpalloc (void *pa, idx_t *pn, idx_t n_incr_min, ptrdiff_t n_max, idx_t s) size_t nbytes; #endif idx_t adjusted_nbytes - = (INT_MULTIPLY_WRAPV (n, s, &nbytes) + = (ckd_mul (&nbytes, n, s) ? MIN (IDX_MAX, SIZE_MAX) : nbytes < DEFAULT_MXFAST ? DEFAULT_MXFAST : 0); if (adjusted_nbytes) @@ -263,9 +263,9 @@ xpalloc (void *pa, idx_t *pn, idx_t n_incr_min, ptrdiff_t n_max, idx_t s) if (! pa) *pn = 0; if (n - n0 < n_incr_min - && (INT_ADD_WRAPV (n0, n_incr_min, &n) + && (ckd_add (&n, n0, n_incr_min) || (0 <= n_max && n_max < n) - || INT_MULTIPLY_WRAPV (n, s, &nbytes))) + || ckd_mul (&nbytes, n, s))) xalloc_die (); pa = xrealloc (pa, nbytes); *pn = n; diff --git a/gl/xsize.c b/gl/xsize.c index b3d73a2..761e343 100644 --- a/gl/xsize.c +++ b/gl/xsize.c @@ -1,6 +1,6 @@ /* Checked size_t computations. - Copyright (C) 2012-2021 Free Software Foundation, Inc. + Copyright (C) 2012-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as diff --git a/gl/xsize.h b/gl/xsize.h index 91fa877..0bfa4c8 100644 --- a/gl/xsize.h +++ b/gl/xsize.h @@ -1,6 +1,6 @@ /* xsize.h -- Checked size_t computations. - Copyright (C) 2003, 2008-2021 Free Software Foundation, Inc. + Copyright (C) 2003, 2008-2022 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as -- cgit v0.10-9-g596f