[darcs-devel] A forwarded darcs patch

David Roundy droundy at abridgegame.org
Mon Jun 21 02:26:57 PDT 2004


On Sun, Jun 20, 2004 at 11:46:22PM +0200, Juliusz Chroboczek wrote:
> > droundy at abridgegame.org**20040619103451] {
> > hunk ./compat.c 54
> > -#define FILENAME_SIZE 11 + 15 + 8 + 1
> > +#define FILENAME_SIZE 11 + 15 + 8 + 1 + 65
> > }
> 
> Why is that needed?  hotname is truncated to 15 bytes a few lines
> later.

I see.  I hadn't noticed that hostname got truncated.  But nevertheless,
the snprintf was failing on my Mac, and increasing the FILENAME_SIZE
eliminated the failure and allowed the locking to function.

I think I may see the problem.  The %4x number isn't limited to take only 4
characters--it takes a minimum of four characters, so on systems with a
long hostname and large process IDs the lock would fail.
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-devel mailing list