Commit c71759d3 authored by Stefan Tauner's avatar Stefan Tauner
Browse files

hwaccess.h: fix compilation on OSX


DirectHW provides prototypes for out[bwl] and in[bwl], but we still
need to define the respective OUT[BWL] and IN[BWL] binding macros.

Apparently this has been broken since r1864 (or January 2015).

Corresponding to flashrom svn r1890.
Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
parent 95edc89a
...@@ -231,11 +231,6 @@ cpu_to_be(64) ...@@ -231,11 +231,6 @@ cpu_to_be(64)
#define INL(x) __extension__ ({ u_int inl_tmp = (x); inl(inl_tmp); }) #define INL(x) __extension__ ({ u_int inl_tmp = (x); inl(inl_tmp); })
#else #else
#if defined(__MACH__) && defined(__APPLE__)
/* Header is part of the DirectHW library. */
#include <DirectHW/DirectHW.h>
#else
#if defined (__sun) #if defined (__sun)
/* Note different order for outb */ /* Note different order for outb */
#define OUTB(x,y) outb(y, x) #define OUTB(x,y) outb(y, x)
...@@ -259,6 +254,12 @@ cpu_to_be(64) ...@@ -259,6 +254,12 @@ cpu_to_be(64)
#define INL inportl #define INL inportl
#else #else
#if defined(__MACH__) && defined(__APPLE__)
/* Header is part of the DirectHW library. */
#include <DirectHW/DirectHW.h>
#endif
/* This is the usual glibc interface. */ /* This is the usual glibc interface. */
#define OUTB outb #define OUTB outb
#define OUTW outw #define OUTW outw
...@@ -269,7 +270,6 @@ cpu_to_be(64) ...@@ -269,7 +270,6 @@ cpu_to_be(64)
#endif #endif
#endif #endif
#endif #endif
#endif
#if defined(__NetBSD__) || defined (__OpenBSD__) #if defined(__NetBSD__) || defined (__OpenBSD__)
#if defined(__i386__) || defined(__x86_64__) #if defined(__i386__) || defined(__x86_64__)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment