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

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

Revision 1.1.2.1, Sun Sep 29 23:28:48 2013 UTC (9 years, 2 months ago) by schwarze
Branch: VERSION_1_12
Changes since 1.1: +16 -0 lines

Final tweaks for the release candidate:
* Test for betoh64(), otherwise use be64toh().
* In the Makefile, improve the explanation of STATIC.
* Update VERSION and VDATE.

#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;
}