X-Git-Url: https://git.cworth.org/git?p=tar;a=blobdiff_plain;f=gnu%2Fsys_stat.in.h;fp=gnu%2Fsys_stat.in.h;h=f2ac370d45b433cec001102cb7412c22d682d3ae;hp=75e38ed6a6e9f8d441751f980c19da4c6a75d876;hb=de7372b23c3da92fbfaea2d1ac592f0b2ba87914;hpb=fbbfb9406a82e647ce27b6462b11a802fa48f31a diff --git a/gnu/sys_stat.in.h b/gnu/sys_stat.in.h index 75e38ed..f2ac370 100644 --- a/gnu/sys_stat.in.h +++ b/gnu/sys_stat.in.h @@ -26,6 +26,7 @@ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif +@PRAGMA_COLUMNS@ #if defined __need_system_sys_stat_h /* Special invocation convention. */ @@ -58,7 +59,8 @@ /* Before doing "#define mkdir rpl_mkdir" below, we need to include all headers that may declare mkdir(). */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# include +# include /* mingw32, mingw64 */ +# include /* mingw64 */ #endif #ifndef S_IFMT @@ -392,7 +394,10 @@ _GL_WARN_ON_USE (futimens, "futimens is not portable - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define lchmod chmod # endif -_GL_CXXALIAS_RPL_1 (lchmod, chmod, int, (const char *filename, mode_t mode)); +/* Need to cast, because on mingw, the second parameter of chmod is + int mode. */ +_GL_CXXALIAS_RPL_CAST_1 (lchmod, chmod, int, + (const char *filename, mode_t mode)); # else # if 0 /* assume already declared */ _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode) @@ -400,7 +405,9 @@ _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode) # endif _GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); # endif +# if @HAVE_LCHMOD@ _GL_CXXALIASWARN (lchmod); +# endif #elif defined GNULIB_POSIXCHECK # undef lchmod # if HAVE_RAW_DECL_LCHMOD @@ -429,7 +436,9 @@ _GL_CXXALIAS_RPL (lstat, int, (const char *name, struct stat *buf)); # else _GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf)); # endif +# if @HAVE_LSTAT@ _GL_CXXALIASWARN (lstat); +# endif #elif defined GNULIB_POSIXCHECK # undef lstat # if HAVE_RAW_DECL_LSTAT @@ -450,7 +459,8 @@ _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); #else /* mingw's _mkdir() function has 1 argument, but we pass 2 arguments. Additionally, it declares _mkdir (and depending on compile flags, an - alias mkdir), only in the nonstandard , which is included above. */ + alias mkdir), only in the nonstandard includes and , + which are included above. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ static inline int @@ -587,7 +597,8 @@ _GL_WARN_ON_USE (mknodat, "mknodat is not portable - " # else /* !_LARGE_FILES */ # define stat(name, st) rpl_stat (name, st) # endif /* !_LARGE_FILES */ -_GL_EXTERN_C int stat (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2)); +_GL_EXTERN_C int stat (const char *name, struct stat *buf) + _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef stat