diff options
author | Anatol Belski <ab@php.net> | 2017-07-22 22:33:18 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2017-07-22 22:34:16 +0200 |
commit | e0825ec60fc4e4aa3f026c832c26be51b23b4f09 (patch) | |
tree | 7c1c22851043f1c1057bea8d874ed26739c13c80 /ext/mbstring/libmbfl | |
parent | 934cfa35f8c3946b812739e4ed5afe0f456610eb (diff) | |
download | php-git-e0825ec60fc4e4aa3f026c832c26be51b23b4f09.tar.gz |
Mitigation for ssize_t issue in 22a5f554a8766d63fd2c2ce91a90ebacb13c0f6a
and some more
Diffstat (limited to 'ext/mbstring/libmbfl')
-rw-r--r-- | ext/mbstring/libmbfl/mbfl/mbfilter.c | 2 | ||||
-rw-r--r-- | ext/mbstring/libmbfl/mbfl/mbfilter.h | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.c b/ext/mbstring/libmbfl/mbfl/mbfilter.c index d76c54ecf7..a58acca9d4 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.c @@ -823,7 +823,7 @@ size_t mbfl_strpos( mbfl_string *haystack, mbfl_string *needle, - long offset, + ssize_t offset, int reverse) { size_t result; diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.h b/ext/mbstring/libmbfl/mbfl/mbfilter.h index d376e7d46d..0a27d3a265 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.h @@ -98,6 +98,15 @@ #include "mbfl_convert.h" #include "mbfl_ident.h" +/* Prefer local fix, otherwise need to include too much. */ +#ifndef ssize_t +#if defined(_WIN64) +#define ssize_t __int64 +#elif defined(_WIN32) +#define ssize_t __int32 +#endif +#endif + /* * version information */ @@ -191,7 +200,7 @@ mbfl_oddlen(mbfl_string *string); * strpos */ MBFLAPI extern size_t -mbfl_strpos(mbfl_string *haystack, mbfl_string *needle, long offset, int reverse); +mbfl_strpos(mbfl_string *haystack, mbfl_string *needle, ssize_t offset, int reverse); /* |