cURL / Mailing Lists / curl-library / Single Mail

curl-library

[PATCH] Updates for VMS for 0740-0D1220

From: John E. Malmberg <wb8tyw_at_qsl.net>
Date: Sun, 21 Dec 2014 09:24:55 -0600

lib/setup-vms.h : VAX HP OpenSSL port is ancient, needs help.
                  More defines to set symbols to uppercase.

src/tool_main.c : Fix parameter to vms_special_exit() call.

packages/vms/ :
  backup_gnv_curl_src.com : Fix the error message to have the correct package.

  build_curl-config_script.com : Rewrite to be more accurate.

  build_libcurl_pc.com : Use tool_version.h now.

  build_vms.com : Fix to handle lib/vtls directory.

  curl_gnv_build_steps.txt : Updated build procedure documentation.

  generate_config_vms_h_curl.com :
       * VAX does not support 64 bit ints, so no NTLM support for now.
       * VAX HP SSL port is ancient, needs some help.
       * Disable NGHTTP2 for now, not ported to VMS.
       * Disable UNIX_SOCKETS, not available on VMS yet.
       * HP GSSAPI port does not have gss_nt_service_name.

  gnv_link_curl.com : Update for new curl structure.

  pcsi_product_gnv_curl.com : Set up to optionally do a complete build.

---
 lib/setup-vms.h                             |   31 +++
 packages/vms/build_curl-config_script.com   |  346 ++++++++-------------------
 packages/vms/build_libcurl_pc.com           |    2 +-
 packages/vms/build_vms.com                  |   22 ++-
 packages/vms/curl_gnv_build_steps.txt       |   53 ++++-
 packages/vms/generate_config_vms_h_curl.com |   39 +++
 packages/vms/gnv_link_curl.com              |   11 +-
 packages/vms/pcsi_product_gnv_curl.com      |   30 +++-
 src/tool_main.c                             |    2 +-
 9 files changed, 272 insertions(+), 264 deletions(-)
diff --git a/lib/setup-vms.h b/lib/setup-vms.h
index f5eedf7..9aac671 100644
--- a/lib/setup-vms.h
+++ b/lib/setup-vms.h
@@ -203,6 +203,19 @@ char * unix_path;
 #define CRYPTO_cleanup_all_ex_data CRYPTO_CLEANUP_ALL_EX_DATA
 #define CRYPTO_free CRYPTO_FREE
 #define CRYPTO_malloc CRYPTO_MALLOC
+#define CONF_modules_load_file CONF_MODULES_LOAD_FILE
+#ifdef __VAX
+#  ifdef VMS_OLD_SSL
+  /* Ancient OpenSSL on VAX/VMS missing this constant */
+#    define CONF_MFLAGS_IGNORE_MISSING_FILE	0x10
+#    undef CONF_modules_load_file
+     static int CONF_modules_load_file(const char *filename,
+                                       const char *appname,
+                                       unsigned long flags) {
+             return 1;
+     }
+#  endif
+#endif
 #define DES_ecb_encrypt DES_ECB_ENCRYPT
 #define DES_set_key DES_SET_KEY
 #define DES_set_odd_parity DES_SET_ODD_PARITY
@@ -228,6 +241,7 @@ char * unix_path;
 #define EVP_PKEY_free EVP_PKEY_FREE
 #define EVP_cleanup EVP_CLEANUP
 #define GENERAL_NAMES_free GENERAL_NAMES_FREE
+#define i2d_X509_PUBKEY I2D_X509_PUBKEY
 #define MD4_Final MD4_FINAL
 #define MD4_Init MD4_INIT
 #define MD4_Update MD4_UPDATE
@@ -274,6 +288,7 @@ char * unix_path;
 #define SSL_get_peer_cert_chain SSL_GET_PEER_CERT_CHAIN
 #define SSL_get_peer_certificate SSL_GET_PEER_CERTIFICATE
 #define SSL_get_privatekey SSL_GET_PRIVATEKEY
+#define SSL_get_session SSL_GET_SESSION
 #define SSL_get_shutdown SSL_GET_SHUTDOWN
 #define SSL_get_verify_result SSL_GET_VERIFY_RESULT
 #define SSL_library_init SSL_LIBRARY_INIT
@@ -291,7 +306,23 @@ char * unix_path;
 #define SSLv23_client_method SSLV23_CLIENT_METHOD
 #define SSLv3_client_method SSLV3_CLIENT_METHOD
 #define TLSv1_client_method TLSV1_CLIENT_METHOD
