xf86-video-intel: src/i830.h

Chris Wilson ickle at kemper.freedesktop.org
Mon Jun 14 03:21:55 PDT 2010


 src/i830.h |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

New commits:
commit 84d65bace521ad80b9bede4ae9e3e2a8d0668b90
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Jun 14 11:31:40 2010 +0100

    Compile fix for alternate list.h from xserver-1.9
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/i830.h b/src/i830.h
index 0992088..c98a842 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;


More information about the xorg-commit mailing list