Web lists-archives.com

[Mingw-users] Problems compiling Gnulib-assisted projects with MinGW runtime 3.22.2




I finally upgraded to the latest MinGW runtime.  Building GDB 7.12
with the updated headers reveals a serious problem with the technique
used by some MinGW standard C headers to exclude portions of them when
included in specific ways.

This post here is just to provide a heads up to anyone who bumps into
the same problems.

You can find the details in my report to Gnulib developers:

  https://lists.gnu.org/archive/html/bug-gnulib/2016-10/msg00007.html

I don't know what will be their response, but personally, I think the
way MinGW headers behave now is not very clean, because any project
that needs to provide replacement/wrapper headers will probably be in
similar trouble.  Let's not forget that almost all projects developed
for Posix platforms that support MinGW always use some part of Gnulib
for that support, so undermining Gnulib is not in our best interests.

My provisional "fix" for these problems was to explicitly include
wchar.h and wctype.h before the headers that include them (string.h
and ctype.h, in this case).  But this solution is, of course, tedious
and not very clean.

Another gripe about 3.22.2 is that strcasecmp and strncasecmp are now
declared in strings.h, which many projects don't bother to include
explicitly, probably because it is somehow indirectly included by some
other header (string.h?).  This causes warnings and errors, and
requires explicit inclusion of strings.h in the affected source files.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe