mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-29 01:24:51 +02:00
Played around with the file locking and discovered to my chagrin that
whenever a process writes a cell to disk, it immediately releases the file lock it had on that cell, which is clearly not the intent of file locking. Fixed this issue. On a related topic, revised the "cellname writeable" command so that it can make a cell editable even if the cell has an advisory lock and cannot be made writeable. Perhaps there should be a clearer distinction here between "writeable" and "editable". Also: Reconsidered the previous commit, which removed the "--disable-locking" from the configuration options. Because some operating systems may not implement fnctl()-based file locking (Cygwin, for one, apparently doesn't), it is still useful to be able to completely remove the function, in case the operating system will fail to recognize the fnctl() values in the code. Now, file locking behavior can be permanently removed through the configuration option, or temporarily disabled from the command line.
This commit is contained in:
Vendored
+9
-2
@@ -6844,8 +6844,15 @@ else
|
||||
fi
|
||||
|
||||
|
||||
if test "x$enable_locking" = "xno" ; then
|
||||
echo "File locking no longer set during configuration; ignoring option."
|
||||
if test "x$enable_locking" = "xyes" ; then
|
||||
case $target in
|
||||
*cygwin*)
|
||||
;;
|
||||
*)
|
||||
$as_echo "#define FILE_LOCKS 1" >>confdefs.h
|
||||
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Check whether --enable-calma was given.
|
||||
|
||||
@@ -935,8 +935,14 @@ AC_ARG_ENABLE(locking,
|
||||
[],
|
||||
[enable_locking=yes])
|
||||
|
||||
if test "x$enable_locking" = "xno" ; then
|
||||
echo "File locking no longer set during configuration; ignoring option."
|
||||
if test "x$enable_locking" = "xyes" ; then
|
||||
case $target in
|
||||
*cygwin*)
|
||||
;;
|
||||
*)
|
||||
AC_DEFINE(FILE_LOCKS)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(calma,
|
||||
|
||||
Reference in New Issue
Block a user