Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Jul 2007 18:35:49 -0500 (CDT)
From:      "Sean C. Farley" <scf@FreeBSD.org>
To:        freebsd-current@FreeBSD.org
Subject:   HEADS UP:  getenv() and family API change
Message-ID:  <20070703182400.Q1449@baba.farley.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070703182400.Q1449>