+#define UI_create_method UI_CREATE_METHOD
+#define UI_destroy_method UI_DESTROY_METHOD
+#define UI_get0_user_data UI_GET0_USER_DATA
+#define UI_get_input_flags UI_GET_INPUT_FLAGS
+#define UI_get_string_type UI_GET_STRING_TYPE
+#define UI_create_method UI_CREATE_METHOD
+#define UI_destroy_method UI_DESTROY_METHOD
+#define UI_method_get_closer UI_METHOD_GET_CLOSER
+#define UI_method_get_opener UI_METHOD_GET_OPENER
+#define UI_method_get_reader UI_METHOD_GET_READER
+#define UI_method_get_writer UI_METHOD_GET_WRITER
+#define UI_method_set_closer UI_METHOD_SET_CLOSER
+#define UI_method_set_opener UI_METHOD_SET_OPENER
+#define UI_method_set_reader UI_METHOD_SET_READER
+#define UI_method_set_writer UI_METHOD_SET_WRITER
 #define UI_OpenSSL UI_OPENSSL
+#define UI_set_result UI_SET_RESULT
 #define X509V3_EXT_print X509V3_EXT_PRINT
 #define X509_EXTENSION_get_critical X509_EXTENSION_GET_CRITICAL
 #define X509_EXTENSION_get_object X509_EXTENSION_GET_OBJECT
diff --git a/packages/vms/build_curl-config_script.com b/packages/vms/build_curl-config_script.com
index ae9d181..ea1881d 100644
--- a/packages/vms/build_curl-config_script.com
+++ b/packages/vms/build_curl-config_script.com
@@ -1,10 +1,8 @@
-$! File: build_libcurl_pc.com
+$! build_curl-config_script.com
 $!
-$! $Id:$
+$! This generates the curl-config. script from the curl-config.in file.
 $!
-$! Build the curl-config file from the config_curl.in file
-$!
-$! Copyright 2013, John Malmberg
+$! Copyright 2014, John Malmberg
 $!
 $! Permission to use, copy, modify, and/or distribute this software for any
 $! purpose with or without fee is hereby granted, provided that the above
@@ -19,44 +17,13 @@ $! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
 $! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 $!
 $!
-$! 15-Jun-2013  J. Malmberg
+$! 16-Dec-2014	J. Malmberg
 $!
 $!===========================================================================
 $!
 $! Skip this if the curl-config. already exists.
 $ if f$search("[--]curl-config.") .nes. "" then goto all_exit
 $!
-$! Need to know the kit type.
-$ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
-$ if kit_name .eqs. ""
-$ then
-$   write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
-$   goto all_exit
-$ endif
-$!
-$!
-$! Parse the kit name into components.
-$!---------------------------------------
-$ producer = f$element(0, "-", kit_name)
-$ base = f$element(1, "-", kit_name)
-$ product = f$element(2, "-", kit_name)
-$ mmversion = f$element(3, "-", kit_name)
-$ majorver = f$extract(0, 3, mmversion)
-$ minorver = f$extract(3, 2, mmversion)
-$ updatepatch = f$element(4, "-", kit_name)
-$ if updatepatch .eqs. "-" then updatepatch = ""
-$!
-$! kit type of "D" means a daily build
-$ kit_type = f$edit(f$extract(0, 1, majorver), "upcase")
-$!
-$ cfg_file_in = "[--]curl-config.in"
-$!
-$ if f$search(cfg_file_in) .eqs. ""
-$ then
-$    write sys$output "Can not find curl-config.in."
-$    goto all_exit
-$ endif
-$!
 $ if (f$getsyi("HW_MODEL") .lt. 1024)
 $ then
 $    arch_name = "VAX"
@@ -66,223 +33,122 @@ $    arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
 $    if (arch_name .eqs. "") then arch_name = "UNK"
 $ endif
 $!
+$ x_prefix = "/usr"
+$ x_exec_prefix = "/usr"
+$ x_includedir = "${prefix}/include"
+$ x_cppflag_curl_staticlib = "-DCURL_STATICLIB"
+$ x_enabled_shared = "no"
+$ x_curl_ca_bundle = ""
+$ x_cc = "cc"
+$ x_support_features = "SSL IPv6 libz NTLM"
+$ x_support_protocols1 = "DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP"
+$ x_support_protocols2 = " LDAPS POP3 POP3S RTSP SMTP SMTPS TELNET TFTP"
+$ x_support_protocols = x_support_protocols1 + x_support_protocols2
+$ x_curlversion = "0.0.0.0"
+$ x_versionnum = ""
+$ x_libdir = "${prefix}/lib"
+$ x_require_lib_deps = ""
+$ x_enable_static = ""
+$ x_ldflags = ""
+$ part1 = "-L/usr/lib -L/SSL_LIB -lssl -lcrypto -lz"
+$ if arch_name .eqs. "VAX"
+$ then
+$   x_libcurl_libs = part1
+$ else
+$   x_libcurl_libs = part1 + " -lgssapi"
+$ endif
+$ x_libext = "a"
 $!
-$ curl_version = "0.0.0"
-$ open/read vf [--.include.curl]curlver.h
-$version_loop:
-$   read vf/end=version_loop_end line_in
+$! Get the version number
+$!-----------------------
+$ i = 0
+$ open/read/error=version_loop_end vhf [--.include.curl]curlver.h
+$ version_loop:
+$   read/end=version_loop_end vhf line_in
 $   if line_in .eqs. "" then goto version_loop
-$   key = f$element(0, " ", line_in)
-$   if key .nes. "#define" then goto version_loop
-$   name = f$element(1, " ", line_in)
-$   if name .eqs. "LIBCURL_VERSION"
+$   if f$locate("#define LIBCURL_VERSION ", line_in) .eq. 0
 $   then
-$       curl_version = f$element(2, " ", line_in) - """" - """"
-$       goto version_loop
+$       x_curlversion = f$element(2," ", line_in) - """" - """"
+$       i = i + 1
 $   endif
-$   if name .eqs. "LIBCURL_VERSION_NUM"
+$   if f$locate("#define LIBCURL_VERSION_NUM ", line_in) .eq. 0
 $   then
-$       version_num_hex = f$element(2, " ", line_in)
-$       version_num = version_num_hex - "0x"
-$       goto version_loop
+$       x_versionnum = f$element(2," ", line_in) - """" - """"
+$       i = i + 1
 $   endif
-$version_loop_end:
-$ close vf
+$   if i .lt 2 then goto version_loop
+$ version_loop_end:
+$ close vhf
 $!
-$!
-$ create [--]curl-config.
-$ open/append pco [--]curl-config.
-$ open/read pci 'cfg_file_in'
-$cfg_file_loop:
-$ read pci/end=cfg_file_loop_end line_in
-$!
-$! blank lines
-$ if line_in .eqs. ""
+$ kit_type = "V"
+$ if f$locate("-", x_curlversion) .lt. f$length(x_curlversion)
 $ then
-$   write pco ""
-$   goto cfg_file_loop
+$   kit_type = "D"
+$   x_prefix = "/beta"
+$   x_exec_prefix = "/beta"
 $ endif
 $!
-$! comment lines
-$ key = f$extract(0, 1, line_in)
-$ if key .eqs. "#"
-$ then
-$   write pco line_in
-$   goto cfg_file_loop
-$ endif
-$!
-$! No substitution line
-$ line_in_len = f$length(line_in)
-$ if f$locate("@", line_in) .ge. line_in_len
-$ then
-$   write pco line_in
-$   goto cfg_file_loop
-$ endif
-$!
-$ if f$locate("@prefix@", line_in) .lt line_in_len
-$ then
-$    if kit_type .nes. "D"
-$    then
-$        write pco "prefix=/usr"
-$    else
-$        write pco "prefix=/beta"
-$    endif
-$    goto cfg_file_loop
-$ endif
-$ if f$locate("@exec_prefix@", line_in) .lt line_in_len
-$ then
-$    if kit_type .nes. "D"
-$    then
-$        write pco "exec_prefix=/usr"
-$    else
-$        write pco "exec_prefix=/beta"
-$    endif
-$    goto cfg_file_loop
-$ endif
-$ if f$locate("=@includedir@", line_in) .lt line_in_len
-$ then
-$    write pco "includedir=$(prefix}/include"
-$    goto cfg_file_loop
-$ endif
-$ if f$locate("X_at_includedir@", line_in) .lt line_in_len
-$ then
-$    write pco "        if test ""X$(prefix}/include""; then"
-$    goto cfg_file_loop
-$ endif
-$ if f$locate("I_at_includedir@", line_in) .lt line_in_len
-$ then
-$    write pco "          echo "${CPPFLAG_CURL_STATICLIB}-I$(prefix}/include"
-$    goto cfg_file_loop
-$ endif
-$ if f$locate("@CPPFLAG_CURL_STATICLIB@", line_in) .lt line_in_len
-$ then
-$    write pco "cppflag_curl_staticlib=-DCURL_STATICLIB"
-$    goto cfg_file_loop
-$ endif
-$ if f$locate("@ENABLE_SHARED@", line_in) .lt line_in_len
+$ if kit_type .nes. "D"
 $ then
-$    write pco "        echo no"
-$    goto cfg_file_loop
-$ endif
-$ if f$locate("@CURL_CA_BUNDLE@", line_in) .lt line_in_len
-$ then
-$    write pco "        echo """""
-$    goto cfg_file_loop
-$ endif
-$ if f$locate("@CC@", line_in) .lt line_in_len
-$ then
-$    write pco "        echo ""cc"""
-$    goto cfg_file_loop
-$ endif
-$ if f$locate("@SUPPORT_FEATURES@", line_in) .lt line_in_len
-$ then
-$    if arch_name .eqs. "VAX"
-$    then
-$        write pco "        for feature in SSL libz NTLM ""; do"
-$    else
-$        write pco "        for feature in SSL IPv6 libz NTLM ""; do"
-$    endif
-$    goto cfg_file_loop
-$ endif
-$ if f$locate("@SUPPORT_PROTOCOLS@", line_in) .lt line_in_len
-$ then
-$    proto1 = "DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS"
-$    proto2 = " LDAP LDAPS POP3 POP3S RTSP SMTP SMTPS TELNET TFTP"
-$    proto = proto1 + proto2
-$    write pco "        for protocol in " + proto + "; do"
-$    goto cfg_file_loop
-$ endif
-$ if f$locate("libcurl @CURLVERSION@", line_in) .lt line_in_len
-$ then
-$    write pco "        echo libcurl ''curl_version'"
-$    goto cfg_file_loop
-$ endif
-$ if f$locate("existing @CURLVERSION@", line_in) .lt line_in_len
-$ then
-$    line_start = -
-  "          echo ""requested version $checkfor is newer than existing"
-$    write pco "''line_start' ''curl_version'"""
-$    goto cfg_file_loop
-$ endif
-$ if f$locate("`echo @versionnum@", line_in) .lt line_in_len
-$ then
-$    write pco "        numuppercase=`echo ''version_num' | tr 'a-f' 'A-F'`"
-$    goto cfg_file_loop
-$ endif
-$ if f$locate(" echo @versionnum@", line_in) .lt line_in_len
-$ then
-$    write pco "        echo ''version_num'"
-$    goto cfg_file_loop
-$ endif
-$ if f$locate("X_at_libdir@", line_in) .lt line_in_len
-$ then
-$    part1 = "        if test ""$(exec_prefix}/lib"" != ""X/usr/lib"""
-$    part2 = "-a ""X$(exec_prefix}/lib"" != ""X/usr/lib64""; then"
-$    write pco part1,part2
-$    goto cfg_file_loop
-$ endif
-$ if f$locate("L_at_libdir@", line_in) .lt line_in_len
-$ then
-$    write pco "           CURLLIBDIR=""$(exec_prefix}/lib """
-$    goto cfg_file_loop
-$ endif
-$ if f$locate("@REQUIRE_LIB_DEPS@", line_in) .lt line_in_len
-$ then
-$    write pco "        if test "Xyes" = "Xyes"; then"
-$    goto cfg_file_loop
-$ endif
-$ if f$locate("@LIBCURL_LIBS@", line_in) .lt line_in_len
-$ then
-$    if arch_name .eqs. "VAX"
-$    then
-$        write pco "          echo ${CURLLIBDIR}-lssl -lcrypto -lz"
-$    else
-$        write pco "          echo ${CURLLIBDIR}-lssl -lcrypto -lgssapi -lz"
-$    endif
-$    goto cfg_file_loop
-$ endif
-$ if f$locate("@ENABLE_STATIC@", line_in) .lt line_in_len
-$ then
-$    write pco "        if test "Xyes" != "Xno" ; then"
-$    goto cfg_file_loop
+$    part1 = "        echo "" '--prefix=/usr' '--exec-prefix=/usr' "
+$ else
+$    part1 = "        echo "" '--prefix=/beta' '--exec_prefix=/beta' "
 $ endif
-$ if f$locate("@LIBCURL_LIBS@", line_in) .lt line_in_len
+$ if arch_name .eqs. "VAX"
 $ then
-$    part1 = "          echo ${exec_prefix}/lib/libcurl.a"
-$    part2 = "-L/usr/lib -L/SSL_LIB"
-$    if arch_name .eqs. "VAX"
-$    then
-$        write pco "''part1' ''part2' -lssl -lcrypto -lz"
-$    else
-$        write pco "''part1' ''part2' -lssl -lcrypto -lgssapi -lz"
-$    endif
-$    goto cfg_file_loop
+$    part3 = ""
+$ else
+$    part3 = "'--with-gssapi' "
 $ endif
-$ if f$locate("@CONFIGURE_OPTIONS@", line_in) .lt line_in_len
-$ then
-$    if kit_type .nes. "D"
-$    then
-$        part1 = "        echo "" '--prefix=/usr' '--exec-prefix=/usr' "
-$    else
-$        part1 = "        echo "" '--prefix=/beta' '--exec_prefix=/beta' "
-$    endif
-$    if arch_name .eqs. "VAX"
-$    then
-$        part3 = ""
-$    else
-$        part3 = "'--with-gssapi' "
-$    endif
-$    part2 = "'--disable-dependency-tracking' '--disable-libtool-lock' "
-$    part4 = "'--disable-ntlm-wb' '--with-ca-path=gnv$curl_ca_path'"""
+$ part2 = "'--disable-dependency-tracking' '--disable-libtool-lock' "
+$ part4 = "'--disable-ntlm-wb' '--with-ca-path=gnv$curl_ca_path'"""
 $!
-$    write pco part1,part2,part3,part4
+$ x_configure_options = part1 + part2 + part3 + part4
 $!
-$    goto cfg_file_loop
-$ endif
-$!
-$pc_file_loop_end:
-$ close pco
-$ close pci
 $!
