summaryrefslogtreecommitdiff
path: root/ext/fcntl
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-07 03:24:11 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-07 03:24:11 +0000
commit4f6558a4eca8cdee8dba8eab202b23a68f13f64d (patch)
tree0253d3b8be9d4d49071dc164c45479209def2f2e /ext/fcntl
parent9c6cfb5672328af8376e71f849bea871017538ea (diff)
* ext/fcntl/fcntl.c (Init_fcntl): define Fcntl::ACCMODE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/fcntl')
-rw-r--r--ext/fcntl/fcntl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/fcntl/fcntl.c b/ext/fcntl/fcntl.c
index de0b284b36..ca7b12bde1 100644
--- a/ext/fcntl/fcntl.c
+++ b/ext/fcntl/fcntl.c
@@ -104,4 +104,9 @@ Init_fcntl()
#ifdef O_WRONLY
rb_define_const(mFcntl, "O_WRONLY", INT2NUM(O_WRONLY));
#endif
+#ifdef O_ACCMODE
+ rb_define_const(mFcntl, "ACCMODE", INT2FIX(O_ACCMODE));
+#else
+ rb_define_const(mFcntl, "ACCMODE", INT2FIX(O_RDONLY | O_WRONLY | O_RDWR));
+#endif
}