if (f && *f) {
PerlIO_funcs *tab = PerlIOBase(f)->tab;
PerlIO *new;
- PerlIO_debug("fdupopen f=%p param=%p\n",f,param);
+ PerlIO_debug("fdupopen f=%p param=%p\n",(void*)f,(void*)param);
new = (*tab->Dup)(aTHX_ PerlIO_allocate(aTHX),f,param, flags);
return new;
}
{
PerlIOl *l = *f;
if (l) {
- PerlIO_debug("PerlIO_pop f=%p %s\n", f, l->tab->name);
+ PerlIO_debug("PerlIO_pop f=%p %s\n", (void*)f, l->tab->name);
if (l->tab->Popped) {
/*
* If popped returns non-zero do not free its layer structure
for (i = 0; i < PL_known_layers->cur; i++) {
PerlIO_funcs *f = PL_known_layers->array[i].funcs;
if (memEQ(f->name, name, len)) {
- PerlIO_debug("%.*s => %p\n", (int) len, name, f);
+ PerlIO_debug("%.*s => %p\n", (int) len, name, (void*)f);
return f;
}
}
if (!PL_known_layers)
PL_known_layers = PerlIO_list_alloc(aTHX);
PerlIO_list_push(aTHX_ PL_known_layers, tab, Nullsv);
- PerlIO_debug("define %s %p\n", tab->name, tab);
+ PerlIO_debug("define %s %p\n", tab->name, (void*)tab);
}
int
PerlIO_default_buffer(pTHX_ PerlIO_list_t *av)
{
PerlIO_funcs *tab = &PerlIO_perlio;
-#ifdef PERLIO_CRLF
+#ifdef PERLIO_USING_CRLF
tab = &PerlIO_crlf;
#else
if (PerlIO_stdio.Set_ptrcnt)
l->next = *f;
l->tab = tab;
*f = l;
- PerlIO_debug("PerlIO_push f=%p %s %s %p\n", f, tab->name,
- (mode) ? mode : "(Null)", arg);
+ PerlIO_debug("PerlIO_push f=%p %s %s %p\n", (void*)f, tab->name,
+ (mode) ? mode : "(Null)", (void*)arg);
if ((*l->tab->Pushed) (f, mode, arg) != 0) {
PerlIO_pop(aTHX_ f);
return NULL;
break;
}
}
- PerlIO_debug(":raw f=%p :%s\n", f, PerlIOBase(f)->tab->name);
+ PerlIO_debug(":raw f=%p :%s\n", (void*)f, PerlIOBase(f)->tab->name);
return 0;
}
return -1;
PerlIO_binmode(pTHX_ PerlIO *f, int iotype, int mode, const char *names)
{
PerlIO_debug("PerlIO_binmode f=%p %s %c %x %s\n",
- f, PerlIOBase(f)->tab->name, iotype, mode,
+ (void*)f, PerlIOBase(f)->tab->name, iotype, mode,
(names) ? names : "(Null)");
/* Can't flush if switching encodings. */
if (!(names && memEQ(names, ":encoding(", 10))) {
PerlIO_flush(f);
-#ifdef PERLIO_CRLF
+#ifdef PERLIO_USING_CRLF
if (!names && (mode & O_BINARY)) {
PerlIO *top = f;
while (*top) {
Perl_croak(aTHX_ "More than one argument to open(,':%s')",tab->name);
}
PerlIO_debug("openn(%s,'%s','%s',%d,%x,%o,%p,%d,%p)\n",
- tab->name, layers, mode, fd, imode, perm, f, narg,
- args);
+ tab->name, layers, mode, fd, imode, perm,
+ (void*)f, narg, (void*)args);
f = (*tab->Open) (aTHX_ tab, layera, n, mode, fd, imode, perm,
f, narg, args);
if (f) {
return (*tab->Flush) (f);
}
else {
- PerlIO_debug("Cannot flush f=%p :%s\n", f, tab->name);
+ PerlIO_debug("Cannot flush f=%p :%s\n", (void*)f, tab->name);
SETERRNO(EBADF, SS$_IVCHAN);
return -1;
}
}
else {
- PerlIO_debug("Cannot flush f=%p\n", f);
+ PerlIO_debug("Cannot flush f=%p\n", (void*)f);
SETERRNO(EBADF, SS$_IVCHAN);
return -1;
}
*s++ = '+';
}
}
-#ifdef PERLIO_CRLF
+#ifdef PERLIO_USING_CRLF
if (!(flags & PERLIO_F_CRLF))
*s++ = 'b';
#endif
PerlIO_funcs *self = PerlIOBase(o)->tab;
SV *arg = Nullsv;
char buf[8];
- PerlIO_debug("PerlIOBase_dup %s f=%p o=%p param=%p\n",self->name,f,o,param);
+ PerlIO_debug("PerlIOBase_dup %s f=%p o=%p param=%p\n",
+ self->name, (void*)f, (void*)o, (void*)param);
if (self->Getarg) {
arg = (*self->Getarg)(aTHX_ o,param,flags);
}
while (*mode) {
*tmode++ = *mode++;
}
-#ifdef PERLIO_CRLF
+#ifdef PERLIO_USING_CRLF
*tmode++ = 'b';
#endif
*tmode = '\0';
return NULL;
} else {
fd = PerlIO_fileno(f);
-#ifdef PERLIO_CRLF
+#ifdef PERLIO_USING_CRLF
/*
* do something about failing setmode()? --jhi
*/