summaryrefslogtreecommitdiffstats
path: root/newlib/libc/include
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2008-09-25 01:23:08 +0000
committerJeff Johnston <jjohnstn@redhat.com>2008-09-25 01:23:08 +0000
commit37f996a2b22baba8cc6ee7df87f72df25de36737 (patch)
tree84c4a264075efe260eca78cae9950ca26f66c178 /newlib/libc/include
parent62470d09ad879ff2516a520944d5c7349a2aa85f (diff)
downloadcygnal-37f996a2b22baba8cc6ee7df87f72df25de36737.tar.gz
cygnal-37f996a2b22baba8cc6ee7df87f72df25de36737.tar.bz2
cygnal-37f996a2b22baba8cc6ee7df87f72df25de36737.zip
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.
Diffstat (limited to 'newlib/libc/include')
-rw-r--r--newlib/libc/include/stdlib.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libc/include/stdlib.h b/newlib/libc/include/stdlib.h
index 9bee3b187..5f2f60889 100644
--- a/newlib/libc/include/stdlib.h
+++ b/newlib/libc/include/stdlib.h
@@ -174,8 +174,8 @@ unsigned long long _EXFUN(_strtoull_r,(struct _reent *, const char *__n, char **
#ifndef __CYGWIN__
_VOID _EXFUN(cfree,(_PTR));
-void _EXFUN(unsetenv,(const char *__string));
-void _EXFUN(_unsetenv_r,(struct _reent *, const char *__string));
+int _EXFUN(unsetenv,(const char *__string));
+int _EXFUN(_unsetenv_r,(struct _reent *, const char *__string));
#endif
#endif /* ! __STRICT_ANSI__ */