diff options
| author | Paul Eggert | 2015-04-12 14:55:38 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-04-12 14:56:32 -0700 |
| commit | 9d7afc0cccff429587970a9350639bffd3c6c66e (patch) | |
| tree | 74162ae9af55432acfe4d9b38bec50d6b74edb62 /lib-src | |
| parent | 30bcb238c3a53f777c2a4952f51a68df6272cff4 (diff) | |
| download | emacs-9d7afc0cccff429587970a9350639bffd3c6c66e.tar.gz emacs-9d7afc0cccff429587970a9350639bffd3c6c66e.zip | |
Remove configure's --with-mmdf option
* configure.ac (MAIL_USE_MMDF): Remove.
* etc/NEWS: Document this.
* lib-src/movemail.c: Assume MAIL_USE_MMDF is not defined.
Fixes: bug#20308
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/movemail.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/lib-src/movemail.c b/lib-src/movemail.c index 1618a6980e9..231bc22fa89 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c | |||
| @@ -115,13 +115,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 115 | #define MAIL_USE_SYSTEM_LOCK | 115 | #define MAIL_USE_SYSTEM_LOCK |
| 116 | #endif | 116 | #endif |
| 117 | 117 | ||
| 118 | #ifdef MAIL_USE_MMDF | 118 | #if (!defined MAIL_USE_SYSTEM_LOCK \ |
| 119 | extern int lk_open (), lk_close (); | 119 | && (defined HAVE_LIBMAIL || defined HAVE_LIBLOCKFILE) \ |
| 120 | #endif | 120 | && defined HAVE_MAILLOCK_H) |
| 121 | |||
| 122 | #if !defined (MAIL_USE_SYSTEM_LOCK) && !defined (MAIL_USE_MMDF) && \ | ||
| 123 | (defined (HAVE_LIBMAIL) || defined (HAVE_LIBLOCKFILE)) && \ | ||
| 124 | defined (HAVE_MAILLOCK_H) | ||
| 125 | #include <maillock.h> | 121 | #include <maillock.h> |
| 126 | /* We can't use maillock unless we know what directory system mail | 122 | /* We can't use maillock unless we know what directory system mail |
| 127 | files appear in. */ | 123 | files appear in. */ |
| @@ -144,8 +140,7 @@ static bool mbx_delimit_end (FILE *); | |||
| 144 | #endif | 140 | #endif |
| 145 | 141 | ||
| 146 | #if (defined MAIL_USE_MAILLOCK \ | 142 | #if (defined MAIL_USE_MAILLOCK \ |
| 147 | || (!defined DISABLE_DIRECT_ACCESS && !defined MAIL_USE_MMDF \ | 143 | || (!defined DISABLE_DIRECT_ACCESS && !defined MAIL_USE_SYSTEM_LOCK)) |
| 148 | && !defined MAIL_USE_SYSTEM_LOCK)) | ||
| 149 | /* Like malloc but get fatal error if memory is exhausted. */ | 144 | /* Like malloc but get fatal error if memory is exhausted. */ |
| 150 | 145 | ||
| 151 | static void * | 146 | static void * |
| @@ -229,10 +224,6 @@ main (int argc, char **argv) | |||
| 229 | inname = argv[optind]; | 224 | inname = argv[optind]; |
| 230 | outname = argv[optind+1]; | 225 | outname = argv[optind+1]; |
| 231 | 226 | ||
| 232 | #ifdef MAIL_USE_MMDF | ||
| 233 | mmdf_init (argv[0]); | ||
| 234 | #endif | ||
| 235 | |||
| 236 | if (*outname == 0) | 227 | if (*outname == 0) |
| 237 | fatal ("Destination file name is empty", 0, 0); | 228 | fatal ("Destination file name is empty", 0, 0); |
| 238 | 229 | ||
| @@ -256,7 +247,6 @@ main (int argc, char **argv) | |||
| 256 | 247 | ||
| 257 | char *lockname = 0; | 248 | char *lockname = 0; |
| 258 | 249 | ||
| 259 | #ifndef MAIL_USE_MMDF | ||
| 260 | #ifndef MAIL_USE_SYSTEM_LOCK | 250 | #ifndef MAIL_USE_SYSTEM_LOCK |
| 261 | #ifdef MAIL_USE_MAILLOCK | 251 | #ifdef MAIL_USE_MAILLOCK |
| 262 | spool_name = mail_spool_name (inname); | 252 | spool_name = mail_spool_name (inname); |
| @@ -335,7 +325,6 @@ main (int argc, char **argv) | |||
| 335 | delete_lockname = lockname; | 325 | delete_lockname = lockname; |
| 336 | } | 326 | } |
| 337 | #endif /* not MAIL_USE_SYSTEM_LOCK */ | 327 | #endif /* not MAIL_USE_SYSTEM_LOCK */ |
| 338 | #endif /* not MAIL_USE_MMDF */ | ||
| 339 | 328 | ||
| 340 | #ifdef SIGCHLD | 329 | #ifdef SIGCHLD |
| 341 | signal (SIGCHLD, SIG_DFL); | 330 | signal (SIGCHLD, SIG_DFL); |
| @@ -356,15 +345,11 @@ main (int argc, char **argv) | |||
| 356 | if (setuid (getuid ()) < 0 || setregid (-1, real_gid) < 0) | 345 | if (setuid (getuid ()) < 0 || setregid (-1, real_gid) < 0) |
| 357 | fatal ("Failed to drop privileges", 0, 0); | 346 | fatal ("Failed to drop privileges", 0, 0); |
| 358 | 347 | ||
| 359 | #ifndef MAIL_USE_MMDF | ||
| 360 | #ifdef MAIL_USE_SYSTEM_LOCK | 348 | #ifdef MAIL_USE_SYSTEM_LOCK |
| 361 | indesc = open (inname, O_RDWR | O_BINARY); | 349 | indesc = open (inname, O_RDWR | O_BINARY); |
| 362 | #else /* if not MAIL_USE_SYSTEM_LOCK */ | 350 | #else /* if not MAIL_USE_SYSTEM_LOCK */ |
| 363 | indesc = open (inname, O_RDONLY | O_BINARY); | 351 | indesc = open (inname, O_RDONLY | O_BINARY); |
| 364 | #endif /* not MAIL_USE_SYSTEM_LOCK */ | 352 | #endif /* not MAIL_USE_SYSTEM_LOCK */ |
| 365 | #else /* MAIL_USE_MMDF */ | ||
| 366 | indesc = lk_open (inname, O_RDONLY | O_BINARY, 0, 0, 10); | ||
| 367 | #endif /* MAIL_USE_MMDF */ | ||
| 368 | 353 | ||
| 369 | if (indesc < 0) | 354 | if (indesc < 0) |
| 370 | pfatal_with_name (inname); | 355 | pfatal_with_name (inname); |
| @@ -474,11 +459,7 @@ main (int argc, char **argv) | |||
| 474 | } | 459 | } |
| 475 | #endif /* MAIL_USE_SYSTEM_LOCK */ | 460 | #endif /* MAIL_USE_SYSTEM_LOCK */ |
| 476 | 461 | ||
| 477 | #ifdef MAIL_USE_MMDF | ||
| 478 | lk_close (indesc, 0, 0, 0); | ||
| 479 | #else | ||
| 480 | close (indesc); | 462 | close (indesc); |
| 481 | #endif | ||
| 482 | 463 | ||
| 483 | #ifndef MAIL_USE_SYSTEM_LOCK | 464 | #ifndef MAIL_USE_SYSTEM_LOCK |
| 484 | if (! preserve_mail) | 465 | if (! preserve_mail) |