From: hniksic Date: Thu, 2 Feb 2006 13:04:33 +0000 (-0800) Subject: [svn] Don't define countof if it's already defined. X-Git-Tag: v1.13~690 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=31cc8166dcec35c054f665bb73407511d351f4ec [svn] Don't define countof if it's already defined. --- diff --git a/src/ChangeLog b/src/ChangeLog index 36ff4a1c..3a84779f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-02-02 Hrvoje Niksic + + * hash.c: Don't define countof if it's already defined. + 2006-01-30 Mauro Tortonesi * http.c: Changed output format. Removed excessively verbose debugging diff --git a/src/hash.c b/src/hash.c index c1feb667..64451712 100644 --- a/src/hash.c +++ b/src/hash.c @@ -50,7 +50,9 @@ so, delete this exception statement from your version. */ # define xnew_array(type, x) xmalloc (sizeof (type) * (x)) # define xmalloc malloc # define xfree free -# define countof(x) (sizeof (x) / sizeof ((x)[0])) +# ifndef countof +# define countof(x) (sizeof (x) / sizeof ((x)[0])) +# endif # define TOLOWER(x) ('A' <= (x) && (x) <= 'Z' ? (x) - 32 : (x)) #endif