From 5501768adbef05e82ffb5b62a0fc40a702b3f49a Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Sun, 3 Jan 2010 01:04:18 +0000 Subject: [PATCH] Use queue.h HEAD macros more portably (also avoiding compiler warning). svn path=/trunk/yasm/; revision=2258 --- libyasm/errwarn.c | 4 ++-- libyasm/section.c | 7 ++++--- modules/dbgfmts/codeview/cv-symline.c | 4 ++-- modules/objfmts/bin/bin-objfmt.c | 2 +- modules/preprocs/cpp/cpp-preproc.c | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/libyasm/errwarn.c b/libyasm/errwarn.c index 644d7d27..fa136005 100644 --- a/libyasm/errwarn.c +++ b/libyasm/errwarn.c @@ -69,7 +69,7 @@ typedef struct warn { yasm_warn_class wclass; /*@owned@*/ /*@null@*/ char *wstr; } warn; -static STAILQ_HEAD(, warn) yasm_warns; +static STAILQ_HEAD(warn_head, warn) yasm_warns; /* Enabled warnings. See errwarn.h for a list. */ static unsigned long warn_class_enabled; @@ -86,7 +86,7 @@ typedef struct errwarn_data { } errwarn_data; struct yasm_errwarns { - /*@reldef@*/ SLIST_HEAD(, errwarn_data) errwarns; + /*@reldef@*/ SLIST_HEAD(errwarn_head, errwarn_data) errwarns; /* Total error count */ unsigned int ecount; diff --git a/libyasm/section.c b/libyasm/section.c index 2c6c8de6..3271e391 100644 --- a/libyasm/section.c +++ b/libyasm/section.c @@ -871,10 +871,11 @@ struct yasm_span { }; typedef struct optimize_data { - /*@reldef@*/ TAILQ_HEAD(, yasm_span) spans; - /*@reldef@*/ STAILQ_HEAD(, yasm_span) QA, QB; + /*@reldef@*/ TAILQ_HEAD(yasm_span_head, yasm_span) spans; + /*@reldef@*/ STAILQ_HEAD(yasm_span_shead, yasm_span) QA, QB; /*@only@*/ IntervalTree *itree; - /*@reldef@*/ STAILQ_HEAD(, yasm_offset_setter) offset_setters; + /*@reldef@*/ STAILQ_HEAD(offset_setters_head, yasm_offset_setter) + offset_setters; long len_diff; /* used only for optimize_term_expand */ yasm_span *span; /* used only for check_cycle */ yasm_offset_setter *os; diff --git a/modules/dbgfmts/codeview/cv-symline.c b/modules/dbgfmts/codeview/cv-symline.c index 0a806226..1996c33a 100644 --- a/modules/dbgfmts/codeview/cv-symline.c +++ b/modules/dbgfmts/codeview/cv-symline.c @@ -134,7 +134,7 @@ typedef struct cv8_lineinfo { yasm_section *sect; /* section line numbers are for */ yasm_symrec *sectsym; /* symbol for beginning of sect */ unsigned long num_linenums; - STAILQ_HEAD(, cv8_lineset) linesets; + STAILQ_HEAD(cv8_lineset_head, cv8_lineset) linesets; } cv8_lineinfo; /* Symbols use a bit of meta-programming to encode formats: each character @@ -419,7 +419,7 @@ typedef struct cv_line_info { yasm_linemap *linemap; yasm_errwarns *errwarns; unsigned int num_lineinfos; - STAILQ_HEAD(, cv8_lineinfo) cv8_lineinfos; + STAILQ_HEAD(cv8_lineinfo_head, cv8_lineinfo) cv8_lineinfos; /*@null@*/ cv8_lineinfo *cv8_cur_li; /*@null@*/ cv8_lineset *cv8_cur_ls; } cv_line_info; diff --git a/modules/objfmts/bin/bin-objfmt.c b/modules/objfmts/bin/bin-objfmt.c index 3a64429d..c1be24ec 100644 --- a/modules/objfmts/bin/bin-objfmt.c +++ b/modules/objfmts/bin/bin-objfmt.c @@ -113,7 +113,7 @@ bin_objfmt_create(yasm_object *object) return (yasm_objfmt *)objfmt_bin; } -typedef TAILQ_HEAD(, bin_group) bin_groups; +typedef TAILQ_HEAD(bin_group_head, bin_group) bin_groups; typedef struct bin_group { TAILQ_ENTRY(bin_group) link; diff --git a/modules/preprocs/cpp/cpp-preproc.c b/modules/preprocs/cpp/cpp-preproc.c index 821b98b5..663f726c 100644 --- a/modules/preprocs/cpp/cpp-preproc.c +++ b/modules/preprocs/cpp/cpp-preproc.c @@ -59,7 +59,7 @@ typedef struct yasm_preproc_cpp { yasm_preproc_base preproc; /* base structure */ /* List of arguments to pass to cpp. */ - TAILQ_HEAD(, cpp_arg_entry) cpp_args; + TAILQ_HEAD(cpp_arg_head, cpp_arg_entry) cpp_args; char *filename; FILE *f, *f_deps; -- 2.40.0