* io.c, thread.c, ext/pty/pty.c, ext/fiddle/closure.c: use
__linux__ macro for consistency. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e4081877a8
commit
3d25acdccc
@ -1,3 +1,8 @@
|
|||||||
|
Tue Nov 15 20:08:55 2011 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* io.c, thread.c, ext/pty/pty.c, ext/fiddle/closure.c: use
|
||||||
|
__linux__ macro for consistency.
|
||||||
|
|
||||||
Tue Nov 15 14:45:15 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
Tue Nov 15 14:45:15 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||||
|
|
||||||
* include/ruby/ruby.h(NUM2LONG, NUM2INT, NUM2SHORT, NUM2LL,
|
* include/ruby/ruby.h(NUM2LONG, NUM2INT, NUM2SHORT, NUM2LL,
|
||||||
|
@ -10,7 +10,7 @@ typedef struct {
|
|||||||
ffi_type **argv;
|
ffi_type **argv;
|
||||||
} fiddle_closure;
|
} fiddle_closure;
|
||||||
|
|
||||||
#if defined(MACOSX) || defined(__linux) || defined(__OpenBSD__)
|
#if defined(MACOSX) || defined(__linux__) || defined(__OpenBSD__)
|
||||||
#define DONT_USE_FFI_CLOSURE_ALLOC
|
#define DONT_USE_FFI_CLOSURE_ALLOC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -256,7 +256,7 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg,
|
|||||||
if ((slavefd = rb_cloexec_open(slavedevice, O_RDWR|O_NOCTTY, 0)) == -1) goto error;
|
if ((slavefd = rb_cloexec_open(slavedevice, O_RDWR|O_NOCTTY, 0)) == -1) goto error;
|
||||||
rb_update_max_fd(slavefd);
|
rb_update_max_fd(slavefd);
|
||||||
|
|
||||||
#if defined I_PUSH && !defined linux
|
#if defined(I_PUSH) && !defined(__linux__)
|
||||||
if (ioctl(slavefd, I_PUSH, "ptem") == -1) goto error;
|
if (ioctl(slavefd, I_PUSH, "ptem") == -1) goto error;
|
||||||
if (ioctl(slavefd, I_PUSH, "ldterm") == -1) goto error;
|
if (ioctl(slavefd, I_PUSH, "ldterm") == -1) goto error;
|
||||||
if (ioctl(slavefd, I_PUSH, "ttcompat") == -1) goto error;
|
if (ioctl(slavefd, I_PUSH, "ttcompat") == -1) goto error;
|
||||||
@ -340,7 +340,7 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg,
|
|||||||
if (no_mesg(slavedevice, nomesg) == -1) goto error;
|
if (no_mesg(slavedevice, nomesg) == -1) goto error;
|
||||||
if((slavefd = rb_cloexec_open(slavedevice, O_RDWR, 0)) == -1) goto error;
|
if((slavefd = rb_cloexec_open(slavedevice, O_RDWR, 0)) == -1) goto error;
|
||||||
rb_update_max_fd(slavefd);
|
rb_update_max_fd(slavefd);
|
||||||
#if defined I_PUSH && !defined linux
|
#if defined(I_PUSH) && !defined(__linux__)
|
||||||
if(ioctl(slavefd, I_PUSH, "ptem") == -1) goto error;
|
if(ioctl(slavefd, I_PUSH, "ptem") == -1) goto error;
|
||||||
if(ioctl(slavefd, I_PUSH, "ldterm") == -1) goto error;
|
if(ioctl(slavefd, I_PUSH, "ldterm") == -1) goto error;
|
||||||
ioctl(slavefd, I_PUSH, "ttcompat");
|
ioctl(slavefd, I_PUSH, "ttcompat");
|
||||||
|
4
io.c
4
io.c
@ -8289,7 +8289,7 @@ rb_f_syscall(int argc, VALUE *argv)
|
|||||||
# else
|
# else
|
||||||
# error ---->> it is asserted that __syscall takes the first argument and returns retval in 64bit signed integer. <<----
|
# error ---->> it is asserted that __syscall takes the first argument and returns retval in 64bit signed integer. <<----
|
||||||
# endif
|
# endif
|
||||||
#elif defined linux
|
#elif defined(__linux__)
|
||||||
# define SYSCALL syscall
|
# define SYSCALL syscall
|
||||||
# define NUM2SYSCALLID(x) NUM2LONG(x)
|
# define NUM2SYSCALLID(x) NUM2LONG(x)
|
||||||
# define RETVAL2NUM(x) LONG2NUM(x)
|
# define RETVAL2NUM(x) LONG2NUM(x)
|
||||||
@ -9168,7 +9168,7 @@ nogvl_copy_stream_sendfile(struct copy_stream_struct *stp)
|
|||||||
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
|
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
|
||||||
case EWOULDBLOCK:
|
case EWOULDBLOCK:
|
||||||
#endif
|
#endif
|
||||||
#ifndef linux
|
#ifndef __linux__
|
||||||
/*
|
/*
|
||||||
* Linux requires stp->src_fd to be a mmap-able (regular) file,
|
* Linux requires stp->src_fd to be a mmap-able (regular) file,
|
||||||
* select() reports regular files to always be "ready", so
|
* select() reports regular files to always be "ready", so
|
||||||
|
2
thread.c
2
thread.c
@ -2702,7 +2702,7 @@ rb_thread_fd_select(int max, rb_fdset_t * read, rb_fdset_t * write, rb_fdset_t *
|
|||||||
* one we know of that supports using poll() in all places select()
|
* one we know of that supports using poll() in all places select()
|
||||||
* would work.
|
* would work.
|
||||||
*/
|
*/
|
||||||
#if defined(HAVE_POLL) && defined(linux)
|
#if defined(HAVE_POLL) && defined(__linux__)
|
||||||
# define USE_POLL
|
# define USE_POLL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user