summaryrefslogtreecommitdiff
path: root/lib/gl/sys_stat.in.h
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2010-04-13 20:18:44 +0200
committerSimon Josefsson <simon@josefsson.org>2010-04-13 20:24:59 +0200
commit30748a9bcbfb76460e42ec96b6988ffc69267680 (patch)
tree95459aa136a9213f4cea7b42fa50dcaffb827723 /lib/gl/sys_stat.in.h
parentd0d9fa436ed1dce70395d477f9b15199b0482bb6 (diff)
downloadgnutls-30748a9bcbfb76460e42ec96b6988ffc69267680.tar.gz
Update gnulib files, fix syntax-check warnings.
Diffstat (limited to 'lib/gl/sys_stat.in.h')
-rw-r--r--lib/gl/sys_stat.in.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/gl/sys_stat.in.h b/lib/gl/sys_stat.in.h
index ebfd4e592b..80b9c47ddf 100644
--- a/lib/gl/sys_stat.in.h
+++ b/lib/gl/sys_stat.in.h
@@ -56,7 +56,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 <io.h>
+# include <io.h> /* mingw32, mingw64 */
+# include <direct.h> /* mingw64 */
#endif
#ifndef S_IFMT
@@ -390,7 +391,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)
@@ -452,7 +456,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 <io.h>, which is included above. */
+ alias mkdir), only in the nonstandard includes <direct.h> and <io.h>,
+ which are included above. */
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
static inline int