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).
This commit is contained in:
		
							parent
							
								
									587e1f5598
								
							
						
					
					
						commit
						47722a8c2e
					
				
					 2 changed files with 3 additions and 3 deletions
				
			
		|  | @ -51,7 +51,7 @@ | |||
| #define __GNUC_VA_LIST | ||||
| 
 | ||||
| #define _CRTIMP extern | ||||
| #define __CRT_INLINE extern __inline__ | ||||
| #define __CRT_INLINE static __inline__ | ||||
| 
 | ||||
| #define _CRT_ALIGN(x) __attribute__((aligned(x))) | ||||
| #define DECLSPEC_ALIGN(x) __attribute__((aligned(x))) | ||||
|  |  | |||
|  | @ -1474,7 +1474,7 @@ typedef DWORD LCID; | |||
| #if(defined(_X86_) && !defined(__x86_64)) | ||||
|   __CRT_INLINE VOID MemoryBarrier(VOID) { | ||||
|     LONG Barrier; | ||||
|     __asm__ __volatile__("xchgl %eax,%0 " | ||||
|     __asm__ __volatile__("xchgl %%eax,%0 " | ||||
|       :"=r" (Barrier)); | ||||
|   } | ||||
| #define YieldProcessor() __asm__ __volatile__("rep nop "); | ||||
|  | @ -1486,7 +1486,7 @@ typedef DWORD LCID; | |||
| #define PF_NON_TEMPORAL_LEVEL_ALL | ||||
| 
 | ||||
|   __CRT_INLINE VOID DbgRaiseAssertionFailure(void) { | ||||
|     __asm__ __volatile__("int 0x2c "); | ||||
|     __asm__ __volatile__("int $0x2c "); | ||||
|   } | ||||
|   PVOID GetCurrentFiber(void); | ||||
|   __CRT_INLINE PVOID GetCurrentFiber(void) | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue