From 172bedefc979b19de6799b245e8843f84bfe70b5 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 11 Jul 2012 00:07:19 -0700 Subject: [PATCH] All the cool platforms support CLASH_DETECTION... * configure.ac (CLASH_DETECTION): Define unconditionally. Every platform using configure supports it. * src/s/aix4-2.h, src/s/bsd-common.h, src/s/cygwin.h, src/s/darwin.h: * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/template.h: * src/s/usg5-4-common.h: Move CLASH_DETECTION to configure. * etc/PROBLEMS: Recommend customizing create-lockfiles rather than recompiling with CLASH_DETECTION unset. --- ChangeLog | 2 ++ configure.ac | 8 ++++++++ etc/PROBLEMS | 4 ++-- src/ChangeLog | 4 ++++ src/s/aix4-2.h | 1 - src/s/bsd-common.h | 5 ----- src/s/cygwin.h | 5 ----- src/s/darwin.h | 5 ----- src/s/gnu-linux.h | 5 ----- src/s/hpux10-20.h | 5 ----- src/s/template.h | 5 ----- src/s/usg5-4-common.h | 3 --- 12 files changed, 16 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index cb722a73485..fca05a527c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2012-07-11 Glenn Morris + * configure.ac (CLASH_DETECTION): Define unconditionally. + * configure.ac (opsysfile): Use bsd-common on gnu systems. * configure.ac (GNU_LIBRARY_PENDING_OUTPUT_COUNT): diff --git a/configure.ac b/configure.ac index c191caeea70..82201318515 100644 --- a/configure.ac +++ b/configure.ac @@ -3124,6 +3124,14 @@ dnl and macros for terminal control.]) dnl AC_DEFINE(HAVE_TCATTR, 1, [Define to 1 if you have tcgetattr and tcsetattr.]) dnl fi +dnl Every platform that uses configure (ie every non-MS platform) +dnl supports this. There is a create-lockfiles option you can +dnl customize if you do not want the lock files to be written. +dnl So it is not clear that this #define still needs to exist. +AC_DEFINE(CLASH_DETECTION, 1, [Define if you want lock files to be written, + so that Emacs can tell instantly when you try to modify a file that + someone else has modified in his/her Emacs.]) + case $opsys in darwin | gnu | hpux* | *bsd ) AC_DEFINE(NO_TERMIO, 1, [Define if termio.h should not be included.]) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 4dd8585fc2c..58f2bb9bcf2 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -1884,8 +1884,8 @@ Emacs uses symbolic links to implement file locks. In a directory with +t bit, the directory owner becomes the owner of the symbolic link, so that it cannot be removed by anyone else. -If you don't like those useless links, you can let Emacs not to using -file lock by adding #undef CLASH_DETECTION to config.h. +If you don't like those useless links, you can customize +the option `create-lockfiles'. *** FreeBSD: Getting a Meta key on the console. diff --git a/src/ChangeLog b/src/ChangeLog index 0dc0f010066..c9e4cbbabc0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2012-07-11 Glenn Morris + * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h: + * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h: + Move CLASH_DETECTION to configure. + * s/gnu.h: Remove file, which is now empty. * s/gnu.h, s/gnu-linux.h: diff --git a/src/s/aix4-2.h b/src/s/aix4-2.h index b7bdc8739a7..5741ef7c492 100644 --- a/src/s/aix4-2.h +++ b/src/s/aix4-2.h @@ -42,7 +42,6 @@ along with GNU Emacs. If not, see . */ /* Perry Smith says these are correct. */ #define SIGNALS_VIA_CHARACTERS -#define CLASH_DETECTION /* Perry Smith says these are correct. */ #undef sigmask diff --git a/src/s/bsd-common.h b/src/s/bsd-common.h index 98391740653..c9c531b70b6 100644 --- a/src/s/bsd-common.h +++ b/src/s/bsd-common.h @@ -60,10 +60,5 @@ along with GNU Emacs. If not, see . */ /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */ #define HAVE_SOCKETS -/* Define CLASH_DETECTION if you want lock files to be written - so that Emacs can tell instantly when you try to modify - a file that someone else has modified in his Emacs. */ -#define CLASH_DETECTION - /* Send signals to subprocesses by "typing" special chars at them. */ #define SIGNALS_VIA_CHARACTERS diff --git a/src/s/cygwin.h b/src/s/cygwin.h index 0bbdab0cca1..9faaea785d7 100644 --- a/src/s/cygwin.h +++ b/src/s/cygwin.h @@ -59,11 +59,6 @@ along with GNU Emacs. If not, see . */ } \ while (0) -/* Define CLASH_DETECTION if you want lock files to be written - so that Emacs can tell instantly when you try to modify - a file that someone else has modified in his Emacs. */ -#define CLASH_DETECTION - /* If the system's imake configuration file defines `NeedWidePrototypes' as `NO', we must define NARROWPROTO manually. Such a define is generated in the Makefile generated by `xmkmf'. If we don't diff --git a/src/s/darwin.h b/src/s/darwin.h index 9371afee5e8..485fadbcb1f 100644 --- a/src/s/darwin.h +++ b/src/s/darwin.h @@ -83,11 +83,6 @@ along with GNU Emacs. If not, see . */ for process-connection-type dependent on the kernel version. */ #define MIN_PTY_KERNEL_VERSION '7' -/* Define CLASH_DETECTION if you want lock files to be written - so that Emacs can tell instantly when you try to modify - a file that someone else has modified in his Emacs. */ -#define CLASH_DETECTION - /* Avoid the use of the name init_process (process.c) because it is also the name of a Mach system call. */ #define init_process emacs_init_process diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h index 9f8a994bb7e..d61d3ae5621 100644 --- a/src/s/gnu-linux.h +++ b/src/s/gnu-linux.h @@ -80,11 +80,6 @@ along with GNU Emacs. If not, see . */ #define HAVE_SOCKETS -/* Define CLASH_DETECTION if you want lock files to be written - so that Emacs can tell instantly when you try to modify - a file that someone else has modified in his Emacs. */ -#define CLASH_DETECTION - /* Here, on a separate page, add any special hacks needed to make Emacs work on this system. For example, you might define certain system call names that don't diff --git a/src/s/hpux10-20.h b/src/s/hpux10-20.h index 7d8222761b3..ca8bcecb1f9 100644 --- a/src/s/hpux10-20.h +++ b/src/s/hpux10-20.h @@ -36,11 +36,6 @@ along with GNU Emacs. If not, see . */ /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */ #define HAVE_SOCKETS -/* Define CLASH_DETECTION if you want lock files to be written - so that Emacs can tell instantly when you try to modify - a file that someone else has modified in his Emacs. */ -#define CLASH_DETECTION - /* Special hacks needed to make Emacs run on this system. */ /* This is how to get the device name of the tty end of a pty. */ diff --git a/src/s/template.h b/src/s/template.h index 17c003a8df5..83027dc591b 100644 --- a/src/s/template.h +++ b/src/s/template.h @@ -66,11 +66,6 @@ along with GNU Emacs. If not, see . */ /* #undef subprocesses */ -/* Define CLASH_DETECTION if you want lock files to be written - so that Emacs can tell instantly when you try to modify - a file that someone else has modified in his Emacs. */ -#define CLASH_DETECTION - /* If the character used to separate elements of the executable path is not ':', #define this to be the appropriate character constant. */ /* #define SEPCHAR ':' */ diff --git a/src/s/usg5-4-common.h b/src/s/usg5-4-common.h index 2676e9e5943..74f8908c8f9 100644 --- a/src/s/usg5-4-common.h +++ b/src/s/usg5-4-common.h @@ -51,9 +51,6 @@ along with GNU Emacs. If not, see . */ constant to dimension an array. So wire in the appropriate value here. */ #define NSIG_MINIMUM 32 -/* We can support this. */ -#define CLASH_DETECTION - /* Define HAVE_PTYS if the system supports pty devices. */ #define HAVE_PTYS -- 2.39.2