The mingw-w64 runtime should not call those time functions as they are
conditionally defined based on application compile-time macro
_USE_32BIT_TIME_T.

So hide all those utime functions when building the mingw-w64 runtime to
prevent possible ABI issues in future.
---
 mingw-w64-headers/crt/sys/utime.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/mingw-w64-headers/crt/sys/utime.h 
b/mingw-w64-headers/crt/sys/utime.h
index 7bb353ca03ed..6109da61c83b 100644
--- a/mingw-w64-headers/crt/sys/utime.h
+++ b/mingw-w64-headers/crt/sys/utime.h
@@ -92,6 +92,11 @@ extern "C" {
 
 #ifndef RC_INVOKED
 
+/*
+ * To prevent ABI issues, the mingw-w64 runtime should not call these
+ * functions. Instead it should call the fixed-size variants.
+ */
+#ifndef _CRTBLD
 #ifdef _USE_32BIT_TIME_T
   int __cdecl _utime(const char *_Filename,struct _utimbuf *_Utimbuf) 
__MINGW_ASM_CALL(_utime32);
   int __cdecl _futime(int _Desc,struct _utimbuf *_Utimbuf) 
__MINGW_ASM_CALL(_futime32);
@@ -108,6 +113,7 @@ extern "C" {
   int __cdecl utime(const char *, struct utimbuf *) __MINGW_ASM_CALL(_utime64);
 #endif
 #endif
+#endif /* _CRTBLD */
 
 #endif
 
-- 
2.20.1



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to