diff options
Diffstat (limited to 'lib/sys_stat.in.h')
| -rw-r--r-- | lib/sys_stat.in.h | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index 5acee705f8a..77a7177ca64 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h | |||
| @@ -55,10 +55,17 @@ | |||
| 55 | /* The definition of _GL_WARN_ON_USE is copied here. */ | 55 | /* The definition of _GL_WARN_ON_USE is copied here. */ |
| 56 | 56 | ||
| 57 | /* Before doing "#define mkdir rpl_mkdir" below, we need to include all | 57 | /* Before doing "#define mkdir rpl_mkdir" below, we need to include all |
| 58 | headers that may declare mkdir(). */ | 58 | headers that may declare mkdir(). Native Windows platforms declare mkdir |
| 59 | in <io.h> and/or <direct.h>, not in <unistd.h>. */ | ||
| 59 | #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ | 60 | #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ |
| 60 | # include <io.h> /* mingw32, mingw64 */ | 61 | # include <io.h> /* mingw32, mingw64 */ |
| 61 | # include <direct.h> /* mingw64 */ | 62 | # include <direct.h> /* mingw64, MSVC 9 */ |
| 63 | #endif | ||
| 64 | |||
| 65 | #ifndef S_IFIFO | ||
| 66 | # ifdef _S_IFIFO | ||
| 67 | # define S_IFIFO _S_IFIFO | ||
| 68 | # endif | ||
| 62 | #endif | 69 | #endif |
| 63 | 70 | ||
| 64 | #ifndef S_IFMT | 71 | #ifndef S_IFMT |
| @@ -312,16 +319,25 @@ _GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - " | |||
| 312 | #endif | 319 | #endif |
| 313 | 320 | ||
| 314 | 321 | ||
| 315 | #if @REPLACE_FSTAT@ | 322 | #if @GNULIB_FSTAT@ |
| 316 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 323 | # if @REPLACE_FSTAT@ |
| 317 | # define fstat rpl_fstat | 324 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 318 | # endif | 325 | # undef fstat |
| 326 | # define fstat rpl_fstat | ||
| 327 | # endif | ||
| 319 | _GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2))); | 328 | _GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2))); |
| 320 | _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); | 329 | _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); |
| 321 | #else | 330 | # else |
| 322 | _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); | 331 | _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); |
| 323 | #endif | 332 | # endif |
| 324 | _GL_CXXALIASWARN (fstat); | 333 | _GL_CXXALIASWARN (fstat); |
| 334 | #elif defined GNULIB_POSIXCHECK | ||
| 335 | # undef fstat | ||
| 336 | # if HAVE_RAW_DECL_FSTAT | ||
| 337 | _GL_WARN_ON_USE (fstat, "fstat has portability problems - " | ||
| 338 | "use gnulib module fstat for portability"); | ||
| 339 | # endif | ||
| 340 | #endif | ||
| 325 | 341 | ||
| 326 | 342 | ||
| 327 | #if @GNULIB_FSTATAT@ | 343 | #if @GNULIB_FSTATAT@ |