From owner-freebsd-standards@FreeBSD.ORG Tue Oct 2 14:50:11 2012 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36DBD106566B for ; Tue, 2 Oct 2012 14:50:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E9DDE8FC16 for ; Tue, 2 Oct 2012 14:50:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q92EoAfm063617 for ; Tue, 2 Oct 2012 14:50:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q92EoAFH063616; Tue, 2 Oct 2012 14:50:10 GMT (envelope-from gnats) Resent-Date: Tue, 2 Oct 2012 14:50:10 GMT Resent-Message-Id: <201210021450.q92EoAFH063616@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ed Maste Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ABAE7106566B for ; Tue, 2 Oct 2012 14:41:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 965718FC08 for ; Tue, 2 Oct 2012 14:41:44 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q92Efi51062867 for ; Tue, 2 Oct 2012 14:41:44 GMT (envelope-from emaste@freefall.freebsd.org) Received: (from emaste@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q92EfiUo062866; Tue, 2 Oct 2012 14:41:44 GMT (envelope-from emaste) Message-Id: <201210021441.q92EfiUo062866@freefall.freebsd.org> Date: Tue, 2 Oct 2012 14:41:44 GMT From: Ed Maste To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: standards/172273: unsetenv(3) issue according to autoconf X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ed Maste List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 14:50:11 -0000 >Number: 172273 >Category: standards >Synopsis: unsetenv(3) issue according to autoconf >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 02 14:50:10 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Ed Maste >Release: FreeBSD 9.1-PRERELEASE amd64 >Organization: FreeBSD >Environment: FreeBSD feynman 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #18 r240994M: Thu Sep 27 09:08:57 EDT 2012 emaste@feynman:/data2/emaste/obj/home/emaste/src/9/sys/TEST amd64 GNU autoconf's unsetenv test fails on 9.1 - see test case below. >Description: >How-To-Repeat: The autoconf test is reproduced below - the 'return 3' is the failing line #include #include extern char **environ; int main(int argc, char *argv[]) { char entry1[] = "a=1"; char entry2[] = "b=2"; char *env[] = { entry1, entry2, NULL }; if (putenv ((char *) "a=1")) return 1; if (putenv (entry2)) return 2; entry2[0] = 'a'; unsetenv ("a"); if (getenv ("a")) return 3; if (!unsetenv ("") || errno != EINVAL) return 4; entry2[0] = 'b'; environ = env; if (!getenv ("a")) return 5; entry2[0] = 'a'; unsetenv ("a"); if (getenv ("a")) return 6; return 0; } >Fix: >Release-Note: >Audit-Trail: >Unformatted: