]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
libc-config: fix include problem on older Debian
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 27 Apr 2021 18:23:28 +0000 (11:23 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 27 Apr 2021 18:24:13 +0000 (11:24 -0700)
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
lib/cdefs.h
lib/libc-config.h

index bc7427cb080497f0174651d3e883a6cb215bcf83..a110509f6eb9d33219cf25b959966f05214e6dc6 100644 (file)
--- 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
index 9618152ab8cd2a0fca5e0fd041e1fd44de6d52b0..b883b25666aa300ff199a791670f9ddc56d7d3f4 100644 (file)
       [!!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
index f2c86144b8e5a76ae49407d318e4c73075e61787..fabca2fa3e130517dd024a92a45997e9e4fd47cd 100644 (file)
 # 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.  */