Jeremy Begg wrote:
Hello Craig,
Can I suggest the thing to do would be to work out which CRTL routines you
would use, then ask HP OpenVMS Engineering to tell you how they behave with
symlinks, subject to the presence or absence of assorted DECC$ logical
names? (I assume here your problem is that symlink handling isn't well
documented.)
Almost all of the Symbolic links implementation is part of RMS, not the
CRTL. The unlink() behavior is clearly a bug in the CRTL though.
I have not been able to get the realpath() routine to work from the VMS
debugger while in Perl, regardless of how I have set the DECC$ features.
But this could be that I have not fully set up the directories under
designated VMS root directory.
You mentioned having to define logical names such as
DECC$POSIX_COMPLIANT_PATHNAMES to get certain behaviour from CRTL, but this
runs the risk of breaking other applications. Did you know you can enable
and disable this and similar behaviours from within a C program? Check out
the decc$feature_xxx() routines, e.g. decc$feature_get() and
decc$feature_set().
The problem is that the DECC features globally affect all libraries
written in C, the DECC$POSIX_COMPLIANT_PATHNAME modes turn almost all of
the UNIX to VMS translation over to RMS, and not to the CRTL.
The X11 libraries and the DECW debugger depend on logical names being
translated as part of the UNIX to VMS translation.
RMS at the last time I looked could not do logical name translation, so
that means that any library routine that depends on /foo/bar being
treated as foo:bar or foo:[000000]bar will not work unless you create a
directory, symbolic link, or mount point or named "foo" in the directory
designated by the SET_ROOT command.
It is totally unknown how many and what logical name translations that
the existing run time libraries written in C require, so there is no way
to predict which of these are needed.
The directories under this new ROOT are also global and must be shared
by all applications. Which is a problem if you have conflicting files
of the same name, which logical names now allow.
The last I saw, it was on the HP roadmap to add the logical name
translation for the Posix names into RMS. Until that happens, though, I
would not expect that the Posix modes to be used in production programs.
HP does need feedback from real world programs and real customers about
the Posix modes. I am no longer working on VMS except for my home hobby
system.
-John
[EMAIL PROTECTED]
Personal Opinion Only