From: Paul Eggert <eggert@cs.ucla.edu>
To: Benno Schulenberg <bensberg@telfort.nl>, bug-gnulib@gnu.org
Subject: Re: commit eb32c992 causes trouble on older Debian
Date: Tue, 27 Apr 2021 11:28:20 -0700 [thread overview]
Message-ID: <0599977f-a027-7483-0c2e-5d67dd45c713@cs.ucla.edu> (raw)
In-Reply-To: <04a87155-c80f-555e-8f39-67c00adeb296@telfort.nl>
[-- Attachment #1: Type: text/plain, Size: 161 bytes --]
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).
[-- Attachment #2: 0001-libc-config-fix-include-problem-on-older-Debian.patch --]
[-- Type: text/x-patch, Size: 2523 bytes --]
From 7b152eb2c2fbabce7eb7b1f789ad6feb0966bbd9 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@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 <eggert@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 <eggert@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
next prev parent reply other threads:[~2021-04-27 18:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-27 11:01 commit eb32c992 causes trouble on older Debian Benno Schulenberg
2021-04-27 18:28 ` Paul Eggert [this message]
2021-04-28 8:04 ` Benno Schulenberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0599977f-a027-7483-0c2e-5d67dd45c713@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=bensberg@telfort.nl \
--cc=bug-gnulib@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).