-$all_exit:
-$ exit
+$ open/read/error=read_loop_end c_c_in sys$disk:[--]curl-config.in
+$ create sys$disk:[--]curl-config.
+$ open/append c_c_out sys$disk:[--]curl-config.
+$read_loop:
+$   read/end=read_loop_end c_c_in line_in
+$   line_in_len = f$length(line_in)
+$   if f$locate("@", line_in) .ge. line_in_len
+$   then
+$       write c_c_out line_in
+$       goto read_loop
+$   endif
+$   i = 0
+$   line_out = ""
+$sub_loop:
+$       ! Replace between pairs of @ by alternating the elements.
+$       ! If mis-matched pairs, do not substitute anything.
+$       section1 = f$element(i, "@", line_in)
+$       if section1 .eqs. "@"
+$       then
+$           goto sub_loop_end
+$       endif
+$       i = i + 1
+$       section2 = f$element(i, "@", line_in)
+$       if section2 .eqs. "@"
+$       then
+$           goto sub_loop_end
+$       endif
+$       i = i + 1
+$       section3 = f$element(i, "@", line_in)
+$       if section3 .eqs. "@"
+$       then
+$           if line_out .eqs. "" then line_out = line_in
+$           goto sub_loop_end
+$       endif
+$       line_out = line_out + section1
+$       if f$type(x_'section2') .eqs. "STRING"
+$       then
+$           line_out = line_out + x_'section2'
+$       endif
+$       goto sub_loop
+$sub_loop_end:
+$   write c_c_out line_out
+$   goto read_loop
+$read_loop_end:
+$ close c_c_in
+$ close c_c_out
diff --git a/packages/vms/build_libcurl_pc.com b/packages/vms/build_libcurl_pc.com
index 251b345..97e6ae6 100644
--- a/packages/vms/build_libcurl_pc.com
+++ b/packages/vms/build_libcurl_pc.com
@@ -76,7 +76,7 @@ $ endif
 $!
 $!
 $ curl_version = "0.0.0"
-$ open/read vf [--.src]version.h
+$ open/read vf [--.src]tool_version.h
 $version_loop:
 $   read vf/end=version_loop_end line_in
 $   if line_in .eqs. "" then goto version_loop
diff --git a/packages/vms/build_vms.com b/packages/vms/build_vms.com
index 7b84081..d7edc46 100644
--- a/packages/vms/build_vms.com
+++ b/packages/vms/build_vms.com
@@ -40,7 +40,7 @@ $!              VAX must always use DFLOAT
 $!    NOLARGE   Disable large-file support if large file support available.
 $!              (Non-VAX, VMS >= V7.2.)
 $!    NOLDAP    Disable LDAP support if LDAP is available.
-$!    NOKERBEROS   Disable Kerberos support if Kerberos is not available.
+$!    NOKERBEROS   Disable Kerberos support if Kerberos is available.
 $!    LIST      Create C compiler listings and linker maps.
 $!                 /list/show=(expan,includ)/machine
 $!    FULLLIST  Full detailed listing.
@@ -148,6 +148,9 @@ $!                      * 3 spaces after $ for second level.  Line start + 4.
 $!                      * 7 spaces after $ for third level.  Line start + 8.
 $!                      * Each level after that indents 4 characters.
 $!                      * then/else/endif same indentation as if statement.
+$! 17-Nov-2014, Michael Steve
+$!                   Modified build to handle new location of the VTLS lib
+$!                   source within zip archive. Not a pretty fix.
 $!
 $!===========================================================================
 $!
@@ -677,8 +680,6 @@ $! Form CC qualifiers.
 $!
 $ cc_defs = "/define = (''cc_defs')"
 $ cc_qual2 = cc_qual2 + " /object = ''objdir'"
-$ cc_qual2 = cc_qual2 + " /include = ([-.lib], [-.src],"
-$ cc_qual2 = cc_qual2 + " [-.packages.vms], [-.packages.vms.''arch_name'])"
 $ cc_qual2 = cc_qual2 + "/nested_include_directory=none"
 $!
 $ 'vo_c' "CC opts:", -
@@ -806,7 +807,6 @@ $!   set nover
 $ endif
 $!
 $!
-$!
 $ on control_y then goto Common_Exit
 $!
 $ set default 'proc_dev_dir'
@@ -819,10 +819,21 @@ $ if curl_sys_zlibinc .nes. ""
 $ then
 $   sys_inc = sys_inc + ",''curl_sys_zlibinc'"
 $ endif
+$! Build LIB
+$ cc_include = "/include=([-.lib],[-.lib.vtls],[-.packages.vms]"
+$ cc_include = cc_include + ",[-.packages.vms.''arch_name'])"
 $ call build "[--.lib]" "*.c" "''objdir'CURLLIB.OLB" "amigaos, nwlib, nwos"
 $ if ($status .eq. ctrl_y) then goto Common_Exit
