[Info-vax] VAX VMS going forward
Craig A. Berry
craigberry at nospam.mac.com
Sat Aug 1 09:55:00 EDT 2020
On 8/1/20 4:34 AM, John Dallman wrote:
> In article <rg123i$8hq$1 at dont-email.me>, craigberry at nospam.mac.com (Craig
> A. Berry) wrote:
>
>> Actually, it's only code written for VMS using native 64-bit
>> interfaces that is likely to work with 64-bit pointers. Portable
>> code would have to live without the following from table 1-8 of
>> the CRTL manual:
>>
>> atexit frexp ioctl setbuf
>> execv getopt modf setstate
>> execve iconv putenv setvbuf
>> execvp initstate
>>
>> The problem is not the length of the list but what's on it. It's
>> hard to imagine a full-featured, portable program that does not
>> use getopt, the exec family of functions, and ioctl.
>>
>> In the case of the OP, a math library might be ok, but the user of
>> that library who wants to write a program would have some hoops to
>> jump through.
>
> The math library is OK with these, but its test harness needs a few of
> them. However, they all have wrapper functions, to allow for platform-
> specific handling.
>
> What hoops does one have to jump through? Are there ways to allocate
> memory in P0 or P1, and then obtain short pointers to it for passing to
> the OS?
You have to control the pointer size of the relevant sections of code
with #pragma pointer_size. Documentation appears to be scattered among
the compiler docs, the CRTL docs, the programming concepts manual, and
the guide to 64-bit addressing. Here's an old Digital Technical Journal
article with some of the background:
<https://pdfs.semanticscholar.org/8d96/bbba019c43e80f059825311b67c975a0fede.pdf>
More information about the Info-vax
mailing list