all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* movemail on Debian
@ 2003-04-29 14:17 Dave Love
  2003-04-30  5:43 ` Richard Stallman
  0 siblings, 1 reply; 11+ messages in thread
From: Dave Love @ 2003-04-29 14:17 UTC (permalink / raw)


21.3 never got fixed for mail locking on Debian and apparently could
lose mail from a spool delivered to by a Debian system.  (I've made
previous attempts to get this fixed.  It should really be fixed by
making the locking runtime-configurable, but this seems to fix an
important case.)

If there's a bug-fix follow-on, please consider the following.  I
can't really test it, but perhaps someone could at least check the
logic and consider it also for the head source.  It does at least get
liblockfile dynamically linked, which it isn't in the movemail from
the Debian package.  For the head, it should probably be cleaned up to
distinguish HAVE_LIBMAIL and HAVE_LIBLOCKFILE.

Note that with this you get a warning which should probably be dealt
with:

movemail.c:327: the use of `mktemp' is dangerous, better use `mkstemp'

2003-04-29  Dave Love  <fx@gnu.org>

	* configure.in: When we have -llockfile, define HAVE_LIBMAIL, not
	LIBMAIL.

Index: configure.in
===================================================================
RCS file: /cvsroot/emacs/emacs/configure.in,v
retrieving revision 1.267.4.17
diff -u -p -c -r1.267.4.17 configure.in
cvs server: conflicting specifications of output style
*** configure.in	7 Apr 2003 09:34:40 -0000	1.267.4.17
--- configure.in	29 Apr 2003 13:58:35 -0000
*************** if test "$ac_cv_lib_lockfile_maillock" =
*** 1967,1975 ****
      AC_MSG_ERROR([Shared liblockfile found but can't link against it.
  This probably means that movemail could lose mail.
  There may be a \`development' package to install containing liblockfile.])
-   else AC_DEFINE(LIBMAIL, -llockfile)
-   fi
    else :
  fi
  AC_CHECK_FUNCS(touchlock)
  AC_CHECK_HEADERS(maillock.h)
--- 1967,1975 ----
      AC_MSG_ERROR([Shared liblockfile found but can't link against it.
  This probably means that movemail could lose mail.
  There may be a \`development' package to install containing liblockfile.])
    else :
+   fi
+ else AC_DEFINE(HAVE_LIBMAIL)
  fi
  AC_CHECK_FUNCS(touchlock)
  AC_CHECK_HEADERS(maillock.h)

2003-04-29  Dave Love  <fx@gnu.org>

	* config.in: Add HAVE_LIBLOCKFILE.

	* s/gnu-linux.h (MAIL_USE_FLOCK): Don't define if we should use
	maillock.

*** gnu-linux.h.~1.83.~	Fri Sep 28 16:50:04 2001
--- gnu-linux.h	Tue Apr 29 15:13:55 2003
***************
*** 129,136 ****
--- 129,146 ----
  /* 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.  (MAILDIR is defined in maillock.h.)  -- fx */
  
+ #if !(defined (HAVE_LIBMAIL) && 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-05-25 15:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-29 14:17 movemail on Debian Dave Love
2003-04-30  5:43 ` Richard Stallman
2003-04-30 17:59   ` Dave Love
2003-05-02 14:37     ` Richard Stallman
2003-05-03 14:25       ` Dave Love
2003-05-04 13:04         ` Richard Stallman
2003-05-04 18:05           ` Dave Love
2003-05-05 19:10             ` Richard Stallman
2003-05-20 16:59               ` Dave Love
2003-05-21 15:31                 ` Richard Stallman
2003-05-25 15:31                   ` Dave Love

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.