fixes build with PHP-5.4.

patch taken from MacPorts via upstream Issue tracker:
  https://github.com/libming/libming/issues/9
This commit is contained in:
obache 2012-06-23 03:26:23 +00:00
parent d874e3b79e
commit db7af5d426
2 changed files with 28 additions and 1 deletions

View file

@ -1,7 +1,8 @@
$NetBSD: distinfo,v 1.9 2012/05/12 06:36:39 obache Exp $
$NetBSD: distinfo,v 1.10 2012/06/23 03:26:23 obache Exp $
SHA1 (ming-0.4.4.tar.gz) = 125a9ba6fffeaf230deefb5a9e73d496a640e539
RMD160 (ming-0.4.4.tar.gz) = b2c7530aef4feca90d698b39b746ff5cb5da7af7
Size (ming-0.4.4.tar.gz) = 14816668 bytes
SHA1 (patch-ae) = 614e322330d2d2ab1e0ef1beadf1395014ecd880
SHA1 (patch-php__ext_ming.c) = 36cf34f63b6ccafd48b4035073c0a3d1d984f7b4
SHA1 (patch-test_actionscript_ActionScriptTest.c) = 730ef68fb3e7714da2783d396809b8f8ca5e1bf7

View file

@ -0,0 +1,26 @@
$NetBSD: patch-php__ext_ming.c,v 1.1 2012/06/23 03:26:23 obache Exp $
* fixes build with PHP-5.4
https://github.com/libming/libming/issues/9
--- php_ext/ming.c.orig 2011-10-26 06:33:18.000000000 +0000
+++ php_ext/ming.c
@@ -87,10 +87,17 @@ static SWFCXform getCXform(zval *id TSRM
static SWFMatrix getMatrix(zval *id TSRMLS_DC);
#endif
+#if PHP_API_VERSION < 20100412
#define PHP_MING_FILE_CHK(file) \
if ((PG(safe_mode) && !php_checkuid((file), NULL, CHECKUID_CHECK_FILE_AND_DIR)) || php_check_open_basedir((file) TSRMLS_CC)) { \
RETURN_FALSE; \
- } \
+ }
+#else
+#define PHP_MING_FILE_CHK(file) \
+ if (php_check_open_basedir((file) TSRMLS_CC)) { \
+ RETURN_FALSE; \
+ }
+#endif
/* {{{ proto void ming_setcubicthreshold (int threshold)
Set cubic threshold (?) */