aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn E. Malmberg <wb8tyw@qsl.net>2013-02-04 22:56:44 +0100
committerDaniel Stenberg <daniel@haxx.se>2013-02-05 23:08:57 +0100
commit25f351424b353884bfe36f5e1c7a787b04b46932 (patch)
tree126049f1d76a67003d7fd51e1ad6e17a0b25ef9a /src
parentcb3e6dfa3511e75334f70f53370ce3f1d711c904 (diff)
VMS: fix and generate the VMS build config
config_h.com is a new file that generates a config.h file based on the curl_config.h.in file and a quick scan of the configure script. This is actually a generic procedure that is shared with other VMS packages. The existing pre-built config-vms.h had over 100 entries that were not correct and in some cases conflicted with the build options available in the build_vms.com. generate_config_vms_h_curl.com is a helper procedure to the config_h.com. It covers the cases that the generic config_h.com is not able to figure out, and accepts input from the build_vms.com procedure. build_curlbuild_h.com is a new file to generate the curlbuild.h file that Curl is now using when it is using a curl_config.h file. post-config-vms.h is a new file that is needed to provide VMS specific definitions, and most of them need to be set before the system header files are included. The VMS build procedure is fixed: 1. Fixed to link in the correct HP ssl library. 2. Fixed to detect if HP Kerberos is installed. 3. Fixed to detect if HP LDAP is installed. 4. Fixed to detect if gnv$libzshr is installed. 5. Simplified the input parameter parsing to not use a loop. 6. Warn that 64 bit pointer option support is not complete in comments. 7. Default to IEEE floating if platform supports it so resulting libcurl will be compatible with other open source projects on VMS. 8. Default to LARGEFILE if platform supports it. 9. Default to enable SSL, LDAP, Kerberos, libz if the libraries are present. 10. Build with exact case global symbols for libcurl. 11. Generate linker option file needed. 12. Compiler list option only commonly needed items. 13. fulllist option for those who really want it. 14. Create debug symbol file on Alpha, IA64.
Diffstat (limited to 'src')
-rw-r--r--src/tool_homedir.c14
-rw-r--r--src/tool_main.c8
-rw-r--r--src/tool_operate.c3
-rw-r--r--src/tool_setup.h8
-rw-r--r--src/tool_vms.h2
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);