diff options
Diffstat (limited to 'shared/drm.h')
-rw-r--r-- | shared/drm.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/shared/drm.h b/shared/drm.h index ac9f407a..5faf2bae 100644 --- a/shared/drm.h +++ b/shared/drm.h @@ -47,10 +47,26 @@ #define XFREE86_VERSION(major,minor,patch,snap) \ ((major << 16) | (minor << 8) | patch) +#define __DRM_STRINGIFY(x) #x +#define DRM_STRINGIFY(x) __DRM_STRINGIFY(x) + #ifndef CONFIG_XFREE86_VERSION +/* If CONFIG_XFREE86_VERSION is defined, these must also be defined */ +#define CONFIG_XFREE86_MAJOR 4 +#define CONFIG_XFREE86_MINOR 1 +#define CONFIG_XFREE86_PATCH 0 + #define CONFIG_XFREE86_VERSION XFREE86_VERSION(4,1,0,0) #endif +#define XF86_MAJ_STR DRM_STRINGIFY(CONFIG_XFREE86_MAJOR) +#define XF86_MIN_STR DRM_STRINGIFY(CONFIG_XFREE86_MINOR) +#define XF86_PATCH_STR DRM_STRINGIFY(CONFIG_XFREE86_PATCH) + +#ifndef CONFIG_XFREE86_VERSION_STR +#define CONFIG_XFREE86_VERSION_STR "-"##XF86_MAJ_STR##"_"##XF86_MIN_STR##"_"##XF86_PATCH_STR +#endif + #if CONFIG_XFREE86_VERSION < XFREE86_VERSION(4,1,0,0) #define DRM_PROC_DEVICES "/proc/devices" #define DRM_PROC_MISC "/proc/misc" |