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.
This commit is contained in:
John E. Malmberg 2013-02-04 22:56:44 +01:00 committed by Daniel Stenberg
parent cb3e6dfa35
commit 25f351424b
27 changed files with 3821 additions and 629 deletions

View File

@ -42,5 +42,6 @@ HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h \
warnless.h curl_hmac.h polarssl.h curl_rtmp.h curl_gethostname.h \
gopher.h axtls.h cyassl.h http_proxy.h non-ascii.h asyn.h curl_ntlm.h \
curl_gssapi.h curl_ntlm_wb.h curl_ntlm_core.h curl_ntlm_msgs.h \
curl_sasl.h curl_schannel.h curl_multibyte.h curl_darwinssl.h \
hostcheck.h bundles.h conncache.h curl_setup_once.h multihandle.h
curl_sasl.h curl_schannel.h curl_multibyte.h curl_darwinssl.h \
hostcheck.h bundles.h conncache.h curl_setup_once.h multihandle.h \
post-config-vms.h

View File

@ -1,399 +0,0 @@
#ifndef HEADER_CURL_CONFIG_VMS_H
#define HEADER_CURL_CONFIG_VMS_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2011, 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
* are also available at http://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
***************************************************************************/
/* */
/* MSK, 02/05/04, Hand edited for trail build on Alpha V7.3, DEC C 6.5-003 */
/* MSK, 03/09/04, Seems to work for all platforms I've built on so far. */
/* Added HAVE_SYS_IOCTL_H define */
/* TES, 10/06/04, Added MAX_INITIAL_POST_SIZE, HAVE_BASENAME */
/* MSK, 02/02/05, Changed HAVE_TERMIOS_H to an undef since the change in */
/* getpass.c no longer undef'd it during compile. */
/* MSK, 02/08/05, turned two config-vms files into one by using USE_SSLEAY */
/* MPZ, 12/28/05, changed HAVE_STRTOK_R define to use CRTL_VER */
/* MSK, 01/27/07, needed to add HAVE_STRUCT_TIMEVAL define */
/* Define cpu-machine-OS */
#if defined(__alpha)
# define OS "ALPHA-HP-VMS"
#elif defined(__vax)
# define OS "VAX-HP-VMS"
#elif defined(__ia64)
# define OS "IA64-HP-VMS"
#else
# define OS "UNKNOWN-HP-VMS"
#endif
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
/* The size of `int', as computed by sizeof. */
#define SIZEOF_INT 4
/* The size of `long double', as computed by sizeof. */
#define SIZEOF_LONG_DOUBLE 8
/* The size of `long long', as computed by sizeof. */
#define SIZEOF_LONG_LONG 8
/* The size of `short', as computed by sizeof. */
#define SIZEOF_SHORT 2
/* The size of `size_t', as computed by sizeof. */
#define SIZEOF_SIZE_T 4
/* Define if you have the alarm function. */
#define HAVE_ALARM 1
/* Define if you have the geteuid function. */
#define HAVE_GETEUID 1
/* Define if you have the basename function. */
#define HAVE_BASENAME 1
/* Define if you have the gethostbyaddr function. */
#define HAVE_GETHOSTBYADDR 1
/* Define if you have the gethostname function. */
#define HAVE_GETHOSTNAME 1
/* Define if you have the getpwuid function. */
#define HAVE_GETPWUID 1
/* Define if you have the getservbyname function. */
#define HAVE_GETSERVBYNAME 1
/* Define if you have the gettimeofday function. */
#define HAVE_GETTIMEOFDAY 1
/* Define if you have the inet_addr function. */
#define HAVE_INET_ADDR 1
/* Define if you have the ioctl function. */
#define HAVE_IOCTL 1
/* Define if you have a working ioctl FIONBIO function. */
#define HAVE_IOCTL_FIONBIO 1
/* Define if you have a working ioctl SIOCGIFADDR function. */
#define HAVE_IOCTL_SIOCGIFADDR 1
/* Define if you have the perror function. */
#define HAVE_PERROR 1
/* Define if you have the select function. */
#define HAVE_SELECT 1
/* Define if you have the setvbuf function. */
#define HAVE_SETVBUF 1
/* Define if you have the sigaction function. */
#define HAVE_SIGACTION 1
/* Define if you have the signal function. */
#define HAVE_SIGNAL 1
/* Define if you have the socket function. */
#define HAVE_SOCKET 1
/* Define if you have the strcasecmp function. */
#define HAVE_STRCASECMP 1
/* Define if you have the strcmpi function. */
/* #define HAVE_STRCMPI 1 */
/* Define if you have the strdup function. */
#define HAVE_STRDUP 1
/* Define if you have the strftime function. */
#define HAVE_STRFTIME 1
/* Define if you have the stricmp function. */
/* #define HAVE_STRICMP 1 */
/* Define if you have the strstr function. */
#define HAVE_STRSTR 1
/* Define if you have the ftruncate function. */
#define HAVE_FTRUNCATE 1
/* Define if you have the uname function. */
#define HAVE_UNAME 1
/* Define if you have the <errno.h> header file. */
#define HAVE_ERRNO_H 1
/* Define if you have the <err.h> header file. */
#define HAVE_ERR_H 1
/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define if you have the <getopt.h> header file. */
#define HAVE_GETOPT_H 1
/* Define if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1
/* Define if you need the malloc.h header header file even with stdlib.h */
/* #define NEED_MALLOC_H 1 */
/* Define if you have the <net/if.h> header file. */
#define HAVE_NET_IF_H 1
/* Define if you have the <netdb.h> header file. */
#define HAVE_NETDB_H 1
/* Define if you have the <netinet/if_ether.h> header file. */
#define HAVE_NETINET_IF_ETHER_H 1
/* Define if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1
/* OpenSSL section starts here */
/* Define if you have a working OpenSSL installation */
#ifdef USE_SSLEAY
/* if OpenSSL is in use */
#define USE_OPENSSL 1
/* Define if you have the crypto library (-lcrypto). */
#define HAVE_LIBCRYPTO 1
/* Define if you have the ssl library (-lssl). */
#define HAVE_LIBSSL 1
/* Define if you have the <openssl/crypto.h> header file. */
#define HAVE_OPENSSL_CRYPTO_H 1
/* Define if you have the <openssl/err.h> header file. */
#define HAVE_OPENSSL_ERR_H 1
/* Define if you have the <openssl/pem.h> header file. */
#define HAVE_OPENSSL_PEM_H 1
/* Define if you have the <openssl/rsa.h> header file. */
#define HAVE_OPENSSL_RSA_H 1
/* Define if you have the <openssl/ssl.h> header file. */
#define HAVE_OPENSSL_SSL_H 1
/* Define if you have the <openssl/x509.h> header file. */
#define HAVE_OPENSSL_X509_H 1
/*
* This needs to be defined for OpenSSL 0.9.7 and other versions that have the
* ENGINE stuff supported. If an include of "openssl/engine.h" fails, then
* undefine the define below.
*/
#define HAVE_OPENSSL_ENGINE_H 1
#endif /* USE_SSLEAY */
/* OpenSSL section ends here */
/* Define if you have the <pwd.h> header file. */
#define HAVE_PWD_H 1
/* Define if you have the <sgtty.h> header file. */
#define HAVE_SGTTY_H 1
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
/* Define if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H
/* Define if you have the <time.h> header file. */
#define HAVE_TIME_H 1
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define if you have the resolv library (-lresolv). */
#define HAVE_LIBRESOLV 1
/* Define if you have the socket library (-lsocket). */
#define HAVE_LIBSOCKET 1
/* Define if getaddrinfo exists and works */
#define HAVE_GETADDRINFO 1
/* Define if you have the <timeval.h> header file. */
#define HAVE_TIMEVAL_H 1
/* Define if you have the timeval struct. */
#define HAVE_STRUCT_TIMEVAL 1
/* Name of this package! */
#define PACKAGE "not-used"
/* Version number of this archive. */
#define VERSION "not-used"
/* Define if you have the getpass function. */
#undef HAVE_GETPASS
/* Define if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define if you have the `strtok_r' function. */
/* Condition lifted from <string.h> */
#if __CRTL_VER >= 70301000
# define HAVE_STRTOK_R 1
#endif
/* Define if you have the `strtoll' function. */
#define HAVE_STRTOLL 1
/* Define if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you need the memory.h header file even with stdlib.h */
#define NEED_MEMORY_H 1
/* Define if you have the `sigsetjmp' function. */
#define HAVE_SIGSETJMP 1
/* Define to 1 if you have the <setjmp.h> header file. */
#define HAVE_SETJMP_H 1
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define to 1 if you have the <stropts.h> header file. */
#define HAVE_STROPTS_H 1
/* Define if you have the getnameinfo function. */
#define HAVE_GETNAMEINFO 1
/* Define to the type qualifier of arg 1 for getnameinfo. */
#define GETNAMEINFO_QUAL_ARG1 const
/* Define to the type of arg 1 for getnameinfo. */
#define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
/* Define to the type of arg 2 for getnameinfo. */
#define GETNAMEINFO_TYPE_ARG2 size_t
/* Define to the type of args 4 and 6 for getnameinfo. */
#define GETNAMEINFO_TYPE_ARG46 size_t
/* Define to the type of arg 7 for getnameinfo. */
#define GETNAMEINFO_TYPE_ARG7 int
/* Define if you have the recv function. */
#define HAVE_RECV 1
/* Define to the type of arg 1 for recv. */
#define RECV_TYPE_ARG1 int
/* Define to the type of arg 2 for recv. */
#define RECV_TYPE_ARG2 void *
/* Define to the type of arg 3 for recv. */
#define RECV_TYPE_ARG3 int
/* Define to the type of arg 4 for recv. */
#define RECV_TYPE_ARG4 int
/* Define to the function return type for recv. */
#define RECV_TYPE_RETV int
/* Define if you have the recvfrom function. */
#define HAVE_RECVFROM 1
/* Define to the type of arg 1 for recvfrom. */
#define RECVFROM_TYPE_ARG1 int
/* Define to the type pointed by arg 2 for recvfrom. */
#define RECVFROM_TYPE_ARG2 void
/* Define if the type pointed by arg 2 for recvfrom is void. */
#define RECVFROM_TYPE_ARG2_IS_VOID 1
/* Define to the type of arg 3 for recvfrom. */
#define RECVFROM_TYPE_ARG3 int
/* Define to the type of arg 4 for recvfrom. */
#define RECVFROM_TYPE_ARG4 int
/* Define to the type pointed by arg 5 for recvfrom. */
#define RECVFROM_TYPE_ARG5 struct sockaddr
/* Define to the type pointed by arg 6 for recvfrom. */
#define RECVFROM_TYPE_ARG6 int
/* Define to the function return type for recvfrom. */
#define RECVFROM_TYPE_RETV int
/* Define if you have the send function. */
#define HAVE_SEND 1
/* Define to the type of arg 1 for send. */
#define SEND_TYPE_ARG1 int
/* Define to the type qualifier of arg 2 for send. */
#define SEND_QUAL_ARG2 const
/* Define to the type of arg 2 for send. */
#define SEND_TYPE_ARG2 void *
/* Define to the type of arg 3 for send. */
#define SEND_TYPE_ARG3 int
/* Define to the type of arg 4 for send. */
#define SEND_TYPE_ARG4 int
/* Define to the function return type for send. */
#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)
#endif /* HEADER_CURL_CONFIG_VMS_H */

View File

