summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/fiddle/closure.c2
-rw-r--r--ext/pty/pty.c4
-rw-r--r--io.c4
-rw-r--r--thread.c2
5 files changed, 11 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index cddfc1c544..8966323c4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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");
diff --git a/io.c b/io.c
index a184c7bbfb..7ae0a86335 100644
--- a/io.c
+++ b/io.c
@@ -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
diff --git a/thread.c b/thread.c
index 38b524e1bc..2ad443807d 100644
--- a/thread.c
+++ b/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()
* would work.
*/
-#if defined(HAVE_POLL) && defined(linux)
+#if defined(HAVE_POLL) && defined(__linux__)
# define USE_POLL
#endif