$ENV{"MHCONTEXT"} = $mh . '/.minc.context';
+# TODO: Support dot-locking too. This works on FreeBSD and Linux.
+my $locking = `mhparam datalocking`;
+$? < 0 && die;
+$? == 0 || die('mhparam datalocking: ' . exit_msg($?));
+chomp($locking);
+if ($locking ne 'fcntl') {
+ die("mh locking $locking not supported; only fcntl");
+}
+
\f
###############################################################################
# Utility procedures