INSTALLvms.txt - Installation of Vim on OpenVMS
Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
Last change: 2008 Jan 06
This file contains instructions for compiling Vim on Openvms.
If you already have an executable version of Vim, you don't need this.
If you skip settings described here, then you will get the default Vim
behavior as it is documented, which should be fine for most users.
The file "feature.h" can be edited to match your preferences, but this file
does not describe possibilities hidden in feature.h acrobatics, however
parameters from MAKE_VMS.MMS actively use and set up parameters in relation
with feature.h
More information and case analysis you can find in os_vms.txt
([runtime.doc]os_vms.txt or :help vms from vim prompt)
Contents:
1. Download files
2. Configuration
3. Compilation DECC
4. Compilation VAXC
5. CTAGS, XXD
6. Deployment
7. GTK and other features
8. Notes
9. Authors
----------------------------------------------------------------------------
1. Download files
1.1. Visit the Vim ftp site (see ftp://ftp.vim.org/pub/vim/MIRRORS)
and obtain the following three files:
unix/vim-X.X-src.tar.gz
unix/vim-X.X-rt.tar.gz
extra/vim-X.X-extra.tar.gz
where X.X is the version number.
1.2. Expand the three archives.
1.3. Apply patches if they exist. (Patch files are found in the ftp
site in the "patches" directory.)
1.4. You will need either the DECSET mms utility or the freely available clone
of it called mmk (VMS has no make utility in the standard distribution).
You can download mmk from http://www.openvms.digital.com/freeware/MMK/
1.5. If you want to have Perl, Python or Tcl support in Vim you will need VMS
distributions for them as well.
1.6 If you want to have GTK executable, you need to have properly installed
GTK libraries.
NOTE: procedure in chapter 1 describes source code preparation from multi OS
code, however it is available OpenVMS optimized (and tested) source code from:
ftp://ftp.polarhome.com/pub/vim/source/vms/
(http://www.polarhome.com/vim/files/source/vms/)
Current OpenVMS source code as .zip or .tar.gz file is possible to download
from CVS mirror ftp://ftp.polarhome.com/pub/cvs/SOURCE/
(http://www.polarhome.com/cvs/SOURCE/)
2. Configuration
2.1. Edit vim-X.X/src/feature.h for your preference. (You can skip
this, then you will get the default behavior as is documented,
which should be fine for most people.)
For example, if you want to add the MULTI_BYTE feature, turn on
#define MULTI_BYTE
2.2 Edit vim-X.X/src/Make_vms.mms to customize your Vim. Options are:
Parameter name : MODEL
Description : Build model selection
Options: : TINY - No optional features enabled
NORMAL - A default selection of features enabled
(OpenVMS default)
HUGE - All possible features enabled.
Uncommented - will default to NORMAL
Default : MODEL = NORMAL
Parameter name : GUI
Description : GUI or terminal mode executable
Options: : YES - GUI executable
Uncommented - char only
Default : GUI = YES
Parameter name : GTK
Description : Enable GTK in GUI mode.
It enables features as toolbar etc.
Options: : YES - GTK executable
Uncommented - without GTK
Default : Uncommented
Parameter name : XPM
Description : Enable XPM libraries in GUI/Motif mode.
It enables features as toolbar etc.
Options: : YES - GUI executable
Uncommented - without XPM
Default : Uncommented
Parameter name : DECC
Description : Compiler selection
Options: : YES - DECC compiler
Uncommented - VAXC compiler
Default : DECC = YES
Parameter name : CCVER
Description : Compiler version with :ver command
Options: : YES - Compiler version info will be added
Uncommented - will not be added
Default : CCVER = YES
Parameter name : DEBUG
Description : Building a debug version
Options: : YES - debug version will be built
Uncommented - building normal executable
Default : Uncommented
Parameter name : VIM_TCL
Description : Add Tcl support
Options: : YES - Build with support
Uncommented - build without support.
Default : Uncommented
Parameter name : VIM_PERL
Description : Add Perl support
Options: : YES - Build with support
Uncommented - build without support.
Default : Uncommented
Parameter name : VIM_PYTHON
Description : Add Python support
Options: : YES - Build with support
Uncommented - build without support.
Default : Uncommented
Parameter name : VIM_XIM
Description : X Input Method. For entering special languages
like Chinese and Japanese. Please define just
one: VIM_XIM or VIM_HANGULIN
Options: : YES - Build with support
Uncommented - build without support.
Default : Uncommented
Parameter name : VIM_HANGULIN
Description : Internal Hangul input method. GUI only.
Please define just one: VIM_XIM or VIM_HANGULIN
Options: : YES - Build with support
Uncommented - build without support.
Default : Uncommented
Parameter name : VIM_TAG_ANYWHITE
Description : Allow any white space to separate the fields in a
tags file
When not defined, only a TAB is allowed.
Options: : YES - Build with support
Uncommented - build without support.
Default : Uncommented
You can edit the *_INC and *_LIB qualifiers, but it is really
not recommended for beginners.
3. Compilation DECC
3.1. If you have MSS on your system, the command
mms /descrip=Make_vms.mms
will start building your own customized version of Vim.
The adequate command for mmk is:
mmk /descrip=Make_vms.mms
NOTE: Because of empty /auto/config.h (needed for Unix configure) build
will fail with very strange messages. Therefore before building, it is
recommended to make one clean up, to prepare everything for OpenVMS
development. The command is:
mms /descrip=Make_vms.mms clean
4. Compilation VAXC
4.1. VAXC compiler is not fully ANSI C compatible in pre-processor directives
semantics, therefore you have to use a converter program what will do the
lion part of the job.
@os_vms_fix.com *.c *.h <.proto>*.pro
more information can be found in os_vms_fix.com file itself.
NOTE: even if os_vms_fix.com will fix all pre-processor directives it will
leave single (long) line directives. You have to fix them manually.
Known problematic files are option.h and option.c
4.2. After the conversion you can continue building as it has been described
above.
5. CTAGS, XXD
5.1. MMS_VIM.EXE is building together with VIM.EXE, but for CTAGS.EXE and
XXD.EXE you should change to subdirectory <.CTAGS> or <.XXD> and/* crypto/bio/bio.h */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
* by Eric Young (eay@cryptsoft.com).
* The implementation was written so as to conform with Netscapes SSL.
*
* This library is free for commercial and non-commercial use as long as
* the following conditions are aheared to. The following conditions
* apply to all code found in this distribution, be it the RC4, RSA,
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
* included with this distribution is covered by the same copyright terms
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
*
* Copyright remains Eric Young's, and as such any Copyright notices in
* the code are not to be removed.
* If this package is used in a product, Eric Young should be given attribution
* as the author of the parts of the library used.
* This can be in the form of a textual message at program startup or
* in documentation (online or textual) provided with the package.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* "This product includes cryptographic software written by
* Eric Young (eay@cryptsoft.com)"
* The word 'cryptographic' can be left out if the rouines from the library
* being used are not cryptographic related :-).
* 4. If you include any Windows specific code (or a derivative thereof) from
* the apps directory (application code) you must include an acknowledgement:
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
*
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* The licence and distribution terms for any publically available version or
* derivative of this code cannot be changed. i.e. this code cannot simply be
* copied and put under another distribution licence
* [including the GNU Public Licence.]
*/
#ifndef HEADER_BIO_H
#define HEADER_BIO_H
#ifndef OPENSSL_NO_FP_API
# include <stdio.h>
#endif
#include <stdarg.h>
#include <openssl/crypto.h>
#include <openssl/e_os2.h>
#ifdef __cplusplus
extern "C" {
#endif
/* These are the 'types' of BIOs */
#define BIO_TYPE_NONE 0
#define BIO_TYPE_MEM (1|0x0400)
#define BIO_TYPE_FILE (2|0x0400)
#define BIO_TYPE_FD (4|0x0400|0x0100)
#define BIO_TYPE_SOCKET (5|0x0400|0x0100)
#define BIO_TYPE_NULL (6|0x0400)
#define BIO_TYPE_SSL (7|0x0200)
#define BIO_TYPE_MD (8|0x0200) /* passive filter */
#define BIO_TYPE_BUFFER (9|0x0200) /* filter */
#define BIO_TYPE_CIPHER (10|0x0200) /* filter */
#define BIO_TYPE_BASE64 (11|0x0200) /* filter */
#define BIO_TYPE_CONNECT (12|0x0400|0x0100) /* socket - connect */
#define BIO_TYPE_ACCEPT (13|0x0400|0x0100) /* socket for accept */
#define BIO_TYPE_PROXY_CLIENT (14|0x0200) /* client proxy BIO */
#define BIO_TYPE_PROXY_SERVER (15|0x0200) /* server proxy BIO */
#define BIO_TYPE_NBIO_TEST (16|0x0200) /* server proxy BIO */
#define BIO_TYPE_NULL_FILTER (17|0x0200)
#define BIO_TYPE_BER (18|0x0200) /* BER -> bin filter */
#define BIO_TYPE_BIO (19|0x0400) /* (half a) BIO pair */
#define BIO_TYPE_LINEBUFFER (20|0x0200) /* filter */
#define BIO_TYPE_DESCRIPTOR 0x0100 /* socket, fd, connect or accept */
#define BIO_TYPE_FILTER 0x0200
#define BIO_TYPE_SOURCE_SINK 0x0400
/* BIO_FILENAME_READ|BIO_CLOSE to open or close on free.
* BIO_set_fp(in,stdin,BIO_NOCLOSE); */
#define BIO_NOCLOSE 0x00
#define BIO_CLOSE 0x01
/* These are used in the following macros and are passed to
* BIO_ctrl() */
#define BIO_CTRL_RESET 1 /* opt - rewind/zero etc */
#define BIO_CTRL_EOF 2 /* opt - are we at the eof */
#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
#define BIO_CTRL_SET 4 /* man - set the 'IO' type */
#define BIO_CTRL_GET 5 /* man - get the 'IO' type */
#define BIO_CTRL_PUSH 6 /* opt - internal, used to signify change */
#define BIO_CTRL_POP 7 /* opt - internal, used to signify change */
#define BIO_CTRL_GET_CLOSE 8 /* man - set the 'close' on free */
#define BIO_CTRL_SET_CLOSE 9 /* man - set the 'close' on free */
#define BIO_CTRL_PENDING 10 /* opt - is their more data buffered */
#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
#define BIO_CTRL_DUP 12 /* man - extra stuff for 'duped' BIO */
#define BIO_CTRL_WPENDING 13 /* opt - number of bytes still to write */
/* callback is int cb(BIO *bio,state,ret); */
#define BIO_CTRL_SET_CALLBACK 14 /* opt - set callback function */
#define BIO_CTRL_GET_CALLBACK 15 /* opt - set callback function */
#define BIO_CTRL_SET_FILENAME 30 /* BIO_s_file special */
/* modifiers */
#define BIO_FP_READ 0x02
#define BIO_FP_WRITE 0x04
#define BIO_FP_APPEND 0x08
#define BIO_FP_TEXT 0x10
#define BIO_FLAGS_READ 0x01
#define BIO_FLAGS_WRITE 0x02
#define BIO_FLAGS_IO_SPECIAL 0x04
#define BIO_FLAGS_RWS (BIO_FLAGS_READ|BIO_FLAGS_WRITE|BIO_FLAGS_IO_SPECIAL)
#define BIO_FLAGS_SHOULD_RETRY 0x08
/* Used in BIO_gethostbyname() */
#define BIO_GHBN_CTRL_HITS 1
#define BIO_GHBN_CTRL_MISSES 2
#define BIO_GHBN_CTRL_CACHE_SIZE 3
#define BIO_GHBN_CTRL_GET_ENTRY 4
#define BIO_GHBN_CTRL_FLUSH 5
/* Mostly used in the SSL BIO */
/* Not used anymore
* #define BIO_FLAGS_PROTOCOL_DELAYED_READ 0x10
* #define BIO_FLAGS_PROTOCOL_DELAYED_WRITE 0x20
* #define BIO_FLAGS_PROTOCOL_STARTUP 0x40
*/
#define BIO_FLAGS_BASE64_NO_NL 0x100
/* This is used with memory BIOs: it means we shouldn't free up or change the
* data in any way.
*/
#define BIO_FLAGS_MEM_RDONLY 0x200
#define BIO_set_flags(b,f) ((b)->flags|=(f))
#define BIO_get_flags(b) ((b)->flags)
#define BIO_set_retry_special(b) \
((b)->flags|=(BIO_FLAGS_IO_SPECIAL|BIO_FLAGS_SHOULD_RETRY))
#define BIO_set_retry_read(b) \
((b)->flags|=(BIO_FLAGS_READ|BIO_FLAGS_SHOULD_RETRY))
#define BIO_set_retry_write(b) \
((b)->flags|=(BIO_FLAGS_WRITE|BIO_FLAGS_SHOULD_RETRY))
/* These are normally used internally in BIOs */
#define BIO_clear_flags(b,f) ((b)->flags&= ~(f))
#define BIO_clear_retry_flags(b) \
((b)->flags&= ~(BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY))
#define BIO_get_retry_flags(b) \
((b)->flags&(BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY))
/* These should be used by the application to tell why we should retry */
#define BIO_should_read(a) ((a)->flags & BIO_FLAGS_READ)
#define BIO_should_write(a) ((a)->flags & BIO_FLAGS_WRITE)
#define BIO_should_io_special(a) ((a)->flags & BIO_FLAGS_IO_SPECIAL)
#define BIO_retry_type(a) ((a)->flags & BIO_FLAGS_RWS)
#define BIO_should_retry(a) ((a)->flags & BIO_FLAGS_SHOULD_RETRY)
/* The next three are used in conjunction with the
* BIO_should_io_special() condition. After this returns true,
* BIO *BIO_get_retry_BIO(BIO *bio, int *reason); will walk the BIO
* stack and return the 'reason' for the special and the offending BIO.
* Given a BIO, BIO_get_retry_reason(bio) will return the code. */
/* Returned from the SSL bio when the certificate retrieval code had an error */
#define BIO_RR_SSL_X509_LOOKUP 0x01
/* Returned from the connect BIO when a connect would have blocked */
#define BIO_RR_CONNECT 0x02
/* Returned from the accept BIO when an accept would have blocked */
#define BIO_RR_ACCEPT 0x03
/* These are passed by the BIO callback */
#define BIO_CB_FREE 0x01
#define BIO_CB_READ 0x02
#define BIO_CB_WRITE 0x03
#define BIO_CB_PUTS 0x04
#define BIO_CB_GETS 0x05
#define BIO_CB_CTRL 0x06
/* The callback is called before and after the underling operation,
* The BIO_CB_RETURN flag indicates if it is after the call */
#define BIO_CB_RETURN 0x80
#define BIO_CB_return(a) ((a)|BIO_CB_RETURN))
#define BIO_cb_pre(a) (!((a)&BIO_CB_RETURN))
#define BIO_cb_post(a) ((a)&BIO_CB_RETURN)
#define BIO_set_callback(b,cb) ((b)->callback=(cb))
#define BIO_set_callback_arg(b,arg) ((b)->cb_arg=(char *)(arg))
#define BIO_get_callback_arg(b) ((b)->cb_arg)
#define BIO_get_callback(b) ((b)->callback)
#define BIO_method_name(b) ((b)->method->name)
#define BIO_method_type(b) ((b)->method->type)
typedef struct bio_st BIO;
typedef void bio_info_cb(struct bio_st *, int, const char *, int, long, long);
#ifndef OPENSSL_SYS_WIN16
typedef struct bio_method_st
{
int type;
const char *name;
int (*bwrite)(BIO *, const char *, int);
int (*bread)(BIO *, char *, int);
int (*bputs)(BIO *, const char *);
int (*bgets)(BIO *, char *, int);
long (*ctrl)(BIO *, int, long, void *);
int (*create)(BIO *);
int (*destroy)(BIO *);
long (*callback_ctrl)(BIO *, int, bio_info_cb *);
} BIO_METHOD;
#else
typedef struct bio_method_st
{
int type;
const char *name;
int (_far *bwrite)();
int (_far *bread)();
int (_far *bputs)();
int (_far *bgets)();
long (_far *ctrl)();
int (_far *create)();
int (_far *destroy)();
long (_fat *callback_ctrl)();
} BIO_METHOD;
#endif
struct bio_st
{
BIO_METHOD *method;
/* bio, mode, argp, argi, argl, ret */
long (*callback)(struct bio_st *,int,const char *,int, long,long);
char *cb_arg; /* first argument for the callback */
int init;
int shutdown;
int flags; /* extra storage */
int retry_reason;
int num;
void *ptr;
struct bio_st *next_bio; /* used by filter BIOs */
struct bio_st *prev_bio; /* used by filter BIOs */
int references;
unsigned long num_read;
unsigned long num_write;
CRYPTO_EX_DATA ex_data;
};
DECLARE_STACK_OF(BIO)
typedef struct bio_f_buffer_ctx_struct
{
/* BIO *bio; */ /* this is now in the BIO struct */
int ibuf_size; /* how big is the input buffer */
int obuf_size; /* how big is the output buffer */
char *ibuf; /* the char array */
int ibuf_len; /* how many bytes are in it */
int ibuf_off; /* write/read offset */
char *obuf; /* the char array */
int obuf_len; /* how many bytes are in it */
int obuf_off; /* write/read offset */
} BIO_F_BUFFER_CTX;
/* connect BIO stuff */
#define BIO_CONN_S_BEFORE 1
#define BIO_CONN_S_GET_IP 2
#define BIO_CONN_S_GET_PORT 3
#define BIO_CONN_S_CREATE_SOCKET 4
#define BIO_CONN_S_CONNECT 5
#define BIO_CONN_S_OK 6
#define BIO_CONN_S_BLOCKED_CONNECT 7
#define BIO_CONN_S_NBIO 8
/*#define BIO_CONN_get_param_hostname BIO_ctrl */
#define BIO_C_SET_CONNECT 100
#define BIO_C_DO_STATE_MACHINE 101
#define BIO_C_SET_NBIO 102
#define BIO_C_SET_PROXY_PARAM 103
#define BIO_C_SET_FD 104
#define BIO_C_GET_FD 105
#define BIO_C_SET_FILE_PTR 106
#define BIO_C_GET_FILE_PTR 107
#define BIO_C_SET_FILENAME 108
#define BIO_C_SET_SSL 109
#define BIO_C_GET_SSL 110
#define BIO_C_SET_MD 111
#define BIO_C_GET_MD 112
#define BIO_C_GET_CIPHER_STATUS 113
#define BIO_C_SET_BUF_MEM 114
#define BIO_C_GET_BUF_MEM_PTR 115
#define BIO_C_GET_BUFF_NUM_LINES 116
#define BIO_C_SET_BUFF_SIZE 117
#define BIO_C_SET_ACCEPT 118
#define BIO_C_SSL_MODE 119
#define BIO_C_GET_MD_CTX 120
#define BIO_C_GET_PROXY_PARAM 121
#define BIO_C_SET_BUFF_READ_DATA 122 /* data to read first */
#define BIO_C_GET_CONNECT 123
#define BIO_C_GET_ACCEPT 124
#define BIO_C_SET_SSL_RENEGOTIATE_BYTES 125
#define BIO_C_GET_SSL_NUM_RENEGOTIATES 126
#define BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT 127
#define BIO_C_FILE_SEEK 128
#define BIO_C_GET_CIPHER_CTX 129
#define BIO_C_SET_BUF_MEM_EOF_RETURN 130/*return end of input value*/
#define BIO_C_SET_BIND_MODE 131
#define BIO_C_GET_BIND_MODE 132
#define BIO_C_FILE_TELL 133
#define BIO_C_GET_SOCKS 134
#define BIO_C_SET_SOCKS 135
#define BIO_C_SET_WRITE_BUF_SIZE 136/* for BIO_s_bio */
#define BIO_C_GET_WRITE_BUF_SIZE 137
#define BIO_C_MAKE_BIO_PAIR 138
#define BIO_C_DESTROY_BIO_PAIR 139