HEADS UP: getenv() and family API change

From: Sean C. Farley <scf_at_FreeBSD.org>
Date: Tue, 3 Jul 2007 18:35:49 -0500 (CDT)
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_at_FreeBSD.org
Received on Tue Jul 03 2007 - 21:36:01 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:13 UTC