# include <unistd.h>
#endif
#ifdef I_FCNTL
+#if defined(__GNUC__) && defined(__cplusplus) && defined(WIN32)
+#define _NO_OLDNAMES
+#endif
# include <fcntl.h>
+#if defined(__GNUC__) && defined(__cplusplus) && defined(WIN32)
+#undef _NO_OLDNAMES
+#endif
+
#endif
#ifdef PerlIO
#endif
static int
-not_here(s)
-char *s;
+not_here(char *s)
{
croak("%s not implemented on this architecture", s);
return -1;
}
static bool
-constant(name, pval)
-char *name;
-IV *pval;
+constant(char *name, IV *pval)
{
switch (*name) {
case '_':
ST(0) = sv_2mortal(newSVpv((char*)&pos, sizeof(Fpos_t)));
}
else {
- ST(0) = &sv_undef;
+ ST(0) = &PL_sv_undef;
errno = EINVAL;
}
SV * pos
CODE:
char *p;
- if (handle && (p = SvPVx(pos, na)) && na == sizeof(Fpos_t))
+ if (handle && (p = SvPVx(pos, PL_na)) && PL_na == sizeof(Fpos_t))
#ifdef PerlIO
RETVAL = PerlIO_setpos(handle, (Fpos_t*)p);
#else
SvREFCNT_dec(gv); /* undo increment in newRV() */
}
else {
- ST(0) = &sv_undef;
+ ST(0) = &PL_sv_undef;
SvREFCNT_dec(gv);
}
if (constant(name, &i))
ST(0) = sv_2mortal(newSViv(i));
else
- ST(0) = &sv_undef;
+ ST(0) = &PL_sv_undef;
int
ungetc(handle, c)