diff options
author | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2016-01-17 15:52:30 +0000 |
---|---|---|
committer | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2016-01-25 15:13:24 +0000 |
commit | d50541e1f2ca48a36decdc63a6f00b99befb153f (patch) | |
tree | 2ba34a979d1a0d97e850d9210272c44543f6b852 | |
parent | 7295ec19dc787d8f3490a4425e77653a56de2136 (diff) | |
download | perl-d50541e1f2ca48a36decdc63a6f00b99befb153f.tar.gz |
[perl #121351] Remove non-doio.c uses of PL_statbuf
These are the last remaining uses outside the interwoven mess in
S_openn_cleanup, openn_setup, and their callers in doio.c.
-rw-r--r-- | ext/ODBM_File/ODBM_File.pm | 2 | ||||
-rw-r--r-- | ext/ODBM_File/ODBM_File.xs | 3 | ||||
-rw-r--r-- | os2/os2.c | 5 |
3 files changed, 6 insertions, 4 deletions
diff --git a/ext/ODBM_File/ODBM_File.pm b/ext/ODBM_File/ODBM_File.pm index 958232cb7f..dd92fd357f 100644 --- a/ext/ODBM_File/ODBM_File.pm +++ b/ext/ODBM_File/ODBM_File.pm @@ -7,7 +7,7 @@ require Tie::Hash; require XSLoader; our @ISA = qw(Tie::Hash); -our $VERSION = "1.12"; +our $VERSION = "1.13"; XSLoader::load(); diff --git a/ext/ODBM_File/ODBM_File.xs b/ext/ODBM_File/ODBM_File.xs index d1ece7ff9b..57beaf9a93 100644 --- a/ext/ODBM_File/ODBM_File.xs +++ b/ext/ODBM_File/ODBM_File.xs @@ -92,6 +92,7 @@ odbm_TIEHASH(dbtype, filename, flags, mode) { char *tmpbuf; void * dbp ; + Stat_t statbuf; dMY_CXT; if (dbmrefcnt++) @@ -99,7 +100,7 @@ odbm_TIEHASH(dbtype, filename, flags, mode) Newx(tmpbuf, strlen(filename) + 5, char); SAVEFREEPV(tmpbuf); sprintf(tmpbuf,"%s.dir",filename); - if (stat(tmpbuf, &PL_statbuf) < 0) { + if (stat(tmpbuf, &statbuf) < 0) { if (flags & O_CREAT) { if (mode < 0 || close(creat(tmpbuf,mode)) < 0) croak("ODBM_File: Can't create %s", filename); @@ -1140,6 +1140,7 @@ do_spawn_ve(pTHX_ SV *really, U32 flag, U32 execf, char *inicmd, U32 addflag) if (!buf) buf = ""; /* XXX Needed? */ if (!buf[0]) { /* Empty... */ + struct stat statbuf; PerlIO_close(file); /* Special case: maybe from -Zexe build, so there is an executable around (contrary to @@ -1148,8 +1149,8 @@ do_spawn_ve(pTHX_ SV *really, U32 flag, U32 execf, char *inicmd, U32 addflag) reached this place). */ sv_catpv(scrsv, ".exe"); PL_Argv[0] = scr = SvPV(scrsv, n_a); /* Reload */ - if (PerlLIO_stat(scr,&PL_statbuf) >= 0 - && !S_ISDIR(PL_statbuf.st_mode)) { /* Found */ + if (PerlLIO_stat(scr,&statbuf) >= 0 + && !S_ISDIR(statbuf.st_mode)) { /* Found */ real_name = scr; pass++; goto reread; |