diff options
author | Daniel Stenberg <daniel@haxx.se> | 2001-08-06 12:19:26 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2001-08-06 12:19:26 +0000 |
commit | 93bcfd4e65ba660e0bd45b7c25a0f8cb76c8368c (patch) | |
tree | 3be0daede0a7246b9bd5df9606c0de0734c58d08 /lib/getenv.c | |
parent | 1400561a5a52154ef0188865c059f874a65ee6f8 (diff) | |
download | curl-93bcfd4e65ba660e0bd45b7c25a0f8cb76c8368c.tar.gz |
Nico Baggus' VMS adjustments
Diffstat (limited to 'lib/getenv.c')
-rw-r--r-- | lib/getenv.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/getenv.c b/lib/getenv.c index 941ee8535..1a34f57f7 100644 --- a/lib/getenv.c +++ b/lib/getenv.c @@ -29,6 +29,10 @@ #include <windows.h> #endif +#ifdef VMS +#include <unixlib.h> +#endif + #ifdef MALLOCDEBUG #include "memdebug.h" #endif @@ -44,9 +48,17 @@ char *GetEnv(char *variable) if (temp != NULL) ExpandEnvironmentStrings(temp, env, sizeof(env)); #else +#ifdef VMS + char *env = getenv(variable); + if (env && strcmp("HOME",variable) == 0) { + env = decc$translate_vms(env); + } +/* printf ("Getenv: %s=%s\n",variable,env); */ +#else /* no length control */ char *env = getenv(variable); #endif +#endif return (env && env[0])?strdup(env):NULL; } |