diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tool_homedir.c | 14 | ||||
-rw-r--r-- | src/tool_main.c | 8 | ||||
-rw-r--r-- | src/tool_operate.c | 3 | ||||
-rw-r--r-- | src/tool_setup.h | 8 | ||||
-rw-r--r-- | src/tool_vms.h | 2 |
5 files changed, 14 insertions, 21 deletions
diff --git a/src/tool_homedir.c b/src/tool_homedir.c index cb90095e5..11bb4ef3d 100644 --- a/src/tool_homedir.c +++ b/src/tool_homedir.c @@ -24,9 +24,6 @@ #ifdef HAVE_PWD_H # include <pwd.h> #endif -#ifdef __VMS -# include <unixlib.h> -#endif #include "tool_homedir.h" @@ -56,16 +53,9 @@ static char *GetEnv(const char *variable, char do_expand) } #else (void)do_expand; -#ifdef __VMS - env = getenv(variable); - if(env && strcmp("HOME",variable) == 0) { - env = decc_translate_vms(env); - } -#else /* no length control */ env = getenv(variable); #endif -#endif return (env && env[0]) ? strdup(env) : NULL; } @@ -87,11 +77,7 @@ char *homedir(void) struct passwd *pw = getpwuid(geteuid()); if(pw) { -#ifdef __VMS - home = decc_translate_vms(pw->pw_dir); -#else home = pw->pw_dir; -#endif if(home && home[0]) home = strdup(home); else diff --git a/src/tool_main.c b/src/tool_main.c index cf2d862b2..cdf87ea3c 100644 --- a/src/tool_main.c +++ b/src/tool_main.c @@ -27,6 +27,10 @@ #include <signal.h> #endif +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif + #define ENABLE_CURLX_PRINTF /* use our own printf() functions */ #include "curlx.h" @@ -45,10 +49,6 @@ */ #include "memdebug.h" /* keep this as LAST include */ -#ifdef __VMS -static int vms_show = 0; -#endif - /* * Ensure that file descriptors 0, 1 and 2 (stdin, stdout, stderr) are * open before starting to run. Otherwise, the first three network diff --git a/src/tool_operate.c b/src/tool_operate.c index bcbce2000..1a168afcb 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -1537,6 +1537,7 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[]) show_error: #ifdef __VMS + vms_show = 0; if(is_vms_shell()) { /* VMS DCL shell behavior */ if(!config->showerror) diff --git a/src/tool_setup.h b/src/tool_setup.h index 9ed726030..2065b6f27 100644 --- a/src/tool_setup.h +++ b/src/tool_setup.h @@ -25,12 +25,12 @@ #define CURL_NO_OLDIES /* - * setup.h may define preprocessor macros such as _FILE_OFFSET_BITS and + * curl_setup.h may define preprocessor macros such as _FILE_OFFSET_BITS and * _LARGE_FILES in order to support files larger than 2 GB. On platforms * where this happens it is mandatory that these macros are defined before * any system header file is included, otherwise file handling function * prototypes will be misdeclared and curl tool may not build properly; - * therefore we must include setup.h before curl.h when building curl. + * therefore we must include curl_setup.h before curl.h when building curl. */ #include "curl_setup.h" /* from the lib directory */ @@ -49,6 +49,10 @@ # define main(x,y) curl_main(x,y) #endif +#ifdef __VMS +# include "tool_vms.h" +#endif + #ifdef TPF # undef select /* change which select is used for the curl command line tool */ diff --git a/src/tool_vms.h b/src/tool_vms.h index 5bb262e2e..ad1339c03 100644 --- a/src/tool_vms.h +++ b/src/tool_vms.h @@ -25,6 +25,8 @@ #ifdef __VMS +int vms_show; /* If VMS error code has been written */ + int is_vms_shell(void); void vms_special_exit(int code, int vms_show); |