aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/acinclude.m4
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/acinclude.m4
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/acinclude.m4')
-rw-r--r--libgfortran/acinclude.m416
1 files changed, 16 insertions, 0 deletions
diff --git a/libgfortran/acinclude.m4 b/libgfortran/acinclude.m4
index 1270a98..40ce535 100644
--- a/libgfortran/acinclude.m4
+++ b/libgfortran/acinclude.m4
@@ -386,3 +386,19 @@ AC_DEFUN([LIBGFOR_CHECK_FPSETMASK], [
AC_DEFINE(HAVE_FPSETMASK, 1, [Define if you have fpsetmask.])
fi
])
+
+dnl Check whether we have a mingw that provides a __mingw_snprintf function
+AC_DEFUN([LIBGFOR_CHECK_MINGW_SNPRINTF], [
+ AC_CACHE_CHECK([whether __mingw_snprintf is present], have_mingw_snprintf, [
+ AC_TRY_LINK([
+#include <stdio.h>
+extern int __mingw_snprintf (char *, size_t, const char *, ...);
+],[
+__mingw_snprintf (NULL, 0, "%d\n", 1);
+],
+ eval "have_mingw_snprintf=yes", eval "have_mingw_snprintf=no")
+ ])
+ if test x"$have_mingw_snprintf" = xyes; then
+ AC_DEFINE(HAVE_MINGW_SNPRINTF, 1, [Define if you have __mingw_snprintf.])
+ fi
+])