summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandr Shadchin <Alexandr.Shadchin@gmail.com>2011-10-04 17:20:13 +0600
committerAlexandr Shadchin <Alexandr.Shadchin@gmail.com>2011-10-29 02:13:27 +0600
commit05b41e2dc60a0aefc685a33260e5d8e09580908b (patch)
tree645281d56022e4563129555409431ec910d52b4d
parentaf56e502f5ddf1d2d495b633734cadcb023b7c36 (diff)
Move check definition MAP_FAILED in xf86_OSlib.h
Also remove odd definition MAP_FAILED. Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--hw/xfree86/os-support/bsd/alpha_video.c4
-rw-r--r--hw/xfree86/os-support/bsd/arm_video.c5
-rw-r--r--hw/xfree86/os-support/bsd/i386_video.c4
-rw-r--r--hw/xfree86/os-support/bsd/ppc_video.c5
-rw-r--r--hw/xfree86/os-support/bsd/sparc64_video.c4
-rw-r--r--hw/xfree86/os-support/linux/lnx_video.c4
-rw-r--r--hw/xfree86/os-support/shared/bios_mmap.c4
-rw-r--r--hw/xfree86/os-support/xf86_OSlib.h4
8 files changed, 4 insertions, 30 deletions
diff --git a/hw/xfree86/os-support/bsd/alpha_video.c b/hw/xfree86/os-support/bsd/alpha_video.c
index ee5c86aee..c47f7bfc7 100644
--- a/hw/xfree86/os-support/bsd/alpha_video.c
+++ b/hw/xfree86/os-support/bsd/alpha_video.c
@@ -52,10 +52,6 @@
#define MAP_FLAGS (MAP_FILE | MAP_SHARED)
#endif
-#ifndef MAP_FAILED
-#define MAP_FAILED ((caddr_t)-1)
-#endif
-
axpDevice bsdGetAXP(void);
#ifndef __NetBSD__
diff --git a/hw/xfree86/os-support/bsd/arm_video.c b/hw/xfree86/os-support/bsd/arm_video.c
index ffc42a86d..1de6c87d6 100644
--- a/hw/xfree86/os-support/bsd/arm_video.c
+++ b/hw/xfree86/os-support/bsd/arm_video.c
@@ -97,11 +97,6 @@ struct memAccess ioMemInfo = { CONSOLE_GET_IO_INFO, NULL, NULL,
#define MAP_FLAGS (MAP_FILE | MAP_SHARED)
#endif
-#ifndef MAP_FAILED
-#define MAP_FAILED ((caddr_t)-1)
-#endif
-
-
#define BUS_BASE 0L
#define BUS_BASE_BWX 0L
diff --git a/hw/xfree86/os-support/bsd/i386_video.c b/hw/xfree86/os-support/bsd/i386_video.c
index d16e4a82c..35e00fce7 100644
--- a/hw/xfree86/os-support/bsd/i386_video.c
+++ b/hw/xfree86/os-support/bsd/i386_video.c
@@ -64,10 +64,6 @@
#define MAP_FLAGS (MAP_FILE | MAP_SHARED)
#endif
-#ifndef MAP_FAILED
-#define MAP_FAILED ((caddr_t)-1)
-#endif
-
#ifdef __OpenBSD__
#define SYSCTL_MSG "\tCheck that you have set 'machdep.allowaperture=1'\n"\
"\tin /etc/sysctl.conf and reboot your machine\n" \
diff --git a/hw/xfree86/os-support/bsd/ppc_video.c b/hw/xfree86/os-support/bsd/ppc_video.c
index 920a002a4..e5d832eed 100644
--- a/hw/xfree86/os-support/bsd/ppc_video.c
+++ b/hw/xfree86/os-support/bsd/ppc_video.c
@@ -36,11 +36,6 @@
#include "bus/Pci.h"
-#ifndef MAP_FAILED
-#define MAP_FAILED ((caddr_t)-1)
-#endif
-
-
/***************************************************************************/
/* Video Memory Mapping section */
/***************************************************************************/
diff --git a/hw/xfree86/os-support/bsd/sparc64_video.c b/hw/xfree86/os-support/bsd/sparc64_video.c
index a2a30c9d7..960c850a8 100644
--- a/hw/xfree86/os-support/bsd/sparc64_video.c
+++ b/hw/xfree86/os-support/bsd/sparc64_video.c
@@ -34,10 +34,6 @@
#include "xf86_OSlib.h"
#include "xf86OSpriv.h"
-#ifndef MAP_FAILED
-#define MAP_FAILED ((caddr_t)-1)
-#endif
-
/***************************************************************************/
/* Video Memory Mapping section */
/***************************************************************************/
diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
index 3d455112c..e711784e7 100644
--- a/hw/xfree86/os-support/linux/lnx_video.c
+++ b/hw/xfree86/os-support/linux/lnx_video.c
@@ -46,10 +46,6 @@
#include <asm/mtrr.h>
#endif
-#ifndef MAP_FAILED
-#define MAP_FAILED ((void *)-1)
-#endif
-
static Bool ExtendedEnabled = FALSE;
#ifdef __ia64__
diff --git a/hw/xfree86/os-support/shared/bios_mmap.c b/hw/xfree86/os-support/shared/bios_mmap.c
index 33a8df042..b7b35d9db 100644
--- a/hw/xfree86/os-support/shared/bios_mmap.c
+++ b/hw/xfree86/os-support/shared/bios_mmap.c
@@ -31,10 +31,6 @@
#include "xf86Priv.h"
#include "xf86_OSlib.h"
-#ifndef MAP_FAILED
-#define MAP_FAILED ((void *)-1)
-#endif
-
/*
* Read BIOS via mmap()ing DEV_MEM
*/
diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h
index 34b8669e3..0a5861f49 100644
--- a/hw/xfree86/os-support/xf86_OSlib.h
+++ b/hw/xfree86/os-support/xf86_OSlib.h
@@ -363,6 +363,10 @@
#define DEV_MEM "/dev/mem"
#endif
+#ifndef MAP_FAILED
+#define MAP_FAILED ((void *)-1)
+#endif
+
#define SYSCALL(call) while(((call) == -1) && (errno == EINTR))
#define XF86_OS_PRIVS