diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-05-18 09:12:27 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-05-18 09:12:27 +0000 |
commit | f9c63857f83cbd427b0b0e57f28c20b1322f78ae (patch) | |
tree | 26789ad88816aa387f774836b31222d0b40da4e4 /error.c | |
parent | 41c6972dd515d42a321ce0dbd329b1aec5fe5185 (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.c | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -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 |