@ -40,6 +40,11 @@
#include "curl_config.h"
/* VMS needs some helper routines/definitions */
#ifdef __VMS
# include "post-config-vms.h"
#endif
#else /* HAVE_CONFIG_H */
#ifdef _WIN32_WCE
@ -645,7 +650,9 @@ int netware_init(void);
* Include macros and defines that should only be processed once.
*/
#ifndef HEADER_CURL_SETUP_ONCE_H
#include "curl_setup_once.h"
#endif
/*
* Definition of our NOP statement Object-like macro

View File

@ -526,17 +526,6 @@ typedef int sig_atomic_t;
#define EREMOTE WSAEREMOTE
#endif
/*
* Actually use __32_getpwuid() on 64-bit VMS builds for getpwuid()
*/
#if defined(__VMS) && \
defined(__INITIAL_POINTER_SIZE) && (__INITIAL_POINTER_SIZE == 64)
#define getpwuid __32_getpwuid
#endif
/*
* Macro argv_item_t hides platform details to code using it.
*/

View File

@ -22,10 +22,6 @@
#include "curl_setup.h"
#ifdef __VMS
#include <unixlib.h>
#endif
#include <curl/curl.h>
#include "curl_memory.h"
@ -46,10 +42,6 @@ char *GetEnv(const char *variable)
return (env[0] != '\0')?strdup(env):NULL;
#else
char *env = getenv(variable);
#ifdef __VMS
if(env && strcmp("HOME",variable) == 0)
env = decc_translate_vms(env);
#endif
return (env && env[0])?strdup(env):NULL;
#endif
#endif

View File

@ -25,9 +25,6 @@
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
#ifdef __VMS
#include <unixlib.h>
#endif
#include <curl/curl.h>
#include "netrc.h"
@ -83,11 +80,7 @@ int Curl_parsenetrc(const char *host,
struct passwd *pw;
pw= getpwuid(geteuid());
if(pw) {
#ifdef __VMS
home = decc_translate_vms(pw->pw_dir);
#else
home = pw->pw_dir;
#endif
}
#endif
}

398
lib/post-config-vms.h Normal file
View File

@ -0,0 +1,398 @@
#ifndef HEADER_CONFIG_VMS_H
#define HEADER_CONFIG_VMS_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* 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
* are also available at http://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
***************************************************************************/
/* */
/* JEM, 12/30/12, VMS now generates config.h, so only define wrappers for */
/* getenv(), getpwuid() and provide is_vms_shell() */
/* Also need upper case symbols for system services, and */
/* OpenSSL, and some Kerberos image */
#ifdef __DECC
#pragma message save
#pragma message disable dollarid
#endif
/* Hide the stuff we are overriding */
#define getenv decc_getenv
#ifdef __DECC
# if __INITIAL_POINTER_SIZE != 64
# define getpwuid decc_getpwuid
# endif
#endif
#include <stdlib.h>
char * decc$getenv(const char * __name);
#include <pwd.h>
#include <string.h>
#include <unixlib.h>
#undef getenv
#undef getpwuid
#define getenv vms_getenv
#define getpwuid vms_getpwuid
/* VAX needs these in upper case when compiling exact case */
#define sys$assign SYS$ASSIGN
#define sys$dassgn SYS$DASSGN
#define sys$qiow SYS$QIOW
#ifdef __DECC
# if __INITIAL_POINTER_SIZE
# pragma __pointer_size __save
# endif
#endif
#if __USE_LONG_GID_T
# define decc_getpwuid DECC$__LONG_GID_GETPWUID
#else
# if __INITIAL_POINTER_SIZE
# define decc_getpwuid decc$__32_getpwuid
# else
# define decc_getpwuid decc$getpwuid
# endif
#endif
struct passwd * decc_getpwuid(uid_t uid);
#ifdef __DECC
# if __INITIAL_POINTER_SIZE == 32
/* Translate the path, but only if the path is a VMS file specification */
/* The translation is usually only needed for older versions of VMS */
static char * vms_translate_path(const char * path) {
char * unix_path;
char * test_str;
/* See if the result is in VMS format, if not, we are done */
/* Assume that this is a PATH, not just some data */
test_str = strpbrk(path, ":[<^");
if(test_str == NULL) {
return (char *)path;
}
unix_path = decc$translate_vms(path);
if((int)unix_path <= 0) {
/* We can not translate it, so return the original string */
return (char *)path;
}
}
# else
/* VMS translate path is actually not needed on the current 64 bit */
/* VMS platforms, so instead of figuring out the pointer settings */
/* Change it to a noop */
# define vms_translate_path(__path) __path
# endif
#endif
#ifdef __DECC
# if __INITIAL_POINTER_SIZE
# pragma __pointer_size __restore
# endif
#endif
static char * vms_getenv(const char * envvar) {
char * result;
char * vms_path;
/* first use the DECC getenv() function */
result = decc$getenv(envvar);
if(result == NULL) {
return result;
}
vms_path = result;
result = vms_translate_path(vms_path);
/* note that if you backport this to use VAX C RTL, that the VAX C RTL */
/* may do a malloc(2048) for each call to getenv(), so you will need */
/* to add a free(vms_path) */
/* Do not do a free() for DEC C RTL builds, which should be used for */
/* VMS 5.5-2 and later, even if using GCC */
return result;
}
static struct passwd vms_passwd_cache;
static struct passwd * vms_getpwuid(uid_t uid) {
struct passwd * my_passwd;
/* Hack needed to support 64 bit builds, decc_getpwnam is 32 bit only */
#ifdef __DECC
# if __INITIAL_POINTER_SIZE
__char_ptr32 unix_path;
# else
char * unix_path;
# endif
#else
char * unix_path;
#endif
my_passwd = decc_getpwuid(uid);
if(my_passwd == NULL) {
return my_passwd;
}
unix_path = vms_translate_path(my_passwd->pw_dir);
if((long)unix_path <= 0) {
/* We can not translate it, so return the original string */
return my_passwd;
}
/* If no changes needed just return it */
if(unix_path == my_passwd->pw_dir) {
return my_passwd;
}
/* Need to copy the structure returned */
/* Since curl is only using pw_dir, no need to fix up *
/* the pw_shell when running under Bash */
vms_passwd_cache.pw_name = my_passwd->pw_name;
vms_passwd_cache.pw_uid = my_passwd->pw_uid;
vms_passwd_cache.pw_gid = my_passwd->pw_uid;
vms_passwd_cache.pw_dir = unix_path;
vms_passwd_cache.pw_shell = my_passwd->pw_shell;
return &vms_passwd_cache;
}
#ifdef __DECC
#pragma message restore
#endif
/* Bug - VMS OpenSSL and Kerberos universal symbols are in uppercase only */
/* VMS libraries should have universal symbols in exact and uppercase */
#define ASN1_INTEGER_get ASN1_INTEGER_GET
#define ASN1_STRING_data ASN1_STRING_DATA
#define ASN1_STRING_length ASN1_STRING_LENGTH
#define ASN1_STRING_print ASN1_STRING_PRINT
#define ASN1_STRING_to_UTF8 ASN1_STRING_TO_UTF8
#define ASN1_STRING_type ASN1_STRING_TYPE
#define BIO_ctrl BIO_CTRL
#define BIO_free BIO_FREE
#define BIO_new BIO_NEW
#define BIO_s_mem BIO_S_MEM
#define BN_bn2bin BN_BN2BIN
#define BN_num_bits BN_NUM_BITS
#define CRYPTO_cleanup_all_ex_data CRYPTO_CLEANUP_ALL_EX_DATA
#define CRYPTO_free CRYPTO_FREE
#define CRYPTO_malloc CRYPTO_MALLOC
#define DES_ecb_encrypt DES_ECB_ENCRYPT
#define DES_set_key DES_SET_KEY
#define DES_set_odd_parity DES_SET_ODD_PARITY
#define ENGINE_ctrl ENGINE_CTRL
#define ENGINE_ctrl_cmd ENGINE_CTRL_CMD
#define ENGINE_finish ENGINE_FINISH
#define ENGINE_free ENGINE_FREE
#define ENGINE_get_first ENGINE_GET_FIRST
#define ENGINE_get_id ENGINE_GET_ID
#define ENGINE_get_next ENGINE_GET_NEXT
#define ENGINE_init ENGINE_INIT
#define ENGINE_load_builtin_engines ENGINE_LOAD_BUILTIN_ENGINES
#define ENGINE_load_private_key ENGINE_LOAD_PRIVATE_KEY
#define ENGINE_set_default ENGINE_SET_DEFAULT
#define ERR_clear_error ERR_CLEAR_ERROR
#define ERR_error_string ERR_ERROR_STRING
#define ERR_error_string_n ERR_ERROR_STRING_N
#define ERR_free_strings ERR_FREE_STRINGS
#define ERR_get_error ERR_GET_ERROR
#define ERR_peek_error ERR_PEEK_ERROR
#define ERR_remove_state ERR_REMOVE_STATE
#define EVP_PKEY_copy_parameters EVP_PKEY_COPY_PARAMETERS
#define EVP_PKEY_free EVP_PKEY_FREE
#define EVP_cleanup EVP_CLEANUP
#define GENERAL_NAMES_free GENERAL_NAMES_FREE
#define MD4_Final MD4_FINAL
#define MD4_Init MD4_INIT
#define MD4_Update MD4_UPDATE
#define MD5_Final MD5_FINAL
#define MD5_Init MD5_INIT
#define MD5_Update MD5_UPDATE
#define OPENSSL_add_all_algo_noconf OPENSSL_ADD_ALL_ALGO_NOCONF
#define PEM_read_X509 PEM_READ_X509
#define PEM_write_bio_X509 PEM_WRITE_BIO_X509
#define PKCS12_PBE_add PKCS12_PBE_ADD
#define PKCS12_free PKCS12_FREE
#define PKCS12_parse PKCS12_PARSE
#define RAND_add RAND_ADD
#define RAND_bytes RAND_BYTES
#define RAND_egd RAND_EGD
#define RAND_file_name RAND_FILE_NAME
#define RAND_load_file RAND_LOAD_FILE
#define RAND_status RAND_STATUS
#define SSL_CIPHER_get_name SSL_CIPHER_GET_NAME
#define SSL_CTX_add_client_CA SSL_CTX_ADD_CLIENT_CA
#define SSL_CTX_callback_ctrl SSL_CTX_CALLBACK_CTRL
#define SSL_CTX_check_private_key SSL_CTX_CHECK_PRIVATE_KEY
#define SSL_CTX_ctrl SSL_CTX_CTRL
#define SSL_CTX_free SSL_CTX_FREE
#define SSL_CTX_get_cert_store SSL_CTX_GET_CERT_STORE
#define SSL_CTX_load_verify_locations SSL_CTX_LOAD_VERIFY_LOCATIONS
#define SSL_CTX_new SSL_CTX_NEW
#define SSL_CTX_set_cipher_list SSL_CTX_SET_CIPHER_LIST
#define SSL_CTX_set_def_passwd_cb_ud SSL_CTX_SET_DEF_PASSWD_CB_UD
#define SSL_CTX_set_default_passwd_cb SSL_CTX_SET_DEFAULT_PASSWD_CB
#define SSL_CTX_set_verify SSL_CTX_SET_VERIFY
#define SSL_CTX_use_PrivateKey SSL_CTX_USE_PRIVATEKEY
#define SSL_CTX_use_PrivateKey_file SSL_CTX_USE_PRIVATEKEY_FILE
#define SSL_CTX_use_cert_chain_file SSL_CTX_USE_CERT_CHAIN_FILE
#define SSL_CTX_use_certificate SSL_CTX_USE_CERTIFICATE
#define SSL_CTX_use_certificate_file SSL_CTX_USE_CERTIFICATE_FILE
#define SSL_SESSION_free SSL_SESSION_FREE
#define SSL_connect SSL_CONNECT
#define SSL_free SSL_FREE
#define SSL_get1_session SSL_GET1_SESSION
#define SSL_get_certificate SSL_GET_CERTIFICATE
#define SSL_get_current_cipher SSL_GET_CURRENT_CIPHER
#define SSL_get_error SSL_GET_ERROR
#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_shutdown SSL_GET_SHUTDOWN
#define SSL_get_verify_result SSL_GET_VERIFY_RESULT
#define SSL_library_init SSL_LIBRARY_INIT
#define SSL_load_error_strings SSL_LOAD_ERROR_STRINGS
#define SSL_new SSL_NEW
#define SSL_peek SSL_PEEK
#define SSL_pending SSL_PENDING
#define SSL_read SSL_READ
#define SSL_set_connect_state SSL_SET_CONNECT_STATE
#define SSL_set_fd SSL_SET_FD
#define SSL_set_session SSL_SET_SESSION
#define SSL_shutdown SSL_SHUTDOWN
#define SSL_write SSL_WRITE
#define SSLeay SSLEAY
#define SSLv23_client_method SSLV23_CLIENT_METHOD
#define SSLv3_client_method SSLV3_CLIENT_METHOD
#define TLSv1_client_method TLSV1_CLIENT_METHOD
#define UI_OpenSSL UI_OPENSSL
#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
#define X509_LOOKUP_file X509_LOOKUP_FILE
#define X509_NAME_ENTRY_get_data X509_NAME_ENTRY_GET_DATA
#define X509_NAME_get_entry X509_NAME_GET_ENTRY
#define X509_NAME_get_index_by_NID X509_NAME_GET_INDEX_BY_NID
#define X509_NAME_print_ex X509_NAME_PRINT_EX
#define X509_STORE_CTX_get_current_cert X509_STORE_CTX_GET_CURRENT_CERT
#define X509_STORE_add_lookup X509_STORE_ADD_LOOKUP
#define X509_STORE_set_flags X509_STORE_SET_FLAGS
#define X509_check_issued X509_CHECK_ISSUED
#define X509_free X509_FREE
#define X509_get_ext_d2i X509_GET_EXT_D2I
#define X509_get_issuer_name X509_GET_ISSUER_NAME
#define X509_get_pubkey X509_GET_PUBKEY
#define X509_get_serialNumber X509_GET_SERIALNUMBER
#define X509_get_subject_name X509_GET_SUBJECT_NAME
#define X509_load_crl_file X509_LOAD_CRL_FILE
#define X509_verify_cert_error_string X509_VERIFY_CERT_ERROR_STRING
#define d2i_PKCS12_fp D2I_PKCS12_FP
#define i2t_ASN1_OBJECT I2T_ASN1_OBJECT
#define sk_num SK_NUM
#define sk_pop_free SK_POP_FREE
#define sk_value SK_VALUE
#define USE_UPPERCASE_GSSAPI 1
#define gss_seal GSS_SEAL
#define gss_unseal GSS_UNSEAL
#define USE_UPPERCASE_KRBAPI 1
/* AI_NUMERICHOST needed for IP V6 support in Curl */
#ifdef HAVE_NETDB_H
#include <netdb.h>
#ifndef AI_NUMERICHOST
#ifdef ENABLE_IPV6
#undef ENABLE_IPV6
#endif
#endif
#endif
/* VAX symbols are always in uppercase */
#ifdef __VAX
#define inflate INFLATE
#define inflateEnd INFLATEEND
#define inflateInit2_ INFLATEINIT2_
#define inflateInit_ INFLATEINIT_
#define zlibVersion ZLIBVERSION
#endif
/* Older VAX OpenSSL port defines these as Macros */
/* Need to include the headers first and then redefine */
/* that way a newer port will also work if some one has one */
#ifdef __VAX
# if (OPENSSL_VERSION_NUMBER < 0x00907001L)
# define des_set_odd_parity DES_SET_ODD_PARITY
# define des_set_key DES_SET_KEY
# define des_ecb_encrypt DES_ECB_ENCRYPT
# endif
# include <openssl/evp.h>
# ifndef OpenSSL_add_all_algorithms
# define OpenSSL_add_all_algorithms OPENSSL_ADD_ALL_ALGORITHMS
void OPENSSL_ADD_ALL_ALGORITHMS(void);
# endif
/* Curl defines these to lower case and VAX needs them in upper case */
/* So we need static routines */
# if (OPENSSL_VERSION_NUMBER < 0x00907001L)
# undef des_set_odd_parity
# undef DES_set_odd_parity
# undef des_set_key
# undef DES_set_key
# undef des_ecb_encrypt
# undef DES_ecb_encrypt
static void des_set_odd_parity(des_cblock *key) {
DES_SET_ODD_PARITY(key);
}
static int des_set_key(const_des_cblock *key,
des_key_schedule schedule) {
return DES_SET_KEY(key, schedule);
}
static void des_ecb_encrypt(const_des_cblock *input,
des_cblock *output,
des_key_schedule ks,int enc) {
DES_ECB_ENCRYPT(input, output, ks, enc);
}
#endif
/* Need this to stop a macro redefinition error */
#if OPENSSL_VERSION_NUMBER < 0x00907000L
# ifdef X509_STORE_set_flags
# undef X509_STORE_set_flags
# define X509_STORE_set_flags(x,y) Curl_nop_stmt
# endif
#endif
#endif
#endif /* HEADER_CONFIG_VMS_H */

