OSDN Git Service

Avoid use of c++ reserved keyword "virtual" when using a C++ compiler.
authorEric Anholt <eric@anholt.net>
Thu, 26 Aug 2010 22:39:28 +0000 (15:39 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 26 Aug 2010 22:45:12 +0000 (15:45 -0700)
Avoids requiring nasty hacks around libdrm headers in the new C++
parts of Mesa drivers.

include/drm/drm.h
intel/intel_bufmgr.h

index a0559eb..2ba7136 100644 (file)
@@ -373,7 +373,11 @@ struct drm_buf_pub {
  */
 struct drm_buf_map {
        int count;              /**< Length of the buffer list */
+#ifdef __cplusplus
+       void *virt;
+#else
        void *virtual;          /**< Mmap'd area in user-virtual */
+#endif
        struct drm_buf_pub *list;       /**< Buffer information */
 };
 
index 65fd603..9df5168 100644 (file)
@@ -66,7 +66,11 @@ struct _drm_intel_bo {
         * Virtual address for accessing the buffer data.  Only valid while
         * mapped.
         */
+#ifdef __cplusplus
+       void *virt;
+#else
        void *virtual;
+#endif
 
        /** Buffer manager context associated with this buffer object */
        drm_intel_bufmgr *bufmgr;
@@ -168,7 +172,7 @@ void drm_intel_bufmgr_fake_set_fence_callback(drm_intel_bufmgr *bufmgr,
 drm_intel_bo *drm_intel_bo_fake_alloc_static(drm_intel_bufmgr *bufmgr,
                                             const char *name,
                                             unsigned long offset,
-                                            unsigned long size, void *virtual);
+                                            unsigned long size, void *virt);
 void drm_intel_bo_fake_disable_backing_store(drm_intel_bo *bo,
                                             void (*invalidate_cb) (drm_intel_bo
                                                                    * bo,