summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-06-14 11:31:40 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-06-14 11:31:40 +0100
commit84d65bace521ad80b9bede4ae9e3e2a8d0668b90 (patch)
tree9f238cc14190564c24999cba087208cb6f63787f
parent00a54eee8f29ced610ef9d65b077e64bc65655e9 (diff)
Compile fix for alternate list.h from xserver-1.9
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/i830.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/i830.h b/src/i830.h
index 09920883..c98a842f 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -77,6 +77,15 @@ void i830_uxa_block_handler(ScreenPtr pScreen);
Bool i830_get_aperture_space(ScrnInfoPtr scrn, drm_intel_bo ** bo_table,
int num_bos);
+/* XXX
+ * The X server gained an *almost* identical implementation in 1.9.
+ *
+ * Remove this duplicate code either in 2.16 (when we can depend upon 1.9)
+ * or the drivers are merged back into the xserver tree, whichever happens
+ * earlier.
+ */
+
+#ifndef _LIST_H_
/* classic doubly-link circular list */
struct list {
struct list *next, *prev;
@@ -124,25 +133,35 @@ list_is_empty(struct list *head)
{
return head->next == head;
}
+#endif
#ifndef container_of
#define container_of(ptr, type, member) \
(type *)((char *)(ptr) - (char *) &((type *)0)->member)
#endif
+#ifndef list_entry
#define list_entry(ptr, type, member) \
container_of(ptr, type, member)
+#endif
+#ifndef list_first_entry
#define list_first_entry(ptr, type, member) \
list_entry((ptr)->next, type, member)
+#endif
+#ifndef list_foreach
#define list_foreach(pos, head) \
for (pos = (head)->next; pos != (head); pos = pos->next)
+#endif
+/* XXX list.h from xserver-1.9 uses a GCC-ism to avoid having to pass type */
+#ifndef list_foreach_entry
#define list_foreach_entry(pos, type, head, member) \
for (pos = list_entry((head)->next, type, member);\
&pos->member != (head); \
pos = list_entry(pos->member.next, type, member))
+#endif
struct intel_pixmap {
dri_bo *bo;