[libgfortran,patch] Use __mingw_snprintf instead of snprintf when possible

François-Xavier Coudert fxcoudert@gmail.com
Wed Aug 22 13:54:00 GMT 2007


:ADDPATCH libgfortran:

Attached patch adds a new configure check to libgfortran, to detect
the availability of __mingw_snprintf(). When detected, this function
is used instead of snprintf() by redefining snprintf() as a macro in
libgfortran.h.

The __mingw_snprintf() was created by mingw developers to circumvent
the shortcomings of Windows' vsnprintf(), which (among other issues)
doesn't handle long doubles. With this patch, we can allow gfortran
and libgfortran to use real(kind=10) on i386-pc-mingw32, and can
finally build a working compiler and library without any patch to the
front-end (previously, it required disabling the use of long doubles
in trans-types.c).

Built and tested (but not regtested, as it requires a very weird setup
on mingw) on i386-pc-mingw32, OK to commit?

FX
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mingw_snprintf.ChangeLog
Type: application/octet-stream
Size: 341 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070822/8fc623a6/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mingw_snprintf.diff
Type: application/octet-stream
Size: 5991 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070822/8fc623a6/attachment-0001.obj>


More information about the Gcc-patches mailing list