Bruno Haible <bruno <at> clisp.org> writes:

> > > +  if test $gl_cv_header_wchar_h_correct_inline = no; then
> > > +    AC_MSG_ERROR([<wchar.h> cannot be used with this compiler ($CC 
$CFLAGS).
> > 
> > Must we error out, or can we use AC_DEFINE/AC_SUBST to make our <wchar.h> 
> > substitute work around the problem by never calling #include_next?
> 
> I think we would lose too much glibc functionality in this case. Starting with
> the precise definition of mbstate_t, up to the support for -mlong-double-64.

Good points.  I think you've convinced me that AC_MSG_ERROR is the right thing 
to do here.

> Additionally, glibc's <wchar.h> is so broken that many packages that don't use
> gnulib won't compile either, with -std=gnu99. We do a favour to the user if
> we tell him to fix his system.

Maybe there's one more option we can/should mention.  If I understand the issue 
correctly, then if your gcc supports -fgnu89-inline, you can work around the 
issue by specifying CFLAGS='-fgnu89-inline' at configure time.

But I'm okay with the patch, whether or not you decide to add that.

-- 
Eric Blake




Reply via email to