mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 22:21:16 +02:00
Portability fixes and cleanups
Move Mac OS X IOKit/DirectHW availability checks in the Makefile from compiler check to pciutils check. Print the compiler error messages for feature detection. Add DOS libpci in the Makefile includes only if a PCI-based programmer was requested. Restrict mmap usage in ich_descriptors_tool to Unix style systems. Build ich_descriptors_tool with the correct .exe extension on DOS/Windows. Build ich_descriptors_tool by default on x86. (Patch by Stefan Tauner) Print the Windows version instead of "unknown machine" on Windows. Don't #define our own __DARWIN__, use the standard OS X detection method. Update the README. Add more generated files to svn:ignore Corresponding to flashrom svn r1567. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:
@ -180,10 +180,6 @@ cpu_to_be(64)
|
||||
#include <asm/sunddi.h>
|
||||
#endif
|
||||
|
||||
#if (defined(__MACH__) && defined(__APPLE__))
|
||||
#define __DARWIN__
|
||||
#endif
|
||||
|
||||
/* Clarification about OUTB/OUTW/OUTL argument order:
|
||||
* OUT[BWL](val, port)
|
||||
*/
|
||||
@ -203,7 +199,7 @@ cpu_to_be(64)
|
||||
#define INW(x) __extension__ ({ u_int inw_tmp = (x); inw(inw_tmp); })
|
||||
#define INL(x) __extension__ ({ u_int inl_tmp = (x); inl(inl_tmp); })
|
||||
#else
|
||||
#if defined(__DARWIN__)
|
||||
#if defined(__MACH__) && defined(__APPLE__)
|
||||
/* Header is part of the DirectHW library. */
|
||||
#include <DirectHW/DirectHW.h>
|
||||
#define off64_t off_t
|
||||
@ -303,7 +299,7 @@ static inline uint32_t inl(uint16_t port)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(__DARWIN__) && !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__DragonFly__) && !defined(__LIBPAYLOAD__)
|
||||
#if !(defined(__MACH__) && defined(__APPLE__)) && !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__DragonFly__) && !defined(__LIBPAYLOAD__)
|
||||
typedef struct { uint32_t hi, lo; } msr_t;
|
||||
msr_t rdmsr(int addr);
|
||||
int wrmsr(int addr, msr_t msr);
|
||||
|
Reference in New Issue
Block a user