summaryrefslogtreecommitdiff
path: root/mail/fetchmail/patches/patch-ah
blob: 285f0553f2531a21dffb49c5e6168bc82e8eca90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
$NetBSD: patch-ah,v 1.1 2005/10/21 20:56:50 tonio Exp $

--- fetchmail.c.orig	2003-10-15 21:22:31.000000000 +0200
+++ fetchmail.c
@@ -172,7 +172,7 @@ int main(int argc, char **argv)
      * call near the beginning of the polling loop for details).  We want
      * to be sure the lock gets nuked on any error exit, basically.
      */
-    lock_dispose();
+    fm_lock_dispose();
 
 #ifdef HAVE_GETCWD
     /* save the current directory */
@@ -268,7 +268,7 @@ int main(int argc, char **argv)
 	report_init((run.poll_interval == 0 || nodetach) && !run.logfile);
 
     /* construct the lockfile */
-    lock_setup();
+    fm_lock_setup();
 
 #ifdef HAVE_SETRLIMIT
     /*
@@ -349,7 +349,7 @@ int main(int argc, char **argv)
     }
 
     /* check for another fetchmail running concurrently */
-    pid = lock_state();
+    pid = fm_lock_state();
     bkgd = (pid < 0);
     pid = bkgd ? -pid : pid;
 
@@ -387,7 +387,7 @@ int main(int argc, char **argv)
 	{
 	    fprintf(stderr,GT_("fetchmail: %s fetchmail at %d killed.\n"),
 		    bkgd ? GT_("background") : GT_("foreground"), pid);
-	    lock_release();
+	    fm_lock_release();
 	    if (argc == 2)
 		exit(0);
 	    else
@@ -420,7 +420,7 @@ int main(int argc, char **argv)
 	}
 	else if (getpid() == pid)
 	    /* this test enables re-execing on a changed rcfile */
-	    lock_assert();
+	    fm_lock_assert();
 	else if (argc > 1)
 	{
 	    fprintf(stderr,
@@ -529,7 +529,7 @@ int main(int argc, char **argv)
     set_signal_handler(SIGQUIT, terminate_run);
 
     /* here's the exclusion lock */
-    lock_or_die();
+    fm_lock_or_die();
 
     /*
      * Query all hosts. If there's only one, the error return will
@@ -1300,7 +1300,7 @@ static RETSIGTYPE terminate_run(int sig)
 	  memset(ctl->password, '\0', strlen(ctl->password));
 
 #if !defined(HAVE_ATEXIT) && !defined(HAVE_ON_EXIT)
-    lock_release();
+    fm_lock_release();
 #endif
 
     if (activecount == 0)