* please see the file GPL in the top level source directory.
*/
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <lib-lib/lib-lib.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <sys/file.h>
-#include <sys/stat.h>
#include <sys/utsname.h>
-#include <errno.h>
-#include <time.h>
-#include <fcntl.h>
-#include <limits.h>
-
-#ifndef _POSIX_PATH_MAX
-#include <posix1_lim.h>
-#endif
-
#include "dotlock.h"
-#include "config.h"
#ifdef HAVE_GETOPT_H
#include <getopt.h>
# endif
-# ifndef HAVE_SNPRINTF
-extern int snprintf (char *, size_t, const char *, ...);
-# endif
-
-#include <lib-lib/str.h>
-
static int DotlockFlags;
static int Retry = MAXLOCKATTEMPT;
/* determine the system's host name */
uname (&utsname);
- if (!(Hostname = strdup (utsname.nodename))) /* __MEM_CHECKED__ */
+ if (!(Hostname = strdup(utsname.nodename)))
return DL_EX_ERROR;
if ((p = strchr (Hostname, '.')))
*p = '\0';
static void usage (const char *av0)
{
- fprintf (stderr, "dotlock [Mutt-ng %s]\n", VERSION);
+ fprintf (stderr, "dotlock [Madmutt %s]\n", VERSION);
fprintf (stderr, "usage: %s [-t|-f|-u|-d] [-p] [-r <retries>] file\n", av0);
fputs ("\noptions:"
{
char lockfile[_POSIX_PATH_MAX + LONG_STRING];
char nfslockfile[_POSIX_PATH_MAX + LONG_STRING];
- size_t prev_size = 0;
+ ssize_t prev_size = 0;
int fd;
int count = 0;
int hard_count = 0;