B.3.2.2 Compiling gawk Dynamic Extensions on OpenVMS

The extensions that have been ported to OpenVMS 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.

/name=(as_is,short)
/float=ieee/ieee_mode=denorm_results

Compile-time macros need to be defined before the first OpenVMS-supplied header file is included, as follows:

#if (__CRTL_VER >= 70200000)
#define _LARGEFILE 1
#endif

#ifdef __CRTL_VER
#if __CRTL_VER >= 80200000
#define _USE_STD_STAT 1
#endif
#endif

If you are writing your own extensions to run on OpenVMS, you must supply these definitions yourself. The config.h file created when building gawk on OpenVMS does this for you; if instead you use that file or a similar one, then you must remember to include it before any OpenVMS-supplied header files.