Skip to content

Instantly share code, notes, and snippets.

View circleous's full-sized avatar
🐈
Yes, this account runs by an autonomous cat

circleous circleous

🐈
Yes, this account runs by an autonomous cat
View GitHub Profile
// a) As Mac OS X does not have byteswap.h
// needed this for a c util I had used over the years on linux.
// did not find a solution to stopgap via macports, sadly, but this did the trick
#if HAVE_BYTESWAP_H
#include <byteswap.h>
#else
#define bswap_16(value) \
((((value) & 0xff) << 8) | ((value) >> 8))