Index: /trunk/src/kmk/incdep.c
===================================================================
--- /trunk/src/kmk/incdep.c	(revision 1911)
+++ /trunk/src/kmk/incdep.c	(revision 1912)
@@ -773,9 +773,5 @@
                                                      entry->length,
                                                      entry->hash1,
-#ifdef STRCACHE2_USE_CHAINING
                                                      1);
-#else
-                                                     entry->hash2);
-#endif
   return (const char *)entry->user;
 }
Index: /trunk/src/kmk/strcache2.c
===================================================================
--- /trunk/src/kmk/strcache2.c	(revision 1911)
+++ /trunk/src/kmk/strcache2.c	(revision 1912)
@@ -287,48 +287,4 @@
 
 MY_INLINE unsigned int
-strcache2_case_sensitive_hash_2 (const char *str, unsigned int len)
-{
-#ifndef STRCACHE2_USE_CHAINING
-  unsigned int hash = 0;
-  if (MY_PREDICT_TRUE(len >= 2))
-    {
-      unsigned int ch0 = *str++;
-      hash = 0;
-      len--;
-      while (len >= 2)
-        {
-          unsigned int ch1 = *str++;
-          hash += ch0 << (ch1 & 0x7);
-
-          ch0 = *str++;
-          hash += ch1 << (ch0 & 0x7);
-
-          len -= 2;
-        }
-      if (len == 1)
-        {
-          unsigned ch1 = *str;
-          hash += ch0 << (ch1 & 0x7);
-
-          hash += ch1;
-        }
-      else
-        hash += ch0;
-    }
-  else if (len)
-    {
-      hash = *str;
-      hash += hash << (hash & 0x7);
-    }
-  else
-    hash = 1;
-  hash |= 1;
-  return hash;
-#else  /* STRCACHE2_USE_CHAINING */
-  return 1;
-#endif /* STRCACHE2_USE_CHAINING */
-}
-
-MY_INLINE unsigned int
 strcache2_case_insensitive_hash_1 (const char *str, unsigned int len)
 {
@@ -371,52 +327,4 @@
     hash = 0;
   return hash;
-}
-
-MY_INLINE unsigned int
-strcache2_case_insensitive_hash_2 (const char *str, unsigned int len)
-{
-#ifndef STRCACHE2_USE_CHAINING
-  unsigned int hash = 0;
-  if (MY_PREDICT_TRUE(len >= 2))
-    {
-      unsigned int ch0 = *str++;
-      ch0 = tolower (ch0);
-      hash = 0;
-      len--;
-      while (len >= 2)
-        {
-          unsigned int ch1 = *str++;
-          ch1 = tolower (ch1);
-          hash += ch0 << (ch1 & 0x7);
-
-          ch0 = *str++;
-          ch0 = tolower (ch0);
-          hash += ch1 << (ch0 & 0x7);
-
-          len -= 2;
-        }
-      if (len == 1)
-        {
-          unsigned ch1 = *str;
-          ch1 = tolower (ch1);
-          hash += ch0 << (ch1 & 0x7);
-
-          hash += ch1;
-        }
-      else
-        hash += ch0;
-    }
-  else if (len)
-    {
-      hash = *str;
-      hash += hash << (hash & 0x7);
-    }
-  else
-    hash = 1;
-  hash |= 1;
-  return hash;
-#else  /* STRCACHE2_USE_CHAINING */
-  return 1;
-#endif /* STRCACHE2_USE_CHAINING */
 }
 
@@ -666,5 +574,4 @@
 
   /* Copy the entries from the old to the new hash table. */
-#ifdef STRCACHE2_USE_CHAINING
   cache->collision_count = 0;
   while (src-- > 0)
@@ -682,30 +589,4 @@
         }
     }
-#else  /* !STRCACHE2_USE_CHAINING */
-  while (src-- > 0)
-    {
-      struct strcache2_entry *entry = src_tab[src];
-      if (entry)
-        {
-          unsigned int dst = STRCACHE2_MOD_IT (cache, entry->hash1);
-          if (dst_tab[dst])
-            {
-              unsigned int hash2 = entry->hash2;
-              if (!hash2)
-                entry->hash2 = hash2 = cache->case_insensitive
-                  ? strcache2_case_insensitive_hash_2 ((const char *)(entry + 1), entry->length)
-                  : strcache2_case_sensitive_hash_2 ((const char *)(entry + 1), entry->length);
-              dst += hash2;
-              dst = STRCACHE2_MOD_IT (cache, dst);
-              while (dst_tab[dst])
-                {
-                  dst += hash2;
-                  dst = STRCACHE2_MOD_IT (cache, dst);
-                }
-            }
-          dst_tab[dst] = entry;
-        }
-    }
-#endif /* !STRCACHE2_USE_CHAINING */
 
   /* That's it, just free the old table and we're done. */
