diff options
-rw-r--r-- | translate/grt/grt-astdio.adb | 11 | ||||
-rw-r--r-- | translate/grt/grt-cbinding.c | 4 |
2 files changed, 6 insertions, 9 deletions
diff --git a/translate/grt/grt-astdio.adb b/translate/grt/grt-astdio.adb index ea1b471..ee264cf 100644 --- a/translate/grt/grt-astdio.adb +++ b/translate/grt/grt-astdio.adb @@ -159,14 +159,11 @@ package body Grt.Astdio is procedure Put_F64 (Stream : FILEs; F64 : Ghdl_F64) is - procedure fprintf (Stream : FILEs; - Template : System.Address; - Arg : Ghdl_F64); - pragma Import (C, fprintf); - - Str : constant String := "%g" & Character'Val (0); + procedure Fprintf_G (Stream : FILEs; + Arg : Ghdl_F64); + pragma Import (C, Fprintf_G, "__ghdl_fprintf_g"); begin - fprintf (Stream, Str'Address, F64); + Fprintf_G (Stream, F64); end Put_F64; Hex_Map : constant array (0 .. 15) of Character := "0123456789ABCDEF"; diff --git a/translate/grt/grt-cbinding.c b/translate/grt/grt-cbinding.c index 61e474d..1f37d29 100644 --- a/translate/grt/grt-cbinding.c +++ b/translate/grt/grt-cbinding.c @@ -39,9 +39,9 @@ __ghdl_get_stderr (void) } void -__ghdl_snprintf_g (char *buf, int len, double val) +__ghdl_fprintf_g (FILE *stream, double val) { - snprintf (buf, len, "%g", val); + fprintf (stream, "%g", val); } static int run_env_en; |