Return to test-betoh64.c CVS log | 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 (10 years, 11 months ago) by schwarze
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; }