diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2004-05-23 06:22:27 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2004-05-23 06:22:27 +0000 |
commit | efec7c23b1d646578ddc47685496bdb9f1e9187f (patch) | |
tree | f0843268d4841bbe88eaaf16f23d5ec21b7b3152 /openbsd-compat/sys-queue.h | |
parent | b409718797da73ac4ee2de422d894297b2c2d8f7 (diff) |
- (bal) [openbsd-compat/sys-queue.h] Reintroduce machinary to handle
old/broken/incomplete <sys/queue.h>.
Diffstat (limited to 'openbsd-compat/sys-queue.h')
-rw-r--r-- | openbsd-compat/sys-queue.h | 89 |
1 files changed, 86 insertions, 3 deletions
diff --git a/openbsd-compat/sys-queue.h b/openbsd-compat/sys-queue.h index dd289dc16..c49a94650 100644 --- a/openbsd-compat/sys-queue.h +++ b/openbsd-compat/sys-queue.h | |||
@@ -34,8 +34,91 @@ | |||
34 | * @(#)queue.h 8.5 (Berkeley) 8/20/94 | 34 | * @(#)queue.h 8.5 (Berkeley) 8/20/94 |
35 | */ | 35 | */ |
36 | 36 | ||
37 | #ifndef _SYS_QUEUE_H_ | 37 | #ifndef _FAKE_QUEUE_H_ |
38 | #define _SYS_QUEUE_H_ | 38 | #define _FAKE_QUEUE_H_ |
39 | |||
40 | /* | ||
41 | * Require for OS/X and other platforms that have old/broken/incomplete | ||
42 | * <sys/queue.h>. | ||
43 | */ | ||
44 | #undef SLIST_HEAD | ||
45 | #undef SLIST_HEAD_INITIALIZER | ||
46 | #undef SLIST_ENTRY | ||
47 | #undef SLIST_FOREACH_PREVPTR | ||
48 | #undef SLIST_FIRST | ||
49 | #undef SLIST_END | ||
50 | #undef SLIST_EMPTY | ||
51 | #undef SLIST_NEXT | ||
52 | #undef SLIST_FOREACH | ||
53 | #undef SLIST_INIT | ||
54 | #undef SLIST_INSERT_AFTER | ||
55 | #undef SLIST_INSERT_HEAD | ||
56 | #undef SLIST_REMOVE_HEAD | ||
57 | #undef SLIST_REMOVE | ||
58 | #undef SLIST_REMOVE_NEXT | ||
59 | #undef LIST_HEAD | ||
60 | #undef LIST_HEAD_INITIALIZER | ||
61 | #undef LIST_ENTRY | ||
62 | #undef LIST_FIRST | ||
63 | #undef LIST_END | ||
64 | #undef LIST_EMPTY | ||
65 | #undef LIST_NEXT | ||
66 | #undef LIST_FOREACH | ||
67 | #undef LIST_INIT | ||
68 | #undef LIST_INSERT_AFTER | ||
69 | #undef LIST_INSERT_BEFORE | ||
70 | #undef LIST_INSERT_HEAD | ||
71 | #undef LIST_REMOVE | ||
72 | #undef LIST_REPLACE | ||
73 | #undef SIMPLEQ_HEAD | ||
74 | #undef SIMPLEQ_HEAD_INITIALIZER | ||
75 | #undef SIMPLEQ_ENTRY | ||
76 | #undef SIMPLEQ_FIRST | ||
77 | #undef SIMPLEQ_END | ||
78 | #undef SIMPLEQ_EMPTY | ||
79 | #undef SIMPLEQ_NEXT | ||
80 | #undef SIMPLEQ_FOREACH | ||
81 | #undef SIMPLEQ_INIT | ||
82 | #undef SIMPLEQ_INSERT_HEAD | ||
83 | #undef SIMPLEQ_INSERT_TAIL | ||
84 | #undef SIMPLEQ_INSERT_AFTER | ||
85 | #undef SIMPLEQ_REMOVE_HEAD | ||
86 | #undef TAILQ_HEAD | ||
87 | #undef TAILQ_HEAD_INITIALIZER | ||
88 | #undef TAILQ_ENTRY | ||
89 | #undef TAILQ_FIRST | ||
90 | #undef TAILQ_END | ||
91 | #undef TAILQ_NEXT | ||
92 | #undef TAILQ_LAST | ||
93 | #undef TAILQ_PREV | ||
94 | #undef TAILQ_EMPTY | ||
95 | #undef TAILQ_FOREACH | ||
96 | #undef TAILQ_FOREACH_REVERSE | ||
97 | #undef TAILQ_INIT | ||
98 | #undef TAILQ_INSERT_HEAD | ||
99 | #undef TAILQ_INSERT_TAIL | ||
100 | #undef TAILQ_INSERT_AFTER | ||
101 | #undef TAILQ_INSERT_BEFORE | ||
102 | #undef TAILQ_REMOVE | ||
103 | #undef TAILQ_REPLACE | ||
104 | #undef CIRCLEQ_HEAD | ||
105 | #undef CIRCLEQ_HEAD_INITIALIZER | ||
106 | #undef CIRCLEQ_ENTRY | ||
107 | #undef CIRCLEQ_FIRST | ||
108 | #undef CIRCLEQ_LAST | ||
109 | #undef CIRCLEQ_END | ||
110 | #undef CIRCLEQ_NEXT | ||
111 | #undef CIRCLEQ_PREV | ||
112 | #undef CIRCLEQ_EMPTY | ||
113 | #undef CIRCLEQ_FOREACH | ||
114 | #undef CIRCLEQ_FOREACH_REVERSE | ||
115 | #undef CIRCLEQ_INIT | ||
116 | #undef CIRCLEQ_INSERT_AFTER | ||
117 | #undef CIRCLEQ_INSERT_BEFORE | ||
118 | #undef CIRCLEQ_INSERT_HEAD | ||
119 | #undef CIRCLEQ_INSERT_TAIL | ||
120 | #undef CIRCLEQ_REMOVE | ||
121 | #undef CIRCLEQ_REPLACE | ||
39 | 122 | ||
40 | /* | 123 | /* |
41 | * This file defines five types of data structures: singly-linked lists, | 124 | * This file defines five types of data structures: singly-linked lists, |
@@ -507,4 +590,4 @@ struct { \ | |||
507 | (elm2)->field.cqe_prev->field.cqe_next = (elm2); \ | 590 | (elm2)->field.cqe_prev->field.cqe_next = (elm2); \ |
508 | } while (0) | 591 | } while (0) |
509 | 592 | ||
510 | #endif /* !_SYS_QUEUE_H_ */ | 593 | #endif /* !_FAKE_QUEUE_H_ */ |