Correct versions are provided by non-inline variants. To prevent code duplication and maintenance, remove those inline definitions completely instead of fixing them. --- mingw-w64-headers/crt/sys/stat.h | 84 -------------------------------- 1 file changed, 84 deletions(-)
diff --git a/mingw-w64-headers/crt/sys/stat.h b/mingw-w64-headers/crt/sys/stat.h index 5a85c2c483b5..343bd1178a01 100644 --- a/mingw-w64-headers/crt/sys/stat.h +++ b/mingw-w64-headers/crt/sys/stat.h @@ -185,90 +185,6 @@ int __cdecl fstat(int _Desc,struct stat *_Stat); int __cdecl stat(const char *_Filename,struct stat *_Stat); int __cdecl wstat(const wchar_t *_Filename,struct stat *_Stat); #endif - -#ifndef __CRT__NO_INLINE -#ifdef _USE_32BIT_TIME_T -__CRT_INLINE int __cdecl - fstat(int _Desc,struct stat *_Stat) { - struct _stat32 st; - int __ret=_fstat32(_Desc,&st); - if (__ret == -1) { - memset(_Stat,0,sizeof(struct stat)); - return -1; - } - /* struct stat and struct _stat32 - are the same for this case. */ - memcpy(_Stat, &st, sizeof(struct _stat32)); - return __ret; -} -/* Disable it for making sure trailing slash issue is fixed. */ -#if 0 -__CRT_INLINE int __cdecl - stat(const char *_Filename,struct stat *_Stat) { - struct _stat32 st; - int __ret=_stat32(_Filename,&st); - if (__ret == -1) { - memset(_Stat,0,sizeof(struct stat)); - return -1; - } - /* struct stat and struct _stat32 - are the same for this case. */ - memcpy(_Stat, &st, sizeof(struct _stat32)); - return __ret; -} -#endif -#else -__CRT_INLINE int __cdecl - fstat(int _Desc,struct stat *_Stat) { - struct _stat64 st; - int __ret=_fstat64(_Desc,&st); - if (__ret == -1) { - memset(_Stat,0,sizeof(struct stat)); - return -1; - } - /* struct stat and struct _stat64i32 - are the same for this case. */ - _Stat->st_dev=st.st_dev; - _Stat->st_ino=st.st_ino; - _Stat->st_mode=st.st_mode; - _Stat->st_nlink=st.st_nlink; - _Stat->st_uid=st.st_uid; - _Stat->st_gid=st.st_gid; - _Stat->st_rdev=st.st_rdev; - _Stat->st_size=(_off_t) st.st_size; - _Stat->st_atime=st.st_atime; - _Stat->st_mtime=st.st_mtime; - _Stat->st_ctime=st.st_ctime; - return __ret; -} -/* Disable it for making sure trailing slash issue is fixed. */ -#if 0 -__CRT_INLINE int __cdecl - stat(const char *_Filename,struct stat *_Stat) { - struct _stat64 st; - int __ret=_stat64(_Filename,&st); - if (__ret == -1) { - memset(_Stat,0,sizeof(struct stat)); - return -1; - } - /* struct stat and struct _stat64i32 - are the same for this case. */ - _Stat->st_dev=st.st_dev; - _Stat->st_ino=st.st_ino; - _Stat->st_mode=st.st_mode; - _Stat->st_nlink=st.st_nlink; - _Stat->st_uid=st.st_uid; - _Stat->st_gid=st.st_gid; - _Stat->st_rdev=st.st_rdev; - _Stat->st_size=(_off_t) st.st_size; - _Stat->st_atime=st.st_atime; - _Stat->st_mtime=st.st_mtime; - _Stat->st_ctime=st.st_ctime; - return __ret; -} -#endif -#endif /* _USE_32BIT_TIME_T */ -#endif /* __CRT__NO_INLINE */ #endif /* !RC_INVOKED && !NO_OLDNAMES */ #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64) -- 2.20.1 _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public