From 30748a9bcbfb76460e42ec96b6988ffc69267680 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Tue, 13 Apr 2010 20:18:44 +0200 Subject: Update gnulib files, fix syntax-check warnings. --- gl/unistd.in.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'gl/unistd.in.h') 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 . */ -# 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 -- cgit v1.2.1