diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2013-09-29 23:28:48 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2013-09-29 23:28:48 +0000 |
commit | cde8f6b7ca9fda1ff1dd42ae380fd54abc81d8eb (patch) | |
tree | 34fa0f1fdf4bc3a95297e4fe6ae6f613eba7e42f /test-betoh64.c | |
parent | 5cd33719f3f2d7d7ceb9a649ed5dc80ab339ed6a (diff) | |
download | mandoc-cde8f6b7ca9fda1ff1dd42ae380fd54abc81d8eb.tar.gz mandoc-cde8f6b7ca9fda1ff1dd42ae380fd54abc81d8eb.tar.zst mandoc-cde8f6b7ca9fda1ff1dd42ae380fd54abc81d8eb.zip |
Final tweaks for the release candidate:
* Test for betoh64(), otherwise use be64toh().
* In the Makefile, improve the explanation of STATIC.
* Update VERSION and VDATE.
Diffstat (limited to 'test-betoh64.c')
-rw-r--r-- | test-betoh64.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test-betoh64.c b/test-betoh64.c new file mode 100644 index 00000000..602b9320 --- /dev/null +++ b/test-betoh64.c @@ -0,0 +1,16 @@ +#include <sys/types.h> + +#if defined(__linux__) +# include <endian.h> +#elif defined(__APPLE__) +# include <libkern/OSByteOrder.h> +#endif + +int +main(int argc, char **argv) +{ + u_int64_t hostorder; + u_int64_t bigendian = 1; + hostorder = betoh64(bigendian); + return 0; +} |