[BACK]Return to test-be32toh.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

File: [cvsweb.bsd.lv] / mandoc / test-be32toh.c (download)

Revision 1.1, Fri Aug 5 23:15:08 2016 UTC (5 years ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_5, VERSION_1_14_4, VERSION_1_14_3, VERSION_1_14_2, VERSION_1_14_1, HEAD

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.

#ifdef SYS_ENDIAN
#include <sys/endian.h>
#else
#include <endian.h>
#endif

int
main(void)
{
	return htobe32(be32toh(0x3a7d0cdb)) != 0x3a7d0cdb;
}