From: Bruno Haible Date: Sat, 13 May 2017 00:36:19 +0000 (+0200) Subject: stat, fstat: Complete removal of old native Windows code. X-Git-Tag: v1.0~6165 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=3a447f5959ac94af56430a393643f3b98d7b67b4;p=gnulib.git stat, fstat: Complete removal of old native Windows code. * lib/stat.c: Remove old macrology for WINDOWS_NATIVE. * lib/fstat.c: Likewise. * lib/stat-w32.c: Likewise. --- diff --git a/ChangeLog b/ChangeLog index 17f835dd92..f6cee1dc26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2017-05-13 Bruno Haible + + stat, fstat: Complete removal of old native Windows code. + * lib/stat.c: Remove old macrology for WINDOWS_NATIVE. + * lib/fstat.c: Likewise. + * lib/stat-w32.c: Likewise. + 2017-05-13 Bruno Haible stat: Complete removal of REPLACE_FUNC_STAT_DIR code. diff --git a/lib/fstat.c b/lib/fstat.c index 605ac7d85e..d2e04688f2 100644 --- a/lib/fstat.c +++ b/lib/fstat.c @@ -27,12 +27,6 @@ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # define WINDOWS_NATIVE -# if _GL_WINDOWS_64_BIT_ST_SIZE -# undef stat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */ -# define stat _stati64 -# undef fstat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */ -# define fstat _fstati64 -# endif #endif #if !defined WINDOWS_NATIVE diff --git a/lib/stat-w32.c b/lib/stat-w32.c index 4f4a105812..4818a57a8c 100644 --- a/lib/stat-w32.c +++ b/lib/stat-w32.c @@ -18,22 +18,19 @@ #include +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# if _GL_WINDOWS_64_BIT_ST_SIZE -# undef stat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */ -# define stat _stati64 -# endif -# include -# include -# include -# include +#include +#include +#include +#include /* Specification. */ -# include "stat-w32.h" +#include "stat-w32.h" -# include "pathmax.h" +#include "pathmax.h" /* GetFinalPathNameByHandle was introduced only in Windows Vista. */ typedef DWORD (WINAPI * GetFinalPathNameByHandleFuncType) (HANDLE hFile, diff --git a/lib/stat.c b/lib/stat.c index 696f3d643a..6e4d788ab7 100644 --- a/lib/stat.c +++ b/lib/stat.c @@ -29,16 +29,6 @@ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # define WINDOWS_NATIVE -# if _GL_WINDOWS_64_BIT_ST_SIZE -# undef stat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */ -# define stat _stati64 -# undef REPLACE_FUNC_STAT_FILE -# elif REPLACE_FUNC_STAT_FILE -/* mingw64 has a broken stat() function, based on _stat(), in libmingwex.a. - Bypass it. */ -# define stat _stat -# undef REPLACE_FUNC_STAT_FILE -# endif #endif #if !defined WINDOWS_NATIVE