From 31c7022553963522dee5f0765842216773d2cfe2 Mon Sep 17 00:00:00 2001 From: Theo Buehler Date: Tue, 1 Nov 2022 20:26:21 +0000 Subject: 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 --- gnu/lib/libreadline/rlstdc.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'gnu') 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 -- cgit v1.2.3