[Info-vax] C99 updates to CRTL
Craig A. Berry
craigberry at nospam.mac.com
Sat Jul 27 17:33:45 EDT 2019
On 7/27/19 12:33 PM, Arne Vajhøj wrote:
> On 7/27/2019 1:12 PM, John Reagan wrote:
>> On Saturday, July 27, 2019 at 9:53:07 AM UTC-4, Craig A. Berry wrote:
>>> I1 X 566 #if defined(__DECC) && (__DECC_VER >= 60400000) &&
>>> (__STDC_VERSION__ >= 199901L) && defined(_ANSI_C_SOURCE) /* C99 *
>>> I1 X 566 /
>>> I1 X 567 int isblank (int);
>>> I1 X 568 #endif
> I am not an expert in C headers or the finer points in the various
> C standards.
>
> But I have this feeling that there are or will be a need
> to be able to chose between modern and compatibility.
We're not talking about modern. We're talking about completing work
that was planned 15+ years ago but never got done until now. You'll
notice in the listing snippet above that the new functions require a C
compiler version of 6.4 or later (__DECC_VER >= 60400000). That is an
ancient version from the Compaq era and its relevance most likely comes
from when they added the C99 functions to the prefix table in the
compiler. So the compiler has been sitting there all this time waiting
and ready for the CRTL updates to be completed.
There is no reason to put special guards of any kind around C99 function
prototypes other than something indicating whether they are available or
not. snprintf was new in C99 but wasn't available in the CRTL until VMS
7.3-1, and so its prototype is guarded only by __CRTL_VER >= 70312000.
That makes sense and doesn't require any special compiler switches.
Except this time they didn't bump __CRTL_VER for reasons I can only
speculate, so the obvious mechanism is not available, and the made-up
mechanisms cause other problems I have outlined.
More information about the Info-vax
mailing list