#include <netdb.h>
#endif /* HAVE_GETHOSTBYNAME */
-#ifdef SUNOS
-#include <stdlib.h>
-#endif
-
#include "fetchmail.h"
#include "tunable.h"
#include "smtp.h"
char *idfile; /* UID list file */
flag versioninfo; /* emit only version info */
char *user; /* the name of the invoking user */
+char *home;
char *fetchmailhost; /* the name of the host running fetchmail */
char *program_name; /* the name to prefix error messages with */
{
int st, bkgd = FALSE;
int parsestatus, implicitmode = FALSE;
- struct passwd *pw;
struct query *ctl;
FILE *lockfp;
netrc_entry *netrc_list;
/* set up to do lock protocol */
if (!getuid())
- strcpy(tmpbuf, "/var/run/fetchmail.pid");
+ sprintf(tmpbuf, "%s/fetchmail.pid", PID_DIR);
else {
strcpy(tmpbuf, home);
strcat(tmpbuf, "/.fetchmail");
{
int implicitmode, st;
struct passwd *pw;
- struct query def_opts, *ctl, *mp;
+ struct query def_opts, *ctl;
memset(&def_opts, '\0', sizeof(struct query));
def_opts.smtp_socket = -1;
def_opts.server.protocol = P_AUTO;
def_opts.server.timeout = CLIENT_TIMEOUT;
def_opts.remotename = user;
- save_str(&def_opts.smtphunt, -1, fetchmailhost);
- save_str(&def_opts.smtphunt, -1, "localhost");
+ save_str(&def_opts.smtphunt, TRUE, fetchmailhost);
+ save_str(&def_opts.smtphunt, FALSE, "localhost");
/* this builds the host list */
if (prc_parse_file(rcfile, !versioninfo) != 0)