X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=dotlock.c;h=abf92f0f341ba912c76741f119f3b035122704d5;hp=118f53151c28ac081dfbde8c1a2e5b36f4a097d2;hb=68edc972742930c4003e554144bfe197ba6199aa;hpb=230399f9632c37b66c1c117a17e8327eae6b3235 diff --git a/dotlock.c b/dotlock.c index 118f531..abf92f0 100644 --- a/dotlock.c +++ b/dotlock.c @@ -8,30 +8,10 @@ * please see the file GPL in the top level source directory. */ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include +#include -#include -#include -#include -#include #include -#include -#include -#include -#include - -#ifndef _POSIX_PATH_MAX -#include -#endif - #include "dotlock.h" -#include "config.h" #ifdef HAVE_GETOPT_H #include @@ -55,12 +35,6 @@ # endif -# ifndef HAVE_SNPRINTF -extern int snprintf (char *, size_t, const char *, ...); -# endif - -#include - static int DotlockFlags; static int Retry = MAXLOCKATTEMPT; @@ -502,7 +476,7 @@ static int dotlock_lock (const char *frealpath) { 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;