Thanks for reporting that. I installed the attached into Gnulib to try
to work around the problem. Please give it a try (I haven't tested it on
older Debian).
>From 7b152eb2c2fbabce7eb7b1f789ad6feb0966bbd9 Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Tue, 27 Apr 2021 11:23:28 -0700
Subject: [PATCH] libc-config: fix include problem on older Debian
https://lists.gnu.org/r/bug-gnulib/2021-04/msg00198.html
* lib/cdefs.h: Use __GNULIB_CDEFS, not __GLIBC__,
to determine whether to include the bits/* files.
* lib/libc-config.h (__WORDSIZE): Remove.
(__GNULIB_CDEFS): New macro.
---
ChangeLog | 9 +++++++++
lib/cdefs.h | 6 +++---
lib/libc-config.h | 10 +++-------
3 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index bc7427cb0..a110509f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2021-04-27 Paul Eggert <egg...@cs.ucla.edu>
+
+ libc-config: fix include problem on older Debian
+ https://lists.gnu.org/r/bug-gnulib/2021-04/msg00198.html
+ * lib/cdefs.h: Use __GNULIB_CDEFS, not __GLIBC__,
+ to determine whether to include the bits/* files.
+ * lib/libc-config.h (__WORDSIZE): Remove.
+ (__GNULIB_CDEFS): New macro.
+
2021-04-26 Paul Eggert <egg...@cs.ucla.edu>
gnulib-tool: port better to current Autoconf
diff --git a/lib/cdefs.h b/lib/cdefs.h
index 9618152ab..b883b2566 100644
--- a/lib/cdefs.h
+++ b/lib/cdefs.h
@@ -489,9 +489,9 @@
[!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]
#endif
-/* The #ifndef lets Gnulib avoid including these on non-glibc
- platforms, where the includes typically do not exist. */
-#ifdef __GLIBC__
+/* Gnulib avoids including these, as they don't work on non-glibc or
+ older glibc platforms. */
+#ifndef __GNULIB_CDEFS
# include <bits/wordsize.h>
# include <bits/long-double.h>
#endif
diff --git a/lib/libc-config.h b/lib/libc-config.h
index f2c86144b..fabca2fa3 100644
--- a/lib/libc-config.h
+++ b/lib/libc-config.h
@@ -80,13 +80,9 @@
# ifndef _FEATURES_H
# define _FEATURES_H 1
# endif
-/* Define __WORDSIZE so that <cdefs.h> does not attempt to include
- nonexistent files. Make it a syntax error, since Gnulib does not
- use __WORDSIZE now, and if Gnulib uses it later the syntax error
- will let us know that __WORDSIZE needs configuring. */
-# ifndef __WORDSIZE
-# define __WORDSIZE %%%
-# endif
+/* Define __GNULIB_CDEFS so that <cdefs.h> does not attempt to include
+ nonexistent files. */
+# define __GNULIB_CDEFS
/* Undef the macros unconditionally defined by our copy of glibc
<sys/cdefs.h>, so that they do not clash with any system-defined
versions. */
--
2.27.0