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
|
#! /bin/sh /usr/share/dpatch/dpatch-run
## rl-attribute.dpatch by <doko@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Do not redefine __attribute__, define macro __rl_attribute__
@DPATCH@
diff -urNad readline5-5.2~/readline.h readline5-5.2/readline.h
--- readline5-5.2~/readline.h 2006-08-16 21:16:59.000000000 +0200
+++ readline5-5.2/readline.h 2006-10-28 14:03:36.000000000 +0200
@@ -373,7 +373,7 @@
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 -urNad readline5-5.2~/rlstdc.h readline5-5.2/rlstdc.h
--- readline5-5.2~/rlstdc.h 2003-05-30 21:08:02.000000000 +0200
+++ readline5-5.2/rlstdc.h 2006-10-28 14:03:36.000000000 +0200
@@ -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_ */
|