summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-04-17 09:29:36 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-04-17 09:29:36 +0000
commit4c97b921f2f6d71d7a3f2c0b2c0c089b15686973 (patch)
tree7c0bd6b3abad22d25c3014052fd72a58ea07be51 /file.c
parent693efbb71035dede6459e0e5b73a5acdf38e5d90 (diff)
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/file.c b/file.c
index 75a6da7e21..20189a3e6a 100644
--- a/file.c
+++ b/file.c
@@ -1412,6 +1412,19 @@ file_truncate(obj, len)
return INT2FIX(0);
}
+# ifndef LOCK_SH
+# define LOCK_SH 1
+# endif
+# ifndef LOCK_EX
+# define LOCK_EX 2
+# endif
+# ifndef LOCK_NB
+# define LOCK_NB 4
+# endif
+# ifndef LOCK_UN
+# define LOCK_UN 8
+# endif
+
#if defined(THREAD) && defined(EWOULDBLOCK)
static int
thread_flock(fd, op)
@@ -1713,19 +1726,6 @@ Init_File()
rb_define_method(cFile, "flock", file_flock, 1);
-# ifndef LOCK_SH
-# define LOCK_SH 1
-# endif
-# ifndef LOCK_EX
-# define LOCK_EX 2
-# endif
-# ifndef LOCK_NB
-# define LOCK_NB 4
-# endif
-# ifndef LOCK_UN
-# define LOCK_UN 8
-# endif
-
mConst = rb_define_module_under(cFile, "Constants");
rb_define_const(cFile, "LOCK_SH", INT2FIX(LOCK_SH));
rb_define_const(cFile, "LOCK_EX", INT2FIX(LOCK_EX));