1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

ANSI C compatibility adjustment

This commit is contained in:
Yang Tse 2008-09-12 11:18:17 +00:00
parent c3d1b07c45
commit aac739ccd2
4 changed files with 7 additions and 4 deletions

View File

@ -53,7 +53,7 @@ char *GetEnv(const char *variable)
char *env = getenv(variable); char *env = getenv(variable);
#ifdef VMS #ifdef VMS
if(env && strcmp("HOME",variable) == 0) if(env && strcmp("HOME",variable) == 0)
env = decc$translate_vms(env); env = decc_translate_vms(env);
#endif #endif
return (env && env[0])?strdup(env):NULL; return (env && env[0])?strdup(env):NULL;
#endif #endif

View File

@ -117,7 +117,7 @@ int Curl_parsenetrc(const char *host,
pw= getpwuid(geteuid()); pw= getpwuid(geteuid());
if(pw) { if(pw) {
#ifdef VMS #ifdef VMS
home = decc$translate_vms(pw->pw_dir); home = decc_translate_vms(pw->pw_dir);
#else #else
home = pw->pw_dir; home = pw->pw_dir;
#endif #endif

View File

@ -355,3 +355,6 @@
/* Define to the function return type for send. */ /* Define to the function return type for send. */
#define SEND_TYPE_RETV int #define SEND_TYPE_RETV int
/* Define to hide dollar sign from compilers in strict ansi mode. */
#define decc_translate_vms(__s) decc$translate_vms(__s)

View File

@ -71,7 +71,7 @@ char *GetEnv(const char *variable, char do_expand)
#ifdef VMS #ifdef VMS
env = getenv(variable); env = getenv(variable);
if (env && strcmp("HOME",variable) == 0) { if (env && strcmp("HOME",variable) == 0) {
env = decc$translate_vms(env); env = decc_translate_vms(env);
} }
#else #else
/* no length control */ /* no length control */
@ -100,7 +100,7 @@ char *homedir(void)
if (pw) { if (pw) {
#ifdef VMS #ifdef VMS
home = decc$translate_vms(pw->pw_dir); home = decc_translate_vms(pw->pw_dir);
#else #else
home = pw->pw_dir; home = pw->pw_dir;
#endif #endif