]> Pileus Git - ~andy/fetchmail/blobdiff - lock.c
Rebuild po/
[~andy/fetchmail] / lock.c
diff --git a/lock.c b/lock.c
index 111559e79d4a9fc9af320e05518d3681e5dd3b91..2d656df65289fcf3ae829ac3d5306cb192fd3d03 100644 (file)
--- a/lock.c
+++ b/lock.c
@@ -6,21 +6,15 @@
 #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 */
@@ -66,20 +60,19 @@ static void unlockit(void)
 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)) {