File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 8
8
#include <stdbool.h>
9
9
#include <stdint.h>
10
10
#include <string.h>
11
- #include <sys/param.h>
12
11
13
12
/*
14
13
* Create GNU compatible endian macros. We use the values for __LITTLE_ENDIAN
28
27
#if defined(_MSC_VER )
29
28
#include <stdlib.h>
30
29
30
+ //instead of #include <sys/param.h>
31
+ // assume little-endian on Windows
32
+ #define LITTLE_ENDIAN 1234
33
+ #define BIG_ENDIAN 4321
34
+ #define BYTE_ORDER LITTLE_ENDIAN
35
+
31
36
static inline uint32_t rol32 (uint32_t x , int r ) {
32
37
static_assert (sizeof (uint32_t ) == sizeof (unsigned int ), "this code assumes 32-bit integers" );
33
38
return _rotl (x , r );
@@ -38,6 +43,7 @@ static inline uint64_t rol64(uint64_t x, int r) {
38
43
}
39
44
40
45
#else
46
+ #include <sys/param.h>
41
47
42
48
static inline uint32_t rol32 (uint32_t x , int r ) {
43
49
return (x << (r & 31 )) | (x >> (- r & 31 ));
You can’t perform that action at this time.
0 commit comments