#include #include #include void uint32_store(unsigned char *s,uint32_t x) { x = htole32(x); memcpy(s,&x,sizeof x); }