summaryrefslogtreecommitdiff
path: root/www/php-uploadprogress
diff options
context:
space:
mode:
authortaca <taca>2012-06-16 03:09:19 +0000
committertaca <taca>2012-06-16 03:09:19 +0000
commit760aa343b026d08fcc5125dd6539999a0d31f12b (patch)
tree9f2c5fa153861f65f7022e3ebb91ea4958ef5a09 /www/php-uploadprogress
parent291c7e4525b51f3a189d815d4be617669b2581b4 (diff)
downloadpkgsrc-760aa343b026d08fcc5125dd6539999a0d31f12b.tar.gz
* Use new data type name and support for PHP 5.4.x; there is no magic_quotes.
Diffstat (limited to 'www/php-uploadprogress')
-rw-r--r--www/php-uploadprogress/distinfo3
-rw-r--r--www/php-uploadprogress/patches/patch-uploadprogress.c30
2 files changed, 32 insertions, 1 deletions
diff --git a/www/php-uploadprogress/distinfo b/www/php-uploadprogress/distinfo
index e8dd95d292f..e6c05d80039 100644
--- a/www/php-uploadprogress/distinfo
+++ b/www/php-uploadprogress/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.1.1.1 2010/04/11 07:32:17 obache Exp $
+$NetBSD: distinfo,v 1.2 2012/06/16 03:09:19 taca Exp $
SHA1 (php-uploadprogress/uploadprogress-1.0.1.tgz) = 44e7e306da39cd8c0049e19c304ce956ed8cd221
RMD160 (php-uploadprogress/uploadprogress-1.0.1.tgz) = 6df469edee6cafcefe04564830deda51dcac54f9
Size (php-uploadprogress/uploadprogress-1.0.1.tgz) = 8536 bytes
+SHA1 (patch-uploadprogress.c) = ad9c8d3a0304d3ac31e7a05a43baad05f361eb8a
diff --git a/www/php-uploadprogress/patches/patch-uploadprogress.c b/www/php-uploadprogress/patches/patch-uploadprogress.c
new file mode 100644
index 00000000000..087751cd02e
--- /dev/null
+++ b/www/php-uploadprogress/patches/patch-uploadprogress.c
@@ -0,0 +1,30 @@
+$NetBSD: patch-uploadprogress.c,v 1.1 2012/06/16 03:09:19 taca Exp $
+
+* Use modern data structure name.
+* Add support for PHP 5.4.x.
+
+--- uploadprogress.c.orig 1970-01-01 09:13:08.000000000 +0000
++++ uploadprogress.c
+@@ -32,7 +32,7 @@
+ #endif
+
+ /* {{{ uploadprogress_functions[] */
+-function_entry uploadprogress_functions[] = {
++zend_function_entry uploadprogress_functions[] = {
+ PHP_FE(uploadprogress_get_info, NULL)
+ PHP_FE(uploadprogress_get_contents, NULL)
+ { NULL, NULL, NULL }
+@@ -457,11 +457,12 @@ static void uploadprogress_file_php_get_
+ /* uses mmap if possible */
+ if ((len = php_stream_copy_to_mem(stream, &contents, maxlen, 0)) > 0) {
+
++#if PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4
+ if (PG(magic_quotes_runtime)) {
+ contents = php_addslashes(contents, len, &newlen, 1 TSRMLS_CC);
+ len = newlen;
+ }
+-
++#endif
+ RETVAL_STRINGL(contents, len, 0);
+ } else if (len == 0) {
+ RETVAL_EMPTY_STRING();