#ifdef HAVE_CONFIG_H
#define NO_SHORTNAMES /* Tell config not to load remap.h */
-#include <../src/config.h>
+#include <config.h>
#else
#define MAIL_USE_POP
#endif
#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)
#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>
username = getenv ("USER");
if (! (username && *username))
{
+#ifndef WINDOWSNT
username = getlogin ();
if (! (username && *username))
{
return (0);
}
}
+#else
+ strcpy (pop_error, "Could not determine username");
+ return (0);
+#endif
}
}
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");
ret = -1;
}
- close (server->file);
+ CLOSESOCKET (server->file);
}
if (server->buffer)