Subject: bug#79382: commit e124541148d38cd8b7f962aceb72fb44e7cc0aab

From: Bruno Haible <[email-masked]>
Date: Mon, 08 Sep 2025 00:00:21 +0200

Paul Eggert wrote on 2025-09-05:
> I also installed the attached patch, to work around more the places 
> where Gnulib drags in some multithreading and/or locale code that GNU 
> diff (which is single-threaded and not that picky about locales) doesn't 
> need. Not sure if these suggest any Gnulib changes.

The changes in configure.ac regarding mbrtowc and mbrtoc32
are specific to diffutils, I would say. I'm not even sure what you
mean by "Do not worry about multibyte C locales." : glibc and many
other platform have a "C.UTF-8" locale, which behaves like the "C"
locale regarding i18n, but is multibyte.

The changes in configure.ac regarding 'threadlib' are a customization
possibility that is already provided by Gnulib.

The two functions hard_locale_LC_MESSAGES and hard_locale_LC_TIME
look like heuristics to me; I wouldn't bet that they are correct
in all situations.

So, I don't see worthwile Gnulib changes in these areas.

The change in configure.ac finally

+AC_DEFINE([SUPPORT_NON_GREG_CALENDARS_IN_STRFTIME], [false],
+  [Do not worry about GNU strftime behavior for non-Gregorian calendars.])

breaks "make distcheck":

make[1]: Entering directory '/home/runner/work/ci-check/ci-check/diffutils'
make my-distcheck
make[2]: Entering directory '/home/runner/work/ci-check/ci-check/diffutils'
make syntax-check
make[3]: Entering directory '/home/runner/work/ci-check/ci-check/diffutils'
GFDL_version
/usr/bin/grep: .gitmodules: No such file or directory
0.01 GFDL_version
GPL_version
/usr/bin/grep: .gitmodules: No such file or directory
0.01 GPL_version
Wundef_boolean
./lib/config.h:2334:#define SUPPORT_NON_GREG_CALENDARS_IN_STRFTIME false
maint.mk: Use 0 or 1 for macro values
make[3]: *** [maint.mk:1458: sc_Wundef_boolean] Error 1
make[3]: Leaving directory '/home/runner/work/ci-check/ci-check/diffutils'
make[2]: *** [dist-check.mk:148: my-distcheck] Error 2
make[2]: Leaving directory '/home/runner/work/ci-check/ci-check/diffutils'
make[1]: *** [Makefile:2879: distcheck-hook] Error 2
make[1]: Leaving directory '/home/runner/work/ci-check/ci-check/diffutils'
make: *** [Makefile:2662: distcheck] Error 1

Either SUPPORT_NON_GREG_CALENDARS_IN_STRFTIME needs to be defined to 0,
not false. Or the syntax check sc_Wundef_boolean needs to be tweaked.

Bruno