bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

wctype.h compile error on mingw with GNULIB_NAMESPACE


From: Christian Biesinger
Subject: wctype.h compile error on mingw with GNULIB_NAMESPACE
Date: Sat, 16 Nov 2019 16:41:24 -0600

Hello Bruno,

On Sat, Nov 16, 2019 at 6:15 AM Bruno Haible <address@hidden> wrote:
>
> This patch fixes the issue. The cause was that the contents of <time.h>
> in mingw depends on whether <unistd.h> or <pthread.h> was included before.

thank you! That does seem to fix the issue (although it requires
deleting config.cache :( )

I tried to upgrade gnulib instead of patching it and found another
problem, introduced sometime between commits
38237baf99386101934cd93278023aa4ae523ec0 and
b7bf9f4361c8d78ccfda7a30ff31f7a406ea972e (hence my subject change).
Specifically, this testcase:

#define GNULIB_NAMESPACE gnulib
#include "gnulib/config.h"
#include "wctype.h"

x86_64-w64-mingw32-g++ -c test.cc -I build/gnulib/import/ -I
binutils-gdb/gnulib/import/

Fails with errors like:
gnulib/import/wctype.h: In member function
‘gnulib::_gl_iswalnum_wrapper::operator
gnulib::_gl_iswalnum_wrapper::type() const’:
gnulib/import/wctype.h:856:1: error: invalid conversion from ‘int
(*)(wint_t)’ {aka ‘int (*)(short unsigned int)’} to
‘gnulib::_gl_iswalnum_wrapper::type’ {aka ‘int (*)(unsigned int)’}
[-fpermissive]
 _GL_CXXALIAS_SYS (iswalnum, int, (wint_t wc));
 ^~~~~~~~~~~~~~~~

(and followed by many other is* functions)

This only fails with GNULIB_NAMESPACE defined (this is, I think, the
only file in gdb that does define it)

Any thoughts on this one? Let me know if you need any more data
(config.log, etc.)

Christian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]