bug-gettext
[Top][All Lists]
Advanced

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

[bug #57406] mbsinit.c fails to compile with GCC 9.2.0 on MinGW-w64 (i68


From: Bruno Haible
Subject: [bug #57406] mbsinit.c fails to compile with GCC 9.2.0 on MinGW-w64 (i686)
Date: Tue, 17 Dec 2019 05:10:15 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0

Update of bug #57406 (project gettext):

                  Status:               Need Info => Fixed                  
             Assigned to:                    None => haible                 
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #5:

Hi Martin,

Thank you for your explanations; it saved me a couple of hours of
investigation work.

> the first patch is included in the v7.0.0 stable release from November.

OK, I've looked at this release and pushed a (probable) fix into gnulib:
https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=f61573abd91da7f722b8b4a1dc97bea9b81b17a3

It will propagate into packages over time. So that you can test it now, I've
built a testdir from the gnulib sources:
https://haible.de/bruno/gnu/testdir-posix-mingw.tar.gz

> Since a couple years, mingw-w64 can be configured to use the new Windows 10
UCRT

I didn't know of this. I'm always using and testing what the mingw-w64
packages from Cygwin give me by default.

> Currently with UCRT, there's only a header inline definition of mbsinit

Since
1) POSIX mandates and gnulib expects that functions are actually available as
function pointers,
2) Gnulib cannot attach a warning message to an inline function, only to
functions declared with an 'extern' prototype,
this is likely to cause trouble.
Possibly symptoms of this trouble are:
- a syntax error in gnulib's wchar.h override,
- a compilation failure in test-wchar.c or test-wchar-c++.cc.
This trouble can be worked around in gnulib, of course, but it would be better
if it were not present in the first place.

> If I make mingw-w64 provide an mbsinit function in libraries for UCRT (the
second patch above), the gnulib build breaks ...
> I don't know off-hand what the best path forward would be.

How about simply waiting one year or two, then only add the mbsinit function
in mingw-w64? This would give the packages (bison, coreutils, cpio, diffutils,
gettext, grep, sed, tar, ...) time to pick up the gnulib change from today and
prepare a new release.

The 7.0.0 release is out of the door; therefore third-party software must
interoperate with it, regardless whether you add the mbsinit function now in
7.0.1 or later in 7.x.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57406>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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