static int lkopen_flock (const char *, int, mode_t, int *);
#endif /* HAVE_FLOCK */
static int lkopen_flock (const char *, int, mode_t, int *);
#endif /* HAVE_FLOCK */
static int lkopen_dot (const char *, int, mode_t, int *);
static void lkclose_dot (int, const char *);
static int lkopen_dot (const char *, int, mode_t, int *);
static void lkclose_dot (int, const char *);
-int lkopenspool(const char *file, int access, mode_t mode, int *failed_to_lock)
+int
+lkopenspool(const char *file, int access, mode_t mode, int *failed_to_lock)
- return lkopen_fcntl(file, access, mode, failed_to_lock);
+ return lkopen_fcntl(file, access, mode, failed_to_lock);
- return lkopen_dot(file, access, mode, failed_to_lock);
+ return lkopen_dot(file, access, mode, failed_to_lock);
- return lkopen_flock(file, access, mode, failed_to_lock);
+ return lkopen_flock(file, access, mode, failed_to_lock);
- return lkopen_lockf(file, access, mode, failed_to_lock);
+ return lkopen_lockf(file, access, mode, failed_to_lock);
fd = link(tmpfile, curlock);
(void) m_unlink(tmpfile);
fd = link(tmpfile, curlock);
(void) m_unlink(tmpfile);
snprintf (bp, sizeof(li->curlock) - bplen, "%s.lock", cp);
snprintf (bp, sizeof(li->curlock) - bplen, "%s.lock", cp);
/*
* If this is for a new lock, create a name for
* the temporary lock file for lockit()
/*
* If this is for a new lock, create a name for
* the temporary lock file for lockit()
init_locktype(const char *lockname)
{
if (strcasecmp(lockname, "fcntl") == 0) {
init_locktype(const char *lockname)
{
if (strcasecmp(lockname, "fcntl") == 0) {