diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/fiddle/closure.c | 2 | ||||
-rw-r--r-- | ext/pty/pty.c | 4 | ||||
-rw-r--r-- | io.c | 4 | ||||
-rw-r--r-- | thread.c | 2 |
5 files changed, 11 insertions, 6 deletions
@@ -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> * include/ruby/ruby.h(NUM2LONG, NUM2INT, NUM2SHORT, NUM2LL, diff --git a/ext/fiddle/closure.c b/ext/fiddle/closure.c index 542d978395..962f9267fe 100644 --- a/ext/fiddle/closure.c +++ b/ext/fiddle/closure.c @@ -10,7 +10,7 @@ typedef struct { ffi_type **argv; } fiddle_closure; -#if defined(MACOSX) || defined(__linux) || defined(__OpenBSD__) +#if defined(MACOSX) || defined(__linux__) || defined(__OpenBSD__) #define DONT_USE_FFI_CLOSURE_ALLOC #endif diff --git a/ext/pty/pty.c b/ext/pty/pty.c index 4b28fd9f29..d7e6f3d8bb 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -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; 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, "ldterm") == -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((slavefd = rb_cloexec_open(slavedevice, O_RDWR, 0)) == -1) goto error; 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, "ldterm") == -1) goto error; ioctl(slavefd, I_PUSH, "ttcompat"); @@ -8289,7 +8289,7 @@ rb_f_syscall(int argc, VALUE *argv) # else # error ---->> it is asserted that __syscall takes the first argument and returns retval in 64bit signed integer. <<---- # endif -#elif defined linux +#elif defined(__linux__) # define SYSCALL syscall # define NUM2SYSCALLID(x) NUM2LONG(x) # define RETVAL2NUM(x) LONG2NUM(x) @@ -9168,7 +9168,7 @@ nogvl_copy_stream_sendfile(struct copy_stream_struct *stp) #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN case EWOULDBLOCK: #endif -#ifndef linux +#ifndef __linux__ /* * Linux requires stp->src_fd to be a mmap-able (regular) file, * select() reports regular files to always be "ready", so @@ -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() * would work. */ -#if defined(HAVE_POLL) && defined(linux) +#if defined(HAVE_POLL) && defined(__linux__) # define USE_POLL #endif |