Reverts commit
087ca80ad83071dde0bb6bc1c28c743caa00eaf8
Instead of battling the odd format of argv given to main() in default
P64 mode, tell the compiler to make it an array of 64-bit pointers
when compiling in P64 mode.
A note is added in NOTES.VMS regarding minimum DEC C version.
Reviewed-by: Andy Polyakov <appro@openssl.org>
"vms-alpha-p64" => {
inherit_from => [ "vms-alpha" ],
cflags =>
- add("/POINTER_SIZE=64",
+ add("/POINTER_SIZE=64=ARGV",
sub { my @warnings =
@{vms_info()->{disable_warns_p64}};
@warnings
"vms-ia64-p64" => {
inherit_from => [ "vms-ia64" ],
cflags =>
- add("/POINTER_SIZE=64",
+ add("/POINTER_SIZE=64=ARGV",
sub { my @warnings =
@{vms_info()->{disable_warns_p64}};
@warnings
An ANSI C compiled is needed among other things. This means that
VAX C is not and will not be supported.
- We have only tested with DEC C (a.k.a HP VMS C / VSI C), compiling
- with a different ANSI C compiler may require some work.
+ We have only tested with DEC C (a.k.a HP VMS C / VSI C) and require
+ version 7.1 or later. Compiling with a different ANSI C compiler may
+ require some work.
Please avoid using C RTL feature logical names DECC$* when building
and testing OpenSSL. Most of all, they can be disruptive when
char **argv;
} ARGS;
-#if defined(OPENSSL_SYS_VMS) && defined(__DECC)
-# pragma pointer_size save
-# pragma pointer_size 32
-typedef char **argv_t;
-# pragma pointer_size restore
-char **copy_argv(int *argc, argv_t argv);
-#else
-typedef char **argv_t;
-#endif
+/*
+ * VMS C only for now, implemented in vms_decc_init.c
+ * If other C compilers forget to terminate argv with NULL, this function
+ * can be re-used.
+ */
+char **copy_argv(int *argc, char *argv[]);
# define PW_MIN_LENGTH 4
FUNCTION f, *fp;
LHASH_OF(FUNCTION) *prog = NULL;
char **copied_argv = NULL;
- char **argv_alias = NULL;
char *p, *pname;
char buf[1024];
const char *prompt;
bio_out = dup_bio_out(FORMAT_TEXT);
bio_err = dup_bio_err(FORMAT_TEXT);
-#if defined( OPENSSL_SYS_VMS) && defined(__DECC)
- copied_argv = argv_alias = copy_argv(&argc, argv);
-#else
- argv_alias = argv;
+#if defined(OPENSSL_SYS_VMS) && defined(__DECC)
+ copied_argv = argv = copy_argv(&argc, argv);
#endif
p = getenv("OPENSSL_DEBUG_MEMORY");
goto end;
prog = prog_init();
- pname = opt_progname(argv_alias[0]);
+ pname = opt_progname(argv[0]);
/* first check the program name */
f.name = pname;
fp = lh_FUNCTION_retrieve(prog, &f);
if (fp != NULL) {
- argv_alias[0] = pname;
- ret = fp->func(argc, argv_alias);
+ argv[0] = pname;
+ ret = fp->func(argc, argv);
goto end;
}
/* If there is stuff on the command line, run with that. */
if (argc != 1) {
argc--;
- argv_alias++;
- ret = do_cmd(prog, argc, argv_alias);
+ argv++;
+ ret = do_cmd(prog, argc, argv);
if (ret < 0)
ret = 0;
goto end;
};
-char **copy_argv(int *argc, argv_t argv)
+char **copy_argv(int *argc, char *argv[])
{
/*-
* The note below is for historical purpose. On VMS now we always