summaryrefslogtreecommitdiff
path: root/rubysig.h
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-22 03:50:33 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-22 03:50:33 +0000
commitb74286e423abd50d8e697abd242c16bc683b6357 (patch)
tree891f58582e536897e5a10038bd3c037f271051b5 /rubysig.h
parent7958edbcdcf11706cff27891687c8d1f92166c8f (diff)
* lib/irb/ruby-lex.rb (RubyLex::identify_string): %s string do not
process expression interpolation. [ruby-talk:106691] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rubysig.h')
-rw-r--r--rubysig.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/rubysig.h b/rubysig.h
index 6be6347..8871e3a 100644
--- a/rubysig.h
+++ b/rubysig.h
@@ -12,6 +12,7 @@
#ifndef SIG_H
#define SIG_H
+#include <errno.h>
#ifdef _WIN32
typedef LONG rb_atomic_t;
@@ -23,10 +24,13 @@ typedef LONG rb_atomic_t;
/* Windows doesn't allow interrupt while system calls */
# define TRAP_BEG do {\
+ int saved_errno = 0;\
rb_atomic_t trap_immediate = ATOMIC_SET(rb_trap_immediate, 1)
# define TRAP_END\
- ATOMIC_SET(rb_trap_immediate, trap_immediate);\
- CHECK_INTS;\
+ ATOMIC_SET(rb_trap_immediate, trap_immediate);\
+ saved_errno = errno;\
+ CHECK_INTS;\
+ errno = saved_errno;\
} while (0)
# define RUBY_CRITICAL(statements) do {\
rb_w32_enter_critical();\