summaryrefslogtreecommitdiff
path: root/packages/gmp/gmp-4.2.2/03_gnu89-inline.diff
blob: 17e8915fbb0d497b550e59a229df29ec3693b7ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Index: gmp-h.in
===================================================================
RCS file: /cvsroot/pkg-gmp/gmp/gmp-h.in,v
retrieving revision 1.4
diff -u -b -B -r1.4 gmp-h.in
--- gmp-4.2.2.orig/gmp-h.in	15 Sep 2007 23:05:28 -0000	1.4
+++ gmp-4.2.2/gmp-h.in		9 Apr 2008 05:30:42 -0000
@@ -418,9 +418,13 @@
     for an inline too, so as to correctly specify "dllimport" on windows, in
     case the function is called rather than inlined.
     GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
-    inline semantics, unless -fgnu89-inline is used.  */
+    inline semantics, unless -fgnu89-inline is used.
+
+   With GCC 4.2, `__GNUC_STDC_INLINE__' is never defined (because C99 inline
+   semantics are not supported), but a warning is issued in C99 mode if
+   `__gnu_inline__' is not used.  */
 #ifdef __GNUC__
-#ifdef __GNUC_STDC_INLINE__
+#if (defined __GNUC_STDC_INLINE__) || (__GNUC__ == 4 && __GNUC_MINOR__ == 2)
 #define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__))
 #else
 #define __GMP_EXTERN_INLINE      extern __inline__