24 lines
709 B
Text
24 lines
709 B
Text
$NetBSD: patch-aa,v 1.1 2006/03/01 15:58:03 drochner Exp $
|
|
|
|
--- src/getenv_r.c.orig 2006-03-01 16:06:43.000000000 +0100
|
|
+++ src/getenv_r.c
|
|
@@ -39,7 +39,8 @@ int getenv_r(const char *name, char *get
|
|
if (envList == NULL)
|
|
{
|
|
/* The string name was not found in the environment. */
|
|
- retVal = ENOENT;
|
|
+ errno = ENOENT;
|
|
+ retVal = -1;
|
|
}
|
|
else
|
|
{
|
|
@@ -50,7 +51,8 @@ int getenv_r(const char *name, char *get
|
|
Insufficient storage was supplied via getenvbuf and buflen to
|
|
contain the value for the specified name.
|
|
*/
|
|
- retVal = ERANGE;
|
|
+ errno = ERANGE;
|
|
+ retVal = -1;
|
|
}
|
|
else
|
|
{
|