mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
Nico Baggus' VMS adjustments
This commit is contained in:
parent
1400561a5a
commit
93bcfd4e65
12
lib/getenv.c
12
lib/getenv.c
@ -29,6 +29,10 @@
|
||||
#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;
|
||||
}
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user