aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/libgfortran.h
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>2007-08-23 13:03:35 +0000
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2007-08-23 13:03:35 +0000
commitdb8092dc4c678051e1d4e3935a901dbeeef95562 (patch)
tree9abbc0a4bb0fdbe3f645d62bc422147e4a4c80db /libgfortran/libgfortran.h
parentb73aff3657492d5425e780ec650f2c00658a73de (diff)
downloadgcc-db8092dc4c678051e1d4e3935a901dbeeef95562.zip
gcc-db8092dc4c678051e1d4e3935a901dbeeef95562.tar.gz
gcc-db8092dc4c678051e1d4e3935a901dbeeef95562.tar.bz2
re PR libfortran/23138 ([mingw32] real(16) values are printed incorrectly)
PR libfortran/23138 * acinclude.m4 (LIBGFOR_CHECK_MINGW_SNPRINTF): New check. * configure.ac: Use LIBGFOR_CHECK_MINGW_SNPRINTF. * libgfortran.h: If HAVE_MINGW_SNPRINTF is true, use __mingw_snprintf instead of snprintf. * config.h.in: Regenerate. * configure: Regenerate. From-SVN: r127739
Diffstat (limited to 'libgfortran/libgfortran.h')
-rw-r--r--libgfortran/libgfortran.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h
index ce6d28e..6c687f7 100644
--- a/libgfortran/libgfortran.h
+++ b/libgfortran/libgfortran.h
@@ -70,6 +70,16 @@ typedef off_t gfc_offset;
#endif
+/* On mingw, work around the buggy Windows snprintf() by using the one
+ mingw provides, __mingw_snprintf(). We also provide a prototype for
+ __mingw_snprintf(), because the mingw headers currently don't have one. */
+#if HAVE_MINGW_SNPRINTF
+extern int __mingw_snprintf (char *, size_t, const char *, ...);
+#undef snprintf
+#define snprintf __mingw_snprintf
+#endif
+
+
/* For a library, a standard prefix is a requirement in order to partition
the namespace. IPREFIX is for symbols intended to be internal to the
library. */