headers: Fix ftime function for __CRT__NO_INLINE When __CRT__NO_INLINE is enabled then ftime function ignored the _USE_32BIT_TIME_T settings. Fix this problem by declaring ftime function with __MINGW_ASM_CALL attribute with correct alias based on _USE_32BIT_TIME_T settings. With this change the inline variant of ftime function is not needed anymore as it was just wrapper around aliased function, which is now correctly resolved via __MINGW_ASM_CALL. Signed-off-by: Martin Storsjö <martin@martin.st>
diff --git a/mingw-w64-headers/crt/sys/timeb.h b/mingw-w64-headers/crt/sys/timeb.h index 8f69a46..8613661 100644 --- a/mingw-w64-headers/crt/sys/timeb.h +++ b/mingw-w64-headers/crt/sys/timeb.h
@@ -110,20 +110,11 @@ #endif #if !defined (RC_INVOKED) && !defined (NO_OLDNAMES) - void __cdecl ftime (struct timeb *); - -#ifndef __CRT__NO_INLINE - /* TODO: Avoid structure cast here !!!! */ #ifndef _USE_32BIT_TIME_T - __CRT_INLINE void __cdecl ftime(struct timeb *_Tmb) { - _ftime64((struct __timeb64 *)_Tmb); - } + void __cdecl ftime (struct timeb *) __MINGW_ASM_CALL(_ftime64); #else - __CRT_INLINE void __cdecl ftime(struct timeb *_Tmb) { - _ftime32((struct __timeb32 *)_Tmb); - } + void __cdecl ftime (struct timeb *) __MINGW_ASM_CALL(_ftime32); #endif /* _USE_32BIT_TIME_T */ -#endif /* !__CRT__NO_INLINE */ #endif #ifdef __cplusplus