]> diplodocus.org Git - nmh/blobdiff - sbr/lock_file.c
geteditor.c: Hard-code the default, "vi".
[nmh] / sbr / lock_file.c
index c7002b2e361a954f015250097f10d8f52ffd8954..19cad331edb92dc501fb5fea2d416d1672581bf7 100644 (file)
@@ -17,6 +17,7 @@
 #include <h/signals.h>
 #include <h/utils.h>
 #include <h/mts.h>
+#include "lock_file.h"
 #include "m_mktemp.h"
 
 #ifdef HAVE_SYS_TIME_H
@@ -89,7 +90,7 @@ static int lkopen_lockf (const char *, int, mode_t, int *);
 static int lkopen_flock (const char *, int, mode_t, int *);
 #endif /* HAVE_FLOCK */
 
-static enum locktype init_locktype(const char *);
+static enum locktype init_locktype(const char *) PURE;
 
 static int lkopen_dot (const char *, int, mode_t, int *);
 static void lkclose_dot (int, const char *);
@@ -627,7 +628,9 @@ lockname (const char *file, struct lockinfo *li, int isnewlock)
 
     snprintf (bp, sizeof(li->curlock) - bplen, "%s.lock", cp);
 
-#if !defined(HAVE_LIBLOCKFILE)
+#if defined(HAVE_LIBLOCKFILE)
+    NMH_UNUSED(isnewlock);
+#else
     /*
      * If this is for a new lock, create a name for
      * the temporary lock file for lockit()