[vbox-dev] [PATCH 3/3] additions/linux/drm: Remove dependency on iprt/cdefs, stdarg, stdint and types.h

Hans de Goede hdegoede at redhat.com
Wed May 17 14:59:43 GMT 2017


Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
 src/VBox/Additions/linux/drm/VBoxVideoIPRT.h     | 28 +++++++++++++++++++-----
 src/VBox/Additions/linux/drm/files_vboxvideo_drv |  4 ----
 2 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/src/VBox/Additions/linux/drm/VBoxVideoIPRT.h b/src/VBox/Additions/linux/drm/VBoxVideoIPRT.h
index f44fa1c9..dc4886ee 100644
--- a/src/VBox/Additions/linux/drm/VBoxVideoIPRT.h
+++ b/src/VBox/Additions/linux/drm/VBoxVideoIPRT.h
@@ -29,12 +29,8 @@
 #define ___VBox_VBoxVideoIPRT_h
 
 #include <asm/io.h>
-#include <iprt/cdefs.h>
-#include <iprt/stdarg.h>
-#include <iprt/stdint.h>
-#include <iprt/types.h>
-
 #include <linux/string.h>
+#include <linux/version.h>
 
 /** @name VirtualBox error macros
  * @{ */
@@ -82,6 +78,8 @@ extern int RTASSERTVAR[1];
 #define AssertCompileSize(type, size) \
     AssertCompile(sizeof(type) == (size))
 
+#define VALID_PTR(p) (p != NULL)
+
 /** @}  */
 
 /** @name Port I/O helpers
@@ -114,6 +112,26 @@ extern int RTASSERTVAR[1];
 typedef uint32_t HGSMISIZE;
 typedef uint32_t HGSMIOFFSET;
 
+typedef void RTRECT;
+
+#define UINT32_C(val)		(val ## U)
+#define UINT32_MAX		UINT32_C(0xffffffff)
+
+/** @}  */
+
+/** @name iprt/desc.h replacement macros
+ * @{ */
+
+#define RT_C_DECLS_BEGIN
+#define RT_C_DECLS_END
+#define DECLCALLBACK(type) type
+#define DECLCALLBACKMEMBER(type, name) type (*name)
+#define DECLHIDDEN(type) __attribute__((visibility("hidden"))) type
+#define DECLINLINE(type) static __inline__ type
+#define RT_BOOL(val) (!!(val))
+#define RT_BIT BIT
+#define _1K 0x00000400
+
 /** @}  */
 
 #endif /* ___VBox_VBoxVideoIPRT_h */
diff --git a/src/VBox/Additions/linux/drm/files_vboxvideo_drv b/src/VBox/Additions/linux/drm/files_vboxvideo_drv
index 75304b00..b0fa6632 100755
--- a/src/VBox/Additions/linux/drm/files_vboxvideo_drv
+++ b/src/VBox/Additions/linux/drm/files_vboxvideo_drv
@@ -20,10 +20,6 @@ FILES_VBOXVIDEO_DRM_NOBIN=" \
     ${PATH_OUT}/version-generated.h=>version-generated.h \
     ${PATH_OUT}/revision-generated.h=>revision-generated.h \
     ${PATH_OUT}/product-generated.h=>product-generated.h \
-    ${PATH_ROOT}/include/iprt/cdefs.h=>include/iprt/cdefs.h \
-    ${PATH_ROOT}/include/iprt/stdarg.h=>include/iprt/stdarg.h \
-    ${PATH_ROOT}/include/iprt/stdint.h=>include/iprt/stdint.h \
-    ${PATH_ROOT}/include/iprt/types.h=>include/iprt/types.h \
     ${PATH_ROOT}/include/VBox/Graphics/VBoxVideo.h=>include/VBoxVideo.h \
     ${PATH_ROOT}/include/VBox/Graphics/VBoxVideoGuest.h=>include/VBoxVideoGuest.h \
     ${PATH_ROOT}/include/VBox/Graphics/HGSMIChannels.h=>include/HGSMIChannels.h \
-- 
2.12.2




More information about the vbox-dev mailing list