From owner-freebsd-current@FreeBSD.ORG Tue Jul 3 23:36:01 2007 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F48C16A41F for ; Tue, 3 Jul 2007 23:36:01 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.freebsd.org (Postfix) with ESMTP id DEB9B13C43E for ; Tue, 3 Jul 2007 23:36:00 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from [192.168.1.211] ([192.168.1.211]) by mail.farley.org (8.14.1/8.14.1) with ESMTP id l63Nb6eJ094590 for ; Tue, 3 Jul 2007 18:37:11 -0500 (CDT) (envelope-from scf@FreeBSD.org) Date: Tue, 3 Jul 2007 18:35:49 -0500 (CDT) From: "Sean C. Farley" To: freebsd-current@FreeBSD.org Message-ID: <20070703182400.Q1449@baba.farley.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.1 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on mail.farley.org Cc: Subject: HEADS UP: getenv() and family API change X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2007 23:36:01 -0000 As announced on -arch[1], I will be committing the changes to getenv(3) and family (setenv(), putenv and unsetenv()) shortly. A bit of details on the change can be found on -ports[2]. Changes in moving to POSIX from historic BSD API: a. unsetenv returns an int. b. putenv takes a char * instead of const char *. c. putenv no longer makes a copy of the input string. d. errno is set appropriately for POSIX. Exceptions involve bad environ variable and internal initialization code. These both set errno to EFAULT. Let me know if you run across any problems. Sean 1. http://lists.freebsd.org/pipermail/freebsd-arch/2007-June/006554.html 2. http://lists.freebsd.org/pipermail/freebsd-ports/2007-May/041577.html -- scf@FreeBSD.org