Mercurial > emacs
changeset 108379:203aa49071bf
Move MAIL_USE_FLOCK, MAIL_USE_LOCKF, BLESSMAIL_TARGET from cpp to configure.
* configure.in (MAIL_USE_FLOCK, MAIL_USE_LOCKF): New AC_DEFINEs.
(BLESSMAIL_TARGET): New output variable.
* lib-src/Makefile.in (BLESSMAIL_TARGET): Set with configure, not cpp.
* src/s/aix4-2.h (MAIL_USE_LOCKF):
* src/s/bsd-common.h (MAIL_USE_FLOCK):
* src/s/darwin.h (MAIL_USE_FLOCK):
* src/s/gnu-linux.h (MAIL_USE_FLOCK):
* src/s/irix6-5.h (MAIL_USE_FLOCK):
* src/s/template.h (MAIL_USE_FLOCK):
Move to configure.
* src/s/ms-w32.h: Comment.
* msdos/sed3v2.inp (BLESSMAIL_TARGET): Edit to need-blessmail.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sun, 09 May 2010 17:07:47 -0700 |
parents | addaf0e91db3 |
children | 72fc67fa8fe3 |
files | ChangeLog configure.in lib-src/ChangeLog lib-src/Makefile.in msdos/ChangeLog msdos/sed3v2.inp src/ChangeLog src/s/aix4-2.h src/s/bsd-common.h src/s/darwin.h src/s/gnu-linux.h src/s/irix6-5.h src/s/ms-w32.h src/s/template.h |
diffstat | 14 files changed, 88 insertions(+), 115 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun May 09 18:39:36 2010 -0400 +++ b/ChangeLog Sun May 09 17:07:47 2010 -0700 @@ -1,3 +1,8 @@ +2010-05-10 Glenn Morris <rgm@gnu.org> + + * configure.in (MAIL_USE_FLOCK, MAIL_USE_LOCKF): New AC_DEFINEs. + (BLESSMAIL_TARGET): New output variable. + 2010-05-08 Štěpán Němec <stepnem@gmail.com> (tiny change) * INSTALL: Fix typos.
--- a/configure.in Sun May 09 18:39:36 2010 -0400 +++ b/configure.in Sun May 09 17:07:47 2010 -0700 @@ -2482,6 +2482,48 @@ AC_CHECK_HEADERS(maillock.h) AC_SUBST(LIBS_MAIL) +## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to +## interlock access to the mail spool. The alternative is a lock file named +## /usr/spool/mail/$USER.lock. +mail_lock=no +case "$opsys" in + aix4-2) mail_lock="lockf" ;; + + gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;; + + ## On GNU/Linux systems, both methods are used by various mail programs. + ## I assume most people are using newer mailers that have heard of flock. + ## Change this if you need to. + ## Debian contains a patch which says: ``On Debian/GNU/Linux systems, + ## configure gets the right answers, and that means *NOT* using flock. + ## Using flock is guaranteed to be the wrong thing. See Debian Policy + ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the + ## Debian maintainer hasn't provided a clean fix for Emacs. + ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and + ## HAVE_MAILLOCK_H are defined, so the following appears to be the + ## correct logic. -- fx + ## We must check for HAVE_LIBLOCKFILE too, as movemail does. + ## liblockfile is a Free Software replacement for libmail, used on + ## Debian systems and elsewhere. -rfr. + gnu-*) + mail_lock="flock" + if test $have_mail = yes || test $have_lockfile = yes; then + test $ac_cv_header_maillock_h = yes && mail_lock=no + fi + ;; +esac + +BLESSMAIL_TARGET= +case "$mail_lock" in + flock) AC_DEFINE(MAIL_USE_FLOCK, 1, [Define if the mailer uses flock to interlock the mail spool.]) ;; + + lockf) AC_DEFINE(MAIL_USE_LOCKF, 1, [Define if the mailer uses lockf to interlock the mail spool.]) ;; + + *) BLESSMAIL_TARGET="need-blessmail" ;; +esac +AC_SUBST(BLESSMAIL_TARGET) + + AC_CHECK_FUNCS(gethostname getdomainname dup2 \ rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
--- a/lib-src/ChangeLog Sun May 09 18:39:36 2010 -0400 +++ b/lib-src/ChangeLog Sun May 09 17:07:47 2010 -0700 @@ -1,3 +1,7 @@ +2010-05-10 Glenn Morris <rgm@gnu.org> + + * Makefile.in (BLESSMAIL_TARGET): Set with configure, not cpp. + 2010-05-08 Christoph <cschol2112@googlemail.com> (tiny change) * makefile.w32-in (OTHER_PLATFORM_SUPPORT): Use parenthesis
--- a/lib-src/Makefile.in Sun May 09 18:39:36 2010 -0400 +++ b/lib-src/Makefile.in Sun May 09 17:07:47 2010 -0700 @@ -131,8 +131,8 @@ # If neither flag is set, blessmail is used. MOVE_FLAGS= -## May be reset below by cpp. -BLESSMAIL_TARGET= +## Empty if either MAIL_USE_FLOCK or MAIL_USE_LOCKF, else need-blessmail. +BLESSMAIL_TARGET=@BLESSMAIL_TARGET@ ## -lkrb if HAVE_LIBKRB or -lkrb4 if HAVE_LIBKRB4 KRB4LIB=@KRB4LIB@ @@ -173,12 +173,6 @@ #endif LOADLIBES=LIBS_SYSTEM -#ifndef MAIL_USE_FLOCK -#ifndef MAIL_USE_LOCKF -BLESSMAIL_TARGET = need-blessmail -#endif -#endif - .SUFFIXES: .m
--- a/msdos/ChangeLog Sun May 09 18:39:36 2010 -0400 +++ b/msdos/ChangeLog Sun May 09 17:07:47 2010 -0700 @@ -1,3 +1,7 @@ +2010-05-10 Glenn Morris <rgm@gnu.org> + + * sed3v2.inp (BLESSMAIL_TARGET): Edit to need-blessmail. + 2010-05-07 Chong Yidong <cyd@stupidchicken.com> * Version 23.2 released.
--- a/msdos/sed3v2.inp Sun May 09 18:39:36 2010 -0400 +++ b/msdos/sed3v2.inp Sun May 09 17:07:47 2010 -0700 @@ -26,6 +26,7 @@ /^libdir *=/s!=.*$!=/emacs/bin! /^srcdir=/s!srcdir=@srcdir@!srcdir := $(subst \\,/,$(shell command.com /c cd))! /^VPATH *=/s!=.*$!=.! +/^BLESSMAIL_TARGET *=/s!@BLESSMAIL_TARGET@!need-blessmail! /^KRB4LIB *=/s/@[^@\n]*@//g /^DESLIB *=/s/@[^@\n]*@//g /^KRB5LIB *=/s/@[^@\n]*@//g
--- a/src/ChangeLog Sun May 09 18:39:36 2010 -0400 +++ b/src/ChangeLog Sun May 09 17:07:47 2010 -0700 @@ -1,3 +1,13 @@ +2010-05-10 Glenn Morris <rgm@gnu.org> + + * s/aix4-2.h (MAIL_USE_LOCKF): + * s/bsd-common.h (MAIL_USE_FLOCK): + * s/darwin.h (MAIL_USE_FLOCK): + * s/gnu-linux.h (MAIL_USE_FLOCK): + * s/irix6-5.h (MAIL_USE_FLOCK): + * s/template.h (MAIL_USE_FLOCK): + Move to configure. + 2010-05-08 Chong Yidong <cyd@stupidchicken.com> * Version 23.2 released.
--- a/src/s/aix4-2.h Sun May 09 18:39:36 2010 -0400 +++ b/src/s/aix4-2.h Sun May 09 17:07:47 2010 -0700 @@ -110,7 +110,6 @@ /* Perry Smith <pedz@ddivt1.austin.ibm.com> says these are correct. */ #define SIGNALS_VIA_CHARACTERS -#define MAIL_USE_LOCKF #define CLASH_DETECTION /* Perry Smith <pedz@ddivt1.austin.ibm.com> says these are correct. */
--- a/src/s/bsd-common.h Sun May 09 18:39:36 2010 -0400 +++ b/src/s/bsd-common.h Sun May 09 17:07:47 2010 -0700 @@ -1,6 +1,7 @@ /* Definitions file for GNU Emacs running on bsd 4.3 - Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + +Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004, 2005, 2006, 2007, + 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -18,10 +19,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ -/* - * Define symbols to identify the version of Unix this is. - * Define all the symbols that apply correctly. - */ +/* Define symbols to identify the version of Unix this is. + * Define all the symbols that apply correctly. */ /* We give these symbols the numeric values found in <sys/param.h> to avoid warnings about redefined macros. */ @@ -55,61 +54,41 @@ generated in the Makefile generated by `xmkmf'. If we don't define NARROWPROTO, we will see the wrong function prototypes for X functions taking float or double parameters. */ - #define NARROWPROTO 1 /* SYSTEM_TYPE should indicate the kind of system you are using. It sets the Lisp variable system-type. */ - #define SYSTEM_TYPE "berkeley-unix" /* Do not use interrupt_input = 1 by default, because in 4.3 we can make noninterrupt input work properly. */ - #undef INTERRUPT_INPUT /* First pty name is /dev/ptyp0. */ - #define FIRST_PTY_LETTER 'p' -/* - * Define HAVE_PTYS if the system supports pty devices. - */ - +/* Define HAVE_PTYS if the system supports pty devices. */ #define HAVE_PTYS /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */ - #define HAVE_SOCKETS /* Define this symbol if your system has the functions bcopy, etc. */ - #define BSTRING -/* define MAIL_USE_FLOCK if the mailer uses flock - to interlock access to /usr/spool/mail/$USER. - The alternative is that a lock file named - /usr/spool/mail/$USER.lock. */ - -#define MAIL_USE_FLOCK - /* 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 /* The file containing the kernel's symbol table is called /vmunix. */ - #define KERNEL_FILE "/vmunix" /* The symbol in the kernel where the load average is found is named _avenrun. */ - #define LDAV_SYMBOL "_avenrun" /* Send signals to subprocesses by "typing" special chars at them. */ - #define SIGNALS_VIA_CHARACTERS /* arch-tag: 0c367245-bde3-492e-9029-3ff6898beb95
--- a/src/s/darwin.h Sun May 09 18:39:36 2010 -0400 +++ b/src/s/darwin.h Sun May 09 17:07:47 2010 -0700 @@ -1,6 +1,7 @@ /* System description header file for Darwin (Mac OS X). - Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, - 2008, 2009, 2010 Free Software Foundation, Inc. + +Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, + 2010 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -18,10 +19,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ -/* - * Define symbols to identify the version of Unix this is. - * Define all the symbols that apply correctly. - */ +/* Define symbols to identify the version of Unix this is. + * Define all the symbols that apply correctly. */ #define BSD4_2 /* BSD4_3 and BSD4_4 are already defined in sys/param.h */ @@ -31,13 +30,11 @@ may not be defined on non-OSX Darwin, and we cannot define DARWIN here because Panther and lower CoreFoundation.h uses DARWIN to distinguish OS X from pure Darwin. */ - #define DARWIN_OS /* SYSTEM_TYPE should indicate the kind of system you are using. It sets the Lisp variable system-type. */ - #define SYSTEM_TYPE "darwin" /* Emacs can read input using SIGIO and buffering characters itself, @@ -61,12 +58,10 @@ It would have Emacs fork off a separate process to read the input and send it to the true Emacs process through a pipe. */ - #define INTERRUPT_INPUT /* Letter to use in finding device name of first pty, if system supports pty's. 'a' means it is /dev/ptya0 */ - #define FIRST_PTY_LETTER 'p' /* @@ -79,16 +74,13 @@ * Do not define both. HAVE_TERMIOS is preferred, if it is * supported on your system. */ - #define HAVE_TERMIOS - #define NO_TERMIO /* * Define HAVE_PTYS if the system supports pty devices. * Note: PTYs are broken on darwin <6. Use at your own risk. */ - #define HAVE_PTYS /* Run only once. We need a `for'-loop because the code uses `continue'. */ @@ -117,20 +109,11 @@ #define MIN_PTY_KERNEL_VERSION '7' /* Define this symbol if your system has the functions bcopy, etc. */ - #define BSTRING -/* define MAIL_USE_FLOCK if the mailer uses flock - to interlock access to /usr/spool/mail/$USER. - The alternative is that a lock file named - /usr/spool/mail/$USER.lock. */ - -#define MAIL_USE_FLOCK - /* 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 @@ -152,21 +135,18 @@ #define HAVE_SOCKETS /* Definitions for how to dump. Copied from nextstep.h. */ - #define UNEXEC unexmacosx.o /* start_of_text isn't actually used, so make it compile without error. */ #define TEXT_START (0) /* Definitions for how to compile & link. */ - #ifdef HAVE_NS #define SYSTEM_PURESIZE_EXTRA 200000 #endif /* On Darwin, res_init appears not to be useful: see bug#562 and http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html */ - #undef HAVE_RES_INIT #undef HAVE_LIBRESOLV
--- a/src/s/gnu-linux.h Sun May 09 18:39:36 2010 -0400 +++ b/src/s/gnu-linux.h Sun May 09 17:07:47 2010 -0700 @@ -103,41 +103,15 @@ #define HAVE_SOCKETS /* Define this symbol if your system has the functions bcopy, etc. */ - #define BSTRING /* This is used in list_system_processes. */ #define HAVE_PROCFS 1 -/* define MAIL_USE_FLOCK if the mailer uses flock - to interlock access to /usr/spool/mail/$USER. - The alternative is that a lock file named - /usr/spool/mail/$USER.lock. */ - -/* On GNU/Linux systems, both methods are used by various mail - programs. I assume that most people are using newer mailers that - have heard of flock. Change this if you need to. */ -/* Debian contains a patch which says: ``On Debian/GNU/Linux systems, - configure gets the right answers, and that means *NOT* using flock. - Using flock is guaranteed to be the wrong thing. See Debian Policy - for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the - Debian maintainer hasn't provided a clean fix for Emacs. - movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and - HAVE_MAILLOCK_H are defined, so the following appears to be the - correct logic. -- fx */ -/* We must check for HAVE_LIBLOCKFILE too, as movemail does. - liblockfile is a Free Software replacement for libmail, used on - Debian systems and elsewhere. -rfr */ - -#if !((defined (HAVE_LIBMAIL) || defined (HAVE_LIBLOCKFILE)) && \ - defined (HAVE_MAILLOCK_H)) -#define MAIL_USE_FLOCK -#endif /* 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
--- a/src/s/irix6-5.h Sun May 09 18:39:36 2010 -0400 +++ b/src/s/irix6-5.h Sun May 09 17:07:47 2010 -0700 @@ -85,21 +85,10 @@ #define UNEXEC unexelf.o -/* define MAIL_USE_FLOCK if the mailer uses flock - to interlock access to /usr/spool/mail/$USER. - The alternative is that a lock file named - /usr/spool/mail/$USER.lock. */ - -#define MAIL_USE_FLOCK - #define NARROWPROTO 1 #define USE_MMAP_FOR_BUFFERS 1 -/* arch-tag: ad0660e0-acf8-46ae-b866-4f3df5b1101b - (do not change this comment) */ - - #if _MIPS_SZLONG == 64 /* -mabi=64 (gcc) or -64 (MIPSpro) */ #define _LP64 /* lisp.h takes care of the rest */ #endif /* _MIPS_SZLONG */ @@ -112,5 +101,8 @@ #define GC_SETJMP_WORKS 1 #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS +/* arch-tag: ad0660e0-acf8-46ae-b866-4f3df5b1101b + (do not change this comment) */ + /* arch-tag: d7ad9ec2-54ad-4b2f-adf2-0070c5c63e83 (do not change this comment) */
--- a/src/s/ms-w32.h Sun May 09 18:39:36 2010 -0400 +++ b/src/s/ms-w32.h Sun May 09 17:07:47 2010 -0700 @@ -1,6 +1,7 @@ /* System description file for Windows NT. - Copyright (C) 1993, 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + +Copyright (C) 1993, 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006, + 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -89,12 +90,6 @@ #define COFF 1 -/* define MAIL_USE_FLOCK if the mailer uses flock - to interlock access to /usr/spool/mail/$USER. - The alternative is that a lock file named - /usr/spool/mail/$USER.lock. */ - -/* #define MAIL_USE_FLOCK */ #define MAIL_USE_POP 1 #define MAIL_USE_SYSTEM_LOCK 1
--- a/src/s/template.h Sun May 09 18:39:36 2010 -0400 +++ b/src/s/template.h Sun May 09 17:07:47 2010 -0700 @@ -1,8 +1,9 @@ /* Template for system description header files. This file describes the parameters that system description files should define or not. - Copyright (C) 1985, 1986, 1992, 1999, 2001, 2002, 2003, 2004, 2005, - 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + +Copyright (C) 1985, 1986, 1992, 1999, 2001, 2002, 2003, 2004, 2005, + 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -102,13 +103,6 @@ /* #define COFF */ -/* define MAIL_USE_FLOCK if the mailer uses flock - to interlock access to /usr/spool/mail/$USER. - The alternative is that a lock file named - /usr/spool/mail/$USER.lock. */ - -#define MAIL_USE_FLOCK - /* 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. */