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/io.h | 12 ++++++++++++
mingw-w64-headers/crt/wchar.h | 6 ++++++
2 files changed, 18 insertions(+)
diff --git a/mingw-w64-headers/crt/io.h b/mingw-w64-headers/crt/io.h
index c0b54cca5ac6..198606e3b70e 100644
--- a/mingw-w64-headers/crt/io.h
+++ b/mingw-w64-headers/crt/io.h
@@ -76,6 +76,11 @@ _CRTIMP char* __cdecl _getcwd (char*, int);
char name[260];
};
+/*
+ * 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
#define _finddata_t _finddata32_t
#define _finddatai64_t _finddata32i64_t
@@ -93,6 +98,7 @@ _CRTIMP char* __cdecl _getcwd (char*, int);
#define _findfirsti64 _findfirst64
#define _findnexti64 _findnext64
#endif /* _USE_32BIT_TIME_T */
+#endif /* _CRTBLD */
#define _FINDDATA_T_DEFINED
#endif /* _FINDDATA_T_DEFINED */
@@ -135,6 +141,11 @@ _CRTIMP char* __cdecl _getcwd (char*, int);
wchar_t name[260];
};
+/*
+ * 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
#define _wfinddata_t _wfinddata32_t
#define _wfinddatai64_t _wfinddata32i64_t
@@ -152,6 +163,7 @@ _CRTIMP char* __cdecl _getcwd (char*, int);
#define _wfindfirsti64 _wfindfirst64
#define _wfindnexti64 _wfindnext64
#endif /* _USE_32BIT_TIME_T */
+#endif /* _CRTBLD */
#define _WFINDDATA_T_DEFINED
#endif /* _WFINDDATA_T_DEFINED */
diff --git a/mingw-w64-headers/crt/wchar.h b/mingw-w64-headers/crt/wchar.h
index 8a3ec2f35f1f..04595f0d6334 100644
--- a/mingw-w64-headers/crt/wchar.h
+++ b/mingw-w64-headers/crt/wchar.h
@@ -114,6 +114,11 @@ _CRTIMP FILE *__cdecl __acrt_iob_func(unsigned index);
};
/* #endif */
+/*
+ * 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
#define _wfinddata_t _wfinddata32_t
#define _wfinddatai64_t _wfinddata32i64_t
@@ -131,6 +136,7 @@ _CRTIMP FILE *__cdecl __acrt_iob_func(unsigned index);
#define _wfindfirsti64 _wfindfirst64
#define _wfindnexti64 _wfindnext64
#endif
+#endif /* _CRTBLD */
#define _WFINDDATA_T_DEFINED
#endif
--
2.20.1
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public