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

ruby-changes:35968

From: nobu <ko1@a...>
Date: Mon, 20 Oct 2014 15:58:33 +0900 (JST)
Subject: [ruby-changes:35968] nobu:r48049 (trunk): error.c: check if EWOULDBLOCK is defined

nobu	2014-10-20 15:58:16 +0900 (Mon, 20 Oct 2014)

  New Revision: 48049

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

  Log:
    error.c: check if EWOULDBLOCK is defined
    
    * error.c (set_syserr): EWOULDBLOCK may not be defined, check if
      defined first.

  Modified files:
    trunk/error.c
Index: error.c
===================================================================
--- error.c	(revision 48048)
+++ error.c	(revision 48049)
@@ -1290,19 +1290,19 @@ set_syserr(int n, const char *name) https://github.com/ruby/ruby/blob/trunk/error.c#L1290
 
 	/* capture nonblock errnos for WaitReadable/WaitWritable subclasses */
 	switch (n) {
-	    case EAGAIN:
-	        rb_eEAGAIN = error;
+	  case EAGAIN:
+	    rb_eEAGAIN = error;
 
-#if EAGAIN != EWOULDBLOCK
-                break;
-	    case EWOULDBLOCK:
+#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
+	    break;
+	  case EWOULDBLOCK:
 #endif
 
-		rb_eEWOULDBLOCK = error;
-		break;
-	    case EINPROGRESS:
-		rb_eEINPROGRESS = error;
-		break;
+	    rb_eEWOULDBLOCK = error;
+	    break;
+	  case EINPROGRESS:
+	    rb_eEINPROGRESS = error;
+	    break;
 	}
 
 	rb_define_const(error, "Errno", INT2NUM(n));

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

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