aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2010-03-08 09:01:55 +0100
committerKai Tietz <ktietz@gcc.gnu.org>2010-03-08 09:01:55 +0100
commit196c8bc8a319d0be3018c66339e00985857bd627 (patch)
tree54205f64411c22ef87b871e28f9f42f5c3d81cd5 /libgfortran/io
parent4bdd4fc006b7fe2f495a1e2ab72948aa1ad9a2a5 (diff)
downloadgcc-196c8bc8a319d0be3018c66339e00985857bd627.zip
gcc-196c8bc8a319d0be3018c66339e00985857bd627.tar.gz
gcc-196c8bc8a319d0be3018c66339e00985857bd627.tar.bz2
libgfortran.h (_POSIX): Define if __MINGW32__ is defined.
2010-03-08 Kai TIetz <kai.tietz@onevision.com> PR/42950 * libgfortran.h (_POSIX): Define if __MINGW32__ is defined. (gfc_printf): Define to gnu_printf for __MINGW32__ case, otherwise to __printf__. (gfc_strtof,gfc_strtod,gfc_strtold): Define for mingw case to POSIX compatible converter functions. (runtime_error): Use instead gfc_printf as formatter attribute name. (runtime_error_at): Likewise. (runtime_warning_at): Likewise. (st_printf): Likewise. * intrinsics/date_and_time.c (localtime_r): Undefine possible defined macro. (gmtime_r): Likewise. * io/read.c (convert_real): Use gfc_strtof, gfc_strtod, and gfc_strtold. From-SVN: r157271
Diffstat (limited to 'libgfortran/io')
-rw-r--r--libgfortran/io/read.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libgfortran/io/read.c b/libgfortran/io/read.c
index 03046b9..43f4b76 100644
--- a/libgfortran/io/read.c
+++ b/libgfortran/io/read.c
@@ -144,25 +144,25 @@ convert_real (st_parameter_dt *dtp, void *dest, const char *buffer, int length)
case 4:
*((GFC_REAL_4*) dest) =
#if defined(HAVE_STRTOF)
- strtof (buffer, NULL);
+ gfc_strtof (buffer, NULL);
#else
- (GFC_REAL_4) strtod (buffer, NULL);
+ (GFC_REAL_4) gfc_strtod (buffer, NULL);
#endif
break;
case 8:
- *((GFC_REAL_8*) dest) = strtod (buffer, NULL);
+ *((GFC_REAL_8*) dest) = gfc_strtod (buffer, NULL);
break;
#if defined(HAVE_GFC_REAL_10) && defined (HAVE_STRTOLD)
case 10:
- *((GFC_REAL_10*) dest) = strtold (buffer, NULL);
+ *((GFC_REAL_10*) dest) = gfc_strtold (buffer, NULL);
break;
#endif
#if defined(HAVE_GFC_REAL_16) && defined (HAVE_STRTOLD)
case 16:
- *((GFC_REAL_16*) dest) = strtold (buffer, NULL);
+ *((GFC_REAL_16*) dest) = gfc_strtold (buffer, NULL);
break;
#endif