OSDN Git Service

2008-09-24 Pawel Veselov <pawel.veselov@gmail.com>
authorjjohnstn <jjohnstn>
Thu, 25 Sep 2008 01:23:08 +0000 (01:23 +0000)
committerjjohnstn <jjohnstn>
Thu, 25 Sep 2008 01:23:08 +0000 (01:23 +0000)
commitb3968f438336b13862375172406cbe3f8803c4ab
treea5753743cfa1334a51b9ec7baeef64fadabd1259
parentfa59e94786c22b199d36de1a61791985b3cae75a
2008-09-24  Pawel Veselov  <pawel.veselov@gmail.com>

        Fix setenv/getenv/unsetenv to be OpenGroup compliant:
        * libc/include/stdlib.h (unsetenv, _unsetenv_r): Redefine with integer
        return types.
        * libc/stdlib/getenv_r.c (_findenv_r): Do no special processing with
        names that contain equal chars.
        * libc/stdlib/setenv.c: Redefine _unsetenv_r as returning int.
        * libc/stdlib/setenv_r.c (_setenv_r): Return -1 and set errno to
        EINVAL if name contains an equal sign.  Do not remove any equal signs
        from the value.
        (_unsetenv_r): Modified to return int.  Return -1 and set EINVAL
        if name contains equal sign.  Return -1 if no variable(s) were found
        and return 0 otherwise.
newlib/ChangeLog
newlib/libc/include/stdlib.h
newlib/libc/stdlib/getenv_r.c
newlib/libc/stdlib/setenv.c
newlib/libc/stdlib/setenv_r.c