crt: Fix ABI of POSIX ftw() and nftw() functions
There are 4 POSIX stat functions (stat32, stat32i64, stat64, stat64i32)
which differs in the stat structure point size. And there is additional
stat symbol which alias to one of those based on the _FILE_OFFSET_BITS and
_USE_32BIT_TIME_T settings.
As POSIX ftw() and nftw() functions takes also struct stat in its function
callback argument, it is required to properly provide for each settings of
_FILE_OFFSET_BITS and _USE_32BIT_TIME_T configuration, the appropriate
struct stat ABI compatible ftw and nftw symbol.
This change provides 4 new ftw function symbols: ftw32, ftw32i64, ftw64 and
ftw64i32. And same for nftw symbols: nftw32, nftw32i64, nftw64, nftw64i32.
So with this change, the call to the ftw() or nftw() function will respect
the _FILE_OFFSET_BITS and _USE_32BIT_TIME_T settings and provide correct
size of stat structure.
Function symbols for ftw and nftw are aliases to one of the fixed-size
symbol based on the _FILE_OFFSET_BITS and _USE_32BIT_TIME_T settings.
Signed-off-by: Martin Storsjö <martin@martin.st>
6 files changed