[前][次][番号順一覧][スレッド一覧]

ruby-changes:21712

From: akr <ko1@a...>
Date: Tue, 15 Nov 2011 20:10:13 +0900 (JST)
Subject: [ruby-changes:21712] akr:r33761 (trunk): * io.c, thread.c, ext/pty/pty.c, ext/fiddle/closure.c: use

akr	2011-11-15 20:09:47 +0900 (Tue, 15 Nov 2011)

  New Revision: 33761

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33761

  Log:
    * io.c, thread.c, ext/pty/pty.c, ext/fiddle/closure.c: use
      __linux__ macro for consistency.

  Modified files:
    trunk/ChangeLog
    trunk/ext/fiddle/closure.c
    trunk/ext/pty/pty.c
    trunk/io.c
    trunk/thread.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 33760)
+++ ChangeLog	(revision 33761)
@@ -1,3 +1,8 @@
+Tue Nov 15 20:08:55 2011  Tanaka Akira  <akr@f...>
+
+	* 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@g...>
 
 	* include/ruby/ruby.h(NUM2LONG, NUM2INT, NUM2SHORT, NUM2LL,
Index: io.c
===================================================================
--- io.c	(revision 33760)
+++ io.c	(revision 33761)
@@ -8289,7 +8289,7 @@
 # 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 @@
 #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
Index: thread.c
===================================================================
--- thread.c	(revision 33760)
+++ thread.c	(revision 33761)
@@ -2702,7 +2702,7 @@
  * 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
 
Index: ext/pty/pty.c
===================================================================
--- ext/pty/pty.c	(revision 33760)
+++ ext/pty/pty.c	(revision 33761)
@@ -256,7 +256,7 @@
     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 @@
     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");
Index: ext/fiddle/closure.c
===================================================================
--- ext/fiddle/closure.c	(revision 33760)
+++ ext/fiddle/closure.c	(revision 33761)
@@ -10,7 +10,7 @@
     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
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]