From nobody@FreeBSD.org  Sun May 27 17:11:29 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 438F31065670
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 27 May 2012 17:11:29 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 2E86C8FC18
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 27 May 2012 17:11:29 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q4RHBS2l062233
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 27 May 2012 17:11:28 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q4RHBSmF062232;
	Sun, 27 May 2012 17:11:28 GMT
	(envelope-from nobody)
Message-Id: <201205271711.q4RHBSmF062232@red.freebsd.org>
Date: Sun, 27 May 2012 17:11:28 GMT
From: Nicolas Raspail <nicolas.raspail@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: pecl-uploadprogress - compilation failed with php 5.4
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         168382
>Category:       ports
>Synopsis:       [PATCH] devel/pecl-uploadprogress - compilation failed with php 5.4
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 27 17:20:05 UTC 2012
>Closed-Date:    Mon May 28 04:47:14 UTC 2012
>Last-Modified:  Mon May 28 04:50:01 UTC 2012
>Originator:     Nicolas Raspail
>Release:        9.0-RELEASE
>Organization:
>Environment:
FreeBSD dodger.whisperingvault.net 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Hi

When trying to update from php 5.3 to php 5.4, the compilation of pecl-uploadprogress (from 1.0.1 to 1.0.2) has failed with the following error 

/usr/ports/devel/pecl-uploadprogress/work/uploadprogress-1.0.2/uploadprogress.c:460: error: 'struct _php_core_globals' has no member named 'magic_quotes_runtime'
*** Error code 1

I have found the following message http://permalink.gmane.org/gmane.comp.php.pecl.cvs/14722 and after having created the patch, the compilation was ok.
>How-To-Repeat:
After having php upgraded to 5.4, try to compile pecl-uploadprogress-1.0.2
>Fix:
Put the attached patch in /usr/ports/devel/pecl-uploadprogress/files (remove the .txt part) and install the port

Patch attached with submission follows:

???--- uploadprogress.c.orig       2012-05-27 18:32:23.891923716 +0200
+++ uploadprogress.c    2012-05-27 18:33:33.601926257 +0200
@@ -457,11 +457,12 @@
         /* uses mmap if possible */
         if ((len = php_stream_copy_to_mem(stream, &contents, maxlen, 0)) > 0) {

+#if PHP_API_VERSION < 20100412
             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();

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun May 27 20:44:34 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=168382 
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Mon May 28 04:47:13 UTC 2012 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=168382 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/168382: commit references a PR
Date: Mon, 28 May 2012 04:47:19 +0000 (UTC)

 miwi        2012-05-28 04:47:05 UTC
 
   FreeBSD ports repository
 
   Added files:
     devel/pecl-uploadprogress/files patch-uploadprogress.c 
   Log:
   - Fix build with php54
   
   PR:             168382
   Submitted by:   Nicolas Raspail <nicolas.raspail@gmail.com>
   
   Revision  Changes    Path
   1.1       +16 -0     ports/devel/pecl-uploadprogress/files/patch-uploadprogress.c (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
