STRLEN n_a;
char *tmps = POPpx;
I32 gimme = GIMME_V;
- char *mode = "r";
+ const char *mode = "r";
TAINT_PROPER("``");
if (PL_op->op_private & OPpOPEN_IN_RAW)
mode = "rb";
else if (PL_op->op_private & OPpOPEN_IN_CRLF)
mode = "rt";
- fp = PerlProc_popen(tmps, mode);
+ fp = PerlProc_popen(tmps, (char *)mode);
if (fp) {
- char *type = NULL;
+ const char *type = NULL;
if (PL_curcop->cop_io) {
type = SvPV_nolen(PL_curcop->cop_io);
}
{
dSP; dMARK;
SV *tmpsv;
- char *tmps;
+ const char *tmps;
STRLEN len;
if (SP - MARK != 1) {
dTARGET;
PP(pp_die)
{
dSP; dMARK;
- char *tmps;
+ const char *tmps;
SV *tmpsv;
STRLEN len;
bool multiarg = 0;
GV *gv;
SV *sv;
I32 markoff = MARK - PL_stack_base;
- char *methname;
+ const char *methname;
int how = PERL_MAGIC_tied;
U32 items;
}
topgv = gv_fetchpv(IoTOP_NAME(io),FALSE, SVt_PVFM);
if (!topgv || !GvFORM(topgv)) {
- IoLINES_LEFT(io) = 100000000;
+ IoLINES_LEFT(io) = IoPAGE_LEN(io);
goto forget_top;
}
IoTOP_GV(io) = topgv;
read_target = sv_newmortal();
SvUPGRADE(read_target, SVt_PV);
- buffer = SvGROW(read_target, length + 1);
+ buffer = SvGROW(read_target, (STRLEN)(length + 1));
}
if (PL_op->op_type == OP_SYSREAD) {
if ((IoFLAGS(io) & IOf_START) && av_len(GvAVn(gv)) < 0) {
IoLINES(io) = 0;
IoFLAGS(io) &= ~IOf_START;
- do_open(gv, "-", 1, FALSE, O_RDONLY, 0, Nullfp);
+ do_open(gv, (char *)"-", 1, FALSE, O_RDONLY, 0, Nullfp);
sv_setpvn(GvSV(gv), "-", 1);
SvSETMAGIC(GvSV(gv));
}
* might not be signed: if it is not, clever compilers will moan. */
/* XXX Configure probe for the signedness of the length type of *truncate() needed? XXX */
SETERRNO(0,0);
-#if defined(HAS_TRUNCATE) || defined(HAS_CHSIZE) || defined(F_FREESP)
{
int result = 1;
GV *tmpgv;
SETERRNO(EBADF,RMS_IFI);
RETPUSHUNDEF;
}
-#else
- DIE(aTHX_ "truncate not implemented");
-#endif
}
PP(pp_fcntl)
dSP; dTARGET;
SV *argsv = POPs;
unsigned int func = POPu;
- int optype = PL_op->op_type;
+ const int optype = PL_op->op_type;
char *s;
IV retval;
GV *gv = (GV*)POPs;
{
dSP;
Time_t when;
- struct tm *tmbuf;
- static char *dayname[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
- static char *monname[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
+ const struct tm *tmbuf;
+ static const char *dayname[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
+ static const char *monname[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
if (MAXARG < 1)