From 2702a61b0e22ddcbd0b23c1765fac90fe766802a Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 19 Feb 2012 03:04:39 +0100 Subject: Fix hash table issues with ISO C99 ISO C99 forbids unnamed structs/unions and nested functions. Move the "HTABLE_HEAD" and "HTABLE_GENERATE" parts out of the function body and place them at the very top of the file (where function definitions are allowed). Also, remove the unnamed struct from "htable.h" (which was useless anyway). Signed-off-by: Lukas Fleischer --- src/htable.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/htable.h') diff --git a/src/htable.h b/src/htable.h index 10d04c1..efd7cac 100644 --- a/src/htable.h +++ b/src/htable.h @@ -69,9 +69,7 @@ struct name { \ } #define HTABLE_ENTRY(type) \ -struct { \ - struct type *next; /* To build the bucket chain list. */ \ -} +struct type *next /* To build the bucket chain list. */ #define HTABLE_SIZE(head) \ (sizeof (*(head)->bkts) ? sizeof ((head)->bkts) / sizeof (*(head)->bkts) : 0) -- cgit v1.2.3