#include #include #include void uint64_store(unsigned char *s,uint64_t x) { x = htole64(x); memcpy(s,&x,sizeof x); }