summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2009-01-02 11:23:10 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2009-01-02 11:23:10 +0000
commit7e18fbae543b78ffd9a3359eac1a8cf4f9c7a568 (patch)
treea4a79ed19c6b75a97cf9f3984b4b17b85a4ee2a8 /runtime
parent322dc1ce00a3155194d2f636fd0b1ef7b5c9cb37 (diff)
Some cleanups
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@937 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'runtime')
-rw-r--r--runtime/stdio.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/runtime/stdio.h b/runtime/stdio.h
index 27a4313..de573a3 100644
--- a/runtime/stdio.h
+++ b/runtime/stdio.h
@@ -16,7 +16,11 @@
#ifndef _COMPCERT_STDIO_H
#define _COMPCERT_STDIO_H
+#ifdef __GNUC__
+#include_next "stdio.h"
+#else
#include "/usr/include/stdio.h"
+#endif
typedef struct compcert_FILE_ { void * fstr; } compcert_FILE;
@@ -71,11 +75,16 @@ extern int compcert_ungetc(int, compcert_FILE *);
#define fseek compcert_fseek
#define ftell compcert_ftell
#define fwrite compcert_fwrite
+#undef getc
#define getc compcert_getc
+#undef getchar
+#define getchar() compcert_getc(compcert_stdin)
+#undef putc
#define putc compcert_putc
+#undef putchar
+#define putchar(c) compcert_putc(c, compcert_stdout)
#define rewind compcert_rewind
#define ungetc compcert_ungetc
-#define vfprintf compcert_vfprintf
#endif
#endif