Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 0f3fb3d6e8708bcfaa6ac5ac150d357f > files > 3

mingw32-gcc-4.4.2-5.mga3.src.rpm

diff -rup mingw-gcc-4.3.2.orig/gcc-4.4.2/gcc/toplev.c mingw-gcc-4.3.2.new/gcc-4.3.2/gcc/toplev.c
--- mingw-gcc-4.3.2.orig/gcc-4.4.2/gcc/toplev.c	2008-04-24 13:59:01.000000000 -0400
+++ mingw-gcc-4.3.2.new/gcc-4.4.2/gcc/toplev.c	2008-09-02 07:31:12.000000000 -0400
@@ -536,7 +536,7 @@ read_integral_parameter (const char *p, 
    for floor_log2 and exact_log2; see toplev.h.  That construct, however,
    conflicts with the ISO C++ One Definition Rule.   */
 
-#if GCC_VERSION < 3004 || !defined (__cplusplus)
+#if GCC_VERSION < 3004
 
 /* Given X, an unsigned number, return the largest int Y such that 2**Y <= X.
    If X is 0, return -1.  */
diff -rup mingw-gcc-4.3.2.orig/gcc-4.4.2/gcc/toplev.h mingw-gcc-4.3.2.new/gcc-4.3.2/gcc/toplev.h
--- mingw-gcc-4.3.2.orig/gcc-4.4.2/gcc/toplev.h	2007-09-23 15:18:27.000000000 -0400
+++ mingw-gcc-4.3.2.new/gcc-4.4.2/gcc/toplev.h	2008-09-03 07:08:46.000000000 -0400
@@ -154,12 +154,6 @@ extern void decode_d_option		(const char
 /* Return true iff flags are set as if -ffast-math.  */
 extern bool fast_math_flags_set_p	(void);
 
-/* Return log2, or -1 if not exact.  */
-extern int exact_log2                  (unsigned HOST_WIDE_INT);
-
-/* Return floor of log2, with -1 for zero.  */
-extern int floor_log2                  (unsigned HOST_WIDE_INT);
-
 /* Inline versions of the above for speed.  */
 #if GCC_VERSION >= 3004
 # if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
@@ -173,17 +167,23 @@ extern int floor_log2                  (
 #  define CTZ_HWI __builtin_ctz
 # endif
 
-extern inline int
+static inline int
 floor_log2 (unsigned HOST_WIDE_INT x)
 {
   return x ? HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x) : -1;
 }
 
-extern inline int
+static inline int
 exact_log2 (unsigned HOST_WIDE_INT x)
 {
   return x == (x & -x) && x ? (int) CTZ_HWI (x) : -1;
 }
+#else
+/* Return log2, or -1 if not exact.  */
+extern int exact_log2                  (unsigned HOST_WIDE_INT);
+
+/* Return floor of log2, with -1 for zero.  */
+extern int floor_log2                  (unsigned HOST_WIDE_INT);
 #endif /* GCC_VERSION >= 3004 */
 
 /* Functions used to get and set GCC's notion of in what directory