mirror of
https://github.com/monero-project/monero.git
synced 2025-05-07 14:14:59 -04:00
OpenBSD support for Monero.
This commit is contained in:
parent
e75cfe088f
commit
28f95eb001
10 changed files with 41 additions and 19 deletions
|
@ -137,6 +137,7 @@ static inline uint32_t div128_32(uint64_t dividend_hi, uint64_t dividend_lo, uin
|
|||
static inline uint32_t ident32(uint32_t x) { return x; }
|
||||
static inline uint64_t ident64(uint64_t x) { return x; }
|
||||
|
||||
#ifndef __OpenBSD__
|
||||
static inline uint32_t swap32(uint32_t x) {
|
||||
x = ((x & 0x00ff00ff) << 8) | ((x & 0xff00ff00) >> 8);
|
||||
return (x << 16) | (x >> 16);
|
||||
|
@ -146,6 +147,7 @@ static inline uint64_t swap64(uint64_t x) {
|
|||
x = ((x & 0x0000ffff0000ffff) << 16) | ((x & 0xffff0000ffff0000) >> 16);
|
||||
return (x << 32) | (x >> 32);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define UNUSED __attribute__((unused))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue