summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-28 12:47:35 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-28 12:47:35 +0000
commite87f0fc47744cbd7f9e7ebdd78cf3029b52a6714 (patch)
tree7eac5ca000523ba060a191f4aa167e041d9a3cd1
parent8cebdae6526ae83cf813fc5cb3bd71ff475ef54a (diff)
* configure.in (ac_cv_func_fcntl): fcntl support for MinGW.
* missing/flock.c: workaround for MinGW. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--configure.in1
-rw-r--r--missing/flock.c5
3 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 156b46c14d..1909358e63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Feb 28 21:15:00 2007 WATANABE Hirofumi <eban@ruby-lang.org>
+
+ * configure.in (ac_cv_func_fcntl): fcntl support for MinGW.
+
+ * missing/flock.c: workaround for MinGW.
+
Wed Feb 28 20:51:32 2007 URABE Shyouhei <shyouhei@ruby-lang.org>
* pack.c (pack_unpack): properly ignore non-base64 octets such as
diff --git a/configure.in b/configure.in
index a1e9365d30..950ee8ac4f 100644
--- a/configure.in
+++ b/configure.in
@@ -404,6 +404,7 @@ mingw*) if test "$with_winsock2" = yes; then
rb_cv_binary_elf=no
rb_cv_negative_time_t=no
enable_pthread=no
+ ac_cv_func_fcntl=yes
;;
os2-emx*) LIBS="-lm $LIBS"
ac_cv_lib_dir_opendir=no;;
diff --git a/missing/flock.c b/missing/flock.c
index ed619f0e91..5f6b41c357 100644
--- a/missing/flock.c
+++ b/missing/flock.c
@@ -1,6 +1,7 @@
#include "config.h"
-#if defined HAVE_FCNTL && defined HAVE_FCNTL_H
+#if defined _WIN32
+#elif defined HAVE_FCNTL && defined HAVE_FCNTL_H
/* These are the flock() constants. Since this sytems doesn't have
flock(), the values of the constants are probably not available.
@@ -122,7 +123,7 @@ flock(fd, operation)
return -1;
}
}
-#elif !defined _WIN32
+#else
int
flock(fd, operation)
int fd;