summaryrefslogtreecommitdiffstats
path: root/hwaccess.h
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2013-02-04 04:38:42 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2013-02-04 04:38:42 +0000
commite038e9082cce69f10f17747fc272ae370c9836cf (patch)
tree81738c13224127bddc2f02aa6b62e1281a820354 /hwaccess.h
parentf656e8088e95eaa9a4690529597133d0daf66c2a (diff)
downloadast2050-flashrom-e038e9082cce69f10f17747fc272ae370c9836cf.zip
ast2050-flashrom-e038e9082cce69f10f17747fc272ae370c9836cf.tar.gz
Fix building for MacOSX
- Add a new macro named IS_MACOSX to hwaccess.c and use it to enable iopl(). This was broken since r1638. This fix does *not* restore the very permissive concept where iopl() was activated in an #else branch that was inplace before r1638. - Make printing the image file's size in flashrom.c platform independent. Bonus: remove definitions of off64_t and lseek64 which are not necessary anymore for about 1000 commits. Thanks to SJ for reporting the issue and testing the solution. Corresponding to flashrom svn r1648. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Diffstat (limited to 'hwaccess.h')
-rw-r--r--hwaccess.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/hwaccess.h b/hwaccess.h
index dc52118..714a660 100644
--- a/hwaccess.h
+++ b/hwaccess.h
@@ -189,8 +189,6 @@ cpu_to_be(64)
* versions. Use machine/cpufunc.h only for plain FreeBSD/DragonFlyBSD.
*/
#include <machine/cpufunc.h>
- #define off64_t off_t
- #define lseek64 lseek
#define OUTB(x, y) do { u_int outb_tmp = (y); outb(outb_tmp, (x)); } while (0)
#define OUTW(x, y) do { u_int outw_tmp = (y); outw(outw_tmp, (x)); } while (0)
#define OUTL(x, y) do { u_int outl_tmp = (y); outl(outl_tmp, (x)); } while (0)
@@ -201,8 +199,6 @@ cpu_to_be(64)
#if defined(__MACH__) && defined(__APPLE__)
/* Header is part of the DirectHW library. */
#include <DirectHW/DirectHW.h>
- #define off64_t off_t
- #define lseek64 lseek
#endif
#if defined (__sun) && (defined(__i386) || defined(__amd64))
/* Note different order for outb */
@@ -241,8 +237,6 @@ cpu_to_be(64)
#endif
#if defined(__NetBSD__) || defined (__OpenBSD__)
- #define off64_t off_t
- #define lseek64 lseek
#if defined(__i386__) || defined(__x86_64__)
#include <sys/types.h>
#include <machine/sysarch.h>
OpenPOWER on IntegriCloud