diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2014-10-24 10:44:14 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2014-10-24 10:44:14 -0500 |
commit | 7700e6fe796cabfa22eefddc024d66257a28d4dc (patch) | |
tree | 6189fe56031cfdedc77fe6dfcbdc9105a24531a7 /src | |
parent | 6ca79042b9aa9752e577346e6f355356ef8f2f9a (diff) |
Fix compile errors created by bundling queue.h
Diffstat (limited to 'src')
-rw-r--r-- | src/librc/rc.h.in | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/librc/rc.h.in b/src/librc/rc.h.in index 62119e9f..58d8eb57 100644 --- a/src/librc/rc.h.in +++ b/src/librc/rc.h.in @@ -77,6 +77,51 @@ extern "C" { # define RC_LOCAL_CONFDIR RC_LOCAL_PREFIX "/etc/conf.d" #endif +#ifndef _SYS_QUEUE_H_ + +/* + * The following are copied directly from our imported queue.h. + */ + +/* + * List definitions. + */ +#define LIST_HEAD(name, type) \ +struct name { \ + struct type *lh_first; /* first element */ \ +} + +#define LIST_HEAD_INITIALIZER(head) \ + { NULL } + +#define LIST_ENTRY(type) \ +struct { \ + struct type *le_next; /* next element */ \ + struct type **le_prev; /* address of previous next element */ \ +} + +/* + * Tail queue definitions. + */ +#define _TAILQ_HEAD(name, type, qual) \ +struct name { \ + qual type *tqh_first; /* first element */ \ + qual type *qual *tqh_last; /* addr of last next element */ \ +} +#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,) + +#define TAILQ_HEAD_INITIALIZER(head) \ + { TAILQ_END(head), &(head).tqh_first } + +#define _TAILQ_ENTRY(type, qual) \ +struct { \ + qual type *tqe_next; /* next element */ \ + qual type *qual *tqe_prev; /* address of previous next element */\ +} +#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,) + +#endif /* _SYS_QUEUE_H_ */ + /* A doubly linked list using queue(3) for ease of use */ typedef struct rc_string { char *value; |