From 4f73e86209f313dfc2b9dd649fa6bcdf8122310f Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 4 Apr 2010 22:42:59 +0200 Subject: [PATCH] stdio: Fix some C++ test errors on Solaris 8 with GCC. --- ChangeLog | 6 ++++++ lib/stdio.in.h | 23 ++++++++++++++++++----- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 53c2a1a12d..2697e46538 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-04-04 Bruno Haible + + stdio: Fix some C++ test errors on Solaris 8 with GCC. + * lib/stdio.in.h (vdprintf, vfprintf, vprintf, vsprintf): Use + _GL_CXXALIAS_SYS_CAST. + 2010-04-04 Bruno Haible frexpl: Fix a C++ test error on Solaris 8 and Cygwin. diff --git a/lib/stdio.in.h b/lib/stdio.in.h index 717c2c4415..2b09256584 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -921,7 +921,10 @@ _GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))) _GL_ARG_NONNULL ((2))); # endif -_GL_CXXALIAS_SYS (vdprintf, int, (int fd, const char *format, va_list args)); +/* Need to cast, because on Solaris, the third parameter will likely be + __va_list args. */ +_GL_CXXALIAS_SYS_CAST (vdprintf, int, + (int fd, const char *format, va_list args)); # endif _GL_CXXALIASWARN (vdprintf); #elif defined GNULIB_POSIXCHECK @@ -944,7 +947,11 @@ _GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)); # else -_GL_CXXALIAS_SYS (vfprintf, int, (FILE *fp, const char *format, va_list args)); +/* Need to cast, because on Solaris, the third parameter is + __va_list args + and GCC's fixincludes did not change this to __gnuc_va_list. */ +_GL_CXXALIAS_SYS_CAST (vfprintf, int, + (FILE *fp, const char *format, va_list args)); # endif _GL_CXXALIASWARN (vfprintf); #endif @@ -970,7 +977,10 @@ _GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args)); # else -_GL_CXXALIAS_SYS (vprintf, int, (const char *format, va_list args)); +/* Need to cast, because on Solaris, the second parameter is + __va_list args + and GCC's fixincludes did not change this to __gnuc_va_list. */ +_GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args)); # endif _GL_CXXALIASWARN (vprintf); #endif @@ -1026,8 +1036,11 @@ _GL_FUNCDECL_RPL (vsprintf, int, _GL_CXXALIAS_RPL (vsprintf, int, (char *str, const char *format, va_list args)); # else -_GL_CXXALIAS_SYS (vsprintf, int, - (char *str, const char *format, va_list args)); +/* Need to cast, because on Solaris, the third parameter is + __va_list args + and GCC's fixincludes did not change this to __gnuc_va_list. */ +_GL_CXXALIAS_SYS_CAST (vsprintf, int, + (char *str, const char *format, va_list args)); # endif _GL_CXXALIASWARN (vsprintf); #elif defined GNULIB_POSIXCHECK -- 2.30.2