]> sjero.net Git - wget/blobdiff - src/hash.c
[svn] Don't define countof if it's already defined.
[wget] / src / hash.c
index c1feb6676995e4dad7de26acf4fa1f83e65f45e7..64451712bb9cefd88c09e3c79a7834b5e45bd6ea 100644 (file)
@@ -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