aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-08-06 12:19:26 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-08-06 12:19:26 +0000
commit93bcfd4e65ba660e0bd45b7c25a0f8cb76c8368c (patch)
tree3be0daede0a7246b9bd5df9606c0de0734c58d08
parent1400561a5a52154ef0188865c059f874a65ee6f8 (diff)
Nico Baggus' VMS adjustments
-rw-r--r--lib/getenv.c12
-rw-r--r--lib/hostip.c5
2 files changed, 17 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;
}
diff --git a/lib/hostip.c b/lib/hostip.c
index 5a4a0eb77..9d2119f0d 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -28,6 +28,7 @@
#define _REENTRANT
+
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
#include <winsock.h>
#else
@@ -46,6 +47,10 @@
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
+#ifdef VMS
+#include <inet.h>
+#include <stdlib.h>
+#endif
#endif
#include "urldata.h"