Mercurial > hg > xemacs-beta
comparison lib-src/movemail.c @ 384:bbff43aa5eb7 r21-2-7
Import from CVS: tag r21-2-7
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:08:24 +0200 |
parents | 8626e4521993 |
children | aabb7f5b1c81 |
comparison
equal
deleted
inserted
replaced
383:6a50c6a581a5 | 384:bbff43aa5eb7 |
---|---|
53 * Use strerror instead of get_errmsg. | 53 * Use strerror instead of get_errmsg. |
54 * | 54 * |
55 */ | 55 */ |
56 | 56 |
57 #define NO_SHORTNAMES /* Tell config not to load remap.h */ | 57 #define NO_SHORTNAMES /* Tell config not to load remap.h */ |
58 #define DONT_ENCAPSULATE | |
58 #include <../src/config.h> | 59 #include <../src/config.h> |
59 #include <sys/types.h> | 60 #include <sys/types.h> |
60 #include <sys/stat.h> | 61 #include <sys/stat.h> |
61 #include <sys/file.h> | 62 #include <sys/file.h> |
62 #include <stdio.h> | 63 #include <stdio.h> |
63 #include <errno.h> | 64 #include <errno.h> |
65 #include "../src/sysfile.h" | |
64 #include "../src/syswait.h" | 66 #include "../src/syswait.h" |
67 #ifndef WINDOWSNT | |
65 #include "../src/systime.h" | 68 #include "../src/systime.h" |
69 #endif | |
66 #include <stdlib.h> | 70 #include <stdlib.h> |
67 #include <string.h> | 71 #include <string.h> |
68 #include "getopt.h" | 72 #include "getopt.h" |
69 #ifdef MAIL_USE_POP | 73 #ifdef MAIL_USE_POP |
70 #include "pop.h" | 74 #include "pop.h" |
303 { | 307 { |
304 int retcode = popmail (inname + 3, outname, poppass); | 308 int retcode = popmail (inname + 3, outname, poppass); |
305 exit (retcode); | 309 exit (retcode); |
306 } | 310 } |
307 | 311 |
312 #ifndef WINDOWSNT | |
308 setuid (getuid ()); | 313 setuid (getuid ()); |
314 #endif | |
309 #endif /* MAIL_USE_POP */ | 315 #endif /* MAIL_USE_POP */ |
310 | 316 |
311 #ifndef DISABLE_DIRECT_ACCESS | 317 #ifndef DISABLE_DIRECT_ACCESS |
312 | 318 |
313 /* Check access to input file. */ | 319 /* Check access to input file. */ |
630 { | 636 { |
631 pop_close (server); | 637 pop_close (server); |
632 error ("Error in open: %s, %s", strerror (errno), outfile); | 638 error ("Error in open: %s, %s", strerror (errno), outfile); |
633 return (1); | 639 return (1); |
634 } | 640 } |
635 #ifndef __CYGWIN32__ | 641 #if !defined(__CYGWIN32__) && !defined(WINDOWSNT) |
636 fchown (mbfi, getuid (), -1); | 642 fchown (mbfi, getuid (), -1); |
637 #endif | 643 #endif |
638 | 644 |
639 if ((mbf = fdopen (mbfi, "wb")) == NULL) | 645 if ((mbf = fdopen (mbfi, "wb")) == NULL) |
640 { | 646 { |