+$! Build VTLS
+$ cc_include = "/include=([--.lib.vtls],[--.lib],[--.src]"
+$ cc_include = cc_include + ",[--.packages.vms],[--.packages.vms.''arch_name'])"
+$ call build "[--.lib.vtls]" "*.c" "''objdir'CURLLIB.OLB" "amigaos, nwlib, nwos"
+$! Build SRC
+$ cc_include = "/include=([-.src],[-.lib],[-.lib.vtls]"
+$ cc_include = cc_include + ",[-.packages.vms],[-.packages.vms.''arch_name'])"
 $ call build "[--.src]" "*.c" "''objdir'CURLSRC.OLB"
 $ if ($status .eq. ctrl_y) then goto Common_Exit
+$! Build MSG
 $ call build "[]" "*.msg" "''objdir'CURLSRC.OLB"
 $ if ($status .eq. ctrl_y) then goto Common_Exit
 $!
@@ -920,7 +931,7 @@ $   on control_y then goto EndLoop ! SS$_CONTROLY
 $   sts = 1 ! SS$_NORMAL.
 $!   set noon
 $   set default 'p1'
-$   search = p2
+$   search = "sys$disk:" + p2
 $   reset = f$search("reset")
 $   if f$search( p3) .eqs. ""
 $   then
@@ -994,6 +1005,7 @@ $       define/user decc$system_include 'sys_inc'
 $       CC 'cc_defs' -
          'cc_qual1' -
          'cc_qual2' -
+         'cc_include' -
          'file'
 $   else
 $       cmd_msg = "MESSAGE " + msg_qual
diff --git a/packages/vms/curl_gnv_build_steps.txt b/packages/vms/curl_gnv_build_steps.txt
index e21b37d..6a87fef 100644
--- a/packages/vms/curl_gnv_build_steps.txt
+++ b/packages/vms/curl_gnv_build_steps.txt
@@ -58,7 +58,7 @@ LCL_ROOT:,VMS_ROOT:,SRC_ROOT:
 For the make install process to work, it must have write access to the
 directories referenced by the GNU: logical name.
 
-In future releases of GNV, and with GNV Bash 4.2.45 installed, this name
+In future releases of GNV, and with GNV Bash 4.3.30 installed, this name
 should be GNV$GNU:
 
 As directly updating those directories would probably be disruptive to other
@@ -99,10 +99,6 @@ Note to builders:
 GNV currently has a bug where configure scripts take a long time to run.
 Some of the configure steps take a while to complete, and on a 600 Mhz
 DS10 with IDE disks, taking an hour to run the CURL configure is normal.
-The bug appears to be in the SED for GNV 2.1.3 and GNV 3.0.1 where it
-is taking far longer than it should to do I/O.  In addition, there are
-reports that the SED in GNV 3.0.1 is broken so the SED from GNV 2.1.3
-should be used instead.
 
 The following messages can be ignored and may get fixed in a future version
 of GNV.  The GNV$*.OPT files are used to find the libraries as many have
@@ -119,12 +115,50 @@ u unimplemented switch - ignored
 
 
 With these search lists set up and the properly, curl can be built by
-setting your default to PRJ_ROOT:[curl.packages.vms] where the * is
-replaced by the actual version of curl, and then issuing the command:
+setting your default to PRJ_ROOT:[curl.packages.vms] and then issuing
+either the command:
+
+  $ @pcsi_product_gnv_curl.com
+
+or
 
   $ @build_gnv_curl.com.
 
-This command procedure does the following:
+The GNV configure procedure takes considerably longer than the DCL build
+procecure takes.  It is of use for testing the GNV build environment, and
+may not have been kept up to date.
+
+The pcsi_product_gnv_curl.com needs the following logical names which
+are described in the section below:
+
+  gnv_pcsi_producer
+  gnv_pcsi_producer_full_name
+  stage_root
+  vms_root1 (Optional if vms_root is on a NFS volume)
+  src_root1 (Optional if src_root is on a NFS volume)
+
+The pcsi_product_gnv_curl.com is described in more detail below.  It does
+the following steps.  The build steps are only done if they are needed to
+allow using either DCL or GNV based building procedures.
+
+  $ @build_vms list
+
+  $ @gnv_link_curl.com
+
+  $ @build_gnv_curl_release_notes.com
+
+  $ @backup_gnv_curl_src.com
+
+  $ @build_gnv_curl_pcsi_desc.com
+
+  $ @build_gnv_curl_pcsi_text.com
+
+  $ @stage_curl_install remove
+  $ @stage_curl_install
+
+  Then builds the kit.
+
+The build_gnv_curl.com command procedure does the following:
 
   $ @setup_gnv_curl_build.com
 
@@ -140,7 +174,8 @@ This command procedure does the following:
 
   $ purge new_gnu:[*...]/log
 
-To clean up after a build to start over, the following commands are used:
+To clean up after a GNV based build to start over, the following commands are
+used:
 
    $ bash
    bash$ cd ../..
