History

drm: add extern C guard for the UAPI headers

Emil Velikov committed 10 years ago

Commit ebbb0e51 parent 12246494 files · +40 −0Browse files

Showing the changes to include/uapi (4 of 4 files). Show all

Unified · Split

4 files
  1. include/uapi/drm/drm.h +16 −0
  2. include/uapi/drm/drm_fourcc.h +8 −0
  3. include/uapi/drm/drm_mode.h +8 −0
  4. include/uapi/drm/drm_sarea.h +8 −0
include/uapi/drm/drm.h+16−0
@@ -65,6 +65,10 @@ typedef unsigned long drm_handle_t; · 64 unmodified lines
6565
6666 #endif
6767
68+#if defined(__cplusplus)
69+extern "C" {
70+#endif
71+
6872 #define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */
6973 #define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */
7074 #define DRM_MAX_ORDER 22 /**< Up to 2^22 bytes = 4MB */
@@ -691,8 +695,16 @@ struct drm_prime_handle { · 620 unmodified lines
691695 __s32 fd;
692696 };
693697
698+#if defined(__cplusplus)
699+}
700+#endif
701+
694702 #include "drm_mode.h"
695703
704+#if defined(__cplusplus)
705+extern "C" {
706+#endif
707+
696708 #define DRM_IOCTL_BASE 'd'
697709 #define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr)
698710 #define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE,nr,type)
@@ -886,4 +898,8 @@ typedef struct drm_scatter_gather drm_scatter_gather_t; · 187 unmodified lines
886898 typedef struct drm_set_version drm_set_version_t;
887899 #endif
888900
901+#if defined(__cplusplus)
902+}
903+#endif
904+
889905 #endif
include/uapi/drm/drm_fourcc.h+8−0
@@ -26,6 +26,10 @@ · 25 unmodified lines
2626
2727 #include "drm.h"
2828
29+#if defined(__cplusplus)
30+extern "C" {
31+#endif
32+
2933 #define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \
3034 ((__u32)(c) << 16) | ((__u32)(d) << 24))
3135
@@ -229,4 +233,8 @@ · 197 unmodified lines
229233 */
230234 #define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE fourcc_mod_code(SAMSUNG, 1)
231235
236+#if defined(__cplusplus)
237+}
238+#endif
239+
232240 #endif /* DRM_FOURCC_H */
include/uapi/drm/drm_mode.h+8−0
@@ -29,6 +29,10 @@ · 28 unmodified lines
2929
3030 #include "drm.h"
3131
32+#if defined(__cplusplus)
33+extern "C" {
34+#endif
35+
3236 #define DRM_DISPLAY_INFO_LEN 32
3337 #define DRM_CONNECTOR_NAME_LEN 32
3438 #define DRM_DISPLAY_MODE_LEN 32
@@ -623,4 +627,8 @@ struct drm_mode_destroy_blob { · 588 unmodified lines
623627 __u32 blob_id;
624628 };
625629
630+#if defined(__cplusplus)
631+}
632+#endif
633+
626634 #endif
include/uapi/drm/drm_sarea.h+8−0
@@ -34,6 +34,10 @@ · 33 unmodified lines
3434
3535 #include "drm.h"
3636
37+#if defined(__cplusplus)
38+extern "C" {
39+#endif
40+
3741 /* SAREA area needs to be at least a page */
3842 #if defined(__alpha__)
3943 #define SAREA_MAX 0x2000U
@@ -83,4 +87,8 @@ typedef struct drm_sarea_frame drm_sarea_frame_t; · 43 unmodified lines
8387 typedef struct drm_sarea drm_sarea_t;
8488 #endif
8589
90+#if defined(__cplusplus)
91+}
92+#endif
93+
8694 #endif /* _DRM_SAREA_H_ */