aboutsummaryrefslogtreecommitdiffstats
path: root/hwaccess.c
diff options
context:
space:
mode:
authorThomas Heijligen <thomas.heijligen@secunet.de>2021-10-12 17:58:35 +0200
committerNico Huber <nico.h@gmx.de>2021-10-15 14:36:09 +0000
commit1379e54f519234c07b7e0995de84ab782581c552 (patch)
tree1f54911858840716722f02d604c2a828b4ff2db2 /hwaccess.c
parentc9d947576bad1854fe7899e9bccc22ce0e649554 (diff)
downloadflashrom-1379e54f519234c07b7e0995de84ab782581c552.tar.gz
flashrom-1379e54f519234c07b7e0995de84ab782581c552.tar.bz2
flashrom-1379e54f519234c07b7e0995de84ab782581c552.zip
buildsystem: evaluate the USE_IOPL, USE_DEV_IO, USE_IOPERM macros
Determine which macro has to be set for the target system. Do this in the buildsystem instead of using preprocessor macros. Change-Id: Ic41ea025e35feb93f07ce7a94c0d15e6e84f38b9 Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de> Reviewed-on: https://review.coreboot.org/c/flashrom/+/58278 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'hwaccess.c')
-rw-r--r--hwaccess.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/hwaccess.c b/hwaccess.c
index aa35f4b3..13bacd7f 100644
--- a/hwaccess.c
+++ b/hwaccess.c
@@ -30,26 +30,6 @@
#include "programmer.h"
#include "hwaccess.h"
-#if !(defined(__gnu_linux__) || defined(__linux__) || defined(__APPLE__) && defined(__MACH__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) || defined(__DJGPP__) || defined(__LIBPAYLOAD__) || defined(__sun) || defined(__gnu_hurd__))
-#error "Unknown operating system"
-#endif
-
-#if defined(__gnu_linux__) || defined(__linux__) || defined(__APPLE__) && defined(__MACH__) || defined(__NetBSD__) || defined(__OpenBSD__)
-#define USE_IOPL 1
-#else
-#define USE_IOPL 0
-#endif
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
-#define USE_DEV_IO 1
-#else
-#define USE_DEV_IO 0
-#endif
-#if defined(__gnu_hurd__)
-#define USE_IOPERM 1
-#else
-#define USE_IOPERM 0
-#endif
-
#if USE_IOPERM
#include <sys/io.h>
#endif