From sean-freebsd@farley.org  Thu May 22 19:35:17 2008
Return-Path: <sean-freebsd@farley.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B42781065675;
	Thu, 22 May 2008 19:35:17 +0000 (UTC)
	(envelope-from sean-freebsd@farley.org)
Received: from mail.farley.org (farley.org [67.64.95.201])
	by mx1.freebsd.org (Postfix) with ESMTP id 28F1B8FC1B;
	Thu, 22 May 2008 19:35:17 +0000 (UTC)
	(envelope-from sean-freebsd@farley.org)
Received: from thor.farley.org (root@thor.farley.org [192.168.1.5])
	by mail.farley.org (8.14.3/8.14.3) with ESMTP id m4MJZ9HK081041;
	Thu, 22 May 2008 14:35:09 -0500 (CDT)
	(envelope-from sean-freebsd@mail.farley.org)
Received: from thor.farley.org (localhost [127.0.0.1])
	by thor.farley.org (8.14.2/8.14.2) with ESMTP id m4MJZ9Y4016679;
	Thu, 22 May 2008 14:35:09 -0500 (CDT)
	(envelope-from sean-freebsd@thor.farley.org)
Received: (from root@localhost)
	by thor.farley.org (8.14.2/8.14.2/Submit) id m4MJZ9Vc016678;
	Thu, 22 May 2008 14:35:09 -0500 (CDT)
	(envelope-from sean-freebsd)
Message-Id: <200805221935.m4MJZ9Vc016678@thor.farley.org>
Date: Thu, 22 May 2008 14:35:09 -0500 (CDT)
From: "Sean C. Farley" <scf@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: ale@freebsd.org
Subject: [PATCH] lang/php5: remove putenv() patch for FreeBSD 7+
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         123911
>Category:       ports
>Synopsis:       [PATCH] lang/php5: remove putenv() patch for FreeBSD 7+
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ale
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 22 19:40:04 UTC 2008
>Closed-Date:    Mon Jun 09 12:12:08 UTC 2008
>Last-Modified:  Mon Jun  9 12:20:02 UTC 2008
>Originator:     Sean C. Farley
>Release:        FreeBSD 7.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD thor.farley.org 7.0-STABLE FreeBSD 7.0-STABLE #1: Wed May 21 19:45:38 CDT 2008
>Description:
The current patch to putenv() is not required for FreeBSD after version
700050.  Before version 700050, putenv() did copy the provided string.
Now, it follows the POSIX standard and uses the provided string
directly.

Port maintainer (ale@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- php5-5.2.6_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/lang/php5.orig/Makefile /usr/ports/lang/php5/Makefile
--- /usr/ports/lang/php5.orig/Makefile	2008-05-14 15:10:30.000000000 -0500
+++ /usr/ports/lang/php5/Makefile	2008-05-21 21:17:27.000000000 -0500
@@ -7,7 +7,7 @@
 
 PORTNAME=	php5
 PORTVERSION=	5.2.6
-PORTREVISION?=	0
+PORTREVISION?=	1
 CATEGORIES?=	lang devel www
 MASTER_SITES=	${MASTER_SITE_PHP}
 MASTER_SITE_SUBDIR=	distributions
diff -ruN --exclude=CVS /usr/ports/lang/php5.orig/files/patch-ext_standard_basic_functions.c /usr/ports/lang/php5/files/patch-ext_standard_basic_functions.c
--- /usr/ports/lang/php5.orig/files/patch-ext_standard_basic_functions.c	2008-05-03 19:34:20.000000000 -0500
+++ /usr/ports/lang/php5/files/patch-ext_standard_basic_functions.c	2008-05-21 21:17:00.000000000 -0500
@@ -1,5 +1,5 @@
---- ext/standard/basic_functions.c.orig	2008-05-02 08:44:06.000000000 +0200
-+++ ext/standard/basic_functions.c	2008-05-02 08:54:00.000000000 +0200
+--- ext/standard/basic_functions.c.orig	2008-05-21 20:47:35.000000000 -0500
++++ ext/standard/basic_functions.c	2008-05-21 20:52:46.000000000 -0500
 @@ -87,6 +87,7 @@
  # include <sys/loadavg.h>
  #endif
@@ -8,26 +8,21 @@
  #ifdef HARTMUT_0
  #include <getopt.h>
  #endif
-@@ -3861,9 +3862,7 @@
+@@ -3861,7 +3862,7 @@
  		SetEnvironmentVariable(pe->key, "bugbug");
  #endif
  		putenv(pe->previous_value);
 -# if defined(PHP_WIN32)
++# if defined(PHP_WIN32) || __FreeBSD_version < 700050
  		efree(pe->previous_value);
--# endif
+ # endif
  	} else {
- # if HAVE_UNSETENV
- 		unsetenv(pe->key);
-@@ -4463,12 +4462,8 @@
+@@ -4463,7 +4464,7 @@
  		pe.previous_value = NULL;
  		for (env = environ; env != NULL && *env != NULL; env++) {
  			if (!strncmp(*env, pe.key, pe.key_len) && (*env)[pe.key_len] == '=') {	/* found it */
 -#if defined(PHP_WIN32)
++#if defined(PHP_WIN32) || __FreeBSD_version < 700050
  				/* must copy previous value because MSVCRT's putenv can free the string without notice */
  				pe.previous_value = estrdup(*env);
--#else
--				pe.previous_value = *env;
--#endif
- 				break;
- 			}
- 		}
+ #else
--- php5-5.2.6_1.patch ends here ---
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ale 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu May 22 19:40:09 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123911 
State-Changed-From-To: open->closed 
State-Changed-By: ale 
State-Changed-When: Mon Jun 9 12:11:54 UTC 2008 
State-Changed-Why:  
Committed, thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/123911: commit references a PR
Date: Mon,  9 Jun 2008 12:11:53 +0000 (UTC)

 ale         2008-06-09 12:11:33 UTC
 
   FreeBSD ports repository
 
   Modified files:
     lang/php5/files      patch-ext_standard_basic_functions.c 
   Log:
   FreeBSD >= 700050 has POSIX standard putenv().
   
   PR:             ports/123911
   Submitted by:   scf
   
   Revision  Changes    Path
   1.3       +8 -13     ports/lang/php5/files/patch-ext_standard_basic_functions.c
 _______________________________________________
 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:
