浏览代码

Force byte order to little endian, for gcc

Jeremy Soller 6 年之前
父节点
当前提交
44f84f406f
共有 1 个文件被更改,包括 14 次插入0 次删除
  1. 14 0
      include/sys/param.h

+ 14 - 0
include/sys/param.h

@@ -31,4 +31,18 @@
 #include <sys/resource.h>
 #include <limits.h>
 
+/* TODO: Forcing little endian, if you need a big endian system, fix this { */
+#ifndef BIG_ENDIAN
+#define BIG_ENDIAN 4321
+#endif
+
+#ifndef LITTLE_ENDIAN
+#define LITTLE_ENDIAN 1234
+#endif
+
+#ifndef BYTE_ORDER
+#define BYTE_ORDER LITTLE_ENDIAN
+#endif
+/* } */
+
 #endif