summaryrefslogtreecommitdiffstats
path: root/patches/readline-6.2/0001-rl-attribute.patch
blob: e05d53269d5450a00fde3faee8968151208eee8c (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
48
From 28a3a685d30096d9567577acc18a890c814cad86 Mon Sep 17 00:00:00 2001
From: doko@debian.org <doko@debian.org>
Date: Sun, 24 Jan 2010 00:31:09 +0100
Subject: [PATCH 1/6] 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(-)

Index: readline-6.2/readline.h
===================================================================
--- readline-6.2.orig/readline.h
+++ readline-6.2/readline.h
@@ -376,7 +376,7 @@ extern int rl_reset_line_state PARAMS((v
 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
Index: readline-6.2/rlstdc.h
===================================================================
--- readline-6.2.orig/rlstdc.h
+++ readline-6.2/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
 
 #endif /* !_RL_STDC_H_ */