X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Ffstat.c;h=dc802f502b5672f2c78a0a4d9a987082796ca489;hb=51a2203392d4199bf79d97f50db1b10a29a4f2a1;hp=db5b17c1ed23f0e77c97f90fe7973038f5685a8c;hpb=cd76a061a80d91823660fc999727c6ec5f4a067b;p=gnulib.git diff --git a/lib/fstat.c b/lib/fstat.c index db5b17c1e..dc802f502 100644 --- a/lib/fstat.c +++ b/lib/fstat.c @@ -1,5 +1,5 @@ /* fstat() replacement. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,9 +23,15 @@ /* Get the original definition of fstat. It might be defined as a macro. */ #include #include +#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 #undef __need_system_sys_stat_h -static inline int +static int orig_fstat (int fd, struct stat *buf) { return fstat (fd, buf); @@ -45,7 +51,7 @@ orig_fstat (int fd, struct stat *buf) #endif #if HAVE_MSVC_INVALID_PARAMETER_HANDLER -static inline int +static int fstat_nothrow (int fd, struct stat *buf) { int result;