* win32/win32.c (rb_w32_{getc,putc}): removed. they are needed for old
ruby (before 1.8), but not now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7bf5ba1b49
commit
c15a74f3d0
@ -1,3 +1,8 @@
|
|||||||
|
Fri Apr 24 10:40:02 2015 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* win32/win32.c (rb_w32_{getc,putc}): removed. they are needed for old
|
||||||
|
ruby (before 1.8), but not now.
|
||||||
|
|
||||||
Fri Apr 24 08:40:13 2015 NARUSE, Yui <naruse@ruby-lang.org>
|
Fri Apr 24 08:40:13 2015 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* win32/win32.c: remove bcc related code.
|
* win32/win32.c: remove bcc related code.
|
||||||
|
@ -128,27 +128,11 @@ typedef int clockid_t;
|
|||||||
#define CLOCK_REALTIME 0
|
#define CLOCK_REALTIME 0
|
||||||
#define CLOCK_MONOTONIC 1
|
#define CLOCK_MONOTONIC 1
|
||||||
|
|
||||||
#undef getc
|
|
||||||
#undef putc
|
|
||||||
#undef fgetc
|
|
||||||
#undef fputc
|
|
||||||
#undef getchar
|
|
||||||
#undef putchar
|
|
||||||
#undef fgetchar
|
|
||||||
#undef fputchar
|
|
||||||
#undef utime
|
#undef utime
|
||||||
#undef lseek
|
#undef lseek
|
||||||
#undef stat
|
#undef stat
|
||||||
#undef fstat
|
#undef fstat
|
||||||
#define getc(_stream) rb_w32_getc(_stream)
|
|
||||||
#define getchar() rb_w32_getc(stdin)
|
|
||||||
#define putc(_c, _stream) rb_w32_putc(_c, _stream)
|
|
||||||
#define putchar(_c) rb_w32_putc(_c, stdout)
|
|
||||||
#ifdef RUBY_EXPORT
|
#ifdef RUBY_EXPORT
|
||||||
#define fgetc(_stream) getc(_stream)
|
|
||||||
#define fputc(_c, _stream) putc(_c, _stream)
|
|
||||||
#define fgetchar() getchar()
|
|
||||||
#define fputchar(_c) putchar(_c)
|
|
||||||
#define utime(_p, _t) rb_w32_utime(_p, _t)
|
#define utime(_p, _t) rb_w32_utime(_p, _t)
|
||||||
#define lseek(_f, _o, _w) _lseeki64(_f, _o, _w)
|
#define lseek(_f, _o, _w) _lseeki64(_f, _o, _w)
|
||||||
|
|
||||||
@ -730,8 +714,6 @@ struct tm *localtime_r(const time_t *, struct tm *);
|
|||||||
|
|
||||||
/* thread stuff */
|
/* thread stuff */
|
||||||
int rb_w32_sleep(unsigned long msec);
|
int rb_w32_sleep(unsigned long msec);
|
||||||
int rb_w32_putc(int, FILE*);
|
|
||||||
int rb_w32_getc(FILE*);
|
|
||||||
int rb_w32_open(const char *, int, ...);
|
int rb_w32_open(const char *, int, ...);
|
||||||
int rb_w32_uopen(const char *, int, ...);
|
int rb_w32_uopen(const char *, int, ...);
|
||||||
int rb_w32_wopen(const WCHAR *, int, ...);
|
int rb_w32_wopen(const WCHAR *, int, ...);
|
||||||
|
@ -5530,46 +5530,7 @@ rb_w32_times(struct tms *tmbuf)
|
|||||||
#define yield_once() Sleep(0)
|
#define yield_once() Sleep(0)
|
||||||
#define yield_until(condition) do yield_once(); while (!(condition))
|
#define yield_until(condition) do yield_once(); while (!(condition))
|
||||||
|
|
||||||
/* License: Ruby's */
|
|
||||||
static void
|
|
||||||
catch_interrupt(void)
|
|
||||||
{
|
|
||||||
yield_once();
|
|
||||||
RUBY_CRITICAL(rb_w32_wait_events(NULL, 0, 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
#undef fgetc
|
|
||||||
/* License: Ruby's */
|
|
||||||
int
|
|
||||||
rb_w32_getc(FILE* stream)
|
|
||||||
{
|
|
||||||
int c;
|
|
||||||
if (enough_to_get(FILE_COUNT(stream))) {
|
|
||||||
c = (unsigned char)*FILE_READPTR(stream)++;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
c = _filbuf(stream);
|
|
||||||
catch_interrupt();
|
|
||||||
}
|
|
||||||
return c;
|
|
||||||
}
|
|
||||||
|
|
||||||
#undef fputc
|
|
||||||
/* License: Ruby's */
|
|
||||||
int
|
|
||||||
rb_w32_putc(int c, FILE* stream)
|
|
||||||
{
|
|
||||||
if (enough_to_put(FILE_COUNT(stream))) {
|
|
||||||
c = (unsigned char)(*FILE_READPTR(stream)++ = (char)c);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
c = _flsbuf(c, stream);
|
|
||||||
catch_interrupt();
|
|
||||||
}
|
|
||||||
return c;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* License: Ruby's */
|
|
||||||
struct asynchronous_arg_t {
|
struct asynchronous_arg_t {
|
||||||
/* output field */
|
/* output field */
|
||||||
void* stackaddr;
|
void* stackaddr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user