Created
September 25, 2009 09:17
-
-
Save deepj/193424 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ext/cmain.cpp b/ext/cmain.cpp | |
index 76d5c4d..5004251 100644 | |
--- a/ext/cmain.cpp | |
if (Fd < 0) | |
return errno; | |
// From here on, all early returns MUST close Fd. | |
- | |
+ #undef fstat | |
+ #undef stat | |
struct stat st; | |
if (fstat (Fd, &st)) { | |
int e = errno; | |
diff --git a/ext/ed.cpp b/ext/ed.cpp | |
index 03c0a25..25083cf 100644 | |
--- a/ext/ed.cpp | |
+++ b/ext/ed.cpp | |
@@ -540,7 +540,7 @@ void ConnectionDescriptor::Read() | |
int total_bytes_read = 0; | |
char readbuffer [16 * 1024 + 1]; | |
- for (int i=0; i < 10; i++) { | |
+ for (int i=0; i < 1; i++) { | |
// Don't read just one buffer and then move on. This is faster | |
// if there is a lot of incoming. | |
// But don't read indefinitely. Give other sockets a chance to run. | |
diff --git a/ext/rubymain.cpp b/ext/rubymain.cpp | |
index 278bde2..c2de14c 100644 | |
--- a/ext/rubymain.cpp | |
+++ b/ext/rubymain.cpp | |
@@ -387,7 +387,11 @@ t_set_comm_inactivity_timeout | |
static VALUE t_set_comm_inactivity_timeout (VALUE self, VALUE signature, VALUE timeout) | |
{ | |
- float ti = RFLOAT_VALUE(timeout); | |
+ #ifdef HAVE_RB_THREAD_BLOCKING_REGION | |
+ float ti = RFLOAT_VALUE(timeout); | |
+ #else | |
+ float ti = RFLOAT(timeout)->value; | |
+ #endif | |
if (evma_set_comm_inactivity_timeout (StringValuePtr (signature), ti)); | |
return Qtrue; | |
return Qfalse; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment