ada: Fix Ada.Directories.Modification_Time on Windows
commit63eaa7eeb68cd967ce9a93a4669dc46f1048b0bc
authorRonan Desplanques <desplanques@adacore.com>
Mon, 16 Oct 2023 15:09:25 +0000 (16 17:09 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 7 Nov 2023 09:15:04 +0000 (7 10:15 +0100)
treee667b44e5e5e3cd3dbb6480a6f9e4562d10ba0e6
parenta2e4afc6f6bd0fd3c3894a2192fcc09e0b60f0be
ada: Fix Ada.Directories.Modification_Time on Windows

Before this patch, Ada.Directories.Modification_Time called
GetFileAttributesExA under the hood on Windows. That would sometimes
fail to work with files whose names were non-ASCII.

This patch replaces the call to GetFileAttributesExA with a call to
GetFileAttributesEx preceded by an encoding scheme conversion, as is
done in other functions of the run-time library. This fixes the issues
that were observed with the previous implementations.

gcc/ada/

* adaint.c (__gnat_file_time): Fix Windows version.
gcc/ada/adaint.c