[Info-vax] VAX VMS going forward
Craig A. Berry
craigberry at nospam.mac.com
Fri Jul 31 18:52:26 EDT 2020
On 7/31/20 4:05 PM, David Jones wrote:
> On Friday, July 31, 2020 at 3:32:40 PM UTC-4, Craig A. Berry wrote:
>> That's part of the equation, certainly. But if you call execv from a
>> program compiled with /POINTER_SIZE=64=ARGV, how do you hand off an
>> array of 64-bit pointers in argv to a program that may expect an array
>> of 32-bit pointers or may expect an array of 64-bit pointers?
>
> If the header files have the proper prototypes, the compile will flag the calls
> with pointer mismatch warnings.
So say you have a program with a 64-bit argv array and it invokes
various other programs via execv(). What happens when the main()
function of one of those programs expects a 32-bit argv array and it
gets your 64-bit array?
Now maybe the whole command line is flattened into a single string,
reparsed by DCL, and passed to the invoked program. That would be
horrible, but it would avoid the problem of mismatched argv pointer sizes.
More information about the Info-vax
mailing list