From: Dan Sugalski Date: Fri, 13 Aug 1999 09:00:42 +0000 (-0700) Subject: fix up VMS->unix filename translation a bit X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ebd8c45cb71addf3d8b647dc8bb0cf8a7de9822e;p=p5sagit%2Fp5-mst-13.2.git fix up VMS->unix filename translation a bit To: perl5-porters@perl.org, vmsperl@perl.org, bailey@newman.upenn.edu, sarathy@activestate.com Message-ID: p4raw-id: //depot/cfgperl@3979 --- diff --git a/vms/vms.c b/vms/vms.c index bf2726f..29634a5 100644 --- a/vms/vms.c +++ b/vms/vms.c @@ -91,6 +91,10 @@ static struct dsc$descriptor_s *defenv[] = { &fildevdsc, &crtlenvdsc, NULL }; static struct dsc$descriptor_s **env_tables = defenv; static bool will_taint = FALSE; /* tainting active, but no PL_curinterp yet */ +/* True if we shouldn't treat barewords as logicals during directory */ +/* munching */ +static int no_translate_barewords; + /*{{{int vmstrnenv(const char *lnm, char *eqv, unsigned long int idx, struct dsc$descriptor_s **tabvec, unsigned long int flags) */ int vmstrnenv(const char *lnm, char *eqv, unsigned long int idx, @@ -1721,7 +1725,8 @@ static char *do_pathify_dirspec(char *dir,char *buf, int ts) if (*dir) strcpy(trndir,dir); else getcwd(trndir,sizeof trndir - 1); - while (!strpbrk(trndir,"/]:>") && my_trnlnm(trndir,trndir,0)) { + while (!strpbrk(trndir,"/]:>") && !no_translate_barewords + && my_trnlnm(trndir,trndir,0)) { STRLEN trnlen = strlen(trndir); /* Trap simple rooted lnms, and return lnm:[000000] */ @@ -5030,6 +5035,12 @@ init_os_extras() { char* file = __FILE__; dTHX; + char temp_buff[512]; + if (my_trnlnm("DECC$DISABLE_TO_VMS_LOGNAME_TRANSLATION", temp_buff, 0)) { + no_translate_barewords = TRUE; + } else { + no_translate_barewords = FALSE; + } newXSproto("VMS::Filespec::rmsexpand",rmsexpand_fromperl,file,"$;$"); newXSproto("VMS::Filespec::vmsify",vmsify_fromperl,file,"$");