Browse Source

Merge branch 'bigendian' into bfgminer

Luke Dashjr 13 years ago
parent
commit
0bc95b65da
3 changed files with 12 additions and 2 deletions
  1. 0 1
      miner.c
  2. 12 0
      miner.h
  3. 0 1
      uthash.h

+ 0 - 1
miner.c

@@ -15,7 +15,6 @@
 #include <curses.h>
 #endif
 
-#include <endian.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>

+ 12 - 0
miner.h

@@ -121,6 +121,18 @@ void *alloca (size_t);
 #endif
 #endif /* !defined(__GLXBYTEORDER_H__) */
 
+#ifdef WIN32
+  #ifndef __LITTLE_ENDIAN
+    #define __LITTLE_ENDIAN 1234
+    #define __BIG_ENDIAN    4321
+  #endif
+  #ifndef __BYTE_ORDER
+    #define __BYTE_ORDER __LITTLE_ENDIAN
+  #endif
+#else
+  #include <endian.h>
+#endif
+
 /* This assumes htobe32 is a macro in endian.h */
 #ifndef htobe32
 # if __BYTE_ORDER == __LITTLE_ENDIAN

+ 0 - 1
uthash.h

@@ -24,7 +24,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef UTHASH_H
 #define UTHASH_H
 
-#include <endian.h>
 #include <string.h>   /* memcmp,strlen */
 #include <stddef.h>   /* ptrdiff_t */
 #include <stdlib.h>   /* exit() */