]> granicus.if.org Git - php/commitdiff
reapply platform related onig patches
authorAnatol Belski <ab@php.net>
Tue, 30 May 2017 13:47:22 +0000 (15:47 +0200)
committerAnatol Belski <ab@php.net>
Tue, 30 May 2017 13:47:56 +0000 (15:47 +0200)
ext/mbstring/oniguruma/src/config.h.win32
ext/mbstring/oniguruma/src/config.h.win64
ext/mbstring/oniguruma/src/regint.h

index bdbdaf25c1fa11e4b99599e8c3cb46847f6290e7..9a9c43f26d482e259ceb24fa4ae46bb22796aae4 100644 (file)
@@ -15,6 +15,7 @@
 #define SIZEOF_VOIDP 4
 #define SIZEOF_FLOAT 4
 #define SIZEOF_DOUBLE 8
+#define SIZEOF_SIZE_T 4
 #define HAVE_PROTOTYPES 1
 #define TOKEN_PASTE(x,y) x##y
 #define HAVE_STDARG_PROTOTYPES 1
index 01a86c7bb9be331186a61c159ad62f05bdb03cac..dec7b757734f53522697b73c9b007676bca0ae74 100644 (file)
@@ -15,6 +15,7 @@
 #define SIZEOF_VOIDP 8
 #define SIZEOF_FLOAT 4
 #define SIZEOF_DOUBLE 8
+#define SIZEOF_SIZE_T 8
 #define HAVE_PROTOTYPES 1
 #define TOKEN_PASTE(x,y) x##y
 #define HAVE_STDARG_PROTOTYPES 1
index 9835143fdc6084d6d076aa760baab2d4983c93ec..c33bc4e261de482bc5dfb09ee38ee011af04afdf 100644 (file)
 } while(0)
 
 /* sizeof(OnigCodePoint) */
-#define WORD_ALIGNMENT_SIZE     SIZEOF_LONG
+#define WORD_ALIGNMENT_SIZE     SIZEOF_SIZE_T
 
 #define GET_ALIGNMENT_PAD_SIZE(addr,pad_size) do {\
   (pad_size) = WORD_ALIGNMENT_SIZE \
-               - ((unsigned int )(addr) % WORD_ALIGNMENT_SIZE);\
+               - ((size_t)(addr) % WORD_ALIGNMENT_SIZE);\
   if ((pad_size) == WORD_ALIGNMENT_SIZE) (pad_size) = 0;\
 } while (0)
 
 #define ALIGNMENT_RIGHT(addr) do {\
   (addr) += (WORD_ALIGNMENT_SIZE - 1);\
-  (addr) -= ((unsigned int )(addr) % WORD_ALIGNMENT_SIZE);\
+  (addr) -= ((size_t)(addr) % WORD_ALIGNMENT_SIZE);\
 } while (0)
 
 #endif /* PLATFORM_UNALIGNED_WORD_ACCESS */
@@ -662,7 +662,11 @@ typedef struct {
   BBuf*  mbuf;   /* multi-byte info or NULL */
 } CClassNode;
 
+#ifdef _WIN64
+typedef __int64 OnigStackIndex;
+#else
 typedef long OnigStackIndex;
+#endif
 
 typedef struct _OnigStackType {
   unsigned int type;