@@ -782,14 +663,9 @@
   entry->length = length;
   entry->hash1 = hash1;
-#ifndef STRCACHE2_USE_CHAINING
-  entry->hash2 = hash2;
-#endif
   str_copy = (char *) memcpy (entry + 1, str, length);
   str_copy[length] = '\0';
 
-#ifdef STRCACHE2_USE_CHAINING
   if ((entry->next = cache->hash_tab[idx]) != 0)
     cache->collision_count++;
-#endif /* STRCACHE2_USE_CHAINING */
   cache->hash_tab[idx] = entry;
   cache->count++;
@@ -823,12 +699,5 @@
   cache->collision_1st_count++;
 
-#ifdef STRCACHE2_USE_CHAINING
   entry = entry->next;
-#else  /* !STRCACHE2_USE_CHAINING */
-  hash2 = strcache2_case_sensitive_hash_2 (str, length);
-  idx += hash2;
-  idx = STRCACHE2_MOD_IT (cache, idx);
-  entry = cache->hash_tab[idx];
-#endif /* !STRCACHE2_USE_CHAINING */
   if (!entry)
     return strcache2_enter_string (cache, idx, str, length, hash1, hash2);
@@ -840,11 +709,5 @@
   for (;;)
     {
-#ifdef STRCACHE2_USE_CHAINING
       entry = entry->next;
-#else  /* !STRCACHE2_USE_CHAINING */
-      idx += hash2;
-      idx = STRCACHE2_MOD_IT (cache, idx);
-      entry = cache->hash_tab[idx];
-#endif /* !STRCACHE2_USE_CHAINING */
       if (!entry)
         return strcache2_enter_string (cache, idx, str, length, hash1, hash2);
@@ -889,13 +752,5 @@
   cache->collision_1st_count++;
 
-#ifdef STRCACHE2_USE_CHAINING
   entry = entry->next;
-#else  /* !STRCACHE2_USE_CHAINING */
-  if (!hash2)
-      hash2 = strcache2_case_sensitive_hash_2 (str, length);
-  idx += hash2;
-  idx = STRCACHE2_MOD_IT (cache, idx);
-  entry = cache->hash_tab[idx];
-#endif /* !STRCACHE2_USE_CHAINING */
   if (!entry)
     return strcache2_enter_string (cache, idx, str, length, hash1, hash2);
@@ -907,11 +762,5 @@
   for (;;)
     {
-#ifdef STRCACHE2_USE_CHAINING
       entry = entry->next;
-#else  /* !STRCACHE2_USE_CHAINING */
-      idx += hash2;
-      idx = STRCACHE2_MOD_IT (cache, idx);
-      entry = cache->hash_tab[idx];
-#endif /* !STRCACHE2_USE_CHAINING */
       if (!entry)
         return strcache2_enter_string (cache, idx, str, length, hash1, hash2);
@@ -929,7 +778,4 @@
   struct strcache2_entry const *entry;
   unsigned int hash1 = strcache2_case_sensitive_hash_1 (str, length);
-#ifndef STRCACHE2_USE_CHAINING
-  unsigned int hash2;
-#endif
   unsigned int idx;
 
@@ -948,12 +794,5 @@
   cache->collision_1st_count++;
 
-#ifdef STRCACHE2_USE_CHAINING
   entry = entry->next;
-#else  /* !STRCACHE2_USE_CHAINING */
-  hash2 = strcache2_case_sensitive_hash_2 (str, length);
-  idx += hash2;
-  idx = STRCACHE2_MOD_IT (cache, idx);
-  entry = cache->hash_tab[idx];
-#endif /* !STRCACHE2_USE_CHAINING */
   if (!entry)
     return NULL;
@@ -965,11 +804,5 @@
   for (;;)
     {
-#ifdef STRCACHE2_USE_CHAINING
       entry = entry->next;
-#else  /* !STRCACHE2_USE_CHAINING */
-      idx += hash2;
-      idx = STRCACHE2_MOD_IT (cache, idx);
-      entry = cache->hash_tab[idx];
-#endif /* !STRCACHE2_USE_CHAINING */
       if (!entry)
         return NULL;
@@ -1006,12 +839,5 @@
   cache->collision_1st_count++;
 
-#ifdef STRCACHE2_USE_CHAINING
   entry = entry->next;
-#else  /* !STRCACHE2_USE_CHAINING */
-  hash2 = strcache2_case_insensitive_hash_2 (str, length);
-  idx += hash2;
-  idx = STRCACHE2_MOD_IT (cache, idx);
-  entry = cache->hash_tab[idx];
-#endif /* !STRCACHE2_USE_CHAINING */
   if (!entry)
     return strcache2_enter_string (cache, idx, str, length, hash1, hash2);
@@ -1023,11 +849,5 @@
   for (;;)
     {
-#ifdef STRCACHE2_USE_CHAINING
       entry = entry->next;
-#else  /* !STRCACHE2_USE_CHAINING */
-      idx += hash2;
-      idx = STRCACHE2_MOD_IT (cache, idx);
-      entry = cache->hash_tab[idx];
-#endif /* !STRCACHE2_USE_CHAINING */
       if (!entry)
         return strcache2_enter_string (cache, idx, str, length, hash1, hash2);
@@ -1072,13 +892,5 @@
   cache->collision_1st_count++;
 
-#ifdef STRCACHE2_USE_CHAINING
   entry = entry->next;
-#else  /* !STRCACHE2_USE_CHAINING */
-  if (!hash2)
-      hash2 = strcache2_case_insensitive_hash_2 (str, length);
-  idx += hash2;
-  idx = STRCACHE2_MOD_IT (cache, idx);
-  entry = cache->hash_tab[idx];
-#endif /* !STRCACHE2_USE_CHAINING */
   if (!entry)
     return strcache2_enter_string (cache, idx, str, length, hash1, hash2);
@@ -1090,11 +902,5 @@
   for (;;)
     {
-#ifdef STRCACHE2_USE_CHAINING
       entry = entry->next;
-#else  /* !STRCACHE2_USE_CHAINING */
-      idx += hash2;
-      idx = STRCACHE2_MOD_IT (cache, idx);
-      entry = cache->hash_tab[idx];
-#endif /* !STRCACHE2_USE_CHAINING */
       if (!entry)
         return strcache2_enter_string (cache, idx, str, length, hash1, hash2);
@@ -1112,7 +918,4 @@
   struct strcache2_entry const *entry;
   unsigned int hash1 = strcache2_case_insensitive_hash_1 (str, length);
-#ifndef STRCACHE2_USE_CHAINING
-  unsigned int hash2;
-#endif
   unsigned int idx;
 
@@ -1131,12 +934,5 @@
   cache->collision_1st_count++;
 
-#ifdef STRCACHE2_USE_CHAINING
   entry = entry->next;
-#else  /* !STRCACHE2_USE_CHAINING */
-  hash2 = strcache2_case_insensitive_hash_2 (str, length);
-  idx += hash2;
-  idx = STRCACHE2_MOD_IT (cache, idx);
-  entry = cache->hash_tab[idx];
-#endif /* !STRCACHE2_USE_CHAINING */
   if (!entry)
     return NULL;
@@ -1148,11 +944,5 @@
   for (;;)
     {
-#ifdef STRCACHE2_USE_CHAINING
       entry = entry->next;
-#else  /* !STRCACHE2_USE_CHAINING */
-      idx += hash2;
-      idx = STRCACHE2_MOD_IT (cache, idx);
-      entry = cache->hash_tab[idx];
-#endif /* !STRCACHE2_USE_CHAINING */
       if (!entry)
         return NULL;
@@ -1222,36 +1012,7 @@
     }
 
-#ifndef STRCACHE2_USE_CHAINING
-  if (entry->hash2)
-    {
-      hash = cache->case_insensitive
-        ? strcache2_case_insensitive_hash_2 (str, entry->length)
-        : strcache2_case_sensitive_hash_2 (str, entry->length);
-      if (hash != entry->hash2)
-        {
-          fprintf (stderr,
-                   "strcache2[%s]: corrupt entry %p, hash#2: %x, expected %x;\nstring: %s\n",
-                   cache->name, (void *)entry, hash, entry->hash2, str);
-          return -1;
-        }
-    }
-#endif
-
   return 0;
 }
 
-#ifndef STRCACHE2_USE_CHAINING
-/* Fallback for calculating and returning the 2nd hash. */
-unsigned int
-strcache2_get_hash2_fallback (struct strcache2 *cache, const char *str)
-{
-  struct strcache2_entry *entry = (struct strcache2_entry *) str - 1;
-  unsigned hash2 = cache->case_insensitive
-      ? strcache2_case_insensitive_hash_2 (str, entry->length)
-      : strcache2_case_sensitive_hash_2 (str, entry->length);
-  entry->hash2 = hash2;
-  return hash2;
-}
-#endif /* !STRCACHE2_USE_CHAINING */
 
 /* Calculates the case sensitive hash values of the string.
@@ -1259,9 +1020,5 @@
 unsigned int strcache2_hash_str (const char *str, unsigned int length, unsigned int *hash2p)
 {
-#ifndef STRCACHE2_USE_CHAINING
-  *hash2p = strcache2_case_sensitive_hash_2 (str, length);
-#else
   *hash2p = 1;
-#endif
   return    strcache2_case_sensitive_hash_1 (str, length);
 }
@@ -1271,9 +1028,5 @@
 unsigned int strcache2_hash_istr (const char *str, unsigned int length, unsigned int *hash2p)
 {
-#ifndef STRCACHE2_USE_CHAINING
-  *hash2p = strcache2_case_insensitive_hash_2 (str, length);
-#else
   *hash2p = 1;
-#endif
   return    strcache2_case_insensitive_hash_1 (str, length);
 }
@@ -1316,7 +1069,5 @@
 #endif
   cache->count = 0;
-#ifdef STRCACHE2_USE_CHAINING
   cache->collision_count = 0;
-#endif
   cache->lookup_count = 0;
   cache->collision_1st_count = 0;
@@ -1390,7 +1141,5 @@
   unsigned int  idx;
   unsigned int  rehashes;
-#ifdef STRCACHE2_USE_CHAINING
   unsigned int  chain_depths[32];
-#endif
 
   printf (_("\n%s strcache2: %s\n"), prefix, cache->name);
@@ -1411,17 +1160,11 @@
 
   /* String statistics. */
-#ifdef STRCACHE2_USE_CHAINING
   memset (chain_depths, '\0', sizeof (chain_depths));
-#endif
   idx = cache->hash_size;
   while (idx-- > 0)
     {
       struct strcache2_entry const *entry = cache->hash_tab[idx];
-#ifdef STRCACHE2_USE_CHAINING
       unsigned int depth = 0;
       for (; entry != 0; entry = entry->next, depth++)
-#else
-      if (entry)
-#endif
         {
           unsigned int length = entry->length;
@@ -1433,7 +1176,5 @@
           str_count++;
         }
-#ifdef STRCACHE2_USE_CHAINING
       chain_depths[depth >= 32 ? 31 : depth]++;
-#endif
     }
   str_avg_len = cache->count ? str_total_len / cache->count : 0;
@@ -1465,5 +1206,4 @@
           cache->collision_2nd_count, (unsigned int)((100.0 * cache->collision_2nd_count) / cache->lookup_count),
           cache->collision_3rd_count, (unsigned int)((100.0 * cache->collision_3rd_count) / cache->lookup_count));
-#ifdef STRCACHE2_USE_CHAINING
   printf (_("%s  hash insert collisions = %u (%u%%)\n"),
           prefix, cache->collision_count,(unsigned int)((100.0 * cache->collision_count) / cache->count));
@@ -1484,5 +1224,4 @@
                 strs_at_this_depth,        (unsigned int)((100.0 * strs_at_this_depth) / cache->count), idx - 1);
     }
-#endif
 }
 
