Mercurial > hg > xemacs-beta
diff lib-src/pop.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 | c5d627a313b1 |
children | 74fd4e045ea6 |
line wrap: on
line diff
--- a/lib-src/pop.c Mon Aug 13 11:07:40 2007 +0200 +++ b/lib-src/pop.c Mon Aug 13 11:08:24 2007 +0200 @@ -38,7 +38,6 @@ #include <sys/types.h> #ifdef WINDOWSNT -#include "ntlib.h" #include <winsock.h> #undef SOCKET_ERROR #define RECV(s,buf,len,flags) recv(s,buf,len,flags) @@ -77,7 +76,9 @@ #include <sys/stat.h> #include <sys/file.h> #include "../src/syswait.h" +#ifndef WINDOWSNT #include "../src/systime.h" +#endif #include <stdlib.h> #include <string.h> @@ -183,6 +184,7 @@ username = getenv ("USER"); if (! (username && *username)) { +#ifndef WINDOWSNT username = getlogin (); if (! (username && *username)) { @@ -198,6 +200,10 @@ return (0); } } +#else + strcpy (pop_error, "Could not determine username"); + return (0); +#endif } } @@ -247,10 +253,12 @@ if ((! password) && (! DONT_NEED_PASSWORD)) { +#ifndef WINDOWSNT if (! (flags & POP_NO_GETPASS)) { password = getpass ("Enter POP password:"); } +#endif if (! password) { strcpy (pop_error, "Could not determine POP password");