summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2022-11-01 20:26:21 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2022-11-01 20:26:21 +0000
commit31c7022553963522dee5f0765842216773d2cfe2 (patch)
tree74d7a26875f192f73a9e8826bacbb373b0639acf /gnu
parentb4b825af6a542bf0958028a1c7045d06c2937b99 (diff)
Do not neuter __attribute__ with __STRICT_ANSI__
This broke readline support in newer Pythons and generally seems a bad idea. Upstream have removed this conditional in 5.0. ok millert
Diffstat (limited to 'gnu')
-rw-r--r--gnu/lib/libreadline/rlstdc.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/gnu/lib/libreadline/rlstdc.h b/gnu/lib/libreadline/rlstdc.h
index dac8e986e10..847fa9c26f4 100644
--- a/gnu/lib/libreadline/rlstdc.h
+++ b/gnu/lib/libreadline/rlstdc.h
@@ -26,13 +26,19 @@
/* A function can be defined using prototypes and compile on both ANSI C
and traditional C compilers with something like this:
- extern char *func __P((char *, char *, int)); */
+ extern char *func PARAMS((char *, char *, int)); */
-#if !defined (__P)
+#if !defined (PARAMS)
# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus)
-# define __P(protos) protos
+# define PARAMS(protos) protos
# else
-# define __P(protos) ()
+# define PARAMS(protos) ()
+# endif
+#endif
+
+#ifndef __attribute__
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
+# define __attribute__(x)
# endif
#endif