From: Charles Bailey Date: Thu, 18 Mar 1999 00:10:44 +0000 (-0400) Subject: applied suggested patch, modulo superseded parts X-Git-Tag: accepted/trunk/20130322.191538~36571 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=562a7b0c67b6218259506760bd4728f2f0c6093b;p=platform%2Fupstream%2Fperl.git applied suggested patch, modulo superseded parts Message-id: <01J8YFGIHW2W001E7S@mail.newman.upenn.edu> Subject: [PATCH 5.005_56] Miscellaneous VMS-specific fixes p4raw-id: //depot/perl@3153 --- diff --git a/lib/ExtUtils/Liblist.pm b/lib/ExtUtils/Liblist.pm index dae3125..13e4e29 100644 --- a/lib/ExtUtils/Liblist.pm +++ b/lib/ExtUtils/Liblist.pm @@ -362,7 +362,7 @@ sub _vms_ext { return ('', '', $crtlstr, ''); } - my(@dirs,@libs,$dir,$lib,%sh,%olb,%obj,$ldlib); + my(@dirs,@libs,$dir,$lib,%found,@fndlibs,$ldlib); my $cwd = cwd(); my($so,$lib_ext,$obj_ext) = @Config{'so','lib_ext','obj_ext'}; # List of common Unix library names and there VMS equivalents @@ -430,28 +430,28 @@ sub _vms_ext { warn "\tChecking $name\n" if $verbose > 2; if (-f ($test = VMS::Filespec::rmsexpand($name))) { # It's got its own suffix, so we'll have to figure out the type - if ($test =~ /(?:$so|exe)$/i) { $type = 'sh'; } - elsif ($test =~ /(?:$lib_ext|olb)$/i) { $type = 'olb'; } + if ($test =~ /(?:$so|exe)$/i) { $type = 'SHR'; } + elsif ($test =~ /(?:$lib_ext|olb)$/i) { $type = 'OLB'; } elsif ($test =~ /(?:$obj_ext|obj)$/i) { warn "Note (probably harmless): " ."Plain object file $test found in library list\n"; - $type = 'obj'; + $type = 'OBJ'; } else { warn "Note (probably harmless): " ."Unknown library type for $test; assuming shared\n"; - $type = 'sh'; + $type = 'SHR'; } } elsif (-f ($test = VMS::Filespec::rmsexpand($name,$so)) or -f ($test = VMS::Filespec::rmsexpand($name,'.exe'))) { - $type = 'sh'; + $type = 'SHR'; $name = $test unless $test =~ /exe;?\d*$/i; } elsif (not length($ctype) and # If we've got a lib already, don't bother ( -f ($test = VMS::Filespec::rmsexpand($name,$lib_ext)) or -f ($test = VMS::Filespec::rmsexpand($name,'.olb')))) { - $type = 'olb'; + $type = 'OLB'; $name = $test unless $test =~ /olb;?\d*$/i; } elsif (not length($ctype) and # If we've got a lib already, don't bother @@ -459,17 +459,18 @@ sub _vms_ext { -f ($test = VMS::Filespec::rmsexpand($name,'.obj')))) { warn "Note (probably harmless): " ."Plain object file $test found in library list\n"; - $type = 'obj'; + $type = 'OBJ'; $name = $test unless $test =~ /obj;?\d*$/i; } if (defined $type) { $ctype = $type; $cand = $name; - last if $ctype eq 'sh'; + last if $ctype eq 'SHR'; } } if ($ctype) { - eval '$' . $ctype . "{'$cand'}++"; - die "Error recording library: $@" if $@; + # This has to precede any other CRTLs, so just make it first + if ($cand eq 'VAXCCURSE') { unshift @{$found{$ctype}}, $cand; } + else { push @{$found{$ctype}}, $cand; } warn "\tFound as $cand (really $test), type $ctype\n" if $verbose > 1; next LIB; } @@ -478,15 +479,10 @@ sub _vms_ext { ."No library found for $lib\n"; } - @libs = sort keys %obj; - # This has to precede any other CRTLs, so just make it first - if ($olb{VAXCCURSE}) { - push(@libs,"$olb{VAXCCURSE}/Library"); - delete $olb{VAXCCURSE}; - } - push(@libs, map { "$_/Library" } sort keys %olb); - push(@libs, map { "$_/Share" } sort keys %sh); - $lib = join(' ',@libs); + push @fndlibs, @{$found{OBJ}} if exists $found{OBJ}; + push @fndlibs, map { "$_/Library" } @{$found{OLB}} if exists $found{OLB}; + push @fndlibs, map { "$_/Share" } @{$found{SHR}} if exists $found{SHR}; + $lib = join(' ',@fndlibs); $ldlib = $crtlstr ? "$lib $crtlstr" : $lib; warn "Result:\n\tEXTRALIBS: $lib\n\tLDLOADLIBS: $ldlib\n" if $verbose; diff --git a/lib/ExtUtils/MM_VMS.pm b/lib/ExtUtils/MM_VMS.pm index 8f8ac17..3b83528 100644 --- a/lib/ExtUtils/MM_VMS.pm +++ b/lib/ExtUtils/MM_VMS.pm @@ -1465,8 +1465,8 @@ $(INST_STATIC) : $(OBJECT) $(MYEXTLIB) push(@m,"\t",'Library/Object/Replace $(MMS$TARGET) $(MMS$SOURCE_LIST)',"\n"); } - foreach $lib (split $self->{EXTRALIBS}) { - $lib = '""' if $lib eq '"'; + push @m, "\t\$(NOECHO) \$(PERL) -e 1 >\$(INST_ARCHAUTODIR)extralibs.ld\n"; + foreach $lib (split ' ', $self->{EXTRALIBS}) { push(@m,"\t",'$(NOECHO) $(PERL) -e "print qq{',$lib,'\n}" >>$(INST_ARCHAUTODIR)extralibs.ld',"\n"); } push @m, $self->dir_target('$(INST_ARCHAUTODIR)'); @@ -2312,7 +2312,7 @@ $(MAP_TARGET) :: $(MAKE_APERL_FILE) $tmp = $self->fixpath($tmp,1); if (@optlibs) { $extralist = join(' ',@optlibs); } else { $extralist = ''; } - # Let ExtUtils::Liblist find the necessary for us (but skip PerlShr; + # Let ExtUtils::Liblist find the necessary libs for us (but skip PerlShr) # that's what we're building here). push @optlibs, grep { !/PerlShr/i } split +($self->ext())[2]; if ($libperl) { diff --git a/t/comp/require.t b/t/comp/require.t index fc72c07..581dcba 100755 --- a/t/comp/require.t +++ b/t/comp/require.t @@ -45,7 +45,7 @@ do_require "1"; print "# $@\nnot " if $@; print "ok ",$i++,"\n"; -END { unlink 'bleah.pm'; } +END { 1 while unlink 'bleah.pm'; } # ***interaction with pod (don't put any thing after here)*** diff --git a/t/op/lex_assign.t b/t/op/lex_assign.t index cf16a46..b2acd65 100755 --- a/t/op/lex_assign.t +++ b/t/op/lex_assign.t @@ -7,11 +7,12 @@ BEGIN { umask 0; $xref = \ ""; +$runme = ($^O eq 'VMS' ? 'MCR ' : '') . $^X; @a = (1..5); %h = (1..6); $aref = \@a; $href = \%h; -open OP, qq{$^X -le "print 'aaa Ok ok' for 1..100"|}; +open OP, qq{$runme -le "print 'aaa Ok ok' for 1..100"|}; $chopit = 'aaaaaa'; @chopar = (113 .. 119); $posstr = '123456'; @@ -62,7 +63,7 @@ EOE __END__ ref $xref # ref ref $cstr # ref nonref -`ls` # backtick skip(MSWin32) +`$runme -e "print qq[1\n]"` # backtick skip(MSWin32) `$undefed` # backtick undef skip(MSWin32) <*> # glob # readline @@ -187,7 +188,7 @@ readlink 'non-existent', 'non-existent1' # readlink '???' # fork '???' # wait '???' # waitpid -system "$^X -e 0" # system +system "$runme -e 0" # system skip(VMS) '???' # exec '???' # kill getppid # getppid diff --git a/t/op/taint.t b/t/op/taint.t index e25d4e0..d75bc18 100755 --- a/t/op/taint.t +++ b/t/op/taint.t @@ -35,7 +35,7 @@ if ($Is_VMS) { END { \$ENV{PATH} = ''; warn "# Note: logical name 'PATH' may have been deleted\n"; - @ENV{keys %old} = values %old; + \@ENV{keys %old} = values %old; } EndOfCleanup } diff --git a/utils/perldoc.PL b/utils/perldoc.PL index 6d175f1..ed533f5 100644 --- a/utils/perldoc.PL +++ b/utils/perldoc.PL @@ -326,7 +326,7 @@ foreach (@pages) { unless ($opt_m) { if ($Is_VMS) { my($i,$trn); - for ($i = 0; $trn = $ENV{'DCL$PATH'.$i}; $i++) { + for ($i = 0; $trn = $ENV{'DCL$PATH;'.$i}; $i++) { push(@searchdirs,$trn); } push(@searchdirs,'perl_root:[lib.pod]') # installed pods diff --git a/vms/ext/Stdio/Stdio.pm b/vms/ext/Stdio/Stdio.pm index 04b3397..d485e0e 100644 --- a/vms/ext/Stdio/Stdio.pm +++ b/vms/ext/Stdio/Stdio.pm @@ -1,8 +1,8 @@ # VMS::Stdio - VMS extensions to Perl's stdio calls # # Author: Charles Bailey bailey@genetics.upenn.edu -# Version: 2.1 -# Revised: 24-Mar-1998 +# Version: 2.2 +# Revised: 19-Jul-1998 # Docs revised: 13-Oct-1998 Dan Sugalski package VMS::Stdio; @@ -13,17 +13,17 @@ use Carp '&croak'; use DynaLoader (); use Exporter (); -$VERSION = '2.1'; +$VERSION = '2.2'; @ISA = qw( Exporter DynaLoader IO::File ); @EXPORT = qw( &O_APPEND &O_CREAT &O_EXCL &O_NDELAY &O_NOWAIT &O_RDONLY &O_RDWR &O_TRUNC &O_WRONLY ); -@EXPORT_OK = qw( &flush &getname &remove &rewind &sync &setdef &tmpnam +@EXPORT_OK = qw( &binmode &flush &getname &remove &rewind &sync &setdef &tmpnam &vmsopen &vmssysopen &waitfh &writeof ); %EXPORT_TAGS = ( CONSTANTS => [ qw( &O_APPEND &O_CREAT &O_EXCL &O_NDELAY &O_NOWAIT &O_RDONLY &O_RDWR &O_TRUNC &O_WRONLY ) ], - FUNCTIONS => [ qw( &flush &getname &remove &rewind &setdef - &sync &tmpnam &vmsopen &vmssysopen + FUNCTIONS => [ qw( &binmode &flush &getname &remove &rewind + &setdef &sync &tmpnam &vmsopen &vmssysopen &waitfh &writeof ) ] ); bootstrap VMS::Stdio $VERSION; @@ -100,6 +100,7 @@ VMS::Stdio - standard I/O functions via VMS extensions close($fh); remove("another.file"); writeof($pipefh); + binmode($fh); =head1 DESCRIPTION @@ -147,6 +148,22 @@ update your code to use the new routines. =over +=item binmode + +This function causes the file handle to be reopened with the CRTL's +carriage control processing disabled; its effect is the same as that +of the C access mode in C. After the file is reopened, +the file pointer is positioned as close to its position before the +call as possible (I as close as fsetpos() can get it -- for +some record-structured files, it's not possible to return to the +exact byte offset in the file). Because the file must be reopened, +this function cannot be used on temporary-delete files. C +returns true if successful, and C if not. + +Note that the effect of C differs from that of the binmode() +function on operating systems such as Windows and MSDOS, and is not +needed to process most types of file. + =item flush This function causes the contents of stdio buffers for the specified diff --git a/vms/ext/Stdio/Stdio.xs b/vms/ext/Stdio/Stdio.xs index 53b4915..22d9a72 100644 --- a/vms/ext/Stdio/Stdio.xs +++ b/vms/ext/Stdio/Stdio.xs @@ -1,8 +1,8 @@ /* VMS::Stdio - VMS extensions to stdio routines * - * Version: 2.1 - * Author: Charles Bailey bailey@genetics.upenn.edu - * Revised: 24-Mar-1998 + * Version: 2.2 + * Author: Charles Bailey bailey@newman.upenn.edu + * Revised: 18-Jul-1998 * */ @@ -125,6 +125,57 @@ constant(name) ST(0) = &PL_sv_undef; void +binmode(fh) + SV * fh + PROTOTYPE: $ + CODE: + IO *io = sv_2io(fh); + FILE *fp = io ? IoOFP(io) : NULL; + char iotype = io ? IoTYPE(io) : '\0'; + char filespec[NAM$C_MAXRSS], *acmode, *s, *colon, *dirend = Nullch; + int ret = 0, saverrno = errno, savevmserrno = vaxc$errno; + fpos_t pos; + if (fp == NULL || strchr(">was+-|",iotype) == Nullch) { + set_errno(EBADF); set_vaxc_errno(SS$_IVCHAN); XSRETURN_UNDEF; + } + if (!fgetname(fp,filespec)) XSRETURN_UNDEF; + for (s = filespec; *s; s++) { + if (*s == ':') colon = s; + else if (*s == ']' || *s == '>') dirend = s; + } + /* Looks like a tmpfile, which will go away if reopened */ + if (s == dirend + 3) { + set_errno(EBADF); set_vaxc_errno(RMS$_IOP); XSRETURN_UNDEF; + } + /* If we've got a non-file-structured device, clip off the trailing + * junk, and don't lose sleep if we can't get a stream position. */ + if (dirend == Nullch) *(colon+1) = '\0'; + if (iotype != '-' && (ret = fgetpos(fp, &pos)) == -1 && dirend) + XSRETURN_UNDEF; + switch (iotype) { + case '<': case 'r': acmode = "rb"; break; + case '>': case 'w': case '|': + /* use 'a' instead of 'w' to avoid creating new file; + fsetpos below will take care of restoring file position */ + case 'a': acmode = "ab"; break; + case '+': case 's': acmode = "rb+"; break; + case '-': acmode = fileno(fp) ? "ab" : "rb"; break; + /* iotype'll be null for the SYS$INPUT:/SYS$OUTPUT:/SYS$ERROR: files */ + /* since we didn't really open them and can't really */ + /* reopen them */ + case 0: XSRETURN_UNDEF; + default: + if (PL_dowarn) warn("Unrecognized iotype %c for %s in binmode", + iotype, filespec); + acmode = "rb+"; + } + if (freopen(filespec,acmode,fp) == NULL) XSRETURN_UNDEF; + if (iotype != '-' && ret != -1 && fsetpos(fp,&pos) == -1) XSRETURN_UNDEF; + if (ret == -1) { set_errno(saverrno); set_vaxc_errno(savevmserrno); } + XSRETURN_YES; + + +void flush(fp) FILE * fp PROTOTYPE: $ @@ -365,8 +416,7 @@ writeof(mysv) IO *io = sv_2io(mysv); FILE *fp = io ? IoOFP(io) : NULL; if (fp == NULL || strchr(">was+-|",IoTYPE(io)) == Nullch) { - set_errno(EBADF); set_vaxc_errno(SS$_IVCHAN); - ST(0) = &PL_sv_undef; XSRETURN(1); + set_errno(EBADF); set_vaxc_errno(SS$_IVCHAN); XSRETURN_UNDEF; } if (fgetname(fp,devnam) == Nullch) { ST(0) = &PL_sv_undef; XSRETURN(1); } if ((cp = strrchr(devnam,':')) != NULL) *(cp+1) = '\0'; diff --git a/vms/ext/Stdio/test.pl b/vms/ext/Stdio/test.pl index 37131de..2f73573 100755 --- a/vms/ext/Stdio/test.pl +++ b/vms/ext/Stdio/test.pl @@ -1,4 +1,4 @@ -# Tests for VMS::Stdio v2.1 +# Tests for VMS::Stdio v2.2 use VMS::Stdio; import VMS::Stdio qw(&flush &getname &rewind &sync &tmpnam); diff --git a/vms/test.com b/vms/test.com index 207aad9..15c0e8a 100644 --- a/vms/test.com +++ b/vms/test.com @@ -102,7 +102,8 @@ use Config; @compexcl=('cpp.t'); @ioexcl=('argv.t','dup.t','fs.t','pipe.t'); @libexcl=('db-btree.t','db-hash.t','db-recno.t', - 'gdbm.t','io_dup.t', 'io_pipe.t', 'io_sel.t', 'io_sock.t', + 'gdbm.t','io_dup.t', 'io_pipe.t', 'io_poll.t', 'io_sel.t', + 'io_sock.t', 'io_unix.t', 'ndbm.t','odbm.t','open2.t','open3.t', 'ph.t', 'posix.t'); # Note: POSIX is not part of basic build, but can be built diff --git a/vms/vmsish.h b/vms/vmsish.h index 7fce3af..4b45cf4 100644 --- a/vms/vmsish.h +++ b/vms/vmsish.h @@ -2,8 +2,8 @@ * * VMS-specific C header file for perl5. * - * Last revised: 18-Feb-1997 by Charles Bailey bailey@genetics.upenn.edu - * Version: 5.3.28 + * Last revised: 16-Sep-1998 by Charles Bailey bailey@newman.upenn.edu + * Version: 5.5.2 */ #ifndef __vmsish_h_included @@ -64,13 +64,17 @@ # define DONT_MASK_RTL_CALLS #endif - /* defined for vms.c so we can see CRTL | defined for a2p */ +/* Note that we do, in fact, have this */ +#define HAS_GETENV_SV + #ifndef DONT_MASK_RTL_CALLS # ifdef getenv # undef getenv # endif -# define getenv(v) my_getenv(v) /* getenv used for regular logical names */ + /* getenv used for regular logical names */ +# define getenv(v) my_getenv(v,TRUE) #endif +#define getenv_sv(v) my_getenv_sv(v,TRUE) /* DECC introduces this routine in the RTL as of VMS 7.0; for now, * we'll use ours, since it gives us the full VMS exit status. */ @@ -83,66 +87,68 @@ #define DONT_DECLARE_STD 1 /* Our own contribution to PerlShr's global symbols . . . */ -# define my_trnlnm Perl_my_trnlnm -# define my_getenv Perl_my_getenv -# define prime_env_iter Perl_prime_env_iter -# define my_setenv Perl_my_setenv -# define my_crypt Perl_my_crypt -# define my_waitpid Perl_my_waitpid -# define my_gconvert Perl_my_gconvert -# define do_rmdir Perl_do_rmdir -# define kill_file Perl_kill_file -# define my_mkdir Perl_my_mkdir -# define my_utime Perl_my_utime -# define rmsexpand Perl_rmsexpand -# define rmsexpand_ts Perl_rmsexpand_ts -# define fileify_dirspec Perl_fileify_dirspec -# define fileify_dirspec_ts Perl_fileify_dirspec_ts -# define pathify_dirspec Perl_pathify_dirspec -# define pathify_dirspec_ts Perl_pathify_dirspec_ts -# define tounixspec Perl_tounixspec -# define tounixspec_ts Perl_tounixspec_ts -# define tovmsspec Perl_tovmsspec -# define tovmsspec_ts Perl_tovmsspec_ts -# define tounixpath Perl_tounixpath -# define tounixpath_ts Perl_tounixpath_ts -# define tovmspath Perl_tovmspath -# define tovmspath_ts Perl_tovmspath_ts -# define vms_image_init Perl_vms_image_init -# define opendir Perl_opendir -# define readdir Perl_readdir -# define telldir Perl_telldir -# define seekdir Perl_seekdir -# define closedir Perl_closedir -# define vmsreaddirversions Perl_vmsreaddirversions -# define my_gmtime Perl_my_gmtime -# define my_localtime Perl_my_localtime -# define my_time Perl_my_time -# define my_sigemptyset Perl_my_sigemptyset -# define my_sigfillset Perl_my_sigfillset -# define my_sigaddset Perl_my_sigaddset -# define my_sigdelset Perl_my_sigdelset -# define my_sigismember Perl_my_sigismember -# define my_sigprocmask Perl_my_sigprocmask -# define cando_by_name Perl_cando_by_name -# define flex_fstat Perl_flex_fstat -# define flex_stat Perl_flex_stat -# define trim_unixpath Perl_trim_unixpath -# define my_vfork Perl_my_vfork -# define vms_do_aexec Perl_vms_do_aexec -# define vms_do_exec Perl_vms_do_exec -# define do_aspawn Perl_do_aspawn -# define do_spawn Perl_do_spawn -# define my_fwrite Perl_my_fwrite -# define my_flush Perl_my_flush -# define my_binmode Perl_my_binmode -# define my_getpwnam Perl_my_getpwnam -# define my_getpwuid Perl_my_getpwuid -# define my_getpwent Perl_my_getpwent -# define my_endpwent Perl_my_endpwent -# define my_getlogin Perl_my_getlogin -# define rmscopy Perl_rmscopy -# define init_os_extras Perl_init_os_extras +#define vmstrnenv Perl_vmstrnenv +#define my_trnlnm Perl_my_trnlnm +#define my_getenv Perl_my_getenv +#define my_getenv_sv Perl_my_getenv_sv +#define prime_env_iter Perl_prime_env_iter +#define vmssetenv Perl_vmssetenv +#define my_setenv Perl_my_setenv +#define my_crypt Perl_my_crypt +#define my_waitpid Perl_my_waitpid +#define my_gconvert Perl_my_gconvert +#define do_rmdir Perl_do_rmdir +#define kill_file Perl_kill_file +#define my_mkdir Perl_my_mkdir +#define my_utime Perl_my_utime +#define rmsexpand Perl_rmsexpand +#define rmsexpand_ts Perl_rmsexpand_ts +#define fileify_dirspec Perl_fileify_dirspec +#define fileify_dirspec_ts Perl_fileify_dirspec_ts +#define pathify_dirspec Perl_pathify_dirspec +#define pathify_dirspec_ts Perl_pathify_dirspec_ts +#define tounixspec Perl_tounixspec +#define tounixspec_ts Perl_tounixspec_ts +#define tovmsspec Perl_tovmsspec +#define tovmsspec_ts Perl_tovmsspec_ts +#define tounixpath Perl_tounixpath +#define tounixpath_ts Perl_tounixpath_ts +#define tovmspath Perl_tovmspath +#define tovmspath_ts Perl_tovmspath_ts +#define vms_image_init Perl_vms_image_init +#define opendir Perl_opendir +#define readdir Perl_readdir +#define telldir Perl_telldir +#define seekdir Perl_seekdir +#define closedir Perl_closedir +#define vmsreaddirversions Perl_vmsreaddirversions +#define my_gmtime Perl_my_gmtime +#define my_localtime Perl_my_localtime +#define my_time Perl_my_time +#define my_sigemptyset Perl_my_sigemptyset +#define my_sigfillset Perl_my_sigfillset +#define my_sigaddset Perl_my_sigaddset +#define my_sigdelset Perl_my_sigdelset +#define my_sigismember Perl_my_sigismember +#define my_sigprocmask Perl_my_sigprocmask +#define cando_by_name Perl_cando_by_name +#define flex_fstat Perl_flex_fstat +#define flex_stat Perl_flex_stat +#define trim_unixpath Perl_trim_unixpath +#define my_vfork Perl_my_vfork +#define vms_do_aexec Perl_vms_do_aexec +#define vms_do_exec Perl_vms_do_exec +#define do_aspawn Perl_do_aspawn +#define do_spawn Perl_do_spawn +#define my_fwrite Perl_my_fwrite +#define my_flush Perl_my_flush +#define my_getpwnam Perl_my_getpwnam +#define my_getpwuid Perl_my_getpwuid +#define my_getpwent Perl_my_getpwent +#define my_endpwent Perl_my_endpwent +#define my_getlogin Perl_my_getlogin +#define rmscopy Perl_rmscopy +#define init_os_extras Perl_init_os_extras /* Delete if at all possible, changing protections if necessary. */ #define unlink kill_file @@ -208,6 +214,9 @@ #define VMSISH_EXIT TEST_VMSISH(HINT_M_VMSISH_EXIT) #define VMSISH_TIME TEST_VMSISH(HINT_M_VMSISH_TIME) +/* Flags for vmstrnenv() */ +#define PERL__TRNENV_SECURE 0x01 + /* Handy way to vet calls to VMS system services and RTL routines. */ #define _ckvmssts(call) STMT_START { register unsigned long int __ckvms_sts; \ if (!((__ckvms_sts=(call))&1)) { \ @@ -277,7 +286,7 @@ * that a file is in "binary" mode -- that is, that no translation * of bytes occurs on read or write operations. */ -#define USEMYBINMODE +#undef USEMYBINMODE /* Stat_t: * This symbol holds the type used to declare buffers for information @@ -403,7 +412,8 @@ struct utimbuf { #define DYNAMIC_ENV_FETCH 1 #define ENV_HV_NAME "%EnV%VmS%" /* Special getenv function for retrieving %ENV elements. */ -#define ENV_getenv(v) my_getenv(v) +#define ENVgetenv(v) my_getenv(v,FALSE) +#define ENVgetenv_sv(v) my_getenv_sv(v,FALSE) /* Thin jacket around cuserid() tomatch Unix' calling sequence */ @@ -568,8 +578,11 @@ void prime_env_iter _((void)); void init_os_extras _(()); /* prototype section start marker; `typedef' passes through cpp */ typedef char __VMS_PROTOTYPES__; -int my_trnlnm _((char *, char *, unsigned long int)); -char * my_getenv _((const char *)); +int vmstrnenv _((const char *, char *, unsigned long int, struct dsc$descriptor_s **, unsigned long int)); +int my_trnlnm _((const char *, char *, unsigned long int)); +char * my_getenv _((const char *, bool)); +SV * my_getenv_sv _((const char *, bool)); +int vmssetenv _((char *, char *, struct dsc$descriptor_s **)); char * my_crypt _((const char *, const char *)); Pid_t my_waitpid _((Pid_t, int *, int)); char * my_gconvert _((double, int, int, char *)); @@ -620,7 +633,6 @@ unsigned long int do_aspawn _((void *, void **, void **)); unsigned long int do_spawn _((char *)); int my_fwrite _((void *, size_t, size_t, FILE *)); int my_flush _((FILE *)); -FILE * my_binmode _((FILE *, char)); struct passwd * my_getpwnam _((char *name)); struct passwd * my_getpwuid _((Uid_t uid)); struct passwd * my_getpwent _(());