X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=lib-src%2Fmovemail.c;h=f7a572cff391cfa0e1a1fc1145bd62a376908caa;hp=6fa783e8346c0c95115c2abd21b3ca32e046d151;hb=63a686a3d18465a8c96b8cc4a273c295f8a5a379;hpb=3890a2e3064a7f562107c58e59d928284ec04741 diff --git a/lib-src/movemail.c b/lib-src/movemail.c index 6fa783e..f7a572c 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -69,7 +69,7 @@ Boston, MA 02111-1307, USA. #include #include "../src/sysfile.h" #include "../src/syswait.h" -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE #include "../src/systime.h" #endif #include @@ -87,10 +87,6 @@ extern int optind, opterr; char * strerror (int errnum); #endif /* HAVE_STRERROR */ -#ifdef MSDOS -#undef access -#endif /* MSDOS */ - #ifndef DIRECTORY_SEP #define DIRECTORY_SEP '/' #endif @@ -98,7 +94,7 @@ char * strerror (int errnum); #define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP) #endif -#ifdef WINDOWSNT +#ifdef WIN32_NATIVE #undef access #undef unlink #define fork() 0 @@ -110,7 +106,7 @@ char * strerror (int errnum); properly - make sure it does before you enable this! */ #define DISABLE_DIRECT_ACCESS #include -#endif /* WINDOWSNT */ +#endif /* WIN32_NATIVE */ #if defined (HAVE_UNISTD_H) #include @@ -343,7 +339,7 @@ main (int argc, char *argv[]) exit (retcode); } -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE setuid (getuid ()); #endif #endif /* MAIL_USE_POP */ @@ -444,7 +440,7 @@ main (int argc, char *argv[]) errno = saved_errno; pfatal_with_name (outname); } - if (nread < sizeof buf) + if (nread < (int) sizeof buf) break; } } @@ -709,7 +705,7 @@ xmalloc (unsigned int size) #ifdef MAIL_USE_POP -#ifndef WINDOWSNT +#ifndef WIN32_NATIVE #include #include #include @@ -718,7 +714,7 @@ xmalloc (unsigned int size) #include #endif #include -#include +#include "../src/syspwd.h" #define POP_ERROR (-1) #define POP_RETRIEVED (0) @@ -745,14 +741,14 @@ popmail (char *user, char *outfile, char *password) server = pop_open (0, user, password, POP_NO_GETPASS); if (! server) { - error (pop_error, NULL, NULL); + error ("%s", pop_error, NULL); return (1); } VERBOSE(("stat'ing messages\n")); if (pop_stat (server, &nmsgs, &nbytes)) { - error (pop_error, NULL, NULL); + error ("%s", pop_error, NULL); return (1); } @@ -774,7 +770,7 @@ popmail (char *user, char *outfile, char *password) error ("Error in open: %s, %s", strerror (errno), outfile); return (1); } -#if !defined(__CYGWIN32__) && !defined(WINDOWSNT) +#if !defined(CYGWIN) && !defined(WIN32_NATIVE) fchown (mbfi, getuid (), (gid_t) -1); #endif @@ -800,7 +796,7 @@ popmail (char *user, char *outfile, char *password) mbx_delimit_begin (mbf); if (pop_retr (server, i, mbx_write, mbf) != POP_RETRIEVED) { - error (Errmsg, NULL, NULL); + error ("%s", Errmsg, NULL); close (mbfi); return (1); } @@ -848,7 +844,7 @@ popmail (char *user, char *outfile, char *password) VERBOSE(("deleting message %d \n", i)); if (pop_delete (server, i)) { - error (pop_error, NULL, NULL); + error ("%s", pop_error, NULL); pop_close (server); return (1); } @@ -859,7 +855,7 @@ popmail (char *user, char *outfile, char *password) VERBOSE(("closing server \n")); if (pop_quit (server)) { - error (pop_error, NULL, NULL); + error ("%s", pop_error, NULL); return (1); }