From 92e4b1b06e10557e1cfce4962b55f4960f6ed5b5 Mon Sep 17 00:00:00 2001 From: usa Date: Sat, 17 Feb 2001 15:17:10 +0000 Subject: * win32/win32.c: fasten file I/O on mswin32/mingw32. * win32/win32.h: ditto. * rubysig.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- win32/win32.h | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'win32/win32.h') diff --git a/win32/win32.h b/win32/win32.h index ffbe967703..1ffe7faa70 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -112,6 +112,23 @@ extern "C++" { #define pid_t int #define WNOHANG -1 +#undef getc +#undef putc +#undef fgetc +#undef fputc +#undef getchar +#undef putchar +#undef fgetchar +#undef fputchar +#define getc(_stream) win32_getc(_stream) +#define putc(_c, _stream) win32_putc(_c, _stream) +#define fgetc(_stream) getc(_stream) +#define fputc(_c, _stream) putc(_c, _stream) +#define getchar() win32_getc(stdin) +#define putchar(_c) win32_putc(_c, stdout) +#define fgetchar(_stream) getchar() +#define fputchar(_c, _stream) putchar(_c) + #define access _access #define chmod _chmod #define chsize _chsize @@ -427,10 +444,10 @@ struct tms { HANDLE GetCurrentThreadHandle(void); int win32_main_context(int arg, void (*handler)(int)); int win32_sleep(unsigned long msec); -void win32_enter_syscall(void); -void win32_leave_syscall(void); -void win32_disable_interrupt(void); -void win32_enable_interrupt(void); +void win32_enter_critical(void); +void win32_leave_critical(void); +int win32_putc(int, FILE*); +int win32_getc(FILE*); #define Sleep(msec) (void)win32_sleep(msec) /* -- cgit v1.2.3