mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
common,w32: Fix struct stat on Windows.
* common/sysutils.c [HAVE_W32_SYSTEM] (gnupg_stat): Select appropriate structure. -- GnuPG-bug-id: 5897 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
c51139f2bc
commit
fe28e088a9
@ -1237,10 +1237,20 @@ int
|
|||||||
gnupg_stat (const char *name, struct stat *statbuf)
|
gnupg_stat (const char *name, struct stat *statbuf)
|
||||||
{
|
{
|
||||||
# ifdef HAVE_W32_SYSTEM
|
# ifdef HAVE_W32_SYSTEM
|
||||||
|
# if __MINGW32_MAJOR_VERSION > 3
|
||||||
|
/* mingw.org's MinGW */
|
||||||
|
# define STRUCT_STAT _stat
|
||||||
|
# elif defined(_USE_32BIT_TIME_T)
|
||||||
|
/* MinGW64 for i686 */
|
||||||
|
# define STRUCT_STAT _stat32
|
||||||
|
# else
|
||||||
|
/* MinGW64 for x86_64 */
|
||||||
|
# define STRUCT_STAT _stat64i32
|
||||||
|
# endif
|
||||||
if (any8bitchar (name))
|
if (any8bitchar (name))
|
||||||
{
|
{
|
||||||
wchar_t *wname;
|
wchar_t *wname;
|
||||||
struct _stat32 st32;
|
struct STRUCT_STAT st32;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
wname = utf8_to_wchar (name);
|
wname = utf8_to_wchar (name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user