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: ports/123911: [PATCH] lang/php5: remove putenv() patch for FreeBSD 7+ Message-ID: <200805221935.m4MJZ9Vc016678@thor.farley.org> Resent-Message-ID: <200805221940.m4MJe4oA022933@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 123911 >Category: ports >Synopsis: [PATCH] lang/php5: remove putenv() patch for FreeBSD 7+ >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu May 22 19:40:04 UTC 2008 >Closed-Date: >Last-Modified: >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: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805221935.m4MJZ9Vc016678>