From owner-cvs-src@FreeBSD.ORG Mon Apr 30 16:56:19 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4058716A401; Mon, 30 Apr 2007 16:56:19 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 325D213C44C; Mon, 30 Apr 2007 16:56:19 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l3UGuJXG048149; Mon, 30 Apr 2007 16:56:19 GMT (envelope-from ache@repoman.freebsd.org) Received: (from ache@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l3UGuIqf048148; Mon, 30 Apr 2007 16:56:18 GMT (envelope-from ache) Message-Id: <200704301656.l3UGuIqf048148@repoman.freebsd.org> From: "Andrey A. Chernov" Date: Mon, 30 Apr 2007 16:56:18 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/libc/stdlib getenv.3 getenv.c putenv.c setenv.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2007 16:56:19 -0000 ache 2007-04-30 16:56:18 UTC FreeBSD src repository Modified files: lib/libc/stdlib getenv.3 getenv.c putenv.c setenv.c Log: Make putenv() fully conforms to Open Group specs Issue 6 (also IEEE Std 1003.1-2001) The specs explicitly says that altering passed string should change the environment, i.e. putenv() directly puts its arg into environment (unlike setenv() which just copies it there). It means that putenv() can't be implemented via setenv() (like we have before) at all. Putenv() value lives (allows modifying) up to the next putenv() or setenv() call. Revision Changes Path 1.23 +13 -6 src/lib/libc/stdlib/getenv.3 1.7 +5 -2 src/lib/libc/stdlib/getenv.c 1.5 +34 -12 src/lib/libc/stdlib/putenv.c 1.13 +6 -6 src/lib/libc/stdlib/setenv.c