summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-05-18 09:12:27 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-05-18 09:12:27 +0000
commitf9c63857f83cbd427b0b0e57f28c20b1322f78ae (patch)
tree26789ad88816aa387f774836b31222d0b40da4e4 /error.c
parent41c6972dd515d42a321ce0dbd329b1aec5fe5185 (diff)
BeOS patches
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r--error.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/error.c b/error.c
index 9c024dddd8..d8a96e5080 100644
--- a/error.c
+++ b/error.c
@@ -507,6 +507,27 @@ syserr_errno(self)
return rb_iv_get(self, "errno");
}
+#ifdef __BEOS__
+static VALUE
+get_syserr(int i)
+{
+ VALUE *list;
+ int ix, offset;
+
+ i -= B_GENERAL_ERROR_BASE;
+ ix = (i >> 12) & 0xf;
+ offset = (i >> 8) & 0xf;
+ if (offset < syserr_index[ix].n) {
+ ix = syserr_index[ix].ix;
+ if ((i & 0xff) < syserr_list[ix + offset].n) {
+ list = syserr_list[ix + offset].list;
+ return list[i & 0xff];
+ }
+ }
+ return 0;
+}
+#endif /* __BEOS__ */
+
static void init_syserr _((void));
void