]> git.pld-linux.org Git - packages/php.git/blob - php-zlib-for-getimagesize.patch
- up to 8.0.7; soname to reflect that this is php 8
[packages/php.git] / php-zlib-for-getimagesize.patch
1 make compressed .swf parsing possible,
2 link core php with -lz for getimagesize()
3 see also http://bugs.php.net/bug.php?id=29611
4
5 --- php-8.0.0rc1/ext/standard/image.c~  2020-10-09 18:50:01.000000000 +0300
6 +++ php-8.0.0rc1/ext/standard/image.c   2020-10-09 18:53:44.278879164 +0300
7 @@ -31,7 +31,7 @@
8  #endif
9  #include "php_image.h"
10  
11 -#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
12 +#if HAVE_ZLIB
13  #include "zlib.h"
14  #endif
15  
16 @@ -80,7 +80,7 @@
17         REGISTER_LONG_CONSTANT("IMAGETYPE_JP2",     IMAGE_FILETYPE_JP2,     CONST_CS | CONST_PERSISTENT);
18         REGISTER_LONG_CONSTANT("IMAGETYPE_JPX",     IMAGE_FILETYPE_JPX,     CONST_CS | CONST_PERSISTENT);
19         REGISTER_LONG_CONSTANT("IMAGETYPE_JB2",     IMAGE_FILETYPE_JB2,     CONST_CS | CONST_PERSISTENT);
20 -#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
21 +#if HAVE_ZLIB
22         REGISTER_LONG_CONSTANT("IMAGETYPE_SWC",     IMAGE_FILETYPE_SWC,     CONST_CS | CONST_PERSISTENT);
23  #endif
24         REGISTER_LONG_CONSTANT("IMAGETYPE_IFF",     IMAGE_FILETYPE_IFF,     CONST_CS | CONST_PERSISTENT);
25 @@ -186,7 +186,7 @@
26  }
27  /* }}} */
28  
29 -#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
30 +#if HAVE_ZLIB
31  /* {{{ php_handle_swc */
32  static struct gfxinfo *php_handle_swc(php_stream * stream)
33  {
34 @@ -1321,7 +1321,7 @@
35                         result = php_handle_swf(stream);
36                         break;
37                 case IMAGE_FILETYPE_SWC:
38 -#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
39 +#if HAVE_ZLIB
40                         result = php_handle_swc(stream);
41  #else
42                         php_error_docref(NULL, E_NOTICE, "The image is a compressed SWF file, but you do not have a static version of the zlib extension enabled");
This page took 0.040661 seconds and 3 git commands to generate.