From 606b07d2491b9af620d95cb24f193f3533cfb386 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 19 Nov 2014 14:19:05 +0100 Subject: grt: use unlocked version of getc/putc/feof to speed-up files. --- src/grt/grt-cbinding.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/grt/grt-cbinding.c') diff --git a/src/grt/grt-cbinding.c b/src/grt/grt-cbinding.c index b95c0f0..1083d58 100644 --- a/src/grt/grt-cbinding.c +++ b/src/grt/grt-cbinding.c @@ -70,6 +70,30 @@ __ghdl_fprintf_clock (FILE *stream, int a, int b) fprintf (stream, "%3d.%03d", a, b); } +#ifndef getc_unlocked +int +getc_unlocked (FILE *stream) +{ + return getc (stream); +} +#endif + +#ifndef putc_unlocked +int +putc_unlocked (int c, FILE *stream) +{ + return putc (c, stream); +} +#endif + +#ifndef feof_unlocked +int +feof_unlocked (FILE *stream) +{ + return feof (stream); +} +#endif + #ifndef WITH_GNAT_RUN_TIME void __gnat_last_chance_handler (void) -- cgit