From fcc21069b7019a4a93e1ceacc175ccd682353861 Mon Sep 17 00:00:00 2001 From: David Dawes Date: Fri, 30 Mar 2001 17:16:20 +0000 Subject: - Move xf86ConfigDRI declaration from xf86Priv.h to xf86.h. - Don't include xf86Priv.h in the drm module. - Fix 'struct stat' in loader libc wrapping to avoid unnecessary XFree86LOADER #ifdefs in code that uses it. - Make drmOpenMinor() static. --- libdrm/xf86drm.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'libdrm') diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c index a640d598..82675881 100644 --- a/libdrm/xf86drm.c +++ b/libdrm/xf86drm.c @@ -35,11 +35,9 @@ # include "xf86.h" # include "xf86_OSproc.h" # include "xf86_ansic.h" -# include "xf86Priv.h" # define _DRM_MALLOC xalloc # define _DRM_FREE xfree # ifndef XFree86LOADER -# include # include # endif #else @@ -53,6 +51,7 @@ # include # include # include +# define stat_t struct stat # include # include # include @@ -141,11 +140,7 @@ static char *drmStrdup(const char *s) static unsigned long drmGetKeyFromFd(int fd) { -#ifdef XFree86LOADER - struct xf86stat st; -#else - struct stat st; -#endif + stat_t st; st.st_rdev = 0; fstat(fd, &st); @@ -174,11 +169,7 @@ static drmHashEntry *drmGetEntry(int fd) static int drmOpenDevice(long dev, int minor) { -#ifdef XFree86LOADER - struct xf86stat st; -#else - struct stat st; -#endif + stat_t st; char buf[64]; int fd; mode_t dirmode = DRM_DEV_DIRMODE; @@ -225,7 +216,7 @@ static int drmOpenDevice(long dev, int minor) return -errno; } -int drmOpenMinor(int minor, int create) +static int drmOpenMinor(int minor, int create) { int fd; char buf[64]; -- cgit v1.2.3