Index: /trunk/src/kmk/strcache2.h
===================================================================
--- /trunk/src/kmk/strcache2.h	(revision 1911)
+++ /trunk/src/kmk/strcache2.h	(revision 1912)
@@ -33,5 +33,4 @@
 
 #define STRCACHE2_USE_MASK 1
-#define STRCACHE2_USE_CHAINING 1
 
 /* string cache memory segment. */
@@ -48,12 +47,7 @@
 struct strcache2_entry
 {
-#ifdef STRCACHE2_USE_CHAINING
     struct strcache2_entry *next;       /* Collision chain. */
-#endif
     void *user;
     unsigned int hash1;
-#ifndef STRCACHE2_USE_CHAINING
-    unsigned int hash2;
-#endif
     unsigned int length;
 };
@@ -89,7 +83,5 @@
     unsigned long collision_3rd_count;  /* The number of 3rd level collisions. */
     unsigned int count;                 /* Number entries in the cache. */
-#ifdef STRCACHE2_USE_CHAINING
     unsigned int collision_count;       /* Number of entries in chains. */
-#endif
     unsigned int rehash_count;          /* When to rehash the table. */
     unsigned int init_size;             /* The initial hash table size. */
@@ -155,16 +147,4 @@
 }
 
-#ifndef STRCACHE2_USE_CHAINING
-/* Get the second hash value for the string. */
-MY_INLINE unsigned int
-strcache2_get_hash2 (struct strcache2 *cache, const char *str)
-{
-  unsigned int hash2 = strcache2_get_entry (cache, str)->hash2;
-  if (!hash2)
-    hash2 = strcache2_get_hash2_fallback (cache, str);
-  return hash2;
-}
-#endif
-
 /* Get the pointer hash value for the string.
 
