소스 검색

Add a endianness check to _hashindex.c until the code is big endian safe

Jonas Borgström 12 년 전
부모
커밋
0b697117ba
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      darc/_hashindex.c

+ 4 - 0
darc/_hashindex.c

@@ -9,6 +9,10 @@
 #include <unistd.h>
 #include <sys/mman.h>
 
+#if defined(__BYTE_ORDER__)&&(__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+#error This code is not big endian safe yet
+#endif
+
 typedef struct {
     char magic[8];
     int32_t num_entries;