OSDN Git Service

drm: fix build without X11 headers.
authorDmitry Ermilov <dmitry.ermilov@intel.com>
Tue, 3 Jul 2012 13:34:24 +0000 (15:34 +0200)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Wed, 26 Sep 2012 09:53:58 +0000 (11:53 +0200)
Signed-off-by: Dmitry Ermilov <dmitry.ermilov@intel.com>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
dummy_drv_video/dummy_drv_video.c
va/sysdeps.h
va/va.c

index a6e76b9..9d442fa 100644 (file)
@@ -1056,10 +1056,6 @@ VAStatus dummy_PutSurface(
        )
 {
     /* TODO */
-    void *drawable = (void *)draw;
-
-    (void)drawable;
-
     return VA_STATUS_ERROR_UNKNOWN;
 }
 
index d864721..77db28a 100644 (file)
@@ -31,6 +31,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdbool.h>
 #include <string.h>
 #include <stdint.h>
 #include <assert.h>
diff --git a/va/va.c b/va/va.c
index fdbe044..1ba4518 100644 (file)
--- a/va/va.c
+++ b/va/va.c
 #define CHECK_MAXIMUM(s, ctx, var) if (!va_checkMaximum(ctx->max_##var, #var)) s = VA_STATUS_ERROR_UNKNOWN;
 #define CHECK_STRING(s, ctx, var) if (!va_checkString(ctx->str_##var, #var)) s = VA_STATUS_ERROR_UNKNOWN;
 
-#define Bool int
-#define True 1
-#define False 0
-
 /*
  * read a config "env" for libva.conf or from environment setting
  * liva.conf has higher priority
@@ -125,31 +121,31 @@ void va_infoMessage(const char *msg, ...)
     va_end(args);
 }
 
-static Bool va_checkVtable(void *ptr, char *function)
+static bool va_checkVtable(void *ptr, char *function)
 {
     if (!ptr) {
         va_errorMessage("No valid vtable entry for va%s\n", function);
-        return False;
+        return false;
     }
-    return True;
+    return true;
 }
 
-static Bool va_checkMaximum(int value, char *variable)
+static bool va_checkMaximum(int value, char *variable)
 {
     if (!value) {
         va_errorMessage("Failed to define max_%s in init\n", variable);
-        return False;
+        return false;
     }
-    return True;
+    return true;
 }
 
-static Bool va_checkString(const char* value, char *variable)
+static bool va_checkString(const char* value, char *variable)
 {
     if (!value) {
         va_errorMessage("Failed to define str_%s in init\n", variable);
-        return False;
+        return false;
     }
-    return True;
+    return true;
 }
 
 static inline int