On 09/01/2011 07:59, Ralf Wildenhues wrote:
Index: strcache.c =================================================================== RCS file: /cvsroot/make/make/strcache.c,v retrieving revision 2.9 diff -u -r2.9 strcache.c --- strcache.c 13 Jul 2010 01:20:43 -0000 2.9 +++ strcache.c 9 Jan 2011 07:55:51 -0000 @@ -1,5 +1,5 @@ /* Constant string caching for GNU Make. -Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of GNU Make.GNU Make is free software; you can redistribute it and/or modify it under the @@ -20,10 +20,6 @@ #include "hash.h" -/* The size (in bytes) of each cache buffer. - Try to pick something that will map well into the heap. */ -#define CACHE_BUFFER_SIZE (8192 - 16) - /* A string cached here will never be freed, so we don't need to worry about reference counting. We just store the string, and then remember it in a @@ -34,9 +30,18 @@ char *end; /* Pointer to the beginning of the free space. */ int count; /* # of strings in this buffer (for stats). */ int bytesfree; /* The amount of the buffer that is free. */ - char buffer[1]; /* The buffer comes after this. */ + char buffer[1]; /* The buffer starts here. */ }; +/* The size of the strcache struct overhead. */ +#define STRCACHE_HEADER_SIZE (sizeof (struct strcache) - 1)
This would be better written: #define STRCACHE_HEADER_SIZE offsetof (struct strcache, buffer) MM _______________________________________________ Bug-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-make