diff --git a/packages/vms/generate_config_vms_h_curl.com b/packages/vms/generate_config_vms_h_curl.com
index 8024a92..90a83d5 100644
--- a/packages/vms/generate_config_vms_h_curl.com
+++ b/packages/vms/generate_config_vms_h_curl.com
@@ -277,6 +277,18 @@ $endif
 $write cvh "#ifdef CURL_DISABLE_LIBCURL_OPTION"
 $write cvh "#undef CURL_DISABLE_LIBCURL_OPTION"
 $write cvh "#endif"
+$write cvh "#ifndef __VAX"
+$write cvh "#ifdef CURL_DISABLE_NTLM"
+$write cvh "#undef CURL_DISABLE_NTLM"
+$write cvh "#endif"
+$write cvh "#else"
+$! NTLM needs long long or int64 support, missing from DECC C.
+$write cvh "#ifdef __DECC
+$write cvh "#ifndef CURL_DISABLE_NTLM"
+$write cvh "#define CURL_DISABLE_NTLM 1"
+$write cvh "#endif"
+$write cvh "#endif"
+$write cvh "#endif"
 $write cvh "#ifdef CURL_DISABLE_POP3"
 $write cvh "#undef CURL_DISABLE_POP3"
 $write cvh "#endif"
@@ -334,6 +346,9 @@ $write cvh "#endif"
 $write cvh "#ifdef USE_MANUAL"
 $write cvh "#undef USE_MANUAL"
 $write cvh "#endif"
+$write cvh "#ifdef USE_NGHTTP2"
+$write cvh "#undef USE_NGHTTP2"
+$write cvh "#endif"
 $write cvh "#ifdef USE_NSS"
 $write cvh "#undef USE_NSS"
 $write cvh "#endif"
@@ -352,10 +367,17 @@ $write cvh "#endif"
 $write cvh "#ifdef USE_TLS_SRP"
 $write cvh "#undef USE_TLS_SRP"
 $write cvh "#endif"
+$write cvh "#ifdef USE_UNIX_SOCKETS"
+$write cvh "#undef USE_UNIX_SOCKETS"
+$write cvh "#endif"
 $write cvh "#ifdef USE_WINDOWS_SSPI"
 $write cvh "#undef USE_WINDOWS_SSPI"
 $write cvh "#endif"
 $!
+$write cvh "#ifndef HAVE_OLD_GSSMIT"
+$write cvh "#define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE"
+$write cvh "#endif"
+$!
 $!
 $! Note:
 $! The CURL_EXTERN_SYMBOL is used for platforms that need the compiler
@@ -388,6 +410,18 @@ $   write cvh "#endif"
 $   write cvh "#ifndef USE_SSLEAY"
 $   write cvh "#define USE_SSLEAY 1"
 $   write cvh "#endif"
+$   if arch_name .eqs. "VAX"
+$   then
+$       old_mes = f$enviroment("message")
+$       set message/notext/nofaci/noseve/noident
+$       search/output=nla0: ssl$include:*.h CONF_MFLAGS_IGNORE_MISSING_FILE
+$       status = $severity
+$       set message'old_mes'
+$       if status .nes. "1"
+$       then
+$           write cvh "#define VMS_OLD_SSL 1"
+$       endif
+$   endif
 $endif
 $!
 $!
@@ -406,6 +440,7 @@ $   write cvh "#undef HAVE_LIBIDN"
 $   write cvh "#endif"
 $endif
 $!
+$!
 $! LibSSH2 not ported to VMS at this time.
 $! Allow explicit experimentation.
 $if libssh2
@@ -428,6 +463,7 @@ $   write cvh "#endif"
 $endif
 $!
 $!
+$!
 $if .not. nozlib
 $then
 $   write cvh "#define HAVE_LIBZ 1"
@@ -435,6 +471,9 @@ $   write cvh "#define HAVE_ZLIB_H 1"
 $endif
 $!
 $!
+$! Suppress a message in curl_gssapi.c compile.
+$write cvh "#pragma message disable notconstqual"
+$!
 $! Close out the file
 $!
 $write cvh ""
diff --git a/packages/vms/gnv_link_curl.com b/packages/vms/gnv_link_curl.com
index fadbbcc..960c243 100644
--- a/packages/vms/gnv_link_curl.com
+++ b/packages/vms/gnv_link_curl.com
@@ -354,7 +354,6 @@ $ endif
 $!
 $gnv_libcurl_share = "''default_dir'gnv$libcurl.exe"
 $!
-$set ver
 $ if f$search(gnv_libcurl_share) .eqs. ""
 $ then
 $   if arch_name .nes. "VAX"
@@ -420,19 +419,17 @@ $   curl_dsf = "[.src]curl.dsf"
 $   curl_main = "[.packages.vms.''arch_name']tool_main.obj"
 $   curl_src = "[.packages.vms.''arch_name']curlsrc.olb"
 $   curl_lib = "[.packages.vms.''arch_name']curllib.olb"
