History

fix windows errors uncovered by the inline patch

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).

Petr Skocik committed 7 years ago

Commit 47722a81 parent 587e1f52 files · +3 −3Browse files

Unified · Split

2 files
  1. win32/include/_mingw.h +1 −1
  2. win32/include/winapi/winnt.h +2 −2
win32/include/_mingw.h+1−1
@@ -51,7 +51,7 @@ · 50 unmodified lines
51#define __GNUC_VA_LIST51#define __GNUC_VA_LIST
52 52
53#define _CRTIMP extern53#define _CRTIMP extern
54#define __CRT_INLINE extern __inline__54#define __CRT_INLINE static __inline__
55 55
56#define _CRT_ALIGN(x) __attribute__((aligned(x)))56#define _CRT_ALIGN(x) __attribute__((aligned(x)))
57#define DECLSPEC_ALIGN(x) __attribute__((aligned(x)))57#define DECLSPEC_ALIGN(x) __attribute__((aligned(x)))
win32/include/winapi/winnt.h+2−2
@@ -1474,7 +1474,7 @@ typedef DWORD LCID; · 1473 unmodified lines
1474#if(defined(_X86_) && !defined(__x86_64))1474#if(defined(_X86_) && !defined(__x86_64))
1475 __CRT_INLINE VOID MemoryBarrier(VOID) {1475 __CRT_INLINE VOID MemoryBarrier(VOID) {
1476 LONG Barrier;1476 LONG Barrier;
1477 __asm__ __volatile__("xchgl %eax,%0 "1477 __asm__ __volatile__("xchgl %%eax,%0 "
1478 :"=r" (Barrier));1478 :"=r" (Barrier));
1479 }1479 }
1480#define YieldProcessor() __asm__ __volatile__("rep nop ");1480#define YieldProcessor() __asm__ __volatile__("rep nop ");
@@ -1486,7 +1486,7 @@ typedef DWORD LCID; · 5 unmodified lines
1486#define PF_NON_TEMPORAL_LEVEL_ALL1486#define PF_NON_TEMPORAL_LEVEL_ALL
1487 1487
1488 __CRT_INLINE VOID DbgRaiseAssertionFailure(void) {1488 __CRT_INLINE VOID DbgRaiseAssertionFailure(void) {
1489 __asm__ __volatile__("int 0x2c ");1489 __asm__ __volatile__("int $0x2c ");
1490 }1490 }
1491 PVOID GetCurrentFiber(void);1491 PVOID GetCurrentFiber(void);
1492 __CRT_INLINE PVOID GetCurrentFiber(void)1492 __CRT_INLINE PVOID GetCurrentFiber(void)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t