]> sjero.net Git - wget/blobdiff - src/hash.c
Eschew config-post.h.
[wget] / src / hash.c
index 5d156da8ae8a2d94ea302a8c9c3961a589576feb..e3fac111bf85d318b5d7736a122ca33bf2b5ee21 100644 (file)
@@ -30,8 +30,8 @@ so, delete this exception statement from your version.  */
 /* With -DSTANDALONE, this file can be compiled outside Wget source
    tree.  To test, also use -DTEST.  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
+#ifndef STANDALONE
+# include "wget.h"
 #endif
 
 #include <stdio.h>
@@ -42,7 +42,6 @@ so, delete this exception statement from your version.  */
 
 #ifndef STANDALONE
 /* Get Wget's utility headers. */
-# include "wget.h"
 # include "utils.h"
 #else
 /* Make do without them. */
@@ -54,7 +53,7 @@ so, delete this exception statement from your version.  */
 #  define countof(x) (sizeof (x) / sizeof ((x)[0]))
 # endif
 # include <ctype.h>
-# define TOLOWER(x) tolower ((unsigned char) (x))
+# define c_tolower(x) tolower ((unsigned char) (x))
 # if __STDC_VERSION__ >= 199901L
 #  include <stdint.h>  /* for uintptr_t */
 # else
@@ -680,11 +679,11 @@ static unsigned long
 hash_string_nocase (const void *key)
 {
   const char *p = key;
-  unsigned int h = TOLOWER (*p);
+  unsigned int h = c_tolower (*p);
   
   if (h)
     for (p += 1; *p != '\0'; p++)
-      h = (h << 5) - h + TOLOWER (*p);
+      h = (h << 5) - h + c_tolower (*p);
   
   return h;
 }