#include #include #include void int16_store_bigendian(unsigned char *s,int16_t x) { x = htobe16(x); memcpy(s,&x,sizeof x); }