This patch series is fixing stat functions as was discussed in the long
email thread "stat, _stat, and _stat64i32 issues (was: dirent changes)".
I have not included in this patch series Lasse's followup changes.

In v2 are fixed also ftw and nftw functions which directly calls stat.
And there are lot of other fixes to ensure that the compatibility
functions for older CRT libs behaves like it is expected.

Pali Rohár (13):
  crt: Provide emulation of _fstat64, _stat64 and _wstat64 functions
  crt: Fix mingw-w64 emulation of _fstat64i32, _stat64i32 and
    _wstat64i32 functions
  crt: Provide emulation of _fstat32i64, _stat32i64 and _wstat32i64
    functions
  headers: Remove broken inline stat() and fstat() functions
  headers: Remove inline definition of _fstat64i32() and _stat64i32()
    functions
  headers: Add missing _CRTIMP for _fstat64i32/_stat64i32/_wstat64i32
    functions
  crt: Fix ABI of mingw-w64 emulation of POSIX stat* functions
  crt: Fix ABI of POSIX ftw() and nftw() functions
  headers: Fix declaration of POSIX stat/fstat and LFS stat64/fstat64
    functions
  headers: Fix declaration of POSIX ftw/nftw functions
  crt: Fix POSIX stat() with 32-bit st_size for pre-msvcr100 build
  crt: Provide emulation of _time64 function
  headers: Add support for -D_TIME_BITS=64

 mingw-w64-crt/Makefile.am                     |  69 +++++-
 mingw-w64-crt/def-include/crt-aliases.def.in  |  34 ++-
 .../filetime_to_time64.h}                     |  25 +--
 .../api-ms-win-crt-filesystem-l1-1-0.def.in   |  13 ++
 mingw-w64-crt/lib-common/msvcrt.def.in        |   8 +-
 .../misc/{crtdll_fstat.c => _time64.c}        |  39 ++--
 mingw-w64-crt/misc/crtdll_fstat.c             |   1 +
 mingw-w64-crt/misc/ftw.c                      |  34 +--
 mingw-w64-crt/misc/{ftw64.c => ftw32.c}       |  15 +-
 mingw-w64-crt/misc/{ftw64.c => ftw32i64.c}    |   6 +-
 mingw-w64-crt/misc/ftw64.c                    |   6 +-
 mingw-w64-crt/misc/{ftw64.c => ftw64i32.c}    |  15 +-
 .../{_stat.c => __mingw_fix_stat_path.c}      |  72 +-----
 .../{_wstat.c => __mingw_fix_wstat_path.c}    |  71 +-----
 .../crtdll_fstat.c => stdio/_fstat32i64.c}    |  48 ++--
 .../{misc/crtdll_fstat.c => stdio/_fstat64.c} |  52 +++--
 mingw-w64-crt/stdio/_fstat64i32.c             |  28 ++-
 .../crtdll_fstat.c => stdio/_stat32i64.c}     |  48 ++--
 .../{misc/crtdll_fstat.c => stdio/_stat64.c}  |  53 +++--
 mingw-w64-crt/stdio/_stat64i32.c              |  89 ++------
 .../crtdll_fstat.c => stdio/_wstat32i64.c}    |  48 ++--
 .../{misc/crtdll_fstat.c => stdio/_wstat64.c} |  53 +++--
 mingw-w64-crt/stdio/_wstat64i32.c             |  89 ++------
 .../msvcr110plus_stat32.c}                    |  33 +--
 .../msvcr110plus_stat64i32.c}                 |  33 +--
 .../msvcr110plus_wstat32.c}                   |  34 +--
 .../msvcr110plus_wstat64i32.c}                |  34 +--
 .../{_stat64i32.c => msvcr110pre_stat32.c}    |  99 +++-----
 .../{_stat64i32.c => msvcr110pre_stat64i32.c} |  97 +++-----
 .../{_stat64i32.c => msvcr110pre_wstat32.c}   | 100 +++------
 ...{_stat64i32.c => msvcr110pre_wstat64i32.c} |  98 +++-----
 .../crtdll_fstat.c => stdio/stat32i64.c}      |  27 +--
 .../{misc/crtdll_fstat.c => stdio/stat64.c}   |  26 +--
 .../crtdll_fstat.c => stdio/wstat32i64.c}     |  27 +--
 .../{misc/crtdll_fstat.c => stdio/wstat64.c}  |  26 +--
 mingw-w64-headers/crt/_mingw.h.in             |   2 +-
 mingw-w64-headers/crt/_mingw_stat64.h         |  23 +-
 mingw-w64-headers/crt/ftw.h                   |  30 ++-
 mingw-w64-headers/crt/sys/stat.h              | 212 +++++-------------
 mingw-w64-headers/crt/wchar.h                 |   2 +-
 40 files changed, 792 insertions(+), 1027 deletions(-)
 copy mingw-w64-crt/{misc/crtdll_fstat.c => include/filetime_to_time64.h} (18%)
 copy mingw-w64-crt/misc/{crtdll_fstat.c => _time64.c} (18%)
 copy mingw-w64-crt/misc/{ftw64.c => ftw32.c} (24%)
 copy mingw-w64-crt/misc/{ftw64.c => ftw32i64.c} (56%)
 copy mingw-w64-crt/misc/{ftw64.c => ftw64i32.c} (23%)
 rename mingw-w64-crt/stdio/{_stat.c => __mingw_fix_stat_path.c} (42%)
 rename mingw-w64-crt/stdio/{_wstat.c => __mingw_fix_wstat_path.c} (44%)
 copy mingw-w64-crt/{misc/crtdll_fstat.c => stdio/_fstat32i64.c} (20%)
 copy mingw-w64-crt/{misc/crtdll_fstat.c => stdio/_fstat64.c} (18%)
 copy mingw-w64-crt/{misc/crtdll_fstat.c => stdio/_stat32i64.c} (19%)
 copy mingw-w64-crt/{misc/crtdll_fstat.c => stdio/_stat64.c} (16%)
 copy mingw-w64-crt/{misc/crtdll_fstat.c => stdio/_wstat32i64.c} (19%)
 copy mingw-w64-crt/{misc/crtdll_fstat.c => stdio/_wstat64.c} (15%)
 copy mingw-w64-crt/{misc/crtdll_fstat.c => stdio/msvcr110plus_stat32.c} (26%)
 copy mingw-w64-crt/{misc/crtdll_fstat.c => stdio/msvcr110plus_stat64i32.c} 
(26%)
 copy mingw-w64-crt/{misc/crtdll_fstat.c => stdio/msvcr110plus_wstat32.c} (26%)
 copy mingw-w64-crt/{misc/crtdll_fstat.c => stdio/msvcr110plus_wstat64i32.c} 
(26%)
 copy mingw-w64-crt/stdio/{_stat64i32.c => msvcr110pre_stat32.c} (22%)
 copy mingw-w64-crt/stdio/{_stat64i32.c => msvcr110pre_stat64i32.c} (23%)
 copy mingw-w64-crt/stdio/{_stat64i32.c => msvcr110pre_wstat32.c} (22%)
 copy mingw-w64-crt/stdio/{_stat64i32.c => msvcr110pre_wstat64i32.c} (23%)
 copy mingw-w64-crt/{misc/crtdll_fstat.c => stdio/stat32i64.c} (21%)
 copy mingw-w64-crt/{misc/crtdll_fstat.c => stdio/stat64.c} (21%)
 copy mingw-w64-crt/{misc/crtdll_fstat.c => stdio/wstat32i64.c} (21%)
 copy mingw-w64-crt/{misc/crtdll_fstat.c => stdio/wstat64.c} (21%)

-- 
2.20.1



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to