summaryrefslogtreecommitdiff
path: root/win32/win32.h
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-02-17 15:17:10 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-02-17 15:17:10 +0000
commit92e4b1b06e10557e1cfce4962b55f4960f6ed5b5 (patch)
treecf75a2e8fc6fd90fd2c907ac0d5af7803bd74452 /win32/win32.h
parente1c29a3f13a8d5ca0f9a4e491a752c73aca1d721 (diff)
* 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
Diffstat (limited to 'win32/win32.h')
-rw-r--r--win32/win32.h25
1 files changed, 21 insertions, 4 deletions
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)
/*