-$   strtoofft = "strtoofft"
-$   strdup = "strdup"
 $   rawstr = "rawstr"
 $   nonblock = "nonblock"
+$   warnless = "warnless"
 $!
 $!  Extended parse style requires special quoting
 $!
 $   if (arch_name .nes. "VAX") .and. (parse_style .eqs. "EXTENDED")
 $   then
-$       strtoofft = """strtoofft"""
-$       strdup = """strdup"""
 $       rawstr = """rawstr"""
 $       nonblock = """nonblock"""
+$       warnless = """warnless"""
 $   endif
 $   if f$search(curl_exe) .eqs. ""
 $   then
@@ -440,7 +437,7 @@ $       define/user gnv$libcurl 'gnv_libcurl_share'
 $       link'ldebug'/exe='curl_exe'/dsf='curl_dsf' -
            'curl_main','curl_src'/lib, -
            'curl_lib'/library/include=-
-           ('strtoofft', 'strdup', 'rawstr', 'nonblock'),-
+           ('rawstr','nonblock','warnless'),-
            gnv_packages_vms:curlmsg.obj,-
            sys$input:/opt
 gnv$libcurl/share
@@ -448,7 +445,7 @@ gnv_packages_vms:curl_crtl_init.obj
 $   endif
 $ endif
 $!
-$set nover
+$!
 $!
 $! in6addr_missing so skip building:
 $! [.server]sws.o
diff --git a/packages/vms/pcsi_product_gnv_curl.com b/packages/vms/pcsi_product_gnv_curl.com
index 38a1a99..747cbd6 100644
--- a/packages/vms/pcsi_product_gnv_curl.com
+++ b/packages/vms/pcsi_product_gnv_curl.com
@@ -61,6 +61,32 @@ $! Make sure that the kit name is up to date for this build
 $!----------------------------------------------------------
 $ @MAKE_PCSI_CURL_KIT_NAME.COM
 $!
+$!
+$! Make sure that the image is built
+$!----------------------------------
+$ arch_name = f$edit(f$getsyi("arch_name"),"UPCASE")
+$ if f$search("[--.src]curl.exe") .eqs. ""
+$ then
+$   build_it = 1
+$   libfile = "[.packages.vms.''arch_name']curllib.olb"
+$   if f$search(libfile) .nes. ""
+$   then
+$       build_it = 0
+$   else
+$       ! GNV based build
+$       libfile = "[.lib.^.libs]libcurl.a"
+$       if f$search(libfile) .nes. ""
+$       then
+$           build_it = 0;
+$       endif
+$   endif
+$   if build_it .eq. 1
+$   then
+$       @build_vms list
+$   endif
+$   @gnv_link_curl.com
+$ endif
+$!
 $! Make sure that the release note file name is up to date
 $!---------------------------------------------------------
 $ @BUILD_GNV_CURL_RELEASE_NOTES.COM
@@ -107,6 +133,8 @@ $ else
 $   version = "''mmversion'"
 $ endif
 $!
+$ @stage_curl_install remove
+$ @stage_curl_install
 $!
 $! Move to the base directories
 $ set def [--]
@@ -114,6 +142,7 @@ $ current_default = f$environment("DEFAULT")
 $ my_dir = f$parse(current_default,,,"DIRECTORY") - "[" - "<" - ">" - "]"
 $!
 $!
+$!
 $ source = "''default_dir'"
 $ src1 = "new_gnu:[usr.bin],"
 $ src2 = "new_gnu:[usr.include.curl],"
@@ -128,7 +157,6 @@ $ gnu_src = src1 + src2 + src3 + src4 + src5 + src6 + src7 + src8 + src9
 $!
 $!
 $ base = ""
-$ arch_name = f$edit(f$getsyi("arch_name"),"UPCASE")
 $ if arch_name .eqs. "ALPHA" then base = "AXPVMS"
 $ if arch_name .eqs. "IA64" then base = "I64VMS"
 $ if arch_name .eqs. "VAX" then base = "VAXVMS"
diff --git a/src/tool_main.c b/src/tool_main.c
index 8c8acc6..9a5ceba 100644
--- a/src/tool_main.c
+++ b/src/tool_main.c
@@ -266,7 +266,7 @@ int main(int argc, char *argv[])
 #endif
 
 #ifdef __VMS
-  vms_special_exit(res, vms_show);
+  vms_special_exit(result, vms_show);
 #else
   return (int)result;
 #endif
-- 
1.7.9
--------------010806060002000502090206
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLQpMaXN0IGFkbWluOiBodHRwOi8vY29vbC5oYXh4LnNlL2xpc3QvbGlzdGluZm8v
Y3VybC1saWJyYXJ5CkV0aXF1ZXR0ZTogIGh0dHA6Ly9jdXJsLmhheHguc2UvbWFpbC9ldGlxdWV0
dGUuaHRtbA==
--------------010806060002000502090206--
Received on 2001-09-17