From f91b8bbb34ff210ad72bc529c9bd5c6102e27adc Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Mon, 2 Jan 2023 00:52:32 -0500 Subject: Update ancient glob/fnmatch implementations I looked again at trying to use the latest gnulib implemenentations of GNU glob and fnmatch, and the effort required to extract them from gnulib and make them portable to systems which don't support configure is simply far too daunting for me. However it's clear that the previous implementations are growing too long on the tooth to continue to be used without some maintenance, so perform some upkeep on them. - Remove support for pre-ANSI function definitions. - Remove the obsolete "register" keyword. - Assume standard ISO C90/C99 header file support. - Assume standard ISO C "void" and "const" support. - Avoid symbols prefixed with "__" as they're reserved. * maintMakefile: Add a rule to verify lib has the latest content. * src/dir.c: Use void* not __ptr_t which was removed. * gl/lib/glob.c: See above. * gl/lib/fnmatch.in.h: See above. * gl/lib/glob.in.h: See above. * gl/lib/fnmatch.c: See above. Remove __strchrnul(): it is not checked anywhere and is only used in one place anyway. --- maintMakefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'maintMakefile') diff --git a/maintMakefile b/maintMakefile index 80d48d29..46723a2f 100644 --- a/maintMakefile +++ b/maintMakefile @@ -238,16 +238,26 @@ export TAR_OPTIONS := --mode=u+w,go-w --owner=0 --group=0 --numeric-owner --sort # but add a new check to be sure it doesn't happen again. mk_dist_files = AUTHORS ChangeLog COPYING INSTALL README src/mkconfig.h -dist: mk-distcheck +dist: mk-dist mk-distcheck .PHONY: mk-distcheck mk-distcheck: distdir @echo "Checking for extra installed files..." - for fn in $(mk_dist_files); do \ + @for fn in $(mk_dist_files); do \ test -f '$(distdir)'/"$$fn" \ || { echo "Missing dist file: $$fn"; exit 1; }; \ done; true +# Make sure that the files in lib/ have been updated from the files in gl/lib/ + +GL_LIB_FILES := $(wildcard gl/lib/*) + +mk-dist: + @echo "Checking gl/lib files..." + @for fn in $(GL_LIB_FILES); do \ + cmp $$fn $${fn##gl/} \ + || { echo "Run ./bootstrap --gen ?"; exit 1; }; \ + done; true # ---------------------------------- # # Alternative configuration checks. # -- cgit v1.2.1