summaryrefslogtreecommitdiffstats
path: root/patches/readline-7.0/0001-rl-attribute.patch
blob: ac9bd84e8ebde145d24392992c484564ad90af81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From: "doko@debian.org" <doko@debian.org>
Date: Sun, 24 Jan 2010 00:31:09 +0100
Subject: [PATCH] rl-attribute.

rl-attribute.dpatch by  <doko@debian.org>

from:
http://ftp.de.debian.org/debian/pool/main/r/readline6/readline6_6.1-1.diff.gz

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 readline.h | 2 +-
 rlstdc.h   | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/readline.h b/readline.h
index 924bbfb0f213..b1a177a577d5 100644
--- a/readline.h
+++ b/readline.h
@@ -385,7 +385,7 @@ extern int rl_reset_line_state PARAMS((void));
 extern int rl_crlf PARAMS((void));
 
 #if defined (USE_VARARGS) && defined (PREFER_STDARG)
-extern int rl_message (const char *, ...)  __attribute__((__format__ (printf, 1, 2)));
+extern int rl_message (const char *, ...)  __rl_attribute__((__format__ (printf, 1, 2)));
 #else
 extern int rl_message ();
 #endif
diff --git a/rlstdc.h b/rlstdc.h
index 2aaa30babfbd..82b607cb35df 100644
--- a/rlstdc.h
+++ b/rlstdc.h
@@ -36,10 +36,10 @@
 #  endif
 #endif
 
-#ifndef __attribute__
-#  if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
-#    define __attribute__(x)
-#  endif
+#if defined(__GNUC__) && __GNUC__ >= 2
+#  define __rl_attribute__(x) __attribute__(x)
+#else
+#  define __rl_attribute__(x)
 #endif
 
 /* Moved from config.h.in because readline.h:rl_message depends on these