By always instantiating extern inlines, the patch has discovered 2 assembly errors, which were fixed in the original mingw64 in 2009. This fixes those errors. Additionally it changes __CRT_INLINE in win32/include/_mingw.h from `extern __inline__` to `static __inline__`. __CRT_INLINE is used exclusively in header files and as such it should not create externally visible instantiations like a `extern inline` would (as per the C standard).
Unified · Split
| @@ -51,7 +51,7 @@ · 50 unmodified lines | ||
| 51 | 51 | #define __GNUC_VA_LIST |
| 52 | 52 | |
| 53 | 53 | #define _CRTIMP extern |
| 54 | −#define __CRT_INLINE extern __inline__ | |
| 54 | +#define __CRT_INLINE static __inline__ | |
| 55 | 55 | |
| 56 | 56 | #define _CRT_ALIGN(x) __attribute__((aligned(x))) |
| 57 | 57 | #define DECLSPEC_ALIGN(x) __attribute__((aligned(x))) |
| @@ -1474,7 +1474,7 @@ typedef DWORD LCID; · 1473 unmodified lines | ||
| 1474 | 1474 | #if(defined(_X86_) && !defined(__x86_64)) |
| 1475 | 1475 | __CRT_INLINE VOID MemoryBarrier(VOID) { |
| 1476 | 1476 | LONG Barrier; |
| 1477 | − __asm__ __volatile__("xchgl %eax,%0 " | |
| 1477 | + __asm__ __volatile__("xchgl %%eax,%0 " | |
| 1478 | 1478 | :"=r" (Barrier)); |
| 1479 | 1479 | } |
| 1480 | 1480 | #define YieldProcessor() __asm__ __volatile__("rep nop "); |
| @@ -1486,7 +1486,7 @@ typedef DWORD LCID; · 5 unmodified lines | ||
| 1486 | 1486 | #define PF_NON_TEMPORAL_LEVEL_ALL |
| 1487 | 1487 | |
| 1488 | 1488 | __CRT_INLINE VOID DbgRaiseAssertionFailure(void) { |
| 1489 | − __asm__ __volatile__("int 0x2c "); | |
| 1489 | + __asm__ __volatile__("int $0x2c "); | |
| 1490 | 1490 | } |
| 1491 | 1491 | PVOID GetCurrentFiber(void); |
| 1492 | 1492 | __CRT_INLINE PVOID GetCurrentFiber(void) |