This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hek_dup can now store the HEK rather than the HE, as there is now a
[perl5.git]
/
pp_sys.c
diff --git
a/pp_sys.c
b/pp_sys.c
index
542eca2
..
4e2b412
100644
(file)
--- a/
pp_sys.c
+++ b/
pp_sys.c
@@
-309,6
+309,8
@@
S_emulate_eaccess(pTHX_ const char* path, Mode_t mode)
STATIC int
S_emulate_eaccess(pTHX_ const char* path, Mode_t mode)
{
STATIC int
S_emulate_eaccess(pTHX_ const char* path, Mode_t mode)
{
+ (void)path;
+ (void)mode;
Perl_croak(aTHX_ "switching effective uid is not implemented");
/*NOTREACHED*/
return -1;
Perl_croak(aTHX_ "switching effective uid is not implemented");
/*NOTREACHED*/
return -1;
@@
-319,8
+321,7
@@
PP(pp_backtick)
{
dSP; dTARGET;
PerlIO *fp;
{
dSP; dTARGET;
PerlIO *fp;
- STRLEN n_a;
- char *tmps = POPpx;
+ const char *tmps = POPpconstx;
const I32 gimme = GIMME_V;
const char *mode = "r";
const I32 gimme = GIMME_V;
const char *mode = "r";
@@
-329,11
+330,11
@@
PP(pp_backtick)
mode = "rb";
else if (PL_op->op_private & OPpOPEN_IN_CRLF)
mode = "rt";
mode = "rb";
else if (PL_op->op_private & OPpOPEN_IN_CRLF)
mode = "rt";
- fp = PerlProc_popen(tmps, (char *)mode);
+ fp = PerlProc_popen(
(char*)
tmps, (char *)mode);
if (fp) {
const char *type = NULL;
if (PL_curcop->cop_io) {
if (fp) {
const char *type = NULL;
if (PL_curcop->cop_io) {
- type = SvPV_nolen(PL_curcop->cop_io);
+ type = SvPV_nolen
_const
(PL_curcop->cop_io);
}
if (type && *type)
PerlIO_apply_layers(aTHX_ fp,mode,type);
}
if (type && *type)
PerlIO_apply_layers(aTHX_ fp,mode,type);
@@
-444,14
+445,14
@@
PP(pp_warn)
else {
tmpsv = TOPs;
}
else {
tmpsv = TOPs;
}
- tmps = SvPV(tmpsv, len);
+ tmps = SvPV
_const
(tmpsv, len);
if ((!tmps || !len) && PL_errgv) {
SV *error = ERRSV;
if ((!tmps || !len) && PL_errgv) {
SV *error = ERRSV;
-
(void)
SvUPGRADE(error, SVt_PV);
+ SvUPGRADE(error, SVt_PV);
if (SvPOK(error) && SvCUR(error))
sv_catpv(error, "\t...caught");
tmpsv = error;
if (SvPOK(error) && SvCUR(error))
sv_catpv(error, "\t...caught");
tmpsv = error;
- tmps = SvPV(tmpsv, len);
+ tmps = SvPV
_const
(tmpsv, len);
}
if (!tmps || !len)
tmpsv = sv_2mortal(newSVpvn("Warning: something's wrong", 26));
}
if (!tmps || !len)
tmpsv = sv_2mortal(newSVpvn("Warning: something's wrong", 26));
@@
-474,17
+475,17
@@
PP(pp_die)
dTARGET;
do_join(TARG, &PL_sv_no, MARK, SP);
tmpsv = TARG;
dTARGET;
do_join(TARG, &PL_sv_no, MARK, SP);
tmpsv = TARG;
- tmps = SvPV(tmpsv, len);
+ tmps = SvPV
_const
(tmpsv, len);
multiarg = 1;
SP = MARK + 1;
}
else {
tmpsv = TOPs;
multiarg = 1;
SP = MARK + 1;
}
else {
tmpsv = TOPs;
- tmps = SvROK(tmpsv) ? Nullch : SvPV(tmpsv, len);
+ tmps = SvROK(tmpsv) ? Nullch : SvPV
_const
(tmpsv, len);
}
if (!tmps || !len) {
SV *error = ERRSV;
}
if (!tmps || !len) {
SV *error = ERRSV;
-
(void)
SvUPGRADE(error, SVt_PV);
+ SvUPGRADE(error, SVt_PV);
if (multiarg ? SvROK(error) : SvROK(tmpsv)) {
if (!multiarg)
SvSetSV(error,tmpsv);
if (multiarg ? SvROK(error) : SvROK(tmpsv)) {
if (!multiarg)
SvSetSV(error,tmpsv);
@@
-511,7
+512,7
@@
PP(pp_die)
if (SvPOK(error) && SvCUR(error))
sv_catpv(error, "\t...propagated");
tmpsv = error;
if (SvPOK(error) && SvCUR(error))
sv_catpv(error, "\t...propagated");
tmpsv = error;
- tmps = SvPV(tmpsv, len);
+ tmps = SvPV
_const
(tmpsv, len);
}
}
if (!tmps || !len)
}
}
if (!tmps || !len)
@@
-530,7
+531,7
@@
PP(pp_open)
GV *gv;
SV *sv;
IO *io;
GV *gv;
SV *sv;
IO *io;
- char *tmps;
+ c
onst c
har *tmps;
STRLEN len;
MAGIC *mg;
bool ok;
STRLEN len;
MAGIC *mg;
bool ok;
@@
-561,8
+562,8
@@
PP(pp_open)
sv = GvSV(gv);
}
sv = GvSV(gv);
}
- tmps = SvPV(sv, len);
- ok = do_openn(gv, tmps, len, FALSE, O_RDONLY, 0, Nullfp, MARK+1, (SP-MARK));
+ tmps = SvPV
_const
(sv, len);
+ ok = do_openn(gv,
(char *)
tmps, len, FALSE, O_RDONLY, 0, Nullfp, MARK+1, (SP-MARK));
SP = ORIGMARK;
if (ok)
PUSHi( (I32)PL_forkprocess );
SP = ORIGMARK;
if (ok)
PUSHi( (I32)PL_forkprocess );
@@
-712,7
+713,7
@@
PP(pp_umask)
TAINT_PROPER("umask");
XPUSHi(anum);
#else
TAINT_PROPER("umask");
XPUSHi(anum);
#else
- /* Only DIE if trying to restrict permissions on
`user'
(self).
+ /* Only DIE if trying to restrict permissions on
"user"
(self).
* Otherwise it's harmless and more useful to just return undef
* since 'group' and 'other' concepts probably don't exist here. */
if (MAXARG >= 1 && (POPi & 0700))
* Otherwise it's harmless and more useful to just return undef
* since 'group' and 'other' concepts probably don't exist here. */
if (MAXARG >= 1 && (POPi & 0700))
@@
-764,11
+765,11
@@
PP(pp_binmode)
PUTBACK;
if (PerlIO_binmode(aTHX_ fp,IoTYPE(io),mode_from_discipline(discp),
PUTBACK;
if (PerlIO_binmode(aTHX_ fp,IoTYPE(io),mode_from_discipline(discp),
- (discp) ? SvPV_nolen(discp) : Nullch)) {
+ (discp) ? SvPV_nolen
_const
(discp) : Nullch)) {
if (IoOFP(io) && IoOFP(io) != IoIFP(io)) {
if (!PerlIO_binmode(aTHX_ IoOFP(io),IoTYPE(io),
mode_from_discipline(discp),
if (IoOFP(io) && IoOFP(io) != IoIFP(io)) {
if (!PerlIO_binmode(aTHX_ IoOFP(io),IoTYPE(io),
mode_from_discipline(discp),
- (discp) ? SvPV_nolen(discp) : Nullch)) {
+ (discp) ? SvPV_nolen
_const
(discp) : Nullch)) {
SPAGAIN;
RETPUSHUNDEF;
}
SPAGAIN;
RETPUSHUNDEF;
}
@@
-789,7
+790,7
@@
PP(pp_tie)
HV* stash;
GV *gv;
SV *sv;
HV* stash;
GV *gv;
SV *sv;
- I32 markoff = MARK - PL_stack_base;
+
const
I32 markoff = MARK - PL_stack_base;
const char *methname;
int how = PERL_MAGIC_tied;
U32 items;
const char *methname;
int how = PERL_MAGIC_tied;
U32 items;
@@
-876,7
+877,7
@@
PP(pp_untie)
dVAR; dSP;
MAGIC *mg;
SV *sv = POPs;
dVAR; dSP;
MAGIC *mg;
SV *sv = POPs;
- char how = (SvTYPE(sv) == SVt_PVHV || SvTYPE(sv) == SVt_PVAV)
+ c
onst c
har how = (SvTYPE(sv) == SVt_PVHV || SvTYPE(sv) == SVt_PVAV)
? PERL_MAGIC_tied : PERL_MAGIC_tiedscalar;
if (SvTYPE(sv) == SVt_PVGV && !(sv = (SV *)GvIOp(sv)))
? PERL_MAGIC_tied : PERL_MAGIC_tiedscalar;
if (SvTYPE(sv) == SVt_PVGV && !(sv = (SV *)GvIOp(sv)))
@@
-915,7
+916,7
@@
PP(pp_tied)
dSP;
MAGIC *mg;
SV *sv = POPs;
dSP;
MAGIC *mg;
SV *sv = POPs;
- char how = (SvTYPE(sv) == SVt_PVHV || SvTYPE(sv) == SVt_PVAV)
+ c
onst c
har how = (SvTYPE(sv) == SVt_PVHV || SvTYPE(sv) == SVt_PVAV)
? PERL_MAGIC_tied : PERL_MAGIC_tiedscalar;
if (SvTYPE(sv) == SVt_PVGV && !(sv = (SV *)GvIOp(sv)))
? PERL_MAGIC_tied : PERL_MAGIC_tiedscalar;
if (SvTYPE(sv) == SVt_PVGV && !(sv = (SV *)GvIOp(sv)))
@@
-1008,7
+1009,6
@@
PP(pp_sselect)
struct timeval *tbuf = &timebuf;
I32 growsize;
char *fd_sets[4];
struct timeval *tbuf = &timebuf;
I32 growsize;
char *fd_sets[4];
- STRLEN n_a;
#if BYTEORDER != 0x1234 && BYTEORDER != 0x12345678
I32 masksize;
I32 offset;
#if BYTEORDER != 0x1234 && BYTEORDER != 0x12345678
I32 masksize;
I32 offset;
@@
-1024,9
+1024,16
@@
PP(pp_sselect)
SP -= 4;
for (i = 1; i <= 3; i++) {
SP -= 4;
for (i = 1; i <= 3; i++) {
- if (!SvPOK(SP[i]))
+ SV *sv = SP[i];
+ if (SvOK(sv) && SvREADONLY(sv)) {
+ if (SvIsCOW(sv))
+ sv_force_normal_flags(sv, 0);
+ if (SvREADONLY(sv))
+ DIE(aTHX_ PL_no_modify);
+ }
+ if (!SvPOK(sv))
continue;
continue;
- j = SvCUR(
SP[i]
);
+ j = SvCUR(
sv
);
if (maxlen < j)
maxlen = j;
}
if (maxlen < j)
maxlen = j;
}
@@
-1080,7
+1087,7
@@
PP(pp_sselect)
continue;
}
else if (!SvPOK(sv))
continue;
}
else if (!SvPOK(sv))
- SvPV_force
(sv,n_a);
/* force string conversion */
+ SvPV_force
_nolen(sv);
/* force string conversion */
j = SvLEN(sv);
if (j < growsize) {
Sv_Grow(sv, growsize);
j = SvLEN(sv);
if (j < growsize) {
Sv_Grow(sv, growsize);
@@
-1164,10
+1171,10
@@
Perl_setdefout(pTHX_ GV *gv)
PP(pp_select)
{
dSP; dTARGET;
PP(pp_select)
{
dSP; dTARGET;
- GV *
newdefout, *
egv;
+ GV *egv;
HV *hv;
HV *hv;
- newdefout = (PL_op->op_private > 0) ? ((GV *) POPs) : (GV *) NULL;
+
GV * const
newdefout = (PL_op->op_private > 0) ? ((GV *) POPs) : (GV *) NULL;
egv = GvEGV(PL_defoutgv);
if (!egv)
egv = GvEGV(PL_defoutgv);
if (!egv)
@@
-1234,7
+1241,7
@@
PP(pp_getc)
*SvPVX(TARG) = PerlIO_getc(IoIFP(GvIOp(gv))); /* should never be EOF */
if (PerlIO_isutf8(IoIFP(GvIOp(gv)))) {
/* Find out how many bytes the char needs */
*SvPVX(TARG) = PerlIO_getc(IoIFP(GvIOp(gv))); /* should never be EOF */
if (PerlIO_isutf8(IoIFP(GvIOp(gv)))) {
/* Find out how many bytes the char needs */
- Size_t len = UTF8SKIP(SvPVX(TARG));
+ Size_t len = UTF8SKIP(SvPVX
_const
(TARG));
if (len > 1) {
SvGROW(TARG,len+1);
len = PerlIO_read(IoIFP(GvIOp(gv)),SvPVX(TARG)+1,len-1);
if (len > 1) {
SvGROW(TARG,len+1);
len = PerlIO_read(IoIFP(GvIOp(gv)),SvPVX(TARG)+1,len-1);
@@
-1297,14
+1304,14
@@
PP(pp_enterwrite)
cv = GvFORM(fgv);
if (!cv) {
cv = GvFORM(fgv);
if (!cv) {
- char *name = NULL;
if (fgv) {
if (fgv) {
- SV *tmpsv = sv_newmortal();
+ SV * const tmpsv = sv_newmortal();
+ const char *name;
gv_efullname4(tmpsv, fgv, Nullch, FALSE);
gv_efullname4(tmpsv, fgv, Nullch, FALSE);
- name = SvPV_nolen(tmpsv);
+ name = SvPV_nolen_const(tmpsv);
+ if (name && *name)
+ DIE(aTHX_ "Undefined format \"%s\" called", name);
}
}
- if (name && *name)
- DIE(aTHX_ "Undefined format \"%s\" called", name);
DIE(aTHX_ "Not a format reference");
}
if (CvCLONE(cv))
DIE(aTHX_ "Not a format reference");
}
if (CvCLONE(cv))
@@
-1369,7
+1376,7
@@
PP(pp_leavewrite)
}
if (s) {
const STRLEN save = SvCUR(PL_formtarget);
}
if (s) {
const STRLEN save = SvCUR(PL_formtarget);
- SvCUR_set(PL_formtarget, s - SvPVX(PL_formtarget));
+ SvCUR_set(PL_formtarget, s - SvPVX
_const
(PL_formtarget));
do_print(PL_formtarget, ofp);
SvCUR_set(PL_formtarget, save);
sv_chop(PL_formtarget, s);
do_print(PL_formtarget, ofp);
SvCUR_set(PL_formtarget, save);
sv_chop(PL_formtarget, s);
@@
-1386,20
+1393,18
@@
PP(pp_leavewrite)
if (!fgv)
DIE(aTHX_ "bad top format reference");
cv = GvFORM(fgv);
if (!fgv)
DIE(aTHX_ "bad top format reference");
cv = GvFORM(fgv);
- {
- char *name = NULL;
- if (!cv) {
- SV *sv = sv_newmortal();
- gv_efullname4(sv, fgv, Nullch, FALSE);
- name = SvPV_nolen(sv);
- }
+ if (!cv) {
+ SV * const sv = sv_newmortal();
+ const char *name;
+ gv_efullname4(sv, fgv, Nullch, FALSE);
+ name = SvPV_nolen_const(sv);
if (name && *name)
if (name && *name)
- DIE(aTHX_ "Undefined top format \"%s\" called",name);
- /* why no:
- else
- DIE(aTHX_ "Undefined top format called");
- ?*/
+ DIE(aTHX_ "Undefined top format \"%s\" called",name);
}
}
+ /* why no:
+ else
+ DIE(aTHX_ "Undefined top format called");
+ ?*/
if (CvCLONE(cv))
cv = (CV*)sv_2mortal((SV*)cv_clone(cv));
return doform(cv,gv,PL_op);
if (CvCLONE(cv))
cv = (CV*)sv_2mortal((SV*)cv_clone(cv));
return doform(cv,gv,PL_op);
@@
-1521,22
+1526,19
@@
PP(pp_sysopen)
dSP;
GV *gv;
SV *sv;
dSP;
GV *gv;
SV *sv;
- char *tmps;
+ c
onst c
har *tmps;
STRLEN len;
STRLEN len;
- int mode, perm;
+ const int perm = (MAXARG > 3) ? POPi : 0666;
+ const int mode = POPi;
- if (MAXARG > 3)
- perm = POPi;
- else
- perm = 0666;
- mode = POPi;
sv = POPs;
gv = (GV *)POPs;
/* Need TIEHANDLE method ? */
sv = POPs;
gv = (GV *)POPs;
/* Need TIEHANDLE method ? */
- tmps = SvPV(sv, len);
- if (do_open(gv, tmps, len, TRUE, mode, perm, Nullfp)) {
+ tmps = SvPV_const(sv, len);
+ /* FIXME? do_open should do const */
+ if (do_open(gv, (char*)tmps, len, TRUE, mode, perm, Nullfp)) {
IoLINES(GvIOp(gv)) = 0;
PUSHs(&PL_sv_yes);
}
IoLINES(GvIOp(gv)) = 0;
PUSHs(&PL_sv_yes);
}
@@
-1702,7
+1704,7
@@
PP(pp_sysread)
SvCUR_set(bufsv, offset);
read_target = sv_newmortal();
SvCUR_set(bufsv, offset);
read_target = sv_newmortal();
-
(void)
SvUPGRADE(read_target, SVt_PV);
+ SvUPGRADE(read_target, SVt_PV);
buffer = SvGROW(read_target, (STRLEN)(length + 1));
}
buffer = SvGROW(read_target, (STRLEN)(length + 1));
}
@@
-1744,12
+1746,12
@@
PP(pp_sysread)
report_evil_fh(gv, io, OP_phoney_OUTPUT_ONLY);
goto say_undef;
}
report_evil_fh(gv, io, OP_phoney_OUTPUT_ONLY);
goto say_undef;
}
- SvCUR_set(read_target, count+(buffer - SvPVX(read_target)));
+ SvCUR_set(read_target, count+(buffer - SvPVX
_const
(read_target)));
*SvEND(read_target) = '\0';
(void)SvPOK_only(read_target);
if (fp_utf8 && !IN_BYTES) {
/* Look at utf8 we got back and count the characters */
*SvEND(read_target) = '\0';
(void)SvPOK_only(read_target);
if (fp_utf8 && !IN_BYTES) {
/* Look at utf8 we got back and count the characters */
- char *bend = buffer + count;
+ c
onst c
har *bend = buffer + count;
while (buffer < bend) {
if (charstart) {
skip = UTF8SKIP(buffer);
while (buffer < bend) {
if (charstart) {
skip = UTF8SKIP(buffer);
@@
-1758,7
+1760,7
@@
PP(pp_sysread)
if (buffer - charskip + skip > bend) {
/* partial character - try for rest of it */
length = skip - (bend-buffer);
if (buffer - charskip + skip > bend) {
/* partial character - try for rest of it */
length = skip - (bend-buffer);
- offset = bend - SvPVX(bufsv);
+ offset = bend - SvPVX
_const
(bufsv);
charstart = FALSE;
charskip += count;
goto more_bytes;
charstart = FALSE;
charskip += count;
goto more_bytes;
@@
-1775,7
+1777,7
@@
PP(pp_sysread)
*/
if (got < wanted && count == length) {
length = wanted - got;
*/
if (got < wanted && count == length) {
length = wanted - got;
- offset = bend - SvPVX(bufsv);
+ offset = bend - SvPVX
_const
(bufsv);
goto more_bytes;
}
/* return value is character count */
goto more_bytes;
}
/* return value is character count */
@@
-1803,7
+1805,7
@@
PP(pp_sysread)
PP(pp_syswrite)
{
dVAR; dSP;
PP(pp_syswrite)
{
dVAR; dSP;
- int items = (SP - PL_stack_base) - TOPMARK;
+
const
int items = (SP - PL_stack_base) - TOPMARK;
if (items == 2) {
SV *sv;
EXTEND(SP, 1);
if (items == 2) {
SV *sv;
EXTEND(SP, 1);
@@
-1820,7
+1822,7
@@
PP(pp_send)
GV *gv;
IO *io;
SV *bufsv;
GV *gv;
IO *io;
SV *bufsv;
- char *buffer;
+ c
onst c
har *buffer;
Size_t length;
SSize_t retval;
STRLEN blen;
Size_t length;
SSize_t retval;
STRLEN blen;
@@
-1869,7
+1871,7
@@
PP(pp_send)
bufsv = sv_2mortal(newSVsv(bufsv));
buffer = sv_2pvutf8(bufsv, &blen);
} else
bufsv = sv_2mortal(newSVsv(bufsv));
buffer = sv_2pvutf8(bufsv, &blen);
} else
- buffer = SvPV(bufsv, blen);
+ buffer = SvPV
_const
(bufsv, blen);
}
else {
if (DO_UTF8(bufsv)) {
}
else {
if (DO_UTF8(bufsv)) {
@@
-1877,7
+1879,7
@@
PP(pp_send)
bufsv = sv_2mortal(newSVsv(bufsv));
sv_utf8_downgrade(bufsv, FALSE);
}
bufsv = sv_2mortal(newSVsv(bufsv));
sv_utf8_downgrade(bufsv, FALSE);
}
- buffer = SvPV(bufsv, blen);
+ buffer = SvPV
_const
(bufsv, blen);
}
if (PL_op->op_type == OP_SYSWRITE) {
}
if (PL_op->op_type == OP_SYSWRITE) {
@@
-1899,7
+1901,7
@@
PP(pp_send)
if (length > blen - offset)
length = blen - offset;
if (DO_UTF8(bufsv)) {
if (length > blen - offset)
length = blen - offset;
if (DO_UTF8(bufsv)) {
- buffer = (c
har*)utf8_hop((
U8 *)buffer, offset);
+ buffer = (c
onst char*)utf8_hop((const
U8 *)buffer, offset);
length = utf8_hop((U8 *)buffer, length) - (U8 *)buffer;
}
else {
length = utf8_hop((U8 *)buffer, length) - (U8 *)buffer;
}
else {
@@
-1920,9
+1922,8
@@
PP(pp_send)
}
#ifdef HAS_SOCKET
else if (SP > MARK) {
}
#ifdef HAS_SOCKET
else if (SP > MARK) {
- char *sockbuf;
STRLEN mlen;
STRLEN mlen;
- sockbuf = SvPVx(*++MARK, mlen);
+
char * const
sockbuf = SvPVx(*++MARK, mlen);
/* length is really flags */
retval = PerlSock_sendto(PerlIO_fileno(IoIFP(io)), buffer, blen,
length, (struct sockaddr *)sockbuf, mlen);
/* length is really flags */
retval = PerlSock_sendto(PerlIO_fileno(IoIFP(io)), buffer, blen,
length, (struct sockaddr *)sockbuf, mlen);
@@
-2046,7
+2047,7
@@
PP(pp_sysseek)
dVAR; dSP;
GV *gv;
IO *io;
dVAR; dSP;
GV *gv;
IO *io;
- int whence = POPi;
+
const
int whence = POPi;
#if LSEEKSIZE > IVSIZE
Off_t offset = (Off_t)SvNVx(POPs);
#else
#if LSEEKSIZE > IVSIZE
Off_t offset = (Off_t)SvNVx(POPs);
#else
@@
-2146,8
+2147,7
@@
PP(pp_truncate)
}
else {
SV *sv = POPs;
}
else {
SV *sv = POPs;
- char *name;
- STRLEN n_a;
+ const char *name;
if (SvTYPE(sv) == SVt_PVGV) {
tmpgv = (GV*)sv; /* *main::FRED for example */
if (SvTYPE(sv) == SVt_PVGV) {
tmpgv = (GV*)sv; /* *main::FRED for example */
@@
-2162,7
+2162,7
@@
PP(pp_truncate)
goto do_ftruncate_io;
}
goto do_ftruncate_io;
}
- name = SvPV
(sv, n_a
);
+ name = SvPV
_nolen_const(sv
);
TAINT_PROPER("truncate");
#ifdef HAS_TRUNCATE
if (truncate(name, len) < 0)
TAINT_PROPER("truncate");
#ifdef HAS_TRUNCATE
if (truncate(name, len) < 0)
@@
-2199,7
+2199,7
@@
PP(pp_ioctl)
{
dSP; dTARGET;
SV *argsv = POPs;
{
dSP; dTARGET;
SV *argsv = POPs;
- unsigned int func = POPu;
+
const
unsigned int func = POPu;
const int optype = PL_op->op_type;
char *s;
IV retval;
const int optype = PL_op->op_type;
char *s;
IV retval;
@@
-2437,7
+2437,8
@@
PP(pp_bind)
extern void GETUSERMODE();
#endif
SV *addrsv = POPs;
extern void GETUSERMODE();
#endif
SV *addrsv = POPs;
- char *addr;
+ /* OK, so on what platform does bind modify addr? */
+ const char *addr;
GV *gv = (GV*)POPs;
register IO *io = GvIOn(gv);
STRLEN len;
GV *gv = (GV*)POPs;
register IO *io = GvIOn(gv);
STRLEN len;
@@
-2449,7
+2450,7
@@
PP(pp_bind)
if (!io || !IoIFP(io))
goto nuts;
if (!io || !IoIFP(io))
goto nuts;
- addr = SvPV(addrsv, len);
+ addr = SvPV
_const
(addrsv, len);
TAINT_PROPER("bind");
#ifdef MPE /* Deal with MPE bind() peculiarities */
if (((struct sockaddr *)addr)->sa_family == AF_INET) {
TAINT_PROPER("bind");
#ifdef MPE /* Deal with MPE bind() peculiarities */
if (((struct sockaddr *)addr)->sa_family == AF_INET) {
@@
-2492,7
+2493,7
@@
PP(pp_connect)
#ifdef HAS_SOCKET
dSP;
SV *addrsv = POPs;
#ifdef HAS_SOCKET
dSP;
SV *addrsv = POPs;
- char *addr;
+ c
onst c
har *addr;
GV *gv = (GV*)POPs;
register IO *io = GvIOn(gv);
STRLEN len;
GV *gv = (GV*)POPs;
register IO *io = GvIOn(gv);
STRLEN len;
@@
-2500,7
+2501,7
@@
PP(pp_connect)
if (!io || !IoIFP(io))
goto nuts;
if (!io || !IoIFP(io))
goto nuts;
- addr = SvPV(addrsv, len);
+ addr = SvPV
_const
(addrsv, len);
TAINT_PROPER("connect");
if (PerlSock_connect(PerlIO_fileno(IoIFP(io)), (struct sockaddr *)addr, len) >= 0)
RETPUSHYES;
TAINT_PROPER("connect");
if (PerlSock_connect(PerlIO_fileno(IoIFP(io)), (struct sockaddr *)addr, len) >= 0)
RETPUSHYES;
@@
-2687,16
+2688,16
@@
PP(pp_ssockopt)
PUSHs(sv);
break;
case OP_SSOCKOPT: {
PUSHs(sv);
break;
case OP_SSOCKOPT: {
- char *buf;
+ c
onst c
har *buf;
int aint;
if (SvPOKp(sv)) {
STRLEN l;
int aint;
if (SvPOKp(sv)) {
STRLEN l;
- buf = SvPV(sv, l);
+ buf = SvPV
_const
(sv, l);
len = l;
}
else {
aint = (int)SvIV(sv);
len = l;
}
else {
aint = (int)SvIV(sv);
- buf = (char*)&aint;
+ buf = (c
onst c
har*)&aint;
len = sizeof(int);
}
if (PerlSock_setsockopt(fd, lvl, optname, buf, len) < 0)
len = sizeof(int);
}
if (PerlSock_setsockopt(fd, lvl, optname, buf, len) < 0)
@@
-2760,8
+2761,8
@@
PP(pp_getpeername)
{
static const char nowhere[] = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
/* If the call succeeded, make sure we don't have a zeroed port/addr */
{
static const char nowhere[] = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
/* If the call succeeded, make sure we don't have a zeroed port/addr */
- if (((struct sockaddr *)SvPVX(sv))->sa_family == AF_INET &&
- !memcmp((char *)SvPVX(sv) + sizeof(u_short), nowhere,
+ if (((struct sockaddr *)SvPVX
_const
(sv))->sa_family == AF_INET &&
+ !memcmp((char *)SvPVX
_const
(sv) + sizeof(u_short), nowhere,
sizeof(u_short) + sizeof(struct in_addr))) {
goto nuts2;
}
sizeof(u_short) + sizeof(struct in_addr))) {
goto nuts2;
}
@@
-2805,7
+2806,6
@@
PP(pp_stat)
GV *gv;
I32 gimme;
I32 max = 13;
GV *gv;
I32 gimme;
I32 max = 13;
- STRLEN n_a;
if (PL_op->op_flags & OPf_REF) {
gv = cGVOP_gv;
if (PL_op->op_flags & OPf_REF) {
gv = cGVOP_gv;
@@
-2845,15
+2845,15
@@
PP(pp_stat)
"lstat() on filehandle %s", GvENAME(gv));
goto do_fstat;
}
"lstat() on filehandle %s", GvENAME(gv));
goto do_fstat;
}
- sv_setpv(PL_statname, SvPV
(sv,n_a
));
+ sv_setpv(PL_statname, SvPV
_nolen_const(sv
));
PL_statgv = Nullgv;
PL_laststype = PL_op->op_type;
if (PL_op->op_type == OP_LSTAT)
PL_statgv = Nullgv;
PL_laststype = PL_op->op_type;
if (PL_op->op_type == OP_LSTAT)
- PL_laststatval = PerlLIO_lstat(SvPV
(PL_statname, n_a
), &PL_statcache);
+ PL_laststatval = PerlLIO_lstat(SvPV
_nolen_const(PL_statname
), &PL_statcache);
else
else
- PL_laststatval = PerlLIO_stat(SvPV
(PL_statname, n_a
), &PL_statcache);
+ PL_laststatval = PerlLIO_stat(SvPV
_nolen_const(PL_statname
), &PL_statcache);
if (PL_laststatval < 0) {
if (PL_laststatval < 0) {
- if (ckWARN(WARN_NEWLINE) && strchr(SvPV
(PL_statname, n_a
), '\n'))
+ if (ckWARN(WARN_NEWLINE) && strchr(SvPV
_nolen_const(PL_statname
), '\n'))
Perl_warner(aTHX_ packWARN(WARN_NEWLINE), PL_warn_nl, "stat");
max = 0;
}
Perl_warner(aTHX_ packWARN(WARN_NEWLINE), PL_warn_nl, "stat");
max = 0;
}
@@
-2936,7
+2936,6
@@
PP(pp_ftrread)
STACKED_FTEST_CHECK;
#if defined(HAS_ACCESS) && defined(R_OK)
if ((PL_op->op_private & OPpFT_ACCESS) && SvPOK(TOPs)) {
STACKED_FTEST_CHECK;
#if defined(HAS_ACCESS) && defined(R_OK)
if ((PL_op->op_private & OPpFT_ACCESS) && SvPOK(TOPs)) {
- STRLEN n_a;
result = access(POPpx, R_OK);
if (result == 0)
RETPUSHYES;
result = access(POPpx, R_OK);
if (result == 0)
RETPUSHYES;
@@
-2964,7
+2963,6
@@
PP(pp_ftrwrite)
STACKED_FTEST_CHECK;
#if defined(HAS_ACCESS) && defined(W_OK)
if ((PL_op->op_private & OPpFT_ACCESS) && SvPOK(TOPs)) {
STACKED_FTEST_CHECK;
#if defined(HAS_ACCESS) && defined(W_OK)
if ((PL_op->op_private & OPpFT_ACCESS) && SvPOK(TOPs)) {
- STRLEN n_a;
result = access(POPpx, W_OK);
if (result == 0)
RETPUSHYES;
result = access(POPpx, W_OK);
if (result == 0)
RETPUSHYES;
@@
-2992,7
+2990,6
@@
PP(pp_ftrexec)
STACKED_FTEST_CHECK;
#if defined(HAS_ACCESS) && defined(X_OK)
if ((PL_op->op_private & OPpFT_ACCESS) && SvPOK(TOPs)) {
STACKED_FTEST_CHECK;
#if defined(HAS_ACCESS) && defined(X_OK)
if ((PL_op->op_private & OPpFT_ACCESS) && SvPOK(TOPs)) {
- STRLEN n_a;
result = access(POPpx, X_OK);
if (result == 0)
RETPUSHYES;
result = access(POPpx, X_OK);
if (result == 0)
RETPUSHYES;
@@
-3020,7
+3017,6
@@
PP(pp_fteread)
STACKED_FTEST_CHECK;
#ifdef PERL_EFF_ACCESS_R_OK
if ((PL_op->op_private & OPpFT_ACCESS) && SvPOK(TOPs)) {
STACKED_FTEST_CHECK;
#ifdef PERL_EFF_ACCESS_R_OK
if ((PL_op->op_private & OPpFT_ACCESS) && SvPOK(TOPs)) {
- STRLEN n_a;
result = PERL_EFF_ACCESS_R_OK(POPpx);
if (result == 0)
RETPUSHYES;
result = PERL_EFF_ACCESS_R_OK(POPpx);
if (result == 0)
RETPUSHYES;
@@
-3048,7
+3044,6
@@
PP(pp_ftewrite)
STACKED_FTEST_CHECK;
#ifdef PERL_EFF_ACCESS_W_OK
if ((PL_op->op_private & OPpFT_ACCESS) && SvPOK(TOPs)) {
STACKED_FTEST_CHECK;
#ifdef PERL_EFF_ACCESS_W_OK
if ((PL_op->op_private & OPpFT_ACCESS) && SvPOK(TOPs)) {
- STRLEN n_a;
result = PERL_EFF_ACCESS_W_OK(POPpx);
if (result == 0)
RETPUSHYES;
result = PERL_EFF_ACCESS_W_OK(POPpx);
if (result == 0)
RETPUSHYES;
@@
-3076,7
+3071,6
@@
PP(pp_fteexec)
STACKED_FTEST_CHECK;
#ifdef PERL_EFF_ACCESS_X_OK
if ((PL_op->op_private & OPpFT_ACCESS) && SvPOK(TOPs)) {
STACKED_FTEST_CHECK;
#ifdef PERL_EFF_ACCESS_X_OK
if ((PL_op->op_private & OPpFT_ACCESS) && SvPOK(TOPs)) {
- STRLEN n_a;
result = PERL_EFF_ACCESS_X_OK(POPpx);
if (result == 0)
RETPUSHYES;
result = PERL_EFF_ACCESS_X_OK(POPpx);
if (result == 0)
RETPUSHYES;
@@
-3363,8
+3357,7
@@
PP(pp_fttty)
if (GvIO(gv) && IoIFP(GvIOp(gv)))
fd = PerlIO_fileno(IoIFP(GvIOp(gv)));
else if (tmpsv && SvOK(tmpsv)) {
if (GvIO(gv) && IoIFP(GvIOp(gv)))
fd = PerlIO_fileno(IoIFP(GvIOp(gv)));
else if (tmpsv && SvOK(tmpsv)) {
- STRLEN n_a;
- char *tmps = SvPV(tmpsv, n_a);
+ const char *tmps = SvPV_nolen_const(tmpsv);
if (isDIGIT(*tmps))
fd = atoi(tmps);
else
if (isDIGIT(*tmps))
fd = atoi(tmps);
else
@@
-3396,7
+3389,6
@@
PP(pp_fttext)
register IO *io;
register SV *sv;
GV *gv;
register IO *io;
register SV *sv;
GV *gv;
- STRLEN n_a;
PerlIO *fp;
STACKED_FTEST_CHECK;
PerlIO *fp;
STACKED_FTEST_CHECK;
@@
-3465,9
+3457,10
@@
PP(pp_fttext)
really_filename:
PL_statgv = Nullgv;
PL_laststype = OP_STAT;
really_filename:
PL_statgv = Nullgv;
PL_laststype = OP_STAT;
- sv_setpv(PL_statname, SvPV(sv, n_a));
- if (!(fp = PerlIO_open(SvPVX(PL_statname), "r"))) {
- if (ckWARN(WARN_NEWLINE) && strchr(SvPV(PL_statname, n_a), '\n'))
+ sv_setpv(PL_statname, SvPV_nolen_const(sv));
+ if (!(fp = PerlIO_open(SvPVX_const(PL_statname), "r"))) {
+ if (ckWARN(WARN_NEWLINE) && strchr(SvPV_nolen_const(PL_statname),
+ '\n'))
Perl_warner(aTHX_ packWARN(WARN_NEWLINE), PL_warn_nl, "open");
RETPUSHUNDEF;
}
Perl_warner(aTHX_ packWARN(WARN_NEWLINE), PL_warn_nl, "open");
RETPUSHUNDEF;
}
@@
-3551,12
+3544,11
@@
PP(pp_ftbinary)
PP(pp_chdir)
{
dSP; dTARGET;
PP(pp_chdir)
{
dSP; dTARGET;
- char *tmps;
+ c
onst c
har *tmps;
SV **svp;
SV **svp;
- STRLEN n_a;
if( MAXARG == 1 )
if( MAXARG == 1 )
- tmps = POPpx;
+ tmps = POPp
const
x;
else
tmps = 0;
else
tmps = 0;
@@
-3570,7
+3562,7
@@
PP(pp_chdir)
{
if( MAXARG == 1 )
deprecate("chdir('') or chdir(undef) as chdir()");
{
if( MAXARG == 1 )
deprecate("chdir('') or chdir(undef) as chdir()");
- tmps = SvPV
(*svp, n_a
);
+ tmps = SvPV
_nolen_const(*svp
);
}
else {
PUSHi(0);
}
else {
PUSHi(0);
@@
-3607,7
+3599,6
@@
PP(pp_chroot)
{
#ifdef HAS_CHROOT
dSP; dTARGET;
{
#ifdef HAS_CHROOT
dSP; dTARGET;
- STRLEN n_a;
char *tmps = POPpx;
TAINT_PROPER("chroot");
PUSHi( chroot(tmps) >= 0 );
char *tmps = POPpx;
TAINT_PROPER("chroot");
PUSHi( chroot(tmps) >= 0 );
@@
-3651,10
+3642,8
@@
PP(pp_rename)
{
dSP; dTARGET;
int anum;
{
dSP; dTARGET;
int anum;
- STRLEN n_a;
-
- char *tmps2 = POPpx;
- char *tmps = SvPV(TOPs, n_a);
+ const char *tmps2 = POPpconstx;
+ const char *tmps = SvPV_nolen_const(TOPs);
TAINT_PROPER("rename");
#ifdef HAS_RENAME
anum = PerlLIO_rename(tmps, tmps2);
TAINT_PROPER("rename");
#ifdef HAS_RENAME
anum = PerlLIO_rename(tmps, tmps2);
@@
-3678,9
+3667,8
@@
PP(pp_link)
{
#ifdef HAS_LINK
dSP; dTARGET;
{
#ifdef HAS_LINK
dSP; dTARGET;
- STRLEN n_a;
- char *tmps2 = POPpx;
- char *tmps = SvPV(TOPs, n_a);
+ const char *tmps2 = POPpconstx;
+ const char *tmps = SvPV_nolen_const(TOPs);
TAINT_PROPER("link");
SETi( PerlLIO_link(tmps, tmps2) >= 0 );
RETURN;
TAINT_PROPER("link");
SETi( PerlLIO_link(tmps, tmps2) >= 0 );
RETURN;
@@
-3693,9
+3681,8
@@
PP(pp_symlink)
{
#ifdef HAS_SYMLINK
dSP; dTARGET;
{
#ifdef HAS_SYMLINK
dSP; dTARGET;
- STRLEN n_a;
- char *tmps2 = POPpx;
- char *tmps = SvPV(TOPs, n_a);
+ const char *tmps2 = POPpconstx;
+ const char *tmps = SvPV_nolen_const(TOPs);
TAINT_PROPER("symlink");
SETi( symlink(tmps, tmps2) >= 0 );
RETURN;
TAINT_PROPER("symlink");
SETi( symlink(tmps, tmps2) >= 0 );
RETURN;
@@
-3709,15
+3696,14
@@
PP(pp_readlink)
dSP;
#ifdef HAS_SYMLINK
dTARGET;
dSP;
#ifdef HAS_SYMLINK
dTARGET;
- char *tmps;
+ c
onst c
har *tmps;
char buf[MAXPATHLEN];
int len;
char buf[MAXPATHLEN];
int len;
- STRLEN n_a;
#ifndef INCOMPLETE_TAINTS
TAINT;
#endif
#ifndef INCOMPLETE_TAINTS
TAINT;
#endif
- tmps = POPpx;
+ tmps = POPp
const
x;
len = readlink(tmps, buf, sizeof(buf) - 1);
EXTEND(SP, 1);
if (len < 0)
len = readlink(tmps, buf, sizeof(buf) - 1);
EXTEND(SP, 1);
if (len < 0)
@@
-3732,9
+3718,9
@@
PP(pp_readlink)
#if !defined(HAS_MKDIR) || !defined(HAS_RMDIR)
STATIC int
#if !defined(HAS_MKDIR) || !defined(HAS_RMDIR)
STATIC int
-S_dooneliner(pTHX_ c
har *cmd,
char *filename)
+S_dooneliner(pTHX_ c
onst char *cmd, const
char *filename)
{
{
- char *save_filename = filename;
+ char *
const
save_filename = filename;
char *cmdline;
char *s;
PerlIO *myfp;
char *cmdline;
char *s;
PerlIO *myfp;
@@
-3828,7
+3814,7
@@
S_dooneliner(pTHX_ char *cmd, char *filename)
* -d, chdir(), chmod(), chown(), chroot(), fcntl()?,
* (mkdir()), opendir(), rename(), rmdir(), stat(). --jhi */
* -d, chdir(), chmod(), chown(), chroot(), fcntl()?,
* (mkdir()), opendir(), rename(), rmdir(), stat(). --jhi */
-#define TRIMSLASHES(tmps,len,copy) (tmps) = SvPV(TOPs, (len)); \
+#define TRIMSLASHES(tmps,len,copy) (tmps) = SvPV
_const
(TOPs, (len)); \
if ((len) > 1 && (tmps)[(len)-1] == '/') { \
do { \
(len)--; \
if ((len) > 1 && (tmps)[(len)-1] == '/') { \
do { \
(len)--; \
@@
-3845,7
+3831,7
@@
PP(pp_mkdir)
int oldumask;
#endif
STRLEN len;
int oldumask;
#endif
STRLEN len;
- char *tmps;
+ c
onst c
har *tmps;
bool copy = FALSE;
if (MAXARG > 1)
bool copy = FALSE;
if (MAXARG > 1)
@@
-3873,7
+3859,7
@@
PP(pp_rmdir)
{
dSP; dTARGET;
STRLEN len;
{
dSP; dTARGET;
STRLEN len;
- char *tmps;
+ c
onst c
har *tmps;
bool copy = FALSE;
TRIMSLASHES(tmps,len,copy);
bool copy = FALSE;
TRIMSLASHES(tmps,len,copy);
@@
-3894,8
+3880,7
@@
PP(pp_open_dir)
{
#if defined(Direntry_t) && defined(HAS_READDIR)
dSP;
{
#if defined(Direntry_t) && defined(HAS_READDIR)
dSP;
- STRLEN n_a;
- char *dirname = POPpx;
+ const char *dirname = POPpconstx;
GV *gv = (GV*)POPs;
register IO *io = GvIOn(gv);
GV *gv = (GV*)POPs;
register IO *io = GvIOn(gv);
@@
-4180,13
+4165,12
@@
PP(pp_system)
{
dSP; dMARK; dORIGMARK; dTARGET;
I32 value;
{
dSP; dMARK; dORIGMARK; dTARGET;
I32 value;
- STRLEN n_a;
int result;
if (PL_tainting) {
TAINT_ENV();
while (++MARK <= SP) {
int result;
if (PL_tainting) {
TAINT_ENV();
while (++MARK <= SP) {
- (void)SvPV_nolen(*MARK); /* stringify for taint check */
+ (void)SvPV_nolen
_const
(*MARK); /* stringify for taint check */
if (PL_tainted)
break;
}
if (PL_tainted)
break;
}
@@
-4271,7
+4255,7
@@
PP(pp_system)
else if (SP - MARK != 1)
value = (I32)do_aexec5(Nullsv, MARK, SP, pp[1], did_pipes);
else {
else if (SP - MARK != 1)
value = (I32)do_aexec5(Nullsv, MARK, SP, pp[1], did_pipes);
else {
- value = (I32)do_exec3(SvPVx
(sv_mortalcopy(*SP), n_a
), pp[1], did_pipes);
+ value = (I32)do_exec3(SvPVx
_nolen(sv_mortalcopy(*SP)
), pp[1], did_pipes);
}
PerlProc__exit(-1);
}
}
PerlProc__exit(-1);
}
@@
-4294,7
+4278,7
@@
PP(pp_system)
# endif
}
else {
# endif
}
else {
- value = (I32)do_spawn(SvPVx
(sv_mortalcopy(*SP), n_a
));
+ value = (I32)do_spawn(SvPVx
_nolen(sv_mortalcopy(*SP)
));
}
if (PL_statusvalue == -1) /* hint that value must be returned as is */
result = 1;
}
if (PL_statusvalue == -1) /* hint that value must be returned as is */
result = 1;
@@
-4310,12
+4294,11
@@
PP(pp_exec)
{
dSP; dMARK; dORIGMARK; dTARGET;
I32 value;
{
dSP; dMARK; dORIGMARK; dTARGET;
I32 value;
- STRLEN n_a;
if (PL_tainting) {
TAINT_ENV();
while (++MARK <= SP) {
if (PL_tainting) {
TAINT_ENV();
while (++MARK <= SP) {
- (void)SvPV_nolen(*MARK); /* stringify for taint check */
+ (void)SvPV_nolen
_const
(*MARK); /* stringify for taint check */
if (PL_tainted)
break;
}
if (PL_tainted)
break;
}
@@
-4342,13
+4325,13
@@
PP(pp_exec)
#endif
else {
#ifdef VMS
#endif
else {
#ifdef VMS
- value = (I32)vms_do_exec(SvPVx
(sv_mortalcopy(*SP), n_a
));
+ value = (I32)vms_do_exec(SvPVx
_nolen(sv_mortalcopy(*SP)
));
#else
# ifdef __OPEN_VM
#else
# ifdef __OPEN_VM
- (void) do_spawn(SvPVx
(sv_mortalcopy(*SP), n_a
));
+ (void) do_spawn(SvPVx
_nolen(sv_mortalcopy(*SP)
));
value = 0;
# else
value = 0;
# else
- value = (I32)do_exec(SvPVx
(sv_mortalcopy(*SP), n_a
));
+ value = (I32)do_exec(SvPVx
_nolen(sv_mortalcopy(*SP)
));
# endif
#endif
}
# endif
#endif
}
@@
-4377,12
+4360,9
@@
PP(pp_getppid)
#ifdef HAS_GETPPID
dSP; dTARGET;
# ifdef THREADS_HAVE_PIDS
#ifdef HAS_GETPPID
dSP; dTARGET;
# ifdef THREADS_HAVE_PIDS
- {
- IV cur_ppid = getppid();
- if (cur_ppid == 1)
- /* maybe the parent process has died. Refresh ppid cache */
- PL_ppid = cur_ppid;
- }
+ if (PL_ppid != 1 && getppid() == 1)
+ /* maybe the parent process has died. Refresh ppid cache */
+ PL_ppid = 1;
XPUSHi( PL_ppid );
# else
XPUSHi( getppid() );
XPUSHi( PL_ppid );
# else
XPUSHi( getppid() );
@@
-4778,7
+4758,6
@@
PP(pp_ghostent)
#endif
struct hostent *hent;
unsigned long len;
#endif
struct hostent *hent;
unsigned long len;
- STRLEN n_a;
EXTEND(SP, 10);
if (which == OP_GHBYNAME) {
EXTEND(SP, 10);
if (which == OP_GHBYNAME) {
@@
-4894,7
+4873,6
@@
PP(pp_gnetent)
struct netent *getnetent(void);
#endif
struct netent *nent;
struct netent *getnetent(void);
#endif
struct netent *nent;
- STRLEN n_a;
if (which == OP_GNBYNAME){
#ifdef HAS_GETNETBYNAME
if (which == OP_GNBYNAME){
#ifdef HAS_GETNETBYNAME
@@
-4995,7
+4973,6
@@
PP(pp_gprotoent)
struct protoent *getprotoent(void);
#endif
struct protoent *pent;
struct protoent *getprotoent(void);
#endif
struct protoent *pent;
- STRLEN n_a;
if (which == OP_GPBYNAME) {
#ifdef HAS_GETPROTOBYNAME
if (which == OP_GPBYNAME) {
#ifdef HAS_GETPROTOBYNAME
@@
-5082,7
+5059,6
@@
PP(pp_gservent)
struct servent *getservent(void);
#endif
struct servent *sent;
struct servent *getservent(void);
#endif
struct servent *sent;
- STRLEN n_a;
if (which == OP_GSBYNAME) {
#ifdef HAS_GETSERVBYNAME
if (which == OP_GSBYNAME) {
#ifdef HAS_GETSERVBYNAME
@@
-5278,7
+5254,6
@@
PP(pp_gpwent)
dSP;
I32 which = PL_op->op_type;
register SV *sv;
dSP;
I32 which = PL_op->op_type;
register SV *sv;
- STRLEN n_a;
struct passwd *pwent = NULL;
/*
* We currently support only the SysV getsp* shadow password interface.
struct passwd *pwent = NULL;
/*
* We currently support only the SysV getsp* shadow password interface.
@@
-5557,7
+5532,6
@@
PP(pp_ggrent)
register char **elem;
register SV *sv;
struct group *grent;
register char **elem;
register SV *sv;
struct group *grent;
- STRLEN n_a;
if (which == OP_GGRNAM) {
char* name = POPpbytex;
if (which == OP_GGRNAM) {
char* name = POPpbytex;
@@
-5669,7
+5643,6
@@
PP(pp_syscall)
unsigned long a[20];
register I32 i = 0;
I32 retval = -1;
unsigned long a[20];
register I32 i = 0;
I32 retval = -1;
- STRLEN n_a;
if (PL_tainting) {
while (++MARK <= SP) {
if (PL_tainting) {
while (++MARK <= SP) {
@@
-5692,7
+5665,7
@@
PP(pp_syscall)
else if (*MARK == &PL_sv_undef)
a[i++] = 0;
else
else if (*MARK == &PL_sv_undef)
a[i++] = 0;
else
- a[i++] = (unsigned long)SvPV_force
(*MARK, n_a
);
+ a[i++] = (unsigned long)SvPV_force
_nolen(*MARK
);
if (i > 15)
break;
}
if (i > 15)
break;
}