Changeset 1870 for trunk/src/kmk/make.h


Ignore:
Timestamp:
Oct 17, 2008, 1:15:30 AM (17 years ago)
Author:
bird
Message:

kmk: replaced strcache with strcacahe2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/make.h

    r1867 r1870  
    586586void strcache_init (void);
    587587void strcache_print_stats (const char *prefix);
     588#ifndef CONFIG_WITH_STRCACHE2
    588589int strcache_iscached (const char *str);
    589590const char *strcache_add (const char *str);
    590591const char *strcache_add_len (const char *str, int len);
    591592int strcache_setbufsize (int size);
    592 #ifdef CONFIG_WITH_INCLUDEDEP
     593# ifdef CONFIG_WITH_INCLUDEDEP
    593594const char *strcache_add_prehashed (const char *str, int len,
    594595                                    unsigned long hash1, unsigned long hash2);
    595 void strcache_prehash_str (const char *str, unsigned long *hash1p,
     596void strcache_prehash_str (const char *str, unsigned int len, unsigned long *hash1p,
    596597                           unsigned long *hash2p);
    597598#endif
     
    633634}
    634635
    635 #endif
     636# endif /* CONFIG_WITH_VALUE_LENGTH*/
     637
     638#else  /* CONFIG_WITH_STRCACHE2 */
     639
     640# include "strcache2.h"
     641extern struct strcache2 file_strcache;
     642
     643# define strcache_iscached(str)     strcache2_is_cached(&file_strcache, str)
     644# define strcache_add(str)          strcache2_add(&file_strcache, str, strlen (str))
     645# define strcache_add_len(str, len) strcache2_add(&file_strcache, str, len)
     646# ifdef CONFIG_WITH_INCLUDEDEP
     647#  define strcache_add_prehashed(str, len, hash1, hash2) \
     648    strcache2_add_hashed(&file_strcache, str, len, hash1, hash2)
     649#  ifdef HAVE_CASE_INSENSITIVE_FS
     650#   define strcache_prehash_str(str, length, hash1p, hash2p) \
     651     do { *(hash1p) = strcache2_hash_istr (str, length, (hash2p)); } while (0)
     652#  else
     653#   define strcache_prehash_str(str, length, hash1p, hash2p) \
     654     do { *(hash1p) = strcache2_hash_str (str, length, (hash2p)); } while (0)
     655#  endif
     656# endif /* CONFIG_WITH_INCLUDEDEP */
     657# ifdef CONFIG_WITH_VALUE_LENGTH
     658#  define strcache_get_len(str)     strcache2_get_len(&file_strcache, str)
     659#  define strcache_get_hash1(str)   strcache2_get_hash1(&file_strcache, str)
     660#  define strcache_get_hash2(str)   strcache2_get_hash2(&file_strcache, str)
     661# endif /* CONFIG_WITH_VALUE_LENGTH */
     662
     663#endif /* CONFIG_WITH_STRCACHE2 */
    636664
    637665#ifdef  HAVE_VFORK_H
Note: See TracChangeset for help on using the changeset viewer.