+/* ---- Endian Detection ------------------------------------ */
+#ifndef __APPLE__
+# include <byteswap.h>
+# include <endian.h>
+#endif
+
+#ifdef __BIG_ENDIAN__
+# define BB_BIG_ENDIAN 1
+# define BB_LITTLE_ENDIAN 0
+#elif __BYTE_ORDER == __BIG_ENDIAN
+# define BB_BIG_ENDIAN 1
+# define BB_LITTLE_ENDIAN 0
+#else
+# define BB_BIG_ENDIAN 0
+# define BB_LITTLE_ENDIAN 1
+#endif
+
+/* ---- Networking ------------------------------------------ */
+#ifndef __APPLE__
+# include <arpa/inet.h>
+#else
+# include <netinet/in.h>
+#endif
+
+/* ---- miscellaneous --------------------------------------- */
+/* NLS stuff */
+/* THIS SHOULD BE CLEANED OUT OF THE TREE ENTIRELY */
+#define _(Text) Text
+#define N_(Text) (Text)