summaryrefslogtreecommitdiff
path: root/rubysig.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-09 02:52:19 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-09 02:52:19 +0000
commit417a410892ac5a3c6e70f5d7abc9fd8ba9bc1914 (patch)
tree10bd3cad80142dae65ada210d837e52fa3e1be41 /rubysig.h
parentbafe6d850499ad30c4fd21fac6036cb7b5cae2d3 (diff)
* rubysig.h: <errno.h> is needed to use errno which may be a macro.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rubysig.h')
-rw-r--r--rubysig.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/rubysig.h b/rubysig.h
index 650770d5778..ea335b52cb3 100644
--- a/rubysig.h
+++ b/rubysig.h
@@ -10,8 +10,9 @@
**********************************************************************/
-#ifndef SIG_H
-#define SIG_H
+#ifndef RUBYSIG_H
+#define RUBYSIG_H
+#include <errno.h>
#ifdef _WIN32
typedef LONG rb_atomic_t;
@@ -24,7 +25,6 @@ typedef LONG rb_atomic_t;
/* Windows doesn't allow interrupt while system calls */
# define TRAP_BEG do {\
int saved_errno = 0;\
- extern int errno;\
rb_atomic_t trap_immediate = ATOMIC_SET(rb_trap_immediate, 1)
# define TRAP_END\
ATOMIC_SET(rb_trap_immediate, trap_immediate);\
@@ -46,7 +46,6 @@ typedef int rb_atomic_t;
# define ATOMIC_DEC(var) (--(var))
# define TRAP_BEG do {\
- extern int errno;\
int saved_errno = 0;\
int trap_immediate = rb_trap_immediate;\
rb_trap_immediate = 1
@@ -106,4 +105,4 @@ RUBY_EXTERN int rb_thread_tick;
} while (0)
#endif
-#endif
+#endif /* ifndef RUBYSIG_H */