Fix pointer size issues with argv on VMS

The argument 'argv' in 'main' is a short pointer to a short pointer on
VMS, regardless of initial pointer size.  We must therefore make sure
that 'copy_argv' gets a 32-bit pointer for argv, and that the copied
argv is used for the rest of main().

This introduces the local type argv_t, which will have correct pointer
size in all cases (and be harmless on all other platforms) as well as
the macro Argv, which is defined as 'copied_argv' or 'argv', as the
case may be.

Reviewed-by: Andy Polyakov <appro@openssl.org>
This commit is contained in:
Richard Levitte
2016-03-30 08:35:18 +02:00
parent 90dbd25097
commit 087ca80ad8
3 changed files with 23 additions and 12 deletions

View File

@@ -105,7 +105,8 @@ decc_feat_t decc_feat_array[] = {
{(char *)NULL, 0}
};
char **copy_argv(int *argc, char *argv[])
char **copy_argv(int *argc, argv_t argv)
{
/*-
* The note below is for historical purpose. On VMS now we always