summaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2000-09-24 09:34:10 +0000
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2000-09-24 09:34:10 +0000
commitc7558d8fa4df805b7f7ff3d631432eadac9b8a1c (patch)
tree3275f130db9176a55470713b02c13fb1feb7fbdb /shared
parentb1aa228f7d7390f8b9a361f862d724b908d5a71f (diff)
commit xfree86 4.0.1d-pre update
Diffstat (limited to 'shared')
-rw-r--r--shared/drm.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/shared/drm.h b/shared/drm.h
index 5a979e1c..6cfe88fa 100644
--- a/shared/drm.h
+++ b/shared/drm.h
@@ -31,11 +31,16 @@
* Dec 1999, Richard Henderson <rth@twiddle.net>, move to generic cmpxchg.
*
*/
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h,v 1.9 2000/08/24 22:20:18 tsi Exp $ */
#ifndef _DRM_H_
#define _DRM_H_
+#if defined(__linux__)
#include <asm/ioctl.h> /* For _IO* macros */
+#elif defined(__FreeBSD__)
+#include <sys/ioccom.h>
+#endif
#define DRM_PROC_DEVICES "/proc/devices"
#define DRM_PROC_MISC "/proc/misc"
@@ -289,7 +294,11 @@ typedef struct drm_agp_info {
} drm_agp_info_t;
#define DRM_IOCTL_BASE 'd'
+#if defined(__linux__)
#define DRM_IOCTL_NR(n) _IOC_NR(n)
+#elif defined(__FreeBSD__)
+#define DRM_IOCTL_NR(n) ((n) & 0xff)
+#endif
#define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr)
#define DRM_IOR(nr,size) _IOR(DRM_IOCTL_BASE,nr,size)
#define DRM_IOW(nr,size) _IOW(DRM_IOCTL_BASE,nr,size)