-#ifdef DOT_LOCKING
-static int lkopen_dot (char *, int, mode_t);
-static int lockit (struct lockinfo *);
-static void lockname (char *, struct lockinfo *, int);
+
+/* top of list containing all open locks */
+static struct lock *l_top = NULL;
+
+static int lkopen(const char *, int, mode_t, enum locktype, int *);
+static int str2accbits(const char *);
+
+static int lkopen_fcntl (const char *, int, mode_t, int *);
+#ifdef HAVE_LOCKF
+static int lkopen_lockf (const char *, int, mode_t, int *);
+#endif /* HAVE_LOCKF */
+#ifdef HAVE_FLOCK
+static int lkopen_flock (const char *, int, mode_t, int *);
+#endif /* HAVE_FLOCK */
+
+static enum locktype init_locktype(const char *);
+
+static int lkopen_dot (const char *, int, mode_t, int *);
+static void lkclose_dot (int, const char *);
+static void lockname (const char *, struct lockinfo *, int);