From 31cc8166dcec35c054f665bb73407511d351f4ec Mon Sep 17 00:00:00 2001 From: hniksic Date: Thu, 2 Feb 2006 05:04:33 -0800 Subject: [PATCH] [svn] Don't define countof if it's already defined. --- src/ChangeLog | 4 ++++ src/hash.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) 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 -- 2.39.2