From 18a0fa3e0c19e1afaf1dedb3d5a3b14a2c3aa3c7 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Wed, 15 Feb 2006 01:23:13 -0500 Subject: endian fixes and compiles on mac os x arch/alpha/alpha_linux_process.cc: add endian conversions for fstat functions arch/alpha/alpha_tru64_process.cc: add endian conversions for various functions sim/byteswap.hh: for some reason gcc on macos really wants long and unsigned long Why int32_t and uint32_t isn't sufficient I don't know. sim/process.cc: sim/syscall_emul.hh: endian fixes --HG-- extra : convert_revision : ce625d5660b70867c43c74fbed856149c0d8cd36 --- sim/byteswap.hh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sim/byteswap.hh') diff --git a/sim/byteswap.hh b/sim/byteswap.hh index 6a98a987f..c5d8801ab 100644 --- a/sim/byteswap.hh +++ b/sim/byteswap.hh @@ -79,7 +79,11 @@ static inline uint64_t swap_byte(uint64_t x) {return swap_byte64(x);} static inline int64_t swap_byte(int64_t x) {return swap_byte64((uint64_t)x);} static inline uint32_t swap_byte(uint32_t x) {return swap_byte32(x);} static inline int32_t swap_byte(int32_t x) {return swap_byte32((uint32_t)x);} -static inline int32_t swap_byte(long x) {return swap_byte32((long)x);} +#if defined(__APPLE__) +static inline long swap_byte(long x) {return swap_byte32((long)x);} +static inline unsigned long swap_byte(unsigned long x) + { return swap_byte32((unsigned long)x);} +#endif static inline uint16_t swap_byte(uint16_t x) {return swap_byte32(x);} static inline int16_t swap_byte(int16_t x) {return swap_byte16((uint16_t)x);} static inline uint8_t swap_byte(uint8_t x) {return x;} -- cgit v1.2.3