久しぶりに更新された MinGW runtime と w32api ですが、Glib をコンパイルできないという不具合に遭遇しました。MinGW runtime の更新した箇所は、
リリースノートによると次の様になっています。
Notes:
New features in release 3.15
============================
* Package names have been rationalised, to clearly identify the supported
OS platform as `mingw32'; the generic package name has been shortened
from `mingw-runtime' to `mingwrt'.
* The MinGW DLL, for threads support, has been made available in a
package qualified by the `dll' suffix, separately from the development
headers and libraries, which may be found in the package qualified by
the `dev' suffix; as previously, source code is provided in the package
qualified by the `src' prefix.
* A replacement implementation for MinGW's snprintf() and vsnprintf()
functions is provided; this further extends the scope of replacement
to include printf(), fprintf(), sprintf(), vprintf(), vfprintf()
and vsprintf() featuring:--
- Full support for *all* of the *standard* format conversion specs
mandated by ISO-C99 and POSIX, (excluding POSIX-XSI extensions).
- Microsoft's non-standard format conversion specs also supported.
- Correct formatting of values with MinGW's long double data type.
- Microsoft's convention of printing at least three exponent digits,
for "%e" format, (and for "%g" when appropriate), is retained as
default; support for _set_output_format(_TWO_DIGIT_EXPONENT) is
included, for users of MSVCR80.DLL (and later).
- Users preferring the ISO-C99/POSIX standard of only two exponent
digits may set PRINTF_EXPONENT_DIGITS=2, in the environment; this
capability is supported by all of the MinGW replacement functions
named above, and overrides all Microsoft specific conventions, for
users of all versions of MSVCRT.
As in previous releases, the MinGW implementations of snprintf() and
vsnprintf() are the default for these two functions, with the MSVCRT
alternatives being called as _snprintf() and _vsnprintf().
In the case of the other six replacement functions, MSVCRT provides
no underscore decorated name by which they may be invoked; thus, the
MSVCRT implementation for these remains the default. To enable the
MinGW replacements for these six functions, users may employ any one
(or more) of the following, (and *must* #include stdio.h):--
- Include the `-posix' option, in the GCC command, when compiling.
- Compile with the `-ansi' option, or any of the `-std' options
which causes __STRICT_ANSI__ to be defined.
- Define any of __STRICT_ANSI__, _ISOC99_SOURCE, _POSIX_SOURCE,
_POSIX_C_SOURCE, _GNU_SOURCE, _BSD_SOURCE, _SVID_SOURCE,
_XOPEN_SOURCE or _XOPEN_SOURCE_EXTENDED, *before* including
*any* system header file, and in particular stdio.h, (which
*must* be included).
- Define __USE_MINGW_ANSI_STDIO with a non-zero value, *before*
including *any* system header file.
- Define __MINGW_FEATURES__ to represent any odd valued unsigned
long long integer, (i.e. __MINGW_FEATURES__ & 0x1ULL == 0x1ULL),
*before* including *any* system header file.
N.B. *All* of the above techniques, which induce the selection of
the MinGW replacement functions may be overridden, by *explicitly*
defining __USE_MINGW_ANSI_STDIO as zero, *before* including *any*
system header file.
When the MinGW replacement functions have been selected, by any of
the above methods, the original MSVCRT function may be invoked by
prefixing `__msvcrt_' to the function name, e.g. __msvcrt_printf().
* A replacement implementation for the getopt() family of functions,
adding support for the GNU getopt_long_only() function. Users
should note that this intentionally *removes* support for the BSD
or Mac OS-X specific, and non-standard, `optreset' global variable;
to reset the getopt() scanner, use `optind = 0;' instead of relying
on this non-standard, non-portable and now-unsupported feature.
(以下略)
snprintf() と vsnprintf() をいじっているようですが、(従来と同様に)オプションなしで Glib コンパイルすると、まさにこれらの関数を利用する箇所でコンパイルがコケます。いくつかコンパイルにマクロを定義してトライしてみましたが、最後までコンパイルできません。MinGW のメーリングリストをちゃんと読んでおらず、今回の変更の背景が分かりませんし、今までの MinGW runtime では普通にコンパイルできていたので、とりあえず、新しい MinGW runtime と w32api を [Under testing] のカテゴリに移しました。