View File

@ -3,14 +3,4 @@ EXTRA_DIST = build_vms.com \
curlmsg.msg \
curlmsg.sdl \
curlmsg_vms.h \
hpssl_alpha.opt \
hpssl_ia64.opt \
hpssl_vax.opt \
ldap.opt \
openssl_alpha.opt \
openssl_ia64.opt \
openssl_vax.opt \
openssl_ssl_alpha.opt \
openssl_ssl_ia64.opt \
openssl_ssl_vax.opt \
readme

View File

@ -0,0 +1,327 @@
$! File: config_h.com
$!
$! $Id: config_h.com,v 1.1.1.1 2012/12/02 19:25:21 wb8tyw Exp $
$!
$! This procedure attempts to figure out how to build a config.h file
$! for the current project.
$!
$! P1 specifies the config.h.in file or equivalent. If it is not specified
$! then this procedure will search for several common names of the file.
$!
$! The CONFIGURE shell script will be examined for hints and a few symbols
$! but most of the tests will not produce valid results on OpenVMS. Some
$! will produce false positives and some will produce false negatives.
$!
$! It is easier to just read the config.h_in file and make up tests based
$! on what is in it!
$!
$! This file will create an empty config_vms.h file if one does not exist.
$! The config_vms.h is intended for manual edits to handle things that
$! this procedure can not.
$!
$! The config_vms.h will be invoked by the resulting config.h file.
$!
$! This procedure knows about the DEC C RTL on the system it is on.
$! Future versions may be handle the GNV, the OpenVMS porting library,
$! and others.
$!
$! This procedure may not guess the options correctly for all architectures,
$! and is a work in progress.
$!
$! Copyright 2011, 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
$! copyright notice and this permission notice appear in all copies.
$!
$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
$!
$! 15-Jan-2001 J. Malmberg Original
$! 29-Apr-2001 J. Malmberg Also look for config.*in* in a [.include]
$! subdirectory
$! 30-Apr-2001 J. Malmberg Update for SAMBA checks
$! 09-Apr-2005 J. Malmberg Update for RSYNC and large file.
$! 29-Sep-2011 J. Malmberg Update for Bash 4.2
$! 01-Mar-2012 J. Malmberg Warn about getcwd(0,0)
$! 21-Dec-2012 J. Malmberg Update for gawk
$! 29-Dec-2012 J. Malmberg Update for curl
$!============================================================================
$!
$ss_normal = 1
$ss_abort = 44
$ss_control_y = 1556
$status = ss_normal
$on control_y then goto control_y
$on warning then goto general_error
$!
$! Some information for writing timestamps to created files
$!----------------------------------------------------------
$my_proc = f$environment("PROCEDURE")
$my_proc_file = f$parse(my_proc,,,"NAME") + f$parse(my_proc,,,"TYPE")
$tab[0,8] = 9
$datetime = f$element(0,".",f$cvtime(,"ABSOLUTE","DATETIME"))
$username = f$edit(f$getjpi("","USERNAME"),"TRIM")
$!
$pid = f$getjpi("","PID")
$tfile1 = "SYS$SCRATCH:config_h_temp1_''pid'.TEMP"
$dchfile = "SYS$SCRATCH:config_h_decc_''pid'.TEMP"
$configure_script = "SYS$SCRATCH:configure_script_''pid'.TEMP"
$!
$! Get the system type
$!----------------------
$arch_type = f$getsyi("arch_type")
$!
$!
$! Write out the header
$!----------------------
$gosub write_curlbuild_h_header
$!
$!
$! config.h.in could have at least five different names depending
$! on how it was transferred to OpenVMS
$!------------------------------------------------------------------
$base_curlbuild = "sys$disk:[.include.curl]"
$if p1 .nes. ""
$then
$ cfile = p1
$else
$ cfile = f$search("''base_curlbuild'curlbuild.h.in")
$ if cfile .eqs. ""
$ then
$ cfile = f$search("''base_curlbuild'curlbuild.h_in")
$ if cfile .eqs. ""
$ then
$ cfile = f$search("''base_curlbuild'curlbuildh.in")
$ if cfile .eqs. ""
$ then
$ cfile = f$search("''base_curlbuild'curlbuild__2eh.in")
$ if cfile .eqs. ""
$ then
$ cfile = f$search("''base_curlbuild'curlbuild.h__2ein")
$ if cfile .eqs. ""
$ then
$ cfile = f$search("''base_curlbuild'curlbuild.h$5nin")
$ endif
$ endif
$ endif
$ endif
$ endif
$endif
$!
$if cfile .eqs. ""
$then
$ write sys$output "Can not find ''base_curlbuild'curlbuild.h.in"
$ line_out = "Looked for curlbuild.h.in, curlbuild.h_in, curlbuild.in, "
$ line_out = line_out + "curlbuild__2eh.in, curlbuild.h__2ein, "
$ line_out = line_out + "curlbuild.h$5nin"
$ write/symbol sys$output line_out
$ goto general_error
$endif
$!
$open/read inf 'cfile'
$do_comment = 0
$if_block = 0
$cfgh_in_loop1:
$!set nover
$ read/end=cfgh_in_loop1_end inf line_in
$ xline = f$edit(line_in,"TRIM,COMPRESS")
$!
$! Blank line handling
$!---------------------
$ if xline .eqs. ""
$ then
$ write tf ""
$ goto cfgh_in_loop1
$ endif
$ xlen = f$length(xline)
$ key = f$extract(0,2,xline)
$!
$! deal with comments by copying exactly
$!-----------------------------------------
$ if (do_comment .eq. 1) .or. (key .eqs. "/*")
$ then
$ do_comment = 1
$ write tf line_in
$ key = f$extract(xlen - 2, 2, xline)
$ if key .eqs. "*/" then do_comment = 0
$ goto cfgh_in_loop1
$ endif
$!
$! Some quick parsing
$!----------------------
$ keyif = f$extract(0,3,xline)
$ key1 = f$element(0," ",xline)
$ key2 = f$element(1," ",xline)
$ key2a = f$element(0,"_",key2)
$ key2b = f$element(1,"_",key2)
$ key2_len = f$length(key2)
$ key2_h = f$extract(key2_len - 2, 2, key2)
$ key2_t = f$extract(key2_len - 5, 5, key2)
$ if key2_t .eqs. "_TYPE" then key2_h = "_T"
$ key64 = 0
$ if f$locate("64", xline) .lt. xlen then key64 = 1
$!
$!write sys$output "xline = ''xline'"
$!
$ if key1 .nes. "#undef"
$ then
$ write tf line_in
$ goto cfgh_in_loop1
$ endif
$!
$! All versions of VMS have sys/types.h
$!----------------------------------------
$ if (key2 .eqs. "CURL_PULL_SYS_TYPES_H")
$ then
$ write tf "#define ''key2' 1"
$ goto cfgh_in_loop1
$ endif
$!
$! Most have sys/socket.h
$!-------------------------
$ if (key2 .eqs. "CURL_PULL_SYS_SOCKET_H")
$ then
$ write tf "#ifdef HAVE_SYS_SOCKET_H"
$ write tf "#define ''key2' 1"
$ write tf "#else"
$ write tf "#undef ''key2'"
$ write tf "#endif"
$ goto cfgh_in_loop1
$ endif
$!
$! VAX/VMS 7.3 does not have sys/poll.h
$!----------------------------------------
$ if (key2 .eqs. "CURL_PULL_SYS_POLL_H")
$ then
$ write tf "#ifdef HAVE_POLL_H"
$ write tf "#define ''key2' 1"
$ write tf "#else"
$ write tf "#undef ''key2'"
$ write tf "#endif"
$ goto cfgh_in_loop1
$ endif
$!
$ if (key2 .eqs. "CURL_SIZEOF_LONG")
$ then
$ write tf "#define ''key2' SIZEOF_INT"
$ goto cfgh_in_loop1
$ endif
$!
$ if (key2 .eqs. "CURL_SIZEOF_CURL_SOCKLEN_T")
$ then
$ write tf "#define ''key2' SIZEOF_INT"
$ goto cfgh_in_loop1
$ endif
$!
$ if (key2 .eqs. "CURL_TYPEOF_CURL_SOCKLEN_T")
$ then
$ write tf "#define ''key2' size_t"
$ goto cfgh_in_loop1
$ endif
$!
$ if (key2 .eqs. "CURL_TYPEOF_CURL_OFF_T")
$ then
$ write tf "#define ''key2' off_t"
$ goto cfgh_in_loop1
$ endif
$!
$ if (key2 .eqs. "CURL_FORMAT_CURL_OFF_T")
$ then
$ write tf "#if (SIZEOF_OFF_T == 8)"
$ write tf "#define ''key2' ""lld"""
$ write tf "#else"
$ write tf "#define ''key2' ""ld"""
$ write tf "#endif"
$ goto cfgh_in_loop1
$ endif
$!
$ if (key2 .eqs. "CURL_FORMAT_CURL_OFF_TU")
$ then
$ write tf "#if (SIZEOF_OFF_T == 8)"
$ write tf "#define ''key2' ""llu"""
$ write tf "#else"
$ write tf "#define ''key2' ""lu"""
$ write tf "#endif"
$ goto cfgh_in_loop1
$ endif
$!
$ if (key2 .eqs. "CURL_FORMAT_OFF_T")
$ then
$ write tf "#if (SIZEOF_OFF_T == 8)"
$ write tf "#define ''key2' ""%lld"""
$ write tf "#else"
$ write tf "#define ''key2' ""%ld"""
$ write tf "#endif"
$ goto cfgh_in_loop1
$ endif
$!
$ if (key2 .eqs. "CURL_SIZEOF_CURL_OFF_T")
$ then
$ write tf "#define ''key2' SIZEOF_OFF_T"
$ goto cfgh_in_loop1
$ endif
$!
$ if (key2 .eqs. "CURL_SUFFIX_CURL_OFF_T")
$ then
$ write tf "#if (SIZEOF_OFF_T == 8)"
$ write tf "#define ''key2' LL"
$ write tf "#else"
$ write tf "#define ''key2' L"
$ write tf "#endif"
$ goto cfgh_in_loop1
$ endif
$!
$ if (key2 .eqs. "CURL_SUFFIX_CURL_OFF_TU")
$ then
$ write tf "#if (SIZEOF_OFF_T == 8)"
$ write tf "#define ''key2' ULL"
$ write tf "#else"
$ write tf "#define ''key2' UL"
$ write tf "#endif"
$ goto cfgh_in_loop1
$ endif
$!
$!
$!
$! If it falls through everything else, comment it out
$!-----------------------------------------------------
$ write tf "/* ", xline, " */"
$ goto cfgh_in_loop1
$cfgh_in_loop1_end:
$close inf
$close tf
$!
$! Exit and clean up
$!--------------------
$general_error:
$status = '$status'
$all_exit:
$set noon
$if f$trnlnm("tf","lnm$process",,"SUPERVISOR") .nes. "" then close tf
$if f$trnlnm("inf","lnm$process",,"SUPERVISOR") .nes. "" then close inf
$exit 'status'
$!
$!
$control_y:
$ status = ss_control_y
$ goto all_exit
$!
$!
$! gosub to write out a documentation header for config.h
$!----------------------------------------------------------------
$write_curlbuild_h_header:
$outfile = "sys$disk:[.include.curl]curlbuild.h"
$create 'outfile'
$open/append tf 'outfile'
$write tf -
"/* [.include.curl]curlbuild.h. Generated from curlbuild.h.in by */"
$write tf -
"/* ", my_proc_file, tab, datetime, tab, username, tab, " */"
$write tf ""
$return

