return win32_fdupopen(f);
#else
if (f) {
- int fd = PerlLIO_dup(PerlIO_fileno(f));
+ const int fd = PerlLIO_dup(PerlIO_fileno(f));
if (fd >= 0) {
char mode[8];
int omode = fcntl(fd, F_GETFL);
ENTER;
SAVEINT(PL_in_load_module);
if (cv) {
- SAVESPTR(PL_warnhook);
+ SAVEGENERICSV(PL_warnhook);
+ (void)SvREFCNT_inc(cv);
PL_warnhook = (SV *) cv;
}
PL_in_load_module++;
f = PerlIO_fdopen(fd, "w+");
if (f)
PerlIOBase(f)->flags |= PERLIO_F_TEMP;
- PerlLIO_unlink(SvPVX(sv));
+ PerlLIO_unlink(SvPVX_const(sv));
SvREFCNT_dec(sv);
}
# else /* !HAS_MKSTEMP, fallback to stdio tmpfile(). */
return result;
}
#endif
+
+/*
+ * Local variables:
+ * c-indentation-style: bsd
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ *
+ * ex: set ts=8 sts=4 sw=4 noet:
+ */