From: Daniel Stenberg Date: Mon, 6 Aug 2001 12:19:26 +0000 (+0000) Subject: Nico Baggus' VMS adjustments X-Git-Tag: curl-7_8_1~127 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=93bcfd4e65ba660e0bd45b7c25a0f8cb76c8368c;p=thirdparty%2Fcurl.git Nico Baggus' VMS adjustments --- diff --git a/lib/getenv.c b/lib/getenv.c index 941ee85359..1a34f57f78 100644 --- a/lib/getenv.c +++ b/lib/getenv.c @@ -29,6 +29,10 @@ #include #endif +#ifdef VMS +#include +#endif + #ifdef MALLOCDEBUG #include "memdebug.h" #endif @@ -43,9 +47,17 @@ char *GetEnv(char *variable) env[0] = '\0'; 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; } diff --git a/lib/hostip.c b/lib/hostip.c index 5a4a0eb770..9d2119f0df 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -28,6 +28,7 @@ #define _REENTRANT + #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) #include #else @@ -46,6 +47,10 @@ #ifdef HAVE_ARPA_INET_H #include #endif +#ifdef VMS +#include +#include +#endif #endif #include "urldata.h"