Craig A. Berry wrote:
> At 02:18 PM 3/13/00 -0800, Peter Prymmer replied to me off-list:
> > > BTW, did you ever solve the dir not found error in Perl 5.6's vms.c?
> >
> >No. I punted on the issue and sent a patch to vmsperl this morning.
> >It is a wacky large value that I see on the return from sys$check_access.
>
> Ah, I see the patch now. It's actually not such a wacky value:
>
> $ write sys$output f$message(114762)
> %RMS-E-DNF, directory not found
>
> or
>
> $ sea rmsdef.h rms$_dnf
> #define RMS$_DNF 114762
>
> but it's very wacky that you get it under the circumstances you do (but
> perhaps that's all you meant).
>
> In any case, the code in vms.c appears to be trying to account for all the
> return values from sys$check_access that translate to "ain't no such thing."
> However, dir not found isn't in the list. This patch adds it; I wonder if
> that's what's needed?
>
> --- vms.c;-0 Sun Mar 12 19:30:17 2000
> +++ vms.c Mon Mar 13 16:36:12 2000
> @@ -4648,7 +4648,7 @@
> retsts = sys$check_access(&objtyp,&namdsc,&usrdsc,armlst);
> if (retsts == SS$_NOPRIV || retsts == SS$_NOSUCHOBJECT ||
> retsts == SS$_INVFILFOROP || retsts == RMS$_FNF || retsts == RMS$_SYN ||
> - retsts == RMS$_DIR || retsts == RMS$_DEV) {
> + retsts == RMS$_DIR || retsts == RMS$_DEV || retsts == RMS$_DNF) {
> set_vaxc_errno(retsts);
> if (retsts == SS$_NOPRIV) set_errno(EACCES);
> else if (retsts == SS$_INVFILFOROP) set_errno(EINVAL);
> End of Patch.
With this applied to a dirty build dir of Charles' RC1_1 kit (+all of my patch
except for the tweak to vms.c) I see this on an attempt to rebuild (cut and
paste line breaks may have been introduced in odd places):
$ mms
Copy/Log/Noconfirm [.vms]vms.c []
%COPY-S-COPIED, DKB100:[VMSPERL.VMS]VMS.C;3 copied to DKB100:[VMSPERL]VMS.C;3
(336 blocks)
CC/DECC
/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoList/Define=PERL_CORE
VMS.C
Library/Object/Replace LIBPERL.OLB SOCKADAPT.OBJ, AV.OBJ, DEB.OBJ, DOIO.OBJ,
DOOP.OBJ, DUMP.OBJ, GLOBALS.OBJ, GV.OBJ, HV.OBJ, MG.OBJ
, MINIPERLMAIN.OBJ, OP.OBJ, PERL.OBJ, PERLIO.OBJ, PERLY.OBJ, PP.OBJ,
PP_CTL.OBJ, PP_HOT.OBJ, PP_SYS.OBJ, REGCOMP.OBJ, -
REGEXEC.OBJ, RUN.OBJ, SCOPE.OBJ, SV.OBJ, TAINT.OBJ, TOKE.OBJ, UNIVERSAL.OBJ,
UTF8.OBJ, UTIL.OBJ, VMS.OBJ, XSUTILS.OBJ
Link /NoTrace/NoMap/Trace/Exe=MINIPERL.EXE
miniperlmain.obj,libperl.olb/Library/Include=globals ,[]crtl.opt/Options
Link
/NoTrace/NoMap/NoDebug/Trace/NoMap/NoFull/NoCross/Exe=SYS$DISK:[]MINIPERL.EXE
miniperlmain.obj, libperl.olb/Library/Include=globals ,[]crtl.opt/Options
MCR Sys$Disk:[]miniperl.exe "-I[.lib]" [.VMS]Writemain.pl "DynaLoader Socket"
Can't execute [.vms]writemain.pl.
%RMS-E-DNF, directory not found
-NONAME-W-NOMSG, Message number 00000000
%MMS-F-ABORT, For target PERLMAIN.C, CLI returned abort status: %X0001C04A.
-RMS-E-DNF, directory not found
So it didn't quite help. However, with this sort of thing I could redo
my hack in terms of the RMS$_DNF macro (although this does diff not check
for __ALPHA, the __DECC_VER or __VMS_VER like my previous patch):
$ gdiff -u [.vms]vms.c;-1 [.vms]vms.c
--- [.vms]vms.c;-1 Mon Mar 13 16:58:28 2000
+++ [.vms]vms.c Mon Mar 13 16:58:39 2000
@@ -4668,7 +4668,7 @@
if ((privused & CHP$M_READALL) && !curprv.prv$v_readall) return FALSE;
return TRUE;
}
- if (retsts == SS$_ACCONFLICT) {
+ if (retsts == SS$_ACCONFLICT || retsts == RMS$_DNF) {
return TRUE;
}
_ckvmssts(retsts);
end of diff.
> I'm still curious what directory it's not finding. If you ever have a
> chance to do a debug build, an "EXAM/ASCIZ namdsc.dsc$a_pointer" just before
> it calls sys$check_access could be informative.
Thanks for the tip. Please don't hold your breathe waiting for me though
I have a lot of other things to do unfortunately :-{
Peter Prymmer