This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make VMS CRTL features work for embedders.
authorCraig A. Berry <craigberry@mac.com>
Sun, 21 Jan 2018 18:47:45 +0000 (12:47 -0600)
committerCraig A. Berry <craigberry@mac.com>
Sun, 21 Jan 2018 19:48:04 +0000 (13:48 -0600)
commit1d60dc3fde1056479bb0133084c4a22c37869c37
treeec4f217777ea1a95b9ed0e6b6a498a0cae269fc9
parentb3c872ebe7541431109f07330ab5123db843dea1
Make VMS CRTL features work for embedders.

The various run-time features of the CRTL that Perl uses were being
fetched at image activation time and stored in static variables
for later reference.  That works ok when Perl is the program, but
not when Perl is the library since in the latter case attempts by
an embedder to alter the feature settings before invoking Perl were
being ignored.

So store the feature index, not its value, and use that index to
get the current value via decc$feature_get_value whenever we need
it.  This means function calls rather than data references, but
there is no measurable impact on performance.

Also fix a bug in the handling of the feature to disable the POSIX
root; we were saying we were disabling it but weren't really doing
so because its current value cannot be set for some reason (only
its default value).  Since the feature only affects the conversion
of filenames between Unix and VMS format and we don't use the CRTL's
functions for that, it's unlikely this bug ever caused trouble.
pod/perldelta.pod
vms/vms.c