Nico Baggus' VMS adjustments
authorDaniel Stenberg <daniel@haxx.se>
Mon, 6 Aug 2001 12:19:26 +0000 (12:19 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 6 Aug 2001 12:19:26 +0000 (12:19 +0000)
lib/getenv.c
lib/hostip.c

index 941ee853593c5fbe94d89c912aabc673c88e2c88..1a34f57f788bc0ada595bfcea771246cc294339f 100644 (file)
 #include <windows.h>
 #endif
 
+#ifdef VMS
+#include <unixlib.h>
+#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;
 }
index 5a4a0eb77058ab09a1ab6877403142119233271a..9d2119f0df604530a232f7c90b2ea8ace228edb4 100644 (file)
@@ -28,6 +28,7 @@
 
 #define _REENTRANT
 
+
 #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
 #include <winsock.h>
 #else
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
+#ifdef VMS
+#include <inet.h>
+#include <stdlib.h>
+#endif
 #endif
 
 #include "urldata.h"