gawk: VMS Dynamic Extensions
B.3.2.2 Compiling 'gawk' Dynamic Extensions on VMS
..................................................
The extensions that have been ported to VMS can be built using one of
the following commands:
$ MMS/DESCRIPTION=[.vms]descrip.mms extensions
or:
$ MMK/DESCRIPTION=[.vms]descrip.mms extensions
'gawk' uses 'AWKLIBPATH' as either an environment variable or a
logical name to find the dynamic extensions.
Dynamic extensions need to be compiled with the same compiler options
for floating-point, pointer size, and symbol name handling as were used
to compile 'gawk' itself. Alpha and Itanium should use IEEE floating
point. The pointer size is 32 bits, and the symbol name handling should
be exact case with CRC shortening for symbols longer than 32 bits.
For Alpha and Itanium:
/name=(as_is,short)
/float=ieee/ieee_mode=denorm_results
For VAX:
/name=(as_is,short)
Compile-time macros need to be defined before the first VMS-supplied
header file is included, as follows:
#if (__CRTL_VER >= 70200000) && !defined (__VAX)
#define _LARGEFILE 1
#endif
#ifndef __VAX
#ifdef __CRTL_VER
#if __CRTL_VER >= 80200000
#define _USE_STD_STAT 1
#endif
#endif
#endif
If you are writing your own extensions to run on VMS, you must supply
these definitions yourself. The 'config.h' file created when building
'gawk' on VMS does this for you; if instead you use that file or a
similar one, then you must remember to include it before any
VMS-supplied header files.