From 80f43309730056cffbf29fd4e11a24643900f55e Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 10 Feb 2005 03:07:24 +0000 Subject: * bcc32/Makefile.sub (COMMON_LIBS): add libraries included in import32.lib. * lib/mkmf.rb (create_makefile): restrict prefixing with srcdir to rule lines, add search path to implicit rules, and set Borland make special macros for search path. * win32/win32.c, win32/win32.h (read): aboid a BCC runtime bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- win32/win32.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'win32/win32.c') diff --git a/win32/win32.c b/win32/win32.c index 92d00166bd..166d58e792 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -3244,6 +3244,23 @@ catch_interrupt(void) CHECK_INTS; } +#if defined __BORLANDC__ || defined _WIN32_WCE +#undef read +int +read(int fd, void *buf, size_t size) +{ + int trap_immediate = rb_trap_immediate; + int ret = _read(fd, buf, size); + if ((ret < 0) && (errno == EPIPE)) { + errno = 0; + ret = 0; + } + rb_trap_immediate = trap_immediate; + catch_interrupt(); + return ret; +} +#endif + #undef fgetc int rb_w32_getc(FILE* stream) -- cgit v1.2.3