summaryrefslogtreecommitdiff
path: root/flash.h
diff options
context:
space:
mode:
authorstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2015-01-10 09:32:50 +0000
committerstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2015-01-10 09:32:50 +0000
commita944b6ad6fa81aa88b7f10ce4fbd7eb0577b32ee (patch)
treefcba10fdf1451557f3bc58de6f39d669e5106c46 /flash.h
parentc3a79baaa34f56c6a7e92798778810c57c44974c (diff)
downloadflashrom-a944b6ad6fa81aa88b7f10ce4fbd7eb0577b32ee.tar.gz
Unify target OS and CPU architecture checks.
We do CPU architecture checks once for the makefile in arch.h and once for HW access abstraction in hwaccess.c. This patch unifies related files so that they can share the checks to improve maintainability and reduce the chance of inconsistencies. Furthermore, it refines some of the definitions, which - adds "support" for AARCH64 and PPC64, - adds big-endian handling on arm as well as LE handling on PPC64, - fixes compilation of internal.c on AARCH64 and PPC64. Additionally, this patch continues to unify all OS checks in flashrom by adding a new helper macro IS_WINDOWS. The old header file for architecture checking is renamed to platform.h to reflect its broader scope and all new macros are add in there. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1864 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'flash.h')
-rw-r--r--flash.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/flash.h b/flash.h
index 81fd61b..56d9e4b 100644
--- a/flash.h
+++ b/flash.h
@@ -24,12 +24,14 @@
#ifndef __FLASH_H__
#define __FLASH_H__ 1
+#include "platform.h"
+
#include <inttypes.h>
#include <stdio.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
-#ifdef _WIN32
+#if IS_WINDOWS
#include <windows.h>
#undef min
#undef max