diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2013-10-03 00:46:36 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2013-10-03 00:46:36 +0000 |
commit | feb9f0842e4b22249cd81228a850bd933c26c28b (patch) | |
tree | df52743c994af702e2286f51e05cae7fc204507e | |
parent | 25a40fb922bc3637838a5dd91407b306ec63149e (diff) | |
download | mandoc-feb9f0842e4b22249cd81228a850bd933c26c28b.tar.gz mandoc-feb9f0842e4b22249cd81228a850bd933c26c28b.tar.zst mandoc-feb9f0842e4b22249cd81228a850bd933c26c28b.zip |
Byte-order functions for Mac OS X.
Same patch sent in by Franco Fichtner and Kristaps Dzonsons.
Tested by Franco Fichtner <franco at lastsummer dot de>.
-rw-r--r-- | config.h.post | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/config.h.post b/config.h.post index 81662381..cee82aa1 100644 --- a/config.h.post +++ b/config.h.post @@ -16,8 +16,14 @@ #endif #ifndef HAVE_BETOH64 -#define betoh64(x) be64toh(x) +# if defined(__APPLE__) +# define betoh64(x) OSSwapBigToHostInt64(x) +# define htobe64(x) OSSwapHostToBigInt64(x) +# else +# define betoh64(x) be64toh(x) +# endif #endif + #ifndef HAVE_STRLCAT extern size_t strlcat(char *, const char *, size_t); #endif |