aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS4
-rw-r--r--fetchmail.c10
-rw-r--r--lock.c10
-rw-r--r--lock.h10
4 files changed, 19 insertions, 15 deletions
diff --git a/NEWS b/NEWS
index ada7d23e..3d569fd2 100644
--- a/NEWS
+++ b/NEWS
@@ -59,6 +59,10 @@ fetchmail 6.3.5 (not yet released):
completing NTLM handshake, for robustness and consistency.
(Taken from the NetBSD portable packages collection, patch-ac.)
+# CHANGES:
+* Rename all fetchmail-internal lock_* functions to fm_lock_*. Obsoletes
+ NetBSD portable packages collection patch-ah, patch-ai and patch-aj.
+
# TRANSLATION UPDATES:
* Russian/ru (Pavel Maryanov), Vietnamese/vi (Clytie Siddall)
diff --git a/fetchmail.c b/fetchmail.c
index 4bba7ad1..4905c799 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -198,7 +198,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 */
@@ -316,7 +316,7 @@ int main(int argc, char **argv)
#endif /* POP3_ENABLE */
/* construct the lockfile */
- lock_setup(&run);
+ fm_lock_setup(&run);
#ifdef HAVE_SETRLIMIT
/*
@@ -401,7 +401,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;
@@ -476,7 +476,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,
@@ -581,7 +581,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
diff --git a/lock.c b/lock.c
index 277e20bf..39351be1 100644
--- a/lock.c
+++ b/lock.c
@@ -26,7 +26,7 @@
static char *lockfile; /* name of lockfile */
static int lock_acquired; /* have we acquired a lock */
-void lock_setup(struct runctl *ctl)
+void fm_lock_setup(struct runctl *ctl)
/* set up the global lockfile name */
{
/* set up to do lock protocol */
@@ -63,7 +63,7 @@ static void unlockit(void)
unlink(lockfile);
}
-void lock_dispose(void)
+void fm_lock_dispose(void)
/* arrange for a lock to be removed on process exit */
{
#ifdef HAVE_ATEXIT
@@ -71,7 +71,7 @@ void lock_dispose(void)
#endif
}
-int lock_state(void)
+int fm_lock_state(void)
{
int pid, st;
FILE *lockfp;
@@ -111,13 +111,13 @@ int lock_state(void)
return(bkgd ? -pid : pid);
}
-void lock_assert(void)
+void fm_lock_assert(void)
/* assert that we already posess a lock */
{
lock_acquired = TRUE;
}
-void lock_or_die(void)
+void fm_lock_or_die(void)
/* get a lock on a given host or exit */
{
int fd;
diff --git a/lock.h b/lock.h
index 0c9a5951..4c24e09c 100644
--- a/lock.h
+++ b/lock.h
@@ -2,11 +2,11 @@
#define FM_LOCK_H
/* lock.c: concurrency locking */
-void lock_setup(struct runctl *);
-void lock_assert(void);
-void lock_or_die(void);
+void fm_lock_setup(struct runctl *);
+void fm_lock_assert(void);
+void fm_lock_or_die(void);
void fm_lock_release(void);
-int lock_state(void);
-void lock_dispose(void);
+int fm_lock_state(void);
+void fm_lock_dispose(void);
#endif