Latest mingw64 packages.
[fedora-mingw.git] / mingw64-gcc / mingw64-gcc-build.patch
1 diff -rup mingw-gcc-4.3.2.orig/gcc-4.3.2/gcc/toplev.c mingw-gcc-4.3.2.new/gcc-4.3.2/gcc/toplev.c
2 --- mingw-gcc-4.3.2.orig/gcc-4.3.2/gcc/toplev.c 2008-04-24 13:59:01.000000000 -0400
3 +++ mingw-gcc-4.3.2.new/gcc-4.3.2/gcc/toplev.c  2008-09-02 07:31:12.000000000 -0400
4 @@ -536,7 +536,7 @@ read_integral_parameter (const char *p, 
5     for floor_log2 and exact_log2; see toplev.h.  That construct, however,
6     conflicts with the ISO C++ One Definition Rule.   */
7  
8 -#if GCC_VERSION < 3004 || !defined (__cplusplus)
9 +#if GCC_VERSION < 3004
10  
11  /* Given X, an unsigned number, return the largest int Y such that 2**Y <= X.
12     If X is 0, return -1.  */
13 diff -rup mingw-gcc-4.3.2.orig/gcc-4.3.2/gcc/toplev.h mingw-gcc-4.3.2.new/gcc-4.3.2/gcc/toplev.h
14 --- mingw-gcc-4.3.2.orig/gcc-4.3.2/gcc/toplev.h 2007-09-23 15:18:27.000000000 -0400
15 +++ mingw-gcc-4.3.2.new/gcc-4.3.2/gcc/toplev.h  2008-09-03 07:08:46.000000000 -0400
16 @@ -154,12 +154,6 @@ extern void decode_d_option                (const char
17  /* Return true iff flags are set as if -ffast-math.  */
18  extern bool fast_math_flags_set_p      (void);
19  
20 -/* Return log2, or -1 if not exact.  */
21 -extern int exact_log2                  (unsigned HOST_WIDE_INT);
22 -
23 -/* Return floor of log2, with -1 for zero.  */
24 -extern int floor_log2                  (unsigned HOST_WIDE_INT);
25 -
26  /* Inline versions of the above for speed.  */
27  #if GCC_VERSION >= 3004
28  # if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
29 @@ -173,17 +167,23 @@ extern int floor_log2                  (
30  #  define CTZ_HWI __builtin_ctz
31  # endif
32  
33 -extern inline int
34 +static inline int
35  floor_log2 (unsigned HOST_WIDE_INT x)
36  {
37    return x ? HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x) : -1;
38  }
39  
40 -extern inline int
41 +static inline int
42  exact_log2 (unsigned HOST_WIDE_INT x)
43  {
44    return x == (x & -x) && x ? (int) CTZ_HWI (x) : -1;
45  }
46 +#else
47 +/* Return log2, or -1 if not exact.  */
48 +extern int exact_log2                  (unsigned HOST_WIDE_INT);
49 +
50 +/* Return floor of log2, with -1 for zero.  */
51 +extern int floor_log2                  (unsigned HOST_WIDE_INT);
52  #endif /* GCC_VERSION >= 3004 */
53  
54  /* Functions used to get and set GCC's notion of in what directory