open-src/proto/x11proto/xfuncproto.patch
changeset 1112 4778e9ecf66e
parent 1111 582653852b4c
child 1113 7c899e96b5f0
--- a/open-src/proto/x11proto/xfuncproto.patch	Sun Apr 10 11:12:44 2011 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-From e5604f04482350eb922a31ad4342aab91ab3b412 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Thu, 9 Dec 2010 16:04:52 -0800
-Subject: [PATCH:x11proto 1/2] Enable gcc attribute(__format__) on gcc versions older than 4.0
-
-Enabled on 2.3 and up, since that's where it's available according to
-http://www.ohse.de/uwe/articles/gcc-attributes.html#func-format
-
-Tested with gcc 3.4.3 on Solaris.
-
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Jeremy Huddleston <[email protected]>
----
- Xfuncproto.h.in |    8 ++++++--
- 1 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/Xfuncproto.h.in b/Xfuncproto.h.in
-index 0177119..b624956 100644
---- a/Xfuncproto.h.in
-+++ b/Xfuncproto.h.in
-@@ -77,10 +77,8 @@ in this Software without prior written authorization from The Open Group.
- 
- #if defined(__GNUC__) && (__GNUC__ >= 4)
- # define _X_SENTINEL(x) __attribute__ ((__sentinel__(x)))
--# define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y)))
- #else
- # define _X_SENTINEL(x)
--# define _X_ATTRIBUTE_PRINTF(x,y)
- #endif /* GNUC >= 4 */
- 
- #if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__CYGWIN__)
-@@ -124,4 +122,10 @@ in this Software without prior written authorization from The Open Group.
- # define _X_NORETURN
- #endif /* GNUC  */
- 
-+#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 203)
-+# define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y)))
-+#else /* not gcc >= 2.3 */
-+# define _X_ATTRIBUTE_PRINTF(x,y)
-+#endif
-+
- #endif /* _XFUNCPROTO_H_ */
--- 
-1.7.3.2
-
-From 1870ec9ce40e8852e1cdce473afa90d21d780e52 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Mon, 13 Dec 2010 16:25:31 -0800
-Subject: [PATCH:x11proto 2/2] Xfuncproto.h: Add _X_RESTRICT_KEYWORD for C99 & gcc in non-strict-C89 mode
-
-Signed-off-by: Alan Coopersmith <[email protected]>
----
- Xfuncproto.h.in |   12 ++++++++++++
- 1 files changed, 12 insertions(+), 0 deletions(-)
-
-diff --git a/Xfuncproto.h.in b/Xfuncproto.h.in
-index b624956..fd9f29b 100644
---- a/Xfuncproto.h.in
-+++ b/Xfuncproto.h.in
-@@ -128,4 +128,16 @@ in this Software without prior written authorization from The Open Group.
- # define _X_ATTRIBUTE_PRINTF(x,y)
- #endif
- 
-+/* C99 keyword "restrict" or equivalent extensions in pre-C99 compilers */
-+#ifndef _X_RESTRICT_KYWD
-+# if defined(restrict) /* assume autoconf set it correctly */ || \
-+   (defined(__STDC__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */
-+#  define _X_RESTRICT_KYWD  restrict
-+# elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */
-+#  define _X_RESTRICT_KYWD __restrict__
-+# else
-+#  define _X_RESTRICT_KYWD
-+# endif
-+#endif
-+
- #endif /* _XFUNCPROTO_H_ */
--- 
-1.7.3.2
-