From 0d8b463999ab742c1ab2af4f659f098f73eeec52 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 27 Aug 2019 08:48:26 +0200 Subject: update to 0.7.4 with bundled libzstd 1.4.3 drop patch merged upstream --- 24.patch | 83 ---------------------------------------------------------------- 1 file changed, 83 deletions(-) delete mode 100644 24.patch (limited to '24.patch') diff --git a/24.patch b/24.patch deleted file mode 100644 index 3ae7dfe..0000000 --- a/24.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 479c32d63619e3164f3a49bca856eed0c7cef333 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Tue, 23 Jul 2019 16:52:30 +0200 -Subject: [PATCH 1/2] fix for stream changes in 7.4.0beta1 - ---- - zstd.c | 18 ++++++++++++++++-- - 1 file changed, 16 insertions(+), 2 deletions(-) - -diff --git a/zstd.c b/zstd.c -index 46bfc8e..8319abb 100644 ---- a/zstd.c -+++ b/zstd.c -@@ -488,9 +488,16 @@ static int php_zstd_comp_close(php_stream *stream, int close_handle TSRMLS_DC) - } - - -+#if PHP_VERSION_ID < 70400 - static size_t php_zstd_decomp_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) - { -- size_t x, res, ret = 0; -+ size_t ret = 0; -+#else -+static ssize_t php_zstd_decomp_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) -+{ -+ ssize_t ret = 0; -+#endif -+ size_t x, res; - STREAM_DATA_FROM_STREAM(); - - while (count > 0) { -@@ -536,9 +543,16 @@ static size_t php_zstd_decomp_read(php_stream *stream, char *buf, size_t count T - } - - -+#if PHP_VERSION_ID < 70400 - static size_t php_zstd_comp_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC) - { -- size_t res, x, ret = 0; -+ size_t ret = 0; -+#else -+static ssize_t php_zstd_comp_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC) -+{ -+ ssize_t ret = 0; -+#endif -+ size_t x, res; - - STREAM_DATA_FROM_STREAM(); - - -From 419542ad635c0aa8fdfc5f49ea6c2ae1ea815220 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Tue, 23 Jul 2019 16:58:39 +0200 -Subject: [PATCH 2/2] report error to PHP stream wrapper - ---- - zstd.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/zstd.c b/zstd.c -index 8319abb..b8f851e 100644 ---- a/zstd.c -+++ b/zstd.c -@@ -525,6 +525,9 @@ static ssize_t php_zstd_decomp_read(php_stream *stream, char *buf, size_t count - res = ZSTD_decompressStream(self->dctx, &self->output , &self->input); - if (ZSTD_isError(res)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "libzstd error %s\n", ZSTD_getErrorName(res)); -+#if PHP_VERSION_ID >= 70400 -+ return -1; -+#endif - } - /* for us */ - self->output.size = self->output.pos; -@@ -586,6 +589,9 @@ static ssize_t php_zstd_comp_write(php_stream *stream, const char *buf, size_t c - #endif - if (ZSTD_isError(res)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "libzstd error %s\n", ZSTD_getErrorName(res)); -+#if PHP_VERSION_ID >= 70400 -+ return -1; -+#endif - } - php_stream_write(self->stream, self->bufout, self->output.pos); - } while (self->input.pos != self->input.size); -- cgit