"Beni Serfaty" <[EMAIL PROTECTED]> writes:

> I Think I found a bug when STANDALONE is defined on hash.c
> I hope I'm not missing something here...

Good catch, thanks.  I've applied a slightly different fix, appended
below.

By the way, are you using hash.c in a project?  I'd like to hear if
you're satisfied with it and would be very interested in any
suggestions and, of course, bugs.  hash.c was written to be
reuse-friendly.

Also note that you can get the latest version of the file (this fix
included) from http://svn.dotsrc.org/repo/wget/trunk/src/hash.c .


2006-03-06  Hrvoje Niksic  <[EMAIL PROTECTED]>

        * hash.c (TOLOWER): Fix definition when STANDALONE.
        Reported by Beni Serfaty.

Index: src/hash.c
===================================================================
--- src/hash.c  (revision 2119)
+++ src/hash.c  (working copy)
@@ -53,7 +53,8 @@
 # ifndef countof
 #  define countof(x) (sizeof (x) / sizeof ((x)[0]))
 # endif
-# define TOLOWER(x) ('A' <= (x) && (x) <= 'Z' ? (x) - 32 : (x))
+# include <ctype.h>
+# define TOLOWER(x) tolower ((unsigned char) x)
 # if __STDC_VERSION__ >= 199901L
 #  include <stdint.h>  /* for uintptr_t */
 # else

Reply via email to