emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r100206: Move MAIL_USE_FLOCK, MAIL_US


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r100206: Move MAIL_USE_FLOCK, MAIL_USE_LOCKF, BLESSMAIL_TARGET from cpp to configure.
Date: Sun, 09 May 2010 17:07:47 -0700
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100206
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sun 2010-05-09 17:07:47 -0700
message:
  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.
modified:
  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
=== modified file 'ChangeLog'
--- a/ChangeLog 2010-05-08 18:47:07 +0000
+++ b/ChangeLog 2010-05-10 00:07:47 +0000
@@ -1,3 +1,8 @@
+2010-05-10  Glenn Morris  <address@hidden>
+
+       * configure.in (MAIL_USE_FLOCK, MAIL_USE_LOCKF): New AC_DEFINEs.
+       (BLESSMAIL_TARGET): New output variable.
+
 2010-05-08  Štěpán Němec  <address@hidden>  (tiny change)
 
        * INSTALL: Fix typos.

=== modified file 'configure.in'
--- a/configure.in      2010-05-08 18:47:07 +0000
+++ b/configure.in      2010-05-10 00:07:47 +0000
@@ -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 \

=== modified file 'lib-src/ChangeLog'
--- a/lib-src/ChangeLog 2010-05-08 18:47:07 +0000
+++ b/lib-src/ChangeLog 2010-05-10 00:07:47 +0000
@@ -1,3 +1,7 @@
+2010-05-10  Glenn Morris  <address@hidden>
+
+       * Makefile.in (BLESSMAIL_TARGET): Set with configure, not cpp.
+
 2010-05-08  Christoph  <address@hidden>  (tiny change)
 
        * makefile.w32-in (OTHER_PLATFORM_SUPPORT): Use parenthesis

=== modified file 'lib-src/Makefile.in'
--- a/lib-src/Makefile.in       2010-05-08 02:11:06 +0000
+++ b/lib-src/Makefile.in       2010-05-10 00:07:47 +0000
@@ -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.
address@hidden@
 
 ## -lkrb if HAVE_LIBKRB or -lkrb4 if HAVE_LIBKRB4
 address@hidden@
@@ -173,12 +173,6 @@
 #endif
 LOADLIBES=LIBS_SYSTEM
 
-#ifndef MAIL_USE_FLOCK
-#ifndef MAIL_USE_LOCKF
-BLESSMAIL_TARGET = need-blessmail
-#endif
-#endif
-
 
 .SUFFIXES: .m
 

=== modified file 'msdos/ChangeLog'
--- a/msdos/ChangeLog   2010-05-08 18:47:07 +0000
+++ b/msdos/ChangeLog   2010-05-10 00:07:47 +0000
@@ -1,3 +1,7 @@
+2010-05-10  Glenn Morris  <address@hidden>
+
+       * sed3v2.inp (BLESSMAIL_TARGET): Edit to need-blessmail.
+
 2010-05-07  Chong Yidong  <address@hidden>
 
        * Version 23.2 released.

=== modified file 'msdos/sed3v2.inp'
--- a/msdos/sed3v2.inp  2010-05-07 12:57:24 +0000
+++ b/msdos/sed3v2.inp  2010-05-10 00:07:47 +0000
@@ -26,6 +26,7 @@
 /^libdir *=/s!=.*$!=/emacs/bin!
 /^srcdir=/address@hidden@!srcdir := $(subst \\,/,$(shell command.com /c cd))!
 /^VPATH *=/s!=.*$!=.!
+/^BLESSMAIL_TARGET *=/address@hidden@!need-blessmail!
 /^KRB4LIB *=/s/@address@hidden@//g
 /^DESLIB *=/s/@address@hidden@//g
 /^KRB5LIB *=/s/@address@hidden@//g

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-05-08 18:47:07 +0000
+++ b/src/ChangeLog     2010-05-10 00:07:47 +0000
@@ -1,3 +1,13 @@
+2010-05-10  Glenn Morris  <address@hidden>
+
+       * 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  <address@hidden>
 
        * Version 23.2 released.

=== modified file 'src/s/aix4-2.h'
--- a/src/s/aix4-2.h    2010-05-08 02:05:24 +0000
+++ b/src/s/aix4-2.h    2010-05-10 00:07:47 +0000
@@ -110,7 +110,6 @@
 
 /* Perry Smith <address@hidden> says these are correct.  */
 #define SIGNALS_VIA_CHARACTERS
-#define MAIL_USE_LOCKF
 #define CLASH_DETECTION
 
 /* Perry Smith <address@hidden> says these are correct.  */

=== modified file 'src/s/bsd-common.h'
--- a/src/s/bsd-common.h        2010-05-04 07:40:53 +0000
+++ b/src/s/bsd-common.h        2010-05-10 00:07:47 +0000
@@ -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

=== modified file 'src/s/darwin.h'
--- a/src/s/darwin.h    2010-05-08 02:05:24 +0000
+++ b/src/s/darwin.h    2010-05-10 00:07:47 +0000
@@ -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
 

=== modified file 'src/s/gnu-linux.h'
--- a/src/s/gnu-linux.h 2010-05-08 02:05:24 +0000
+++ b/src/s/gnu-linux.h 2010-05-10 00:07:47 +0000
@@ -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

=== modified file 'src/s/irix6-5.h'
--- a/src/s/irix6-5.h   2010-05-08 02:05:24 +0000
+++ b/src/s/irix6-5.h   2010-05-10 00:07:47 +0000
@@ -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) */

=== modified file 'src/s/ms-w32.h'
--- a/src/s/ms-w32.h    2010-05-04 04:00:10 +0000
+++ b/src/s/ms-w32.h    2010-05-10 00:07:47 +0000
@@ -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
 

=== modified file 'src/s/template.h'
--- a/src/s/template.h  2010-04-21 05:47:56 +0000
+++ b/src/s/template.h  2010-05-10 00:07:47 +0000
@@ -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.  */


reply via email to

[Prev in Thread] Current Thread [Next in Thread]