aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test-be32toh.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-08-05 23:15:08 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-08-05 23:15:08 +0000
commit83a44904f7c78e291160d641ce52aff6713689bf (patch)
tree42720b1d97ceb35bd04f4202bcd2393fa7f4440e /test-be32toh.c
parentd300e64bd3801d0e4ea69e807c86fd1aa2e743b2 (diff)
downloadmandoc-83a44904f7c78e291160d641ce52aff6713689bf.tar.gz
mandoc-83a44904f7c78e291160d641ce52aff6713689bf.tar.zst
mandoc-83a44904f7c78e291160d641ce52aff6713689bf.zip
The concept of endianness seems to be somewhat newfangled, so the
respective conversion functions are not yet properly standardized. Rumour has it that POSIX is working on it, though. For now, sprinkle some configuration glue.
Diffstat (limited to 'test-be32toh.c')
-rw-r--r--test-be32toh.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test-be32toh.c b/test-be32toh.c
new file mode 100644
index 00000000..471e85ea
--- /dev/null
+++ b/test-be32toh.c
@@ -0,0 +1,11 @@
+#ifdef SYS_ENDIAN
+#include <sys/endian.h>
+#else
+#include <endian.h>
+#endif
+
+int
+main(void)
+{
+ return htobe32(be32toh(0x3a7d0cdb)) != 0x3a7d0cdb;
+}