From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id EA80C1F463 for ; Sun, 24 Nov 2019 19:16:13 +0000 (UTC) Received: from localhost ([::1]:38290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iYxMi-0003zI-BV for normalperson@yhbt.net; Sun, 24 Nov 2019 14:16:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38733) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iYxMc-0003yx-KL for bug-gnulib@gnu.org; Sun, 24 Nov 2019 14:16:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iYxMa-0003jX-Ds for bug-gnulib@gnu.org; Sun, 24 Nov 2019 14:16:06 -0500 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::11]:22332) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iYxMZ-0003gn-DQ for bug-gnulib@gnu.org; Sun, 24 Nov 2019 14:16:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1574622960; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=AUMfJ7Cf5cT8TwUp59tHK8aysSu8dXTiMibNsjQ6YIo=; b=TyzeQ1NIyqYhlcpOADQ6/jGtLJXKQone25X9rjlp2NORjHibnz27k7Vb6lthhL5oxN OiansXH843q+IobjKEvcgvEZeqKTUckVRXz4EhNs4Zzo36+6nTR6XNMZFiZ8mySFl4zO NYOappI3HfxnNFxePh0KbcXwErIaMJiHTdBKxNXetdS9vBlqbAx/5cvA8E4ovbkZyrgB oF3oQYx+gpPmhho+WJTLLMDDU2BIOnZx5QOPxnfm1f4C/MpkyKEfs/wvzLbpuTimGBfn n3M4Wxv+bf6T7cnyMiQ4xJ2NQhEq/JLP8JPhchoRoux9asNmk59e+2RxuwN/9UIIgggJ LcQw== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOH6fzxfs=" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 44.29.0 DYNA|AUTH) with ESMTPSA id g09d55vAOJFxdSO (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Sun, 24 Nov 2019 20:15:59 +0100 (CET) From: Bruno Haible To: Christian Biesinger Subject: Re: wctype.h compile error on mingw with GNULIB_NAMESPACE Date: Sun, 24 Nov 2019 20:15:57 +0100 Message-ID: <2224173.6J1rjCpN2Q@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-166-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: References: <1804136.G1HiJvb5N8@omega> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart2780379.qQUk4SkF7i" Content-Transfer-Encoding: 7Bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:238:20a:202:5300::11 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bug-gnulib@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" This is a multi-part message in MIME format. --nextPart2780379.qQUk4SkF7i Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Christian Biesinger wrote: > Thanks for your quick patches! This solves the problem for me. Thanks for the confirmation. Some other patches are needed for the same thing to work on Cygwin and mingw. Will push them once Savannah is back online. 2019-11-24 Bruno Haible Fix errors in C++ mode on Cygwin. * lib/sys_wait.in.h (waitpid): Use _GL_CXXALIAS_SYS_CAST instead of _GL_CXXALIAS_SYS. windows-timedmutex: Fix errors in C++ mode on mingw. * lib/windows-timedmutex.h: Add closing brace. iswctype: Fix errors in C++ mode on mingw. * lib/wctype.in.h (rpl_iswctype): Override if GNULIB_OVERRIDES_WINT_T is 1. * lib/iswctype.c (iswctype): Add another implementation, for the GNULIB_defined_wint_t case. * modules/iswctype (configure.ac): Compile iswctype.c also if GNULIB_OVERRIDES_WINT_T is 1. sys_time: Fix errors in C++ mode on mingw. * lib/sys_time.in.h (timeval): Restore the redirection '#define timeval rpl_timeval', for when the symbol timeval is being used outside the 'gnulib' namespace. * lib/sys_select.in.h (select): In C++, write 'timeval', not 'struct timeval'. Fix errors in C++ mode on mingw. * lib/arpa_inet.in.h (inet_ntop, inet_pton): Use _GL_CXXALIAS_SYS_CAST instead of _GL_CXXALIAS_SYS. * lib/signal.in.h (pthread_sigmask): Likewise. * lib/spawn.in.h (posix_spawn_file_actions_addopen, posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2): Likewise. * lib/wchar.in.h (btowc): Likewise. --nextPart2780379.qQUk4SkF7i Content-Disposition: attachment; filename="0001-Fix-errors-in-C-mode-on-Cygwin.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="0001-Fix-errors-in-C-mode-on-Cygwin.patch" >From c67f26eb8394a4e3f63df1e84f777182f13f2f01 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 24 Nov 2019 13:28:03 +0100 Subject: [PATCH 1/5] Fix errors in C++ mode on Cygwin. * lib/sys_wait.in.h (waitpid): Use _GL_CXXALIAS_SYS_CAST instead of _GL_CXXALIAS_SYS. --- ChangeLog | 6 ++++++ lib/sys_wait.in.h | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5c2f5c5..d70a898 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2019-11-24 Bruno Haible + Fix errors in C++ mode on Cygwin. + * lib/sys_wait.in.h (waitpid): Use _GL_CXXALIAS_SYS_CAST instead of + _GL_CXXALIAS_SYS. + +2019-11-24 Bruno Haible + time_r: Fix for mingw (regression from 2019-11-16). * m4/time_r.m4 (gl_TIME_R): Revert to using AC_CHECK_FUNCS_ONCE. Use the AC_LINK_IFELSE test only if the function does not appear to exist. diff --git a/lib/sys_wait.in.h b/lib/sys_wait.in.h index a4c52bb..52b13b3 100644 --- a/lib/sys_wait.in.h +++ b/lib/sys_wait.in.h @@ -114,7 +114,9 @@ # if defined _WIN32 && ! defined __CYGWIN__ _GL_FUNCDECL_SYS (waitpid, pid_t, (pid_t pid, int *statusp, int options)); # endif -_GL_CXXALIAS_SYS (waitpid, pid_t, (pid_t pid, int *statusp, int options)); +/* Need to cast, because on Cygwin, the second parameter is + __wait_status_ptr_t statusp. */ +_GL_CXXALIAS_SYS_CAST (waitpid, pid_t, (pid_t pid, int *statusp, int options)); _GL_CXXALIASWARN (waitpid); #elif defined GNULIB_POSIXCHECK # undef waitpid -- 2.7.4 --nextPart2780379.qQUk4SkF7i Content-Disposition: attachment; filename="0002-windows-timedmutex-Fix-errors-in-C-mode-on-mingw.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="0002-windows-timedmutex-Fix-errors-in-C-mode-on-mingw.patch" >From ae3efebeb1369a08b69d72d62795b67df840a727 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 24 Nov 2019 20:10:02 +0100 Subject: [PATCH 2/5] windows-timedmutex: Fix errors in C++ mode on mingw. * lib/windows-timedmutex.h: Add closing brace. --- ChangeLog | 5 +++++ lib/windows-timedmutex.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index d70a898..6be838b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2019-11-24 Bruno Haible + windows-timedmutex: Fix errors in C++ mode on mingw. + * lib/windows-timedmutex.h: Add closing brace. + +2019-11-24 Bruno Haible + Fix errors in C++ mode on Cygwin. * lib/sys_wait.in.h (waitpid): Use _GL_CXXALIAS_SYS_CAST instead of _GL_CXXALIAS_SYS. diff --git a/lib/windows-timedmutex.h b/lib/windows-timedmutex.h index b952278..f10a774 100644 --- a/lib/windows-timedmutex.h +++ b/lib/windows-timedmutex.h @@ -49,4 +49,8 @@ extern int glwthread_timedmutex_timedlock (glwthread_timedmutex_t *mutex, extern int glwthread_timedmutex_unlock (glwthread_timedmutex_t *mutex); extern int glwthread_timedmutex_destroy (glwthread_timedmutex_t *mutex); +#ifdef __cplusplus +} +#endif + #endif /* _WINDOWS_TIMEDMUTEX_H */ -- 2.7.4 --nextPart2780379.qQUk4SkF7i Content-Disposition: attachment; filename="0003-iswctype-Fix-errors-in-C-mode-on-mingw.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="0003-iswctype-Fix-errors-in-C-mode-on-mingw.patch" >From 48c29e1b8c556c8546ec5756563d9f90aafa93ce Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 24 Nov 2019 20:10:56 +0100 Subject: [PATCH 3/5] iswctype: Fix errors in C++ mode on mingw. * lib/wctype.in.h (rpl_iswctype): Override if GNULIB_OVERRIDES_WINT_T is 1. * lib/iswctype.c (iswctype): Add another implementation, for the GNULIB_defined_wint_t case. * modules/iswctype (configure.ac): Compile iswctype.c also if GNULIB_OVERRIDES_WINT_T is 1. --- ChangeLog | 10 ++++++++++ lib/iswctype.c | 15 ++++++++++++++- lib/wctype.in.h | 13 +++++++++++-- modules/iswctype | 2 +- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6be838b..356edcb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2019-11-24 Bruno Haible + iswctype: Fix errors in C++ mode on mingw. + * lib/wctype.in.h (rpl_iswctype): Override if GNULIB_OVERRIDES_WINT_T + is 1. + * lib/iswctype.c (iswctype): Add another implementation, for the + GNULIB_defined_wint_t case. + * modules/iswctype (configure.ac): Compile iswctype.c also if + GNULIB_OVERRIDES_WINT_T is 1. + +2019-11-24 Bruno Haible + windows-timedmutex: Fix errors in C++ mode on mingw. * lib/windows-timedmutex.h: Add closing brace. diff --git a/lib/iswctype.c b/lib/iswctype.c index 39d4316..75b69f0 100644 --- a/lib/iswctype.c +++ b/lib/iswctype.c @@ -20,4 +20,17 @@ /* Specification. */ #include -#include "iswctype-impl.h" +#if GNULIB_defined_wint_t + +int +iswctype (wint_t wc, wctype_t desc) +# undef iswctype +{ + return ((wchar_t) wc == wc ? iswctype ((wchar_t) wc, desc) : 0); +} + +#else + +# include "iswctype-impl.h" + +#endif diff --git a/lib/wctype.in.h b/lib/wctype.in.h index 4e57961..b3edb0d 100644 --- a/lib/wctype.in.h +++ b/lib/wctype.in.h @@ -589,10 +589,19 @@ _GL_WARN_ON_USE (wctype, "wctype is unportable - " The argument WC must be either a wchar_t value or WEOF. The argument DESC must have been returned by the wctype() function. */ #if @GNULIB_ISWCTYPE@ -# if !@HAVE_WCTYPE_T@ +# if @GNULIB_OVERRIDES_WINT_T@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef iswctype +# define iswctype rpl_iswctype +# endif +_GL_FUNCDECL_RPL (iswctype, int, (wint_t wc, wctype_t desc)); +_GL_CXXALIAS_RPL (iswctype, int, (wint_t wc, wctype_t desc)); +# else +# if !@HAVE_WCTYPE_T@ _GL_FUNCDECL_SYS (iswctype, int, (wint_t wc, wctype_t desc)); -# endif +# endif _GL_CXXALIAS_SYS (iswctype, int, (wint_t wc, wctype_t desc)); +# endif _GL_CXXALIASWARN (iswctype); #elif defined GNULIB_POSIXCHECK # undef iswctype diff --git a/modules/iswctype b/modules/iswctype index 2f6c8a0..9fce684 100644 --- a/modules/iswctype +++ b/modules/iswctype @@ -17,7 +17,7 @@ wctype-h configure.ac: gl_FUNC_ISWCTYPE -if test $HAVE_WCTYPE_T = 0; then +if test $HAVE_WCTYPE_T = 0 || test $GNULIB_OVERRIDES_WINT_T = 1; then AC_LIBOBJ([iswctype]) fi gl_WCTYPE_MODULE_INDICATOR([iswctype]) -- 2.7.4 --nextPart2780379.qQUk4SkF7i Content-Disposition: attachment; filename="0004-sys_time-Fix-errors-in-C-mode-on-mingw.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="0004-sys_time-Fix-errors-in-C-mode-on-mingw.patch" >From df8452e776ee1e1374c4358d5df4c4f8e8440418 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 24 Nov 2019 20:11:28 +0100 Subject: [PATCH 4/5] sys_time: Fix errors in C++ mode on mingw. * lib/sys_time.in.h (timeval): Restore the redirection '#define timeval rpl_timeval', for when the symbol timeval is being used outside the 'gnulib' namespace. * lib/sys_select.in.h (select): In C++, write 'timeval', not 'struct timeval'. --- ChangeLog | 9 +++++++++ lib/sys_select.in.h | 2 +- lib/sys_time.in.h | 6 +++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 356edcb..573946e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2019-11-24 Bruno Haible + sys_time: Fix errors in C++ mode on mingw. + * lib/sys_time.in.h (timeval): Restore the redirection + '#define timeval rpl_timeval', for when the symbol timeval is being used + outside the 'gnulib' namespace. + * lib/sys_select.in.h (select): In C++, write 'timeval', not + 'struct timeval'. + +2019-11-24 Bruno Haible + iswctype: Fix errors in C++ mode on mingw. * lib/wctype.in.h (rpl_iswctype): Override if GNULIB_OVERRIDES_WINT_T is 1. diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h index e264257..19205cb 100644 --- a/lib/sys_select.in.h +++ b/lib/sys_select.in.h @@ -295,7 +295,7 @@ _GL_FUNCDECL_RPL (select, int, struct timeval *restrict)); _GL_CXXALIAS_RPL (select, int, (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, - struct timeval *restrict)); + timeval *restrict)); # else _GL_CXXALIAS_SYS (select, int, (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, diff --git a/lib/sys_time.in.h b/lib/sys_time.in.h index 2bc2bb3..6859af3 100644 --- a/lib/sys_time.in.h +++ b/lib/sys_time.in.h @@ -112,8 +112,12 @@ _GL_CXXALIASWARN (gettimeofday); # if defined __cplusplus && defined GNULIB_NAMESPACE namespace GNULIB_NAMESPACE { typedef ::timeval -#undef timeval +# undef timeval timeval; +# if @REPLACE_STRUCT_TIMEVAL@ +# define timeval rpl_timeval + typedef ::timeval timeval; +# endif } # endif #elif defined GNULIB_POSIXCHECK -- 2.7.4 --nextPart2780379.qQUk4SkF7i Content-Disposition: attachment; filename="0005-Fix-errors-in-C-mode-on-mingw.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="0005-Fix-errors-in-C-mode-on-mingw.patch" >From ff66f981a9c19ee7644a55faf873f6ba4e89bdc0 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 24 Nov 2019 20:12:02 +0100 Subject: [PATCH 5/5] Fix errors in C++ mode on mingw. * lib/arpa_inet.in.h (inet_ntop, inet_pton): Use _GL_CXXALIAS_SYS_CAST instead of _GL_CXXALIAS_SYS. * lib/signal.in.h (pthread_sigmask): Likewise. * lib/spawn.in.h (posix_spawn_file_actions_addopen, posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2): Likewise. * lib/wchar.in.h (btowc): Likewise. --- ChangeLog | 11 +++++++++++ lib/arpa_inet.in.h | 4 ++++ lib/signal.in.h | 2 ++ lib/spawn.in.h | 6 ++++++ lib/wchar.in.h | 3 ++- 5 files changed, 25 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 573946e..17907bd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2019-11-24 Bruno Haible + Fix errors in C++ mode on mingw. + * lib/arpa_inet.in.h (inet_ntop, inet_pton): Use _GL_CXXALIAS_SYS_CAST + instead of _GL_CXXALIAS_SYS. + * lib/signal.in.h (pthread_sigmask): Likewise. + * lib/spawn.in.h (posix_spawn_file_actions_addopen, + posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2): + Likewise. + * lib/wchar.in.h (btowc): Likewise. + +2019-11-24 Bruno Haible + sys_time: Fix errors in C++ mode on mingw. * lib/sys_time.in.h (timeval): Restore the redirection '#define timeval rpl_timeval', for when the symbol timeval is being used diff --git a/lib/arpa_inet.in.h b/lib/arpa_inet.in.h index 7a85eac..6722783 100644 --- a/lib/arpa_inet.in.h +++ b/lib/arpa_inet.in.h @@ -103,7 +103,9 @@ _GL_CXXALIAS_SYS_CAST (inet_ntop, const char *, (int af, const void *restrict src, char *restrict dst, socklen_t cnt)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (inet_ntop); +# endif #elif defined GNULIB_POSIXCHECK # undef inet_ntop # if HAVE_RAW_DECL_INET_NTOP @@ -132,7 +134,9 @@ _GL_FUNCDECL_SYS (inet_pton, int, _GL_CXXALIAS_SYS (inet_pton, int, (int af, const char *restrict src, void *restrict dst)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (inet_pton); +# endif #elif defined GNULIB_POSIXCHECK # undef inet_pton # if HAVE_RAW_DECL_INET_PTON diff --git a/lib/signal.in.h b/lib/signal.in.h index 0f6486d..b4e432d 100644 --- a/lib/signal.in.h +++ b/lib/signal.in.h @@ -144,7 +144,9 @@ _GL_FUNCDECL_SYS (pthread_sigmask, int, _GL_CXXALIAS_SYS (pthread_sigmask, int, (int how, const sigset_t *new_mask, sigset_t *old_mask)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (pthread_sigmask); +# endif #elif defined GNULIB_POSIXCHECK # undef pthread_sigmask # if HAVE_RAW_DECL_PTHREAD_SIGMASK diff --git a/lib/spawn.in.h b/lib/spawn.in.h index 721d70f..09c66f5 100644 --- a/lib/spawn.in.h +++ b/lib/spawn.in.h @@ -802,7 +802,9 @@ _GL_CXXALIAS_SYS (posix_spawn_file_actions_addopen, int, int __fd, const char *_Restrict_ __path, int __oflag, mode_t __mode)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_spawn_file_actions_addopen); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_spawn_file_actions_addopen # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN @@ -833,7 +835,9 @@ _GL_FUNCDECL_SYS (posix_spawn_file_actions_addclose, int, _GL_CXXALIAS_SYS (posix_spawn_file_actions_addclose, int, (posix_spawn_file_actions_t *__file_actions, int __fd)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_spawn_file_actions_addclose); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_spawn_file_actions_addclose # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE @@ -868,7 +872,9 @@ _GL_CXXALIAS_SYS (posix_spawn_file_actions_adddup2, int, (posix_spawn_file_actions_t *__file_actions, int __fd, int __newfd)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_spawn_file_actions_adddup2); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_spawn_file_actions_adddup2 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 diff --git a/lib/wchar.in.h b/lib/wchar.in.h index 9807f60..043a592 100644 --- a/lib/wchar.in.h +++ b/lib/wchar.in.h @@ -161,7 +161,8 @@ _GL_CXXALIAS_RPL (btowc, wint_t, (int c)); # if !@HAVE_BTOWC@ _GL_FUNCDECL_SYS (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE); # endif -_GL_CXXALIAS_SYS (btowc, wint_t, (int c)); +/* Need to cast, because on mingw, the return type is 'unsigned short'. */ +_GL_CXXALIAS_SYS_CAST (btowc, wint_t, (int c)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (btowc); -- 2.7.4 --nextPart2780379.qQUk4SkF7i--