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

Steven Schweda sms.antinode at gmail.com
Tue Jun 21 00:37:53 EDT 2022


   My first attempt used "__STDC_VERSION__ >= 199901" to decide whether
to expect <stdint.h>, and, following the usual hints in the header
files, "__CRTL_VER >= 80500000" for the actual run-time stuff.  This
almost worked.

   In the IA64 -> x86_64 cross-tools (X86_XTOOLS E9.2-XG6F) headers,
<string.h> has this helpful morsel:

#   if __CRTL_VER >= 80500000
    char *strndup(__const_char_ptr64, __size_t);
    int strerror_r(int, __char_ptr64, __size_t);
    char *stpcpy(char *, __const_char_ptr64);
#   define mempcpy(to, from, len) (void *)((char *)memcpy((to), (from),
 (len)) + (len))
#   endif

So mempcpy() works that way.  But my plain-old IA64 <string.h> lacks the
mempcpy() part of that, leading to fatal complaints.

ITS $ cc /vers
VSI C V7.4-001 on OpenVMS IA64 V8.4-2L3
 __STDC_VERSION__ = 199901
 __CRTL_VER = 80500000

V86 $ [...]
V86 $ run stdc_vers     ! x86_64
 __STDC_VERSION__ = 199901
 __CRTL_VER = 80500000

   Am I missing a patch for the IA64 C headers, or is the x86 stuff
expected to make more sense than the IA64 stuff?  I can fake the
mempcpy() stuff  missing from <string.h>, but if it's all already
straightened out (or is about to be), then I'd rather avoid the clutter.



> I believe that it is quite common to have fancy tools [...]

   Sure, but not on VMS.



More information about the Info-vax mailing list