summaryrefslogtreecommitdiff
path: root/gl/unistd.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 /gl/unistd.in.h
parentd0d9fa436ed1dce70395d477f9b15199b0482bb6 (diff)
downloadgnutls-30748a9bcbfb76460e42ec96b6988ffc69267680.tar.gz
Update gnulib files, fix syntax-check warnings.
Diffstat (limited to 'gl/unistd.in.h')
-rw-r--r--gl/unistd.in.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
index 0c5c61687b..04d3a68fed 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -415,9 +415,8 @@ _GL_WARN_ON_USE (faccessat, "faccessat is not portable - "
Return 0 if successful, otherwise -1 and errno set.
See the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/fchdir.html>. */
-# if @REPLACE_FCHDIR@
-_GL_FUNCDECL_RPL (fchdir, int, (int /*fd*/));
-_GL_CXXALIAS_RPL (fchdir, int, (int /*fd*/));
+# if ! @HAVE_FCHDIR@
+_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/));
/* Gnulib internal hooks needed to maintain the fchdir metadata. */
_GL_EXTERN_C int _gl_register_fd (int fd, const char *filename)
@@ -426,9 +425,8 @@ _GL_EXTERN_C void _gl_unregister_fd (int fd);
_GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd);
_GL_EXTERN_C const char *_gl_directory_name (int fd);
-# else
-_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/));
# endif
+_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/));
_GL_CXXALIASWARN (fchdir);
#elif defined GNULIB_POSIXCHECK
# undef fchdir
@@ -525,7 +523,9 @@ _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - "
_GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size));
_GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size));
# else
-_GL_CXXALIAS_SYS (getcwd, char *, (char *buf, size_t size));
+/* Need to cast, because on mingw, the second parameter is
+ int size. */
+_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size));
# endif
_GL_CXXALIASWARN (getcwd);
#elif defined GNULIB_POSIXCHECK
@@ -773,7 +773,9 @@ getpagesize ()
/* Need to cast, because on Cygwin 1.5.x systems, the return type is size_t. */
_GL_CXXALIAS_SYS_CAST (getpagesize, int, (void));
# endif
+# if @HAVE_DECL_GETPAGESIZE@
_GL_CXXALIASWARN (getpagesize);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef getpagesize
# if HAVE_RAW_DECL_GETPAGESIZE
@@ -1266,7 +1268,10 @@ _GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count)
_GL_ARG_NONNULL ((2)));
_GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count));
# else
-_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count));
+/* Need to cast, because on mingw, the third parameter is
+ unsigned int count
+ and the return type is 'int'. */
+_GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count));
# endif
_GL_CXXALIASWARN (write);
#endif