View File

@ -18,16 +18,40 @@ $! CLEAN_ALL Delete product files for all host architectures. (No
$! build done.)
$!
$! 64 Compile with 64-bit pointers.
$! Note, you must match the pointer size that the OpenSSL
$! shared image expects.
$! Currently curl is not building properly with 64 bit pointers
$! on VMS because it is trying to cast pointers to 32 bit
$! integers.
$! CCQUAL=x Add "x" to the C compiler qualifiers.
$! DEBUG Compile and link with debug.
$! IEEE Use IEEE floating point. (Alpha.)
$! LARGE Enable large-file support. (Non-VAX, VMS >= V7.2.)
$! LDAP Enable LDAP support.
$! Default qualifiers are:
$! /standard=relaxed
$! /names=(as_is, shortened)
$! /repository=[.'arch']
$! /nested_include_directory=none
$! /define=(_LARGEFILE=1,_USE_STD_STAT=1) (non-vax)
$! /float=ieee/ieee_mode=denorm_results (non-vax)
$! DEBUG Compile debug and nooptimize
$! Alpha/IA64 always compiles /debug.
$! Always link a debug image.
$! NOIEEE Do not use IEEE floating point. (Alpha/I64)
$! VAX must 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 available.
$! LIST Create C compiler listings and linker maps.
$! /list/show=(expan,includ)/machine
$! FULLLIST Full detailed listing.
$! /list/show=(all, nomessages)/machine
$! NOHPSSL Don't use HP SSL, even if available.
$! Note, you must match the pointer size that the OpenSSL
$! shared image expects. This procedure will select the
$! correct HP OpenSSL image.
$! NOSSL Don't use any SSL, even if available.
$! OSSLOLB Use OpenSSL object libraries (.OLB), even if shared
$! images (.EXE) are available.
$! NOZLIB Don't use GNV$ZLIB shared image even if available.
$!
$! DCL Symbols:
$!
@ -73,7 +97,7 @@ $! Changed to avoid case confusion on ODS5 disks.
$! Added more default dev:[dir] save+restore.
$! Moved remaining "defines.com" code (back) into
$! here, eliminating the hard-coded OpenSSL nonsense.
$! Changed to use F$GETSYI( "ARCH_NAME") (or
$! Changed to use F$GETSYI("ARCH_NAME") (or
$! equivalent) to name architecture-specific product
$! file destination directory, and to create the
$! directory if needed (obviating inclusion of these
@ -84,240 +108,362 @@ $! command across multiple lines to avoid DCL
$! line-too-long problems.
$! Changed "vo_c" messages to show the CC qualifiers
$! once, not with every compile command.
$! 01-Jan-2013 J. Malmberg
$! VMS build procedures need to be able to work with
$! the default set to a search list, with created or
$! modified files only in the first member of the search
$! list.
$! Whitespace change to be more compatible with current
$! practices.
$! One pass option parsing instead of loop.
$! GNV ZLIB shared image support.
$! KERBEROS support where available.
$! LDAP default to on where available
$! LARGEFILE default to on where available
$! IEEE float default to on where available.
$! Generate the curl_config.h file from system inspection.
$! Linker finds ldap with out option file.
$!
$!===========================================================================
$!
$!
$! Save the original default dev:[dir], and arrange for its restoration
$! at exit.
$!
$!------------------------------------------------------------------------
$ curl = ""
$ orig_def = f$environment( "DEFAULT")
$ orig_def = f$environment("DEFAULT")
$ on error then goto Common_Exit
$ on control_y then goto Common_Exit
$!
$ ctrl_y = 1556
$ proc = f$environment( "PROCEDURE")
$ proc_dev_dir = -
f$parse( proc, , , "DEVICE")+ f$parse( proc, , , "DIRECTORY")
$ proc = f$environment("PROCEDURE")
$ proc_fid = f$file_attributes(proc, "FID")
$ proc_dev = f$parse(proc, , , "DEVICE")
$ proc_dir = f$parse(proc, , , "DIRECTORY")
$ proc_name = f$parse(proc, , , "NAME")
$ proc_type = f$parse(proc, , , "TYPE")
$ proc_dev_dir = proc_dev + proc_dir
$!
$! Have to manually parse the device for a search list.
$! Can not use the f$parse() as it will return the first name
$! in the search list.
$!
$ orig_def_dev = f$element(0, ":", orig_def) + ":"
$ if orig_def_dev .eqs. "::" then orig_def_dev = "sys$disk:"
$ test_proc = orig_def_dev + proc_dir + proc_name + proc_type
$!
$! If we can find this file using the default directory
$! then we know that we should use the original device from the
$! default directory which could be a search list.
$!
$ test_proc_fid = f$file_attributes(test_proc, "FID")
$!
$ if (test_proc_fid .eq. proc_fid)
$ then
$ proc_dev_dir = orig_def_dev + proc_dir
$ endif
$!
$!
$! Verbose output message stuff. Define symbol to "write sys$output" or "!".
$! vo_c - verbose output for compile
$! vo_l - link
$! vo_o - object check
$!
$ vo_c = "write sys$output"
$ vo_l = "write sys$output"
$ vo_o = "!"
$ vo_c := "write sys$output"
$ vo_l := "write sys$output"
$ vo_o := "!"
$!
$! Determine the main distribution directory ("[--]") in an
$! ODS5-tolerant (case-insensitive) way. (We do assume that the only
$! "]" is the one at the end.)
$! "]" or ">" is the one at the end.)
$!
$! Some non-US VMS installations report ">" for the directory delimiter
$! so do not assume that it is "]".
$!
$ orig_def_len = f$length(orig_def)
$ delim = f$extract(orig_def_len - 1, 1, orig_def)
$!
$ set default 'proc_dev_dir'
$ set default [--]
$ top_dev_dir = f$environment( "DEFAULT")- "]"
$ base_dev_dir = f$environment("default")
$ top_dev_dir = base_dev_dir - delim
$!
$!
$!
$! Define the architecture-specific product file destination directory
$! name(s).
$!
$ if (f$getsyi( "HW_MODEL") .lt. 1024)
$ if (f$getsyi("HW_MODEL") .lt. 1024)
$ then
$ arch_name = "VAX"
$ else
$ arch_name = ""
$ arch_name = arch_name+ f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
$ arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
$ if (arch_name .eqs. "") then arch_name = "UNK"
$ endif
$!
$ exedir = proc_dev_dir- "]"+ ".''arch_name']"
$ exedir = proc_dev_dir - delim + ".''arch_name'" + delim
$ lisdir = exedir
$ objdir = exedir
$!
$! When building on a search list, need to do a create to make sure that
$! the output directory exists, since the clean procedure tries to delete
$! it.
$ create/dir 'exedir'/prot=o:rwed
$!
$! Interpret command-line options.
$!
$ hpssl = 0
$ ldap = 0
$ ldap = 1
$ list = 0
$ full_list = 0
$ nohpssl = 0
$ nossl = 0
$ openssl = 0
$ osslolb = 0
$ nozlib = 0
$ nokerberos = 0
$ cc_names = "/names=(shortened, as_is)/repository='exedir'
$ cc_defs = "HAVE_CONFIG_H=1"
$ cc_list = "/list='objdir'/show=(expan, includ)/machine
$ cc_full_list = "list='objdir'/show=(all, nomessages)/machine
$ link_qual = ""
$ if arch_name .eqs. "VAX"
$ then
$ cc_debug = "/nodebug/optimize"
$ !cc_defs = cc_defs + ""
$ cc_float = ""
$ cc_large = ""
$ else
$ cc_debug = "/debug/optimize"
$ cc_defs = cc_defs + ",_USE_STD_STAT"
$ cc_float = "/float=ieee/ieee_mode=denorm_results"
$ cc_large = ",_LARGEFILE"
$ endif
$ cc_qual1 = ""
$ cc_qual2 = ""
$ cc_defs = "HAVE_CONFIG_H=1"
$ if (f$type( CURL_CCDEFS) .nes. "")
$ if (f$type(CURL_CCDEFS) .nes. "")
$ then
$ CURL_CCDEFS = f$edit( CURL_CCDEFS, "TRIM")
$ cc_defs = cc_defs+ ", "+ CURL_CCDEFS
$ CURL_CCDEFS = f$edit(CURL_CCDEFS, "TRIM")
$ cc_defs = cc_defs + ", " + CURL_CCDEFS
$ endif
$ link_qual = ""
$ msg_qual = "/object = ''objdir'"
$ ssl_opt = ""
$!
$ arg = 1
$arg_loop:
$ p = "p''arg'"
$ arg_val = 'p'
$ if (arg_val .eqs. "") then goto arg_loop_out
$ arg_val = f$edit( arg_val, "upcase")
$! Allow arguments to be grouped together with comma or separated by spaces
$! Do no know if we will need more than 8.
$ args = "," + p1 + "," + p2 + "," + p3 + "," + p4 + ","
$ args = args + p5 + "," + p6 + "," + p7 + "," + p8 + ","
$!
$ if (arg_val .eqs. "CLEAN")
$! Provide lower case version to simplify parsing.
$ args_lower = f$edit(args, "LOWERCASE,COLLAPSE")
$!
$ args_len = f$length(args)
$ args_lower_len = f$length(args_lower)
$!
$ if f$locate(",clean,", args_lower) .lt. args_lower_len
$ then
$ prods = "''exedir'*.*;*"
$ if (f$search( prods) .nes. "") then delete /log 'prods'
$ prods = proc_dev_dir+ arch_name+ ".DIR;1"
$ if (f$search( prods) .nes. "") then delete /log 'prods'
$ if (f$search(prods) .nes. "") then delete /log 'prods'
$ prods = proc_dev_dir + arch_name + ".DIR;1"
$ if (f$search(prods) .nes. "") then set prot=o:rwed 'prods'
$ if (f$search(prods) .nes. "") then delete /log 'prods'
$ file = "[]config_vms.h"
$ if f$search(file) .nes. "" then delete/log 'file';*
$ file = "[.include.curl]curlbuild.h"
$ if f$search(file) .nes. "" then delete/log 'file';*
$ file = "[.lib]config_vms.h"
$ if f$search(file) .nes. "" then delete/log 'file';*
$ goto Common_Exit
$ endif
$!
$ if (arg_val .eqs. "CLEAN_ALL")
$ if f$locate(",clean_all,", args_lower) .lt. args_lower_len
$ then
$ prods = proc_dev_dir- "]"+ ".ALPHA]*.*;*"
$ if (f$search( prods) .nes. "") then delete /log 'prods'
$ prods = proc_dev_dir+ "ALPHA"+ ".DIR;1"
$ if (f$search( prods) .nes. "") then delete /log 'prods'
$ prods = proc_dev_dir- "]"+ ".IA64]*.*;*"
$ if (f$search( prods) .nes. "") then delete /log 'prods'
$ prods = proc_dev_dir+ "IA64"+ ".DIR;1"
$ if (f$search( prods) .nes. "") then delete /log 'prods'
$ prods = proc_dev_dir- "]"+ ".VAX]*.*;*"
$ if (f$search( prods) .nes. "") then delete /log 'prods'
$ prods = proc_dev_dir+ "VAX"+ ".DIR;1"
$ if (f$search( prods) .nes. "") then delete /log 'prods'
$ prods = proc_dev_dir - delim + ".ALPHA" + delim + "*.*;*"
$ if (f$search(prods) .nes. "") then delete /log 'prods'
$ prods = proc_dev_dir + "ALPHA" + ".DIR;1"
$ if (f$search(prods) .nes. "") then set prot=o:rwed 'prods'
$ if (f$search(prods) .nes. "") then delete /log 'prods'
$ prods = proc_dev_dir - delim + ".IA64" + delim + "*.*;*"
$ if (f$search(prods) .nes. "") then delete /log 'prods'
$ prods = proc_dev_dir + "IA64" + ".DIR;1"
$ if (f$search(prods) .nes. "") then set prot=o:rwed 'prods'
$ if (f$search(prods) .nes. "") then delete /log 'prods'
$ prods = proc_dev_dir - delim + ".VAX" + delim + "*.*;*"
$ if (f$search(prods) .nes. "") then delete /log 'prods'
$ prods = proc_dev_dir + "VAX"+ ".DIR;1"
$ if (f$search(prods) .nes. "") then set prot=o:rwed 'prods'
$ if (f$search(prods) .nes. "") then delete /log 'prods'
$ goto Common_Exit
$ endif
$!
$ if (arg_val .eqs. "64")
$ build_64 = 0
$ if f$locate(",64,", args_lower) .lt. args_lower_len
$ then
$ cc_qual1 = cc_qual1+ " /POINTER = 64"
$ cc_qual1 = cc_qual1 + " /POINTER = 64"
$ build_64 = 1
$ endif
$!
$ args_loc = f$locate(",ccqual=", args_lower)
$ if args_loc .lt. args_lower_len
$ then
$ arg = f$extract(args_loc + 1, args_lower_len, args_lower)
$ arg_val = f$element(0, ",", arg)
$ cc_qual2 = f$element(1, "=", arg_val);
$ endif
$!
$! On Alpha/IA64 no size penalty for compiling /debug/optimize
$! by default.
$ if f$locate(",debug,", args_lower) .lt. args_lower_len
$ then
$ cc_debug = "/debug/nooptimize"
$ goto arg_loop_end
$ endif
$!
$ if (f$extract( 0, 6, arg_val) .eqs. "CCQUAL")
$! We normally want IEEE float if it is available. Programs that are
$! calling libcurl will typically prefer IEEE behavior, unless on the
$! VAX where we have no choice.
$!
$ if f$locate(",noieee,", args_lower) .lt. args_lower_len
$ then
$ opts = f$edit( arg_val, "COLLAPSE")
$ eq = f$locate( "=", opts)
$ cc_qual2 = f$extract( (eq+ 1), 1000, opts)
$ cc_float = ""
$ goto arg_loop_end
$ endif
$!
$ if (arg_val .eqs. "DEBUG")
$! Normally we want large file if it is available.
$ if f$locate(",nolarge,", args_lower) .lt. args_lower_len
$ then
$ cc_qual1 = cc_qual1+ " /debug /nooptimize"
$ link_qual = link_qual+ " /debug"
$ goto arg_loop_end
$ endif
$!
$ if (arg_val .eqs. "IEEE")
$ then
$ cc_qual1 = cc_qual1+ " /FLOAT = IEEE_FLOAT"
$ goto arg_loop_end
$ endif
$!
$ if (arg_val .eqs. "LARGE")
$ then
$ if (arch_name .eqs. "VAX")
$ then
$ write sys$output """LARGE"" is ignored on VAX."
$ else
$ cc_defs = cc_defs+ ", _LARGEFILE=1"
$ write sys$output "Handling of large files disabled."
$ cc_large = ""
$ endif
$ goto arg_loop_end
$ if cc_large .nes. ""
$ then
$ cc_defs = cc_defs + cc_large
$ endif
$!
$ if (arg_val .eqs. "LDAP")
$ if f$locate(",noldap,", args_lower) .lt. args_lower_len
$ then
$ ldap = 1
$ goto arg_loop_end
$ ldap = 0
$ endif
$!
$ if (f$extract( 0, 4, arg_val) .eqs. "LIST")
$ if f$locate(",list,", args_lower) .lt. args_lower_len
$ then
$ list = 1
$ cc_qual1 = cc_qual1+ " /list = ''lisdir' /show = (all, nomessages)"
$ link_qual = link_qual+ " /map = ''lisdir'"
$ msg_qual = msg_qual+ " /list = ''lisdir'"
$ goto arg_loop_end
$ endif
$ if f$locate(",fulllist,", args_lower) .lt. args_lower_len
$ then
$ list = 1
$ full_list = 1
$ endif
$!
$ if (arg_val .eqs. "NOHPSSL")
$ if f$locate(",nohpssl,", args_lower) .lt. args_lower_len
$ then
$ nohpssl = 1
$ goto arg_loop_end
$ endif
$!
$ if (arg_val .eqs. "NOSSL")
$ if f$locate(",nossl,", args_lower) .lt. args_lower_len
$ then
$ nossl = 1
$ goto arg_loop_end
$ endif
$!
$ if (arg_val .eqs. "OSSLOLB")
$ if f$locate(",osslolb,", args_lower) .lt. args_lower_len
$ then
$ osslolb = 1
$ goto arg_loop_end
$ endif
$!
$ write sys$output "Unrecognized command-line option: ''arg_val'"
$ goto Common_Exit
$ if f$locate(",nozlib,", args_lower) .lt. args_lower_len
$ then
$ nozlib = 1
$ endif
$!
$ if f$locate(",nokerberos,", args_lower) .lt. args_lower_len
$ then
$ nokerberos = 1
$ endif
$!
$arg_loop_end:
$ arg = arg+ 1
$ goto arg_loop
$arg_loop_out:
$!
$! CC /LIST, LINK /MAP, and MESSAGE /LIST are defaults in batch mode,
$! so be explicit when they're not desired.
$!
$ if (list .eq. 0)
$
$ if list .eq. 0
$ then
$ cc_qual1 = cc_qual1+ " /nolist"
$ link_qual = link_qual+ " /nomap"
$ msg_qual = msg_qual+ " /nolist"
$ cc_qual1 = cc_qual1 + "/nolist"
$ msg_qual = msg_qual + "/nolist"
$ else
$ msg_qual = msg_qual + "/list='objdir'"
$ if (full_list .ne. 0)
$ then
$ cc_qual1 = cc_qual1 + cc_full_list
$ else
$ cc_qual1 = cc_qual1 + cc_list
$ endif
$ endif
$ cc_qual1 = cc_qual1 + cc_names + cc_float + cc_debug
$!
$! Create product directory, if needed.
$!
$ if (f$search( proc_dev_dir+ arch_name+ ".DIR;1") .eqs. "")
$ if (f$search(proc_dev_dir + arch_name + ".DIR;1") .eqs. "")
$ then
$ create /directory 'exedir'
$ endif
$!
$! Detect available (but not prohibited) SSL software.
$!
$ libsslshr_line = ""
$ libcryptoshr_line = ""
$ if (.not. nossl)
$ then
$ if (f$trnlnm( "OPENSSL") .nes. "")
$ if (f$trnlnm("OPENSSL") .nes. "")
$ then
$ cc_defs = cc_defs+ ", USE_SSLEAY=1"
$ if ((f$trnlnm( "SSL$INCLUDE") .nes. "") .and. (.not. nohpssl))
$! cc_defs = cc_defs + ", USE_SSLEAY=1"
$ if ((f$trnlnm("SSL$INCLUDE") .nes. "") .and. (.not. nohpssl))
$ then
$! Use HP SSL.
$ hpssl = 1
$ ssl_opt = ", ''proc_dev_dir'hpssl_"+ -
f$getsyi("ARCH_NAME")+ ".opt /options"
$!
$! Older SSL only has lib*_shr32 images
$!-----------------------------------------------
$ libsslshr = "sys$share:ssl$libssl_shr"
$ if (f$search("''libsslshr'.exe") .eqs. "") .or. (.not. build_64)
$ then
$ libsslshr = libsslshr + "32"
$ endif
$ libcryptoshr = "sys$share:ssl$libcrypto_shr"
$ if (f$search("''libcryptoshr'.exe") .eqs. "") .or. (.not. build_64)
$ then
$ libcryptoshr = libcryptoshr + "32"
$ endif
$ libsslshr_line = "''libsslshr'.exe/share"
$ libcryptoshr_line = "''libcryptoshr'.exe/share"
$ else
$! Use OpenSSL. Assume object libraries, unless shared images
$! are found (and not prohibited).
$! TODO: We do not know how to automatically choose based on the
$! pointer size.
$!
$ openssl = 1
$ ssl_opt = ", ssllib:libssl.olb /library"+ -
$ libsslshr_line = "ssllib:libssl.olb/lib"
$ libcryptoshr_line = "ssllib:libcrypto.olb/lib"
$ ssl_opt = ", ssllib:libssl.olb /library" + -
", ssllib:libcrypto.olb /library"
$ if (osslolb .eq. 0)
$ then
if ((f$search( "ssllib:ssl_libcrypto.exe") .nes. "") .and. -
(f$search( "ssllib:ssl_libssl.exe") .nes. ""))
if ((f$search("ssllib:ssl_libcrypto.exe") .nes. "") .and. -
(f$search("ssllib:ssl_libssl.exe") .nes. ""))
$ then
$! OpenSSL shared images with "SSL_xxx.EXE names.
$ openssl = 2
$ ssl_opt = ", ''proc_dev_dir'openssl_ssl_"+ -
f$getsyi("ARCH_NAME")+ ".opt /options"
$ libsslshr_line = "ssllib:ssl_libssl_shr.exe/share"
$ libcryptoshr_line = "ssllib:ssl_libcrypto_shr.exe/share"
$ else
$ if ((f$search( "ssllib:libcrypto.exe") .nes. "") .and. -
(f$search( "ssllib:libssl.exe") .nes. ""))
$ if ((f$search("ssllib:libcrypto.exe") .nes. "") .and. -
(f$search("ssllib:libssl.exe") .nes. ""))
$ then
$! OpenSSL shared images with "xxx.EXE names.
$ openssl = 3
$ ssl_opt = ", ''proc_dev_dir'openssl_"+ -
f$getsyi("ARCH_NAME")+ ".opt /options"
$ libsslshr_line = "ssllib:libssl_shr.exe/share"
$ libcryptoshr_line = "ssllib:libcrypto_shr.exe/share"
$ endif
$ endif
$ endif
@ -327,17 +473,56 @@ $ endif
$!
$! LDAP.
$!
$ if f$search("SYS$SHARE:LDAP$SHR.EXE") .eqs. ""
$ then
$ ldap = 0
$ endif
$ if (ldap .eq. 0)
$ then
$ cc_defs = cc_defs+ ", CURL_DISABLE_LDAP=1"
$! cc_defs = cc_defs + ", CURL_DISABLE_LDAP=1"
$ else
$ 'vo_c' "%CURL-I-BLDHPLDAP, building with HP LDAP support"
$ endif
$!
$! KERBEROS
$ gssrtlshr_line = ""
$ try_shr = "sys$share:gss$rtl"
$ if f$search("''try_shr'.exe") .eqs. ""
$ then
$ nokerberos = 1
$ endif
$ curl_sys_krbinc = ""
$ if nokerberos .eq. 0
$ then
$ 'vo_c' "%CURL-I-BLDHPKERBEROS, building with HP KERBEROS support"
$ curl_sys_krbinc = "sys$sysroot:[kerberos.include]"
$ gssrtlshr_line = "''try_shr'/share"
$ endif
$!
$!
$! LIBZ
$ libzshr_line = ""
$ try_shr = "gnv$libzshr"
$ if f$search(try_shr) .eqs. ""
$ then
$ nozlib = 1
$ endif
$ curl_sys_zlibinc = ""
$ if nozlib .eq. 0
$ then
$ 'vo_c' "%CURL-I-BLDGNVLIBZ, building with GNV LIBZ support"
$ libzshr_line = "''try_shr'/share"
$ curl_sys_zlibinc = "GNV$ZLIB_INCLUDE:"
$ endif
$!
$!
$! Form CC qualifiers.
$!
$ cc_defs = "/define = (''cc_defs')"
$ cc_qual2 = cc_qual2+ " /object = ''objdir'"+ -
" /include = ([-.lib], [-.src],"+ -
" [-.packages.vms], [-.packages.vms.''arch_name'])"
$ 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:", -
" ''cc_defs'", -
@ -372,31 +557,34 @@ $ 'vo_c' " EXEDIR = ''exedir'"
$!
$ if (openssl .ne. 0)
$ then
$ ssllib = f$trnlnm( "ssllib")
$ ssllib = f$trnlnm("ssllib")
$ if (ssllib .eqs. "")
$ then
$ ssllib = "(undefined)"
$ endif
$ 'vo_c' " SSLLIB = ''ssllib'"
$!
$! TODO: Why are we translating the logical name?
$! The logical aname used to find the shared image should just be used
$! as translating it could result in the wrong location at run time.
$ if (openssl .eq. 1)
$ then
$ ossl_lib1 = f$trnlnm( "ssllib")+ "LIBSSL.OLB"
$ ossl_lib2 = f$trnlnm( "ssllib")+ "LIBCRYPTO.OLB"
$ ossl_lib1 = f$trnlnm("ssllib")+ "LIBSSL.OLB"
$ ossl_lib2 = f$trnlnm("ssllib")+ "LIBCRYPTO.OLB"
$ msg = "object libraries"
$ else
$ if (openssl .eq. 2)
$ then
$ ossl_lib1 = f$trnlnm( "ssllib")+ "SSL_LIBSSL.EXE"
$ ossl_lib2 = f$trnlnm( "ssllib")+ "SSL_LIBCRYPTO.EXE"
$ ossl_lib1 = f$trnlnm("ssllib")+ "SSL_LIBSSL.EXE"
$ ossl_lib2 = f$trnlnm("ssllib")+ "SSL_LIBCRYPTO.EXE"
$ else
$ ossl_lib1 = f$trnlnm( "ssllib")+ "LIBSSL.EXE"
$ ossl_lib2 = f$trnlnm( "ssllib")+ "LIBCRYPTO.EXE"
$ ossl_lib1 = f$trnlnm("ssllib")+ "LIBSSL.EXE"
$ ossl_lib2 = f$trnlnm("ssllib")+ "LIBCRYPTO.EXE"
$ endif
$ msg = "shared images"
$ endif
$ if ((f$search( ossl_lib1) .eqs. "") .or. -
(f$search( ossl_lib2) .eqs. ""))
$ if ((f$search(ossl_lib1) .eqs. "") .or. -
(f$search(ossl_lib2) .eqs. ""))
$ then
$ write sys$output "Can't find OpenSSL ''msg':"
$ write sys$output " ''ossl_lib1'"
@ -407,7 +595,7 @@ $ endif
$!
$! Define the "curl" (process) logical name for "#include <curl/xxx.h>".
$!
$ curl = f$trnlnm( "curl", "LNM$PROCESS")
$ curl = f$trnlnm("curl", "LNM$PROCESS")
$ if (curl .nes. "")
$ then
$ write sys$output ""
@ -422,15 +610,67 @@ $ write sys$output -
$ write sys$output ""
$ goto Common_Exit
$ endif
$ define curl 'top_dev_dir'.include.curl]
$ curl_logical = top_dev_dir + ".include.curl" + delim
$ curl_sys_inc2 = curl_logical
$ curl_sys_inc1 = top_dev_dir + ".include" + delim
$! define curl 'top_dev_dir'.include.curl'delim'
$!
$! Copy the VMS-specific config file into the product directory.
$! Generate config file into the product directory.
$!
$! call MoveIfDiff [.lib]config-vms.h 'objdir'curl_config.h
$!
$conf_params = ""
$if nossl .ne. 0 then conf_params = conf_params + ",nossl"
$if nohpssl .ne. 0 then conf_params = conf_params + ",nohpssl,"
$if ldap .eq. 0 then conf_params = conf_params + ",noldap,"
$if nozlib .ne. 0 then conf_params = conf_params + ",nozlib,"
$if nokerberos .ne. 0 then conf_params = conf_params + ",nokerberos"
$conf_params = conf_params - ","
$!
$!
$new_conf = f$search("''objdir'curl_config.h")
$if new_conf .eqs. ""
$then
$! set ver
$ write sys$output "Generating curl custom config_vms.h"
$ @'proc_dev_dir'generate_config_vms_h_curl.com ''conf_params'
$!
$ write sys$output "Generating curl_config.h"
$ conf_in = f$search("[.lib]curl_config*.*in")
$ if conf_in .eqs. ""
$ then
$ write sys$output "Can not find [.lib]curl_config*.*in file!"
$ goto common_exit
$ endif
$ @'proc_dev_dir'config_h.com 'conf_in'
$ copy config.h 'objdir'curl_config.h
$ delete config.h;
$! set nover
$endif
$!
$!
$write sys$output "Creating the new curlbuild.h"
$new_conf = f$search("[.include.curl]curlbuild.h")
$if new_conf .eqs. ""
$then
$! set ver
$ @'proc_dev_dir'build_curlbuild_h.com
$! set nover
$endif
$!
$ call MoveIfDiff 'top_dev_dir'.lib]config-vms.h 'objdir'curl_config.h
$!
$ on control_y then goto Common_Exit
$!
$ set default 'proc_dev_dir'
$ sys_inc = "''curl_sys_inc1', ''curl_sys_inc2', ''curl_logical'"
$ if curl_sys_krbinc .nes. ""
$ then
$ sys_inc = sys_inc + ",''curl_sys_krbinc'"
$ endif
$ if curl_sys_zlibinc .nes. ""
$ then
$ curl_sys_inc = sys_inc + ",''curl_sys_zlibinc'"
$ endif
$ call build "[--.lib]" "*.c" "''objdir'CURLLIB.OLB" "amigaos, nwlib, nwos"
$ if ($status .eq. ctrl_y) then goto Common_Exit
$ call build "[--.src]" "*.c" "''objdir'CURLSRC.OLB"
@ -438,8 +678,6 @@ $ if ($status .eq. ctrl_y) then goto Common_Exit
$ call build "[]" "*.msg" "''objdir'CURLSRC.OLB"
$ if ($status .eq. ctrl_y) then goto Common_Exit
$!
$ ldap_opt = ""
$ if (ldap .ne. 0) then ldap_opt = ", ''proc_dev_dir'ldap.opt /options"
$!
$ if (openssl .ne. 0)
$ then
@ -458,11 +696,65 @@ $ 'vo_l' "%CURL-I-LINK_NOSSL, linking with NO SSL support"
$ endif
$ endif
$!
$ link 'link_qual' /executable = 'exedir'CURL.EXE -
'objdir'curlsrc.olb /library /include = (main, curlmsg), -
'objdir'curllib.olb /library -
'ssl_opt' -
'ldap_opt'
$!
$! GNV helper files for building the test curl binary.
$!-----------------------------------------------
$create 'exedir'gnv$curl.opt
$open/append opt 'exedir'gnv$curl.opt
$if libzshr_line .nes. "" then write opt libzshr_line
$if gssrtlshr_line .nes. "" then write opt gssrtlshr_line
$if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
$if libsslshr_line .nes. "" then write opt libsslshr_line
$close opt
$!
$!
$! Create the libcurl
$!------------------------------------------------------
$create 'exedir'gnv_libcurl_linker.opt
$open/append opt 'exedir'gnv_libcurl_linker.opt
$if libzshr_line .nes. "" then write opt libzshr_line
$if gssrtlshr_line .nes. "" then write opt gssrtlshr_line
$if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
$if libsslshr_line .nes. "" then write opt libsslshr_line
$close opt
$!
$!
$! If we are not on VAX, then we want the debug symbol table in
$! a separate file.
$! VAX needs the tool_main unquoted in uppercase,
$! Alpha and IA64 need tool_main quoted in exact case.
$ link_dsf1 = ""
$ link_dsf2 = ""
$ tool_main = "tool_main"
$ if arch_name .nes. "VAX"
$ then
$ tool_main = """tool_main"""
$ link_dsf1 = "/dsf=" + exedir + "CURL.DSF"
$ link_dsf2 = "/dsf=" + exedir + "CURL_DEBUG.DSF"
$ endif
$ if (list .eq. 0)
$ then
$ link_map1 = "/nomap"
$ link_map2 = "/nomap"
$ else
$ link_map1 = "/map=" + exedir + "CURL.MAP"
$ link_map2 = "/map=" + exedir + "CURL_DEBUG.MAP"
$ endif
$!
$!
$! Make a normal image.
$ set ver
$ link 'link_map1' 'link_dsf1' /executable = 'exedir'CURL.EXE -
'objdir'curlsrc.olb /library /include = ('tool_main', curlmsg), -
'objdir'curllib.olb /library, -
'exedir'gnv$curl.opt/opt
$!
$! Also make a debug copy.
$ link/debug 'link_map2' 'link_dsf2' /executable = 'exedir'CURL_DEBUG.EXE -
'objdir'curlsrc.olb /library /include = ('tool_main', curlmsg), -
'objdir'curllib.olb /library, -
'exedir'gnv$curl.opt/opt
$set nover
$!
$ goto Common_Exit
$!
@ -471,7 +763,7 @@ $! the directory passed in via P1 and put it in the object library named
$! via P3. Exclude items in P4.
$!
$build: subroutine
$ build_def = f$environment( "default")
$ build_def = f$environment("default")
$ on control_y then goto EndLoop ! SS$_CONTROLY
$ sts = 1 ! SS$_NORMAL.
$! set noon
@ -482,8 +774,8 @@ $ if f$search( p3) .eqs. ""
$ then
$ librarian /create /object 'p3'
$ endif
$ reject_list__ = ","+ f$edit( p4, "COLLAPSE, UPCASE")+ ","
$ reject_list___len = f$length( reject_list__)
$ reject_list__ = "," + f$edit(p4, "COLLAPSE, UPCASE") + ","
$ reject_list___len = f$length(reject_list__)
$ reset = f$search( "reset", 1)
$Loop:
$ file = f$search( search, 1)
@ -491,16 +783,16 @@ $ if file .eqs. "" then goto EndLoop
$! Skip a name if it's in the P4 exclusion list.
$ if (p4 .nes. "")
$ then
$ name__ = ","+ -
f$edit( f$parse( file, , , "NAME", "SYNTAX_ONLY"), "UPCASE")+ -
$ name__ = "," + -
f$edit(f$parse(file, , , "NAME", "SYNTAX_ONLY"), "UPCASE") + -
","
$ if (f$locate( name__, reject_list__) .lt. reject_list___len)
$ if (f$locate(name__, reject_list__) .lt. reject_list___len)
$ then
$ goto Loop
$ endif
$ endif
$ objfile = f$parse( "''objdir'.OBJ;", file)
$ obj = f$search( objfile, 2)
$ objfile = f$parse("''objdir'.OBJ;", file)
$ obj = f$search(objfile, 2)
$ if (obj .nes. "")
$ then
$ if (f$cvtime(f$file(file,"rdt")) .gts. f$cvtime(f$file(obj,"rdt")))
@ -540,18 +832,21 @@ $ on control_y then return ctrl_y ! SS$_CONTROLY
$! set noon
$ file = p1
$ qual = p2+ p3+ p4+ p5+ p6+ p7+ p8
$ typ = f$edit( f$parse( file, , , "TYPE"), "UPCASE") - "."
$ typ = f$edit(f$parse(file, , , "TYPE"), "UPCASE") - "."
$ if (typ .eqs. "C")
$ then
$ 'vo_c' "CC (opts) ", file
$ define/user curl 'curl_logical'
$ if curl_sys_krbinc .nes. "" then define/user gssapi 'curl_sys_krbinc'
$ define/user decc$system_include 'curl_sys_inc'
$ CC 'cc_defs' -
'cc_qual1' -
'cc_qual2' -
'file'
$ else
$ cmd_msg = "MESSAGE "+ msg_qual
$ cmd_msg = "MESSAGE " + msg_qual
$ x = cmd_'typ'
$ 'vo_c' x," ",file
$ 'vo_c' x, " ", file
$ 'x' 'file'
$ endif
$ ENDSUBROUTINE ! Compile
@ -566,7 +861,7 @@ $ define /user_mode sys$error nl:
$ define /user_mode sys$output nl:
$ differences 'p1' 'p2'
$ status = $status
$ if ( status .ne. %X006C8009) ! if status is not "no diff"
$ if (status .ne. %X006C8009) ! if status is not "no diff"
$ then
$ copy 'p1' 'p2'
$ purge /nolog 'p2'
@ -576,8 +871,4 @@ $ ENDSUBROUTINE ! MoveIfDiff
$!
$Common_Exit:
$ set default 'orig_def'
$ if ((curl .eqs. "") .and. (f$trnlnm( "curl", "LNM$PROCESS") .nes. ""))
$ then
$ deassign curl
$ endif
$ exit

2184
packages/vms/config_h.com Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,445 @@
$! File: GENERATE_CONFIG_H_CURL.COM
$!
$! $Id$
$!
$! Curl like most open source products uses a variant of a config.h file.
$! Depending on the curl version, this could be config.h or curl_config.h.
$!
$! For GNV based builds, the configure script is run and that produces
$! a [curl_]config.h file. Configure scripts on VMS generally do not
$! know how to do everything, so there is also a [-.lib]config-vms.h file
$! that has VMS specific code that compensates for bugs in some of the
$! VMS shared images.
$!
$! This generates a [curl_]config.h file and also a config_vms.h file,
$! which is used to supplement that file. Note that the config_vms.h file
$! and the [.lib]config-vms.h file do two different tasks and that the
$! filenames are slightly different.
$!
$!
$! Copyright 2013, 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
$! copyright notice and this permission notice appear in all copies.
$!
$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
$!
$!
$! 06-Jan-2013 J. Malmberg
$!
$!=========================================================================
$!
$! Allow arguments to be grouped together with comma or separated by spaces
$! Do no know if we will need more than 8.
$args = "," + p1 + "," + p2 + "," + p3 + "," + p4 + ","
$args = args + p5 + "," + p6 + "," + p7 + "," + p8 + ","
$!
$! Provide lower case version to simplify parsing.
$args_lower = f$edit(args, "LOWERCASE")
$!
$args_len = f$length(args)
$!
$if (f$getsyi("HW_MODEL") .lt. 1024)
$then
$ arch_name = "VAX"
$else
$ arch_name = ""
$ arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
$ if (arch_name .eqs. "") then arch_name = "UNK"
$endif
$!
$!
$nossl = 0
$nohpssl = 1
$hpssl = 0
$libidn = 0
$libssh2 = 0
$noldap = 0
$nozlib = 0
$nokerberos = 0
$!
$! First check to see if SSL is disabled.
$!---------------------------------------
$if f$locate(",nossl,", args_lower) .lt. args_len then nossl = 1
$if .not. nossl
$then
$!
$! ssl$* logicals means HP ssl is present
$!----------------------------------------
$ if f$trnlnm("ssl$root") .nes. ""
$ then
$ nohpssl = 0
$ hpssl = 1
$ endif
$!
$! HP defines OPENSSL as SSL$INCLUDE as a convenience for linking.
$! As it is a violation of VMS standards for this to be provided,
$! some sites may have removed it, but if present, assume that
$! it indicates which OpenSSL to use.
$!------------------------------------
$ openssl_lnm = f$trnlnm("OPENSSL")
$ if (openssl_lnm .nes. "SYS$INCLUDE")
$ then
$! Non HP SSL is installed, default to use it.
$ nohpssl = 1
$ hpssl = 0
$ endif
$!
$! Now check to see if hpssl has been specifically disabled
$!----------------------------------------------------------
$ if f$locate(",nohpssl,", args_lower) .lt. args_len
$ then
$ nohpssl = 1
$ hpssl = 0
$ endif
$!
$! Finally check to see if hp ssl has been specifically included.
$!----------------------------------------------------------------
$ if f$locate(",nohpssl,", args_lower) .lt. args_len
$ then
$ nohpssl = 1
$ hpssl = 0
$ endif
$endif
$!
$! Did someone port LIBIDN in the GNV compatible way?
$!------------------------------------------------------
$if f$trnlnm("GNV$LIBIDNSHR") .nes. ""
$then
$ write sys$output "NOTICE: A LIBIDN port has been detected."
$ write sys$output " This port of curl for VMS has not been tested with it."
$ if f$locate(",libidn,", args_lower) .lt. args_len
$ then
$ libidn = 1
$ endif
$ if .not. libidn
$ then
$ write sys$output " LIBIDN support is not enabled."
$ write sys$output "Run with the ""libidn"" parameter to attempt to use."
$ else
$ write sys$output " Untested LIBIDN support requested."
$ endif
$endif
$!
$! Did someone port LIBSSH2 in the GNV compatible way?
$!------------------------------------------------------
$if f$trnlnm("GNV$LIBSSH2SHR") .nes. ""
$then
$ write sys$output "NOTICE: A LIBSSH2 port has been detected."
$ write sys$output " This port of curl for VMS has not been tested with it."
$ if f$locate(",libssh2,", args_lower) .lt. args_len
$ then
$ libssh2 = 1
$ endif
$ if .not. libssh2
$ then
$ write sys$output " LIBSSH2 support is not enabled."
$ write sys$output "Run with the ""libssh2"" parameter to attempt to use."
$ else
$ write sys$output " Untested LIBSSH2 support requested."
$ endif
$endif
$!
$! LDAP suppressed?
$if f$locate(",noldap,", args_lower) .lt. args_len
$then
$ noldap = 1
$endif
$if f$search("SYS$SHARE:LDAP$SHR.EXE") .eqs. ""
$then
$ noldap = 1
$endif
$!
$if f$locate(",nokerberos,", args_lower) .lt. args_len then nokerberos = 1
$if .not. nokerberos
$then
$! If kerberos is installed: sys$share:gss$rtl.exe exists.
$ if f$search("sys$shsare:gss$rtl.exe") .eqs. ""
$ then
$ nokerberos = 1
$ endif
$endif
$!
$!
$! Is GNV compatible LIBZ present?
$!------------------------------------------------------
$if f$trnlnm("GNV$LIBZSHR") .nes. ""
$then
$ if f$locate(",nozlib,", args_lower) .lt. args_len
$ then
$ nozlib = 1
$ endif
$! if .not. nozlib
$! then
$! write sys$output " GNV$LIBZSHR support is enabled."
$! else
$! write sys$output " GNV$LIBZSHR support is disabled by nozlib."
$! endif
$else
$ nozlib = 1
$endif
$!
$!
$! Start the configuration file.
$! Need to do a create and then an append to make the file have the
$! typical file attributes of a VMS text file.
$create sys$disk:[curl.lib]config_vms.h
$open/append cvh sys$disk:[curl.lib]config_vms.h
$!
$! Write the defines to prevent multiple includes.
$! These are probably not needed in this case,
$! but are best practice to put on all header files.
$write cvh "#ifndef __CONFIG_VMS_H__"
$write cvh "#define __CONFIG_VMS_H__"
$write cvh ""
$write cvh "/* Define cpu-machine-OS */"
$!
$! Curl uses an OS macro to set the build environment.
$!----------------------------------------------------
$! Now the DCL builds usually say xxx-HP-VMS and configure scripts
$! may put DEC or COMPAQ or HP for the middle part.
$!
$write cvh "#if defined(__alpha)"
$write cvh "#define OS ""ALPHA-HP-VMS"""
$write cvh "#elif defined(__vax)"
$write cvh "#define OS ""VAX-HP-VMS"""
$write cvh "#elif defined(__ia64)"
$write cvh "#define OS ""IA64-HP-VMS""
$write cvh "#else"
$write cvh "#define OS ""UNKNOWN-HP-VMS""
$write cvh "#endif"
$write cvh ""
$!
$! We are now setting this on the GNV build, so also do this
$! for compatibility.
$write cvh "/* Location of default ca path */"
$write cvh "#define curl_ca_path ""gnv$curl_ca_path"""
$!
$! NTLM_WB_ENABLED requires fork() but configure does not know this
$! We have to disble this in th configure command line.
$! config_h.com finds that configure defaults to it being enabled so
$! reports it. So we need to turn it off here.
$!
$write cvh "#ifdef NTLM_WB_ENABLED"
$write cvh "#undef NTLM_WB_ENABLED"
$write cvh "#endif"
$!
$! The config_h.com finds a bunch of default disable commands in
$! configure and will incorrectly disable these options. The config_h.com
$! is a generic procedure and it would break more things to try to fix it
$! to special case it for curl. So we will fix it here.
$!
$! We do them all here, even the ones that config_h.com currently gets correct.
$!
$write cvh "#ifdef CURL_DISABLE_COOKIES"
$write cvh "#undef CURL_DISABLE_COOKIES"
$write cvh "#endif"
$write cvh "#ifdef CURL_DISABLE_CRYPTO_AUTH"
$write cvh "#undef CURL_DISABLE_CRYPTO_AUTH"
$write cvh "#endif"
$write cvh "#ifdef CURL_DISABLE_DICT"
$write cvh "#undef CURL_DISABLE_DICT"
$write cvh "#endif"
$write cvh "#ifdef CURL_DISABLE_FILE"
$write cvh "#undef CURL_DISABLE_FILE"
$write cvh "#endif"
$write cvh "#ifdef CURL_DISABLE_FTP"
$write cvh "#undef CURL_DISABLE_FTP"
$write cvh "#endif"
$write cvh "#ifdef CURL_DISABLE_GOPHER"
$write cvh "#undef CURL_DISABLE_GOPHER"
$write cvh "#endif"
$write cvh "#ifdef CURL_DISABLE_HTTP"
$write cvh "#undef CURL_DISABLE_HTTP"
$write cvh "#endif"
$write cvh "#ifdef CURL_DISABLE_IMAP"
$write cvh "#undef CURL_DISABLE_IMAP"
$write cvh "#endif"
$if .not. noldap
$then
$ write cvh "#ifdef CURL_DISABLE_LDAP"
$ write cvh "#undef CURL_DISABLE_LDAP"
$ write cvh "#endif"
$ if .not. nossl
$ then
$ write cvh "#ifdef CURL_DISABLE_LDAPS"
$ write cvh "#undef CURL_DISABLE_LDAPS"
$ write cvh "#endif"
$ endif
$endif
$write cvh "#ifdef CURL_DISABLE_LIBCURL_OPTION"
$write cvh "#undef CURL_DISABLE_LIBCURL_OPTION"
$write cvh "#endif"
$write cvh "#ifdef CURL_DISABLE_POP3"
$write cvh "#undef CURL_DISABLE_POP3"
$write cvh "#endif"
$write cvh "#ifdef CURL_DISABLE_PROXY"
$write cvh "#undef CURL_DISABLE_PROXY"
$write cvh "#endif"
$write cvh "#ifdef CURL_DISABLE_RTSP"
$write cvh "#undef CURL_DISABLE_RTSP"
$write cvh "#endif"
$write cvh "#ifdef CURL_DISABLE_SMTP"
$write cvh "#undef CURL_DISABLE_SMTP"
$write cvh "#endif"
$write cvh "#ifdef CURL_DISABLE_TELNET"
$write cvh "#undef CURL_DISABLE_TELNET"
$write cvh "#endif"
$write cvh "#ifdef CURL_DISABLE_TFTP"
$write cvh "#undef CURL_DISABLE_TFTP"
$write cvh "#endif"
$write cvh "#ifdef CURL_DISABLE_POP3"
$write cvh "#undef CURL_DISABLE_POP3"
$write cvh "#endif"
$if .not. nossl
$then
$ write cvh "#ifdef CURL_DISABLE_TLS_SRP"
$ write cvh "#undef CURL_DISABLE_TLS_SRP"
$ write cvh "#endif"
$!
$endif
$write cvh "#ifdef CURL_DISABLE_VERBOSE_STRINGS"
$write cvh "#undef CURL_DISABLE_VERBOSE_STRINGS"
$write cvh "#endif"
$!
$! configure defaults to USE_*, a real configure on VMS chooses different.
$write cvh "#ifdef USE_ARES"
$write cvh "#undef USE_ARES"
$write cvh "#endif"
$write cvh "#ifdef USE_AXTLS"
$write cvh "#undef USE_AXTLS"
$write cvh "#endif"
$write cvh "#ifdef USE_CYASSL"
$write cvh "#undef USE_CYASSL"
$write cvh "#endif"
$write cvh "#ifdef USE_DARWINSSL"
$write cvh "#undef USE_DARWINSSL"
$write cvh "#endif"
$write cvh "#ifdef USE_GNUTLS"
$write cvh "#undef USE_GNUTLS"
$write cvh "#endif"
$write cvh "#ifdef USE_GNUTLS_NETTLE"
$write cvh "#undef USE_GNUTLS_NETTLE"
$write cvh "#endif"
$write cvh "#ifdef USE_LIBRTMP"
$write cvh "#undef USE_LIBRTMP"
$write cvh "#endif"
$write cvh "#ifdef USE_MANUAL"
$write cvh "#undef USE_MANUAL"
$write cvh "#endif"
$write cvh "#ifdef USE_NSS"
$write cvh "#undef USE_NSS"
$write cvh "#endif"
$write cvh "#ifdef USE_OPENLDAP"
$write cvh "#undef USE_OPENLDAP"
$write cvh "#endif"
$write cvh "#ifdef USE_POLARSSL"
$write cvh "#undef USE_POLARSSL"
$write cvh "#endif"
$write cvh "#ifdef USE_SCHANNEL"
$write cvh "#undef USE_SCHANNEL"
$write cvh "#endif"
$write cvh "#ifdef USE_THREADS_POSIX"
$write cvh "#undef USE_THREADS_POSIX"
$write cvh "#endif"
$write cvh "#ifdef USE_TLS_SRP"
$write cvh "#undef USE_TLS_SRP"
$write cvh "#endif"
$write cvh "#ifdef USE_WINDOWS_SSPI"
$write cvh "#undef USE_WINDOWS_SSPI"
$write cvh "#endif"
$!
$!
$! Note:
$! The CURL_EXTERN_SYMBOL is used for platforms that need the compiler
$! to know about universal symbols. VMS does not need this support so
$! we do not set it here.
$!
$!
$! I can not figure out where the C compiler is finding the ALLOCA.H file
$! in the text libraries, so CONFIG_H.COM can not find it either.
$! Usually the header file name is the module name in the text library.
$! It does not appear to hurt anything to not find header file, so we
$! are not overriding it here.
$!
$!
$! Check to see if OpenSSL is present.
$!----------------------------------
$ssl_include = f$trnlnm("OPENSSL")
$if ssl_include .eqs. ""
$then
$ ssl_include = f$trnlnm("ssl$include")
$endif
$if ssl_include .eqs. "" then nossl = 1
$!
$if .not. nossl
$then
$!
$ write cvh "#ifndef USE_OPENSSL"
$ write cvh "#define USE_OPENSSL 1"
$ write cvh "#endif"
$ write cvh "#ifndef USE_SSLEAY"
$ write cvh "#define USE_SSLEAY 1"
$ write cvh "#endif"
$endif
$!
$!
$! LibIDN not ported to VMS at this time.
$! This is for international domain name support.
$! Allow explicit experimentation.
$if libidn
$then
$ write cvh "#define HAVE_IDNA_STRERROR 1"
$ write cvh "#define HAVE_IDNA_FREE 1"
$ write cvh "#define HAVE_IDNA_FREE_H 1"
$ write cvh "#define HAVE_LIBIDN 1"
$else
$ write cvh "#ifdef HAVE_LIBIDN"
$ write cvh "#undef HAVE_LIBIDN"
$ write cvh "#endif"
$endif
$!
$! LibSSH2 not ported to VMS at this time.
$! Allow explicit experimentation.
$if libssh2
$then
$ write cvh "#define HAVE_LIBSSH2_EXIT 1"
$ write cvh "#define HAVE_LIBSSH2_H 1"
$ write cvh "#define HAVE_LIBSSH2_INIT 1"
$ write cvh "#define HAVE_LIBSSH2_SCP_SEND64 1"
$ write cvh "#define HAVE_LIBSSH2_SESSION_HANDSHAKE 1"
$ write cvh "#define HAVE_LIBSSH2_VERSION 1
$ write cvh "#define HAVE_LIBSSH2 1
$!
$ write cvh "#ifndef USE_LIBSSH2"
$ write cvh "#define USE_LIBSSH2 1"
$ write cvh "#endif"
$else
$ write cvh "#ifdef USE_LIBSSH2"
$ write cvh "#undef USE_LIBSSH2"
$ write cvh "#endif"
$endif
$!
$!
$if .not. nozlib
$then
$ write cvh "#define HAVE_LIBZ 1"
$ write cvh "#define HAVE_ZLIB_H 1"
$endif
$!
$!
$! Close out the file
$!
$write cvh ""
$write cvh "#endif /* __CONFIG_VMS_H__ */"
$close cvh
$!
$all_exit:
$exit

View File

@ -1,2 +0,0 @@
SYS$LIBRARY:SSL$LIBCRYPTO_SHR32.EXE/SHARE
SYS$LIBRARY:SSL$LIBSSL_SHR32.EXE/SHARE

View File

@ -1,2 +0,0 @@
SYS$LIBRARY:SSL$LIBCRYPTO_SHR.EXE/SHARE
SYS$LIBRARY:SSL$LIBSSL_SHR.EXE/SHARE

View File

@ -1,2 +0,0 @@
SYS$LIBRARY:SSL$LIBCRYPTO_SHR32.EXE/SHARE
SYS$LIBRARY:SSL$LIBSSL_SHR32.EXE/SHARE

View File

@ -1 +0,0 @@
SYS$SHARE:LDAP$SHR.EXE /SHARE

View File

@ -1,2 +0,0 @@
SSLLIB:LIBCRYPTO.EXE /SHARE
SSLLIB:LIBSSL.EXE /SHARE

View File

@ -1,2 +0,0 @@
SSLLIB:LIBCRYPTO.EXE /SHARE
SSLLIB:LIBSSL.EXE /SHARE

View File

@ -1,2 +0,0 @@
SSLLIB:SSL_LIBCRYPTO.EXE /SHARE
SSLLIB:SSL_LIBSSL.EXE /SHARE

View File

@ -1,2 +0,0 @@
SSLLIB:SSL_LIBCRYPTO.EXE /SHARE
SSLLIB:SSL_LIBSSL.EXE /SHARE

View File

@ -1,2 +0,0 @@
SSLLIB:SSL_LIBCRYPTO.EXE /SHARE
SSLLIB:SSL_LIBSSL.EXE /SHARE

View File

@ -1,2 +0,0 @@
SSLLIB:LIBCRYPTO.EXE /SHARE
SSLLIB:LIBSSL.EXE /SHARE

View File

@ -24,9 +24,6 @@
#ifdef HAVE_PWD_H
# include <pwd.h>
#endif
#ifdef __VMS
# include <unixlib.h>
#endif
#include "tool_homedir.h"
@ -56,15 +53,8 @@ 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

View File

@ -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

View File

@ -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)

View File

@ -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 */

View File

@ -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);