#include "config.h"
#include <stdio.h>
-#ifdef HAVE_STRING_H
#include <string.h> /* strcat() */
-#endif
-#if defined(STDC_HEADERS)
#include <stdlib.h>
-#endif
-#if defined(HAVE_UNISTD_H)
#include <unistd.h>
-#endif
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include "fetchmail.h"
-#include "i18n.h"
+#include "gettext.h"
#include "lock.h"
static char *lockfile; /** name of lockfile */
void fm_lock_dispose(void)
/* arrange for a lock to be removed on process exit */
{
-#ifdef HAVE_ATEXIT
atexit(unlockit);
-#endif
}
int fm_lock_state(void)
{
- int pid, st;
+ long pid;
+ int st;
FILE *lockfp;
int bkgd = FALSE;
if ((lockfp = fopen(lockfile, "r")) != NULL)
{
- int args = fscanf(lockfp, "%d %d", &pid, &st);
+ int args = fscanf(lockfp, "%ld %d", &pid, &st);
bkgd = (args == 2);
if (ferror(lockfp)) {