[Info-vax] Old work-arounds v. new <stdint.h> (et al.)

Stephen Hoffman seaohveh at hoffmanlabs.invalid
Tue Jun 21 15:21:24 EDT 2022


On 2022-06-20 21:20:27 +0000, Steven Schweda said:

>    Is there a C macro which would reveal whether <stdint.h> exists,
> and/or <inttypes.h> has some actual content, and so on?  Perhaps a test
> like: "__STDC_VERSION__ >= 199901"?

No.  Not absent checks in the build procedure. The compiler itself has 
been C99 for a very long time, but the non-compiler pieces only arrived 
within the last several years.

I'd prefer to shift the complexity from the folks building for new to 
the folks building for old, and would assume C99 everywhere and with 
stdint.h present, and would make the user specify a procedure build 
parameter to request an "old" build.

Which might then select CC /DEFINE=LEGACY_HPE_COMPATIBILITY=1 or ilk.

Go for better defaults and cleaner code long-term, and #if-highlight 
the hunks of C code that'll get expunged first. Make it easier to rip 
out the added complexity.

I might add a #if __STDC_VERSION__ >= 199901 defensive check or two 
into the C source code, should some intrepid code retronaut go 
particularly deep into the weeds.

This all given OpenVMS V8.4 is a dozen years back, given there's no HPE 
hobbyist licenses, given (AFAIK) VSI hobbyists currently have access to 
VSI C99, and given OpenVMS x86-64 Clang is C17 and won't have this 
stdint.h mess, and given there's no way VSI is going to emulate the 
busted C99 giblets within the context of the legacy-compatible C 
compiler.


-- 
Pure Personal Opinion | HoffmanLabs LLC 




More information about the Info-vax mailing list