|
| 1 | +diff -wur oniguruma.orig/src/config.h.win32 oniguruma/src/config.h.win32 |
| 2 | +--- oniguruma.orig/src/config.h.win32 2017-07-13 17:12:45.228068900 +0200 |
| 3 | ++++ oniguruma/src/config.h.win32 2017-07-13 16:11:19.955226200 +0200 |
| 4 | +@@ -15,6 +15,7 @@ |
| 5 | + #define SIZEOF_VOIDP 4 |
| 6 | + #define SIZEOF_FLOAT 4 |
| 7 | + #define SIZEOF_DOUBLE 8 |
| 8 | ++#define SIZEOF_SIZE_T 4 |
| 9 | + #define HAVE_PROTOTYPES 1 |
| 10 | + #define TOKEN_PASTE(x,y) x##y |
| 11 | + #define HAVE_STDARG_PROTOTYPES 1 |
| 12 | +diff -wur oniguruma.orig/src/config.h.win64 oniguruma/src/config.h.win64 |
| 13 | +--- oniguruma.orig/src/config.h.win64 2017-07-13 17:12:45.273605000 +0200 |
| 14 | ++++ oniguruma/src/config.h.win64 2017-07-13 16:11:19.957231300 +0200 |
| 15 | +@@ -15,6 +15,7 @@ |
| 16 | + #define SIZEOF_VOIDP 8 |
| 17 | + #define SIZEOF_FLOAT 4 |
| 18 | + #define SIZEOF_DOUBLE 8 |
| 19 | ++#define SIZEOF_SIZE_T 8 |
| 20 | + #define HAVE_PROTOTYPES 1 |
| 21 | + #define TOKEN_PASTE(x,y) x##y |
| 22 | + #define HAVE_STDARG_PROTOTYPES 1 |
| 23 | +diff -wur oniguruma.orig/src/regint.h oniguruma/src/regint.h |
| 24 | +--- oniguruma.orig/src/regint.h 2017-07-13 17:12:48.686073300 +0200 |
| 25 | ++++ oniguruma/src/regint.h 2017-07-13 17:13:28.032286100 +0200 |
| 26 | +@@ -201,17 +201,21 @@ |
| 27 | + } while(0) |
| 28 | + |
| 29 | + /* sizeof(OnigCodePoint) */ |
| 30 | ++#ifdef SIZEOF_SIZE_T |
| 31 | ++# define WORD_ALIGNMENT_SIZE SIZEOF_SIZE_T |
| 32 | ++#else |
| 33 | + #define WORD_ALIGNMENT_SIZE SIZEOF_LONG |
| 34 | ++#endif |
| 35 | + |
| 36 | + #define GET_ALIGNMENT_PAD_SIZE(addr,pad_size) do {\ |
| 37 | + (pad_size) = WORD_ALIGNMENT_SIZE \ |
| 38 | +- - ((unsigned int )(addr) % WORD_ALIGNMENT_SIZE);\ |
| 39 | ++ - ((size_t)(addr) % WORD_ALIGNMENT_SIZE);\ |
| 40 | + if ((pad_size) == WORD_ALIGNMENT_SIZE) (pad_size) = 0;\ |
| 41 | + } while (0) |
| 42 | + |
| 43 | + #define ALIGNMENT_RIGHT(addr) do {\ |
| 44 | + (addr) += (WORD_ALIGNMENT_SIZE - 1);\ |
| 45 | +- (addr) -= ((unsigned int )(addr) % WORD_ALIGNMENT_SIZE);\ |
| 46 | ++ (addr) -= ((size_t)(addr) % WORD_ALIGNMENT_SIZE);\ |
| 47 | + } while (0) |
| 48 | + |
| 49 | + #endif /* PLATFORM_UNALIGNED_WORD_ACCESS */ |
| 50 | +@@ -662,7 +666,11 @@ |
| 51 | + BBuf* mbuf; /* multi-byte info or NULL */ |
| 52 | + } CClassNode; |
| 53 | + |
| 54 | ++#ifdef _WIN64 |
| 55 | ++typedef __int64 OnigStackIndex; |
| 56 | ++#else |
| 57 | + typedef long OnigStackIndex; |
| 58 | ++#endif |
| 59 | + |
| 60 | + typedef struct _OnigStackType { |
| 61 | + unsigned int type; |
0 commit comments