summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsdagley%netscape.com <devnull@localhost>1999-10-27 22:44:48 +0000
committersdagley%netscape.com <devnull@localhost>1999-10-27 22:44:48 +0000
commit30a8bc8fa16a0ab17ad92f8d2bbe2057a8f3c730 (patch)
tree67ba789b9608e2e762831c87105a625333765679
parent4528279f11a544097c98ab1c737fd0fe137a36ee (diff)
downloadnspr-hg-30a8bc8fa16a0ab17ad92f8d2bbe2057a8f3c730.tar.gz
__MD_GetEnv now calls standard C's getenv if environment variable not in NSPR's table. r=beard
-rw-r--r--pr/src/md/mac/mdmac.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pr/src/md/mac/mdmac.c b/pr/src/md/mac/mdmac.c
index 57feb012..c762baa7 100644
--- a/pr/src/md/mac/mdmac.c
+++ b/pr/src/md/mac/mdmac.c
@@ -31,6 +31,7 @@
#include <fcntl.h>
#include <string.h>
#include <stdio.h>
+#include <stdlib.h>
#include <stat.h>
#include <stdarg.h>
#include <unix.h>
@@ -44,6 +45,9 @@
#include "mdmac.h"
+// undefine getenv, so that _MD_GetEnv can call the version in NSStdLib::nsEnvironment.cpp.
+#undef getenv
+
//
// Local routines
//
@@ -181,7 +185,7 @@ char *_MD_GetEnv(const char *name)
currentVariable = currentVariable->next;
}
- return NULL;
+ return getenv(name);
}
PR_IMPLEMENT(int)