diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-10 03:07:24 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-10 03:07:24 +0000 |
commit | 9594f68f5011005935de3388a7d00a6991eab774 (patch) | |
tree | e1f8e1da66c55147b3b1427edf64348c58aaef2d /win32 | |
parent | 1f9da5e23cb663cb22c820d60c0903495e916d56 (diff) | |
download | ruby-9594f68f5011005935de3388a7d00a6991eab774.tar.gz ruby-9594f68f5011005935de3388a7d00a6991eab774.tar.xz ruby-9594f68f5011005935de3388a7d00a6991eab774.zip |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@7938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r-- | win32/win32.c | 17 | ||||
-rw-r--r-- | win32/win32.h | 3 |
2 files changed, 18 insertions, 2 deletions
diff --git a/win32/win32.c b/win32/win32.c index 92d00166b..166d58e79 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) diff --git a/win32/win32.h b/win32/win32.h index 916e8ce27..58538b26e 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -105,7 +105,6 @@ extern "C++" { #define eof() _eof() #define filelength(h) _filelength(h) #define mktemp(t) _mktemp(t) -#define read(h, b, l) _read(h, b, l) #define tell(h) _tell(h) #define unlink(p) _unlink(p) #define write(h, b, l) _write(h, b, l) @@ -205,7 +204,7 @@ extern int rb_w32_rmdir(const char *); #ifdef __BORLANDC__ extern int rb_w32_fstat(int, struct stat *); extern FILE *rb_w32_fopen(const char *, const char *); -extern FILE *rb_w32_fdopen(int, char *); +extern FILE *rb_w32_fdopen(int, const char *); extern FILE *rb_w32_fsopen(const char *, const char *, int); #endif |