Changeset 1870 for trunk/src/kmk/strcache.c
- Timestamp:
- Oct 17, 2008, 1:15:30 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/strcache.c
r1858 r1870 16 16 17 17 #include "make.h" 18 #ifndef CONFIG_WITH_STRCACHE2 18 19 19 20 #include <assert.h> 20 21 21 22 #include "hash.h" 23 22 24 23 25 /* The size (in bytes) of each cache buffer. … … 381 383 /* Performs the prehashing for use with strcache_add_prehashed(). */ 382 384 void 383 strcache_prehash_str (const char *str, unsigned long *hash1p,385 strcache_prehash_str (const char *str, unsigned int len, unsigned long *hash1p, 384 386 unsigned long *hash2p) 385 387 { 388 (void)len; 386 389 *hash1p = str_hash_1 (str); 387 390 *hash2p = str_hash_2 (str); … … 460 463 hash_print_stats (&strings, stdout); 461 464 } 465 466 #else /* CONFIG_WITH_STRCACHE2 */ 467 468 #include "strcache2.h" 469 470 /* The file string cache. */ 471 struct strcache2 file_strcache; 472 473 void strcache_init (void) 474 { 475 strcache2_init(&file_strcache, 476 "file", /* name */ 477 65536, /* hash size */ 478 0, /* default segment size*/ 479 #ifdef HAVE_CASE_INSENSITIVE_FS 480 1, /* case insensitive */ 481 #else 482 0, /* case insensitive */ 483 #endif 484 0); /* thread safe */ 485 } 486 487 void 488 strcache_print_stats (const char *prefix) 489 { 490 strcache2_print_stats (&file_strcache, prefix); 491 } 492 493 494 #endif /* CONFIG_WITH_STRCACHE2 */
Note:
See TracChangeset
for help on using the changeset viewer.