;;
esac
+# getsockname() and getpeername() return 256 for no good reason
+ccflags="$ccflags -DBOGUS_GETNAME_RETURN=256"
+
# You can also include -D_SYSV3 to pick up "traditionally visible"
# symbols hidden by name-space pollution rules. This raises some
# compilation "redefinition" warnings, but they appear harmless.
if ((sv = svp[off]) &&
sv != &sv_undef &&
seq <= SvIVX(sv) &&
- seq > (I32)SvNVX(sv) &&
+ seq > I_32(SvNVX(sv)) &&
strEQ(SvPVX(sv), name))
{
I32 depth;
if ((sv = svp[off]) &&
sv != &sv_undef &&
seq <= SvIVX(sv) &&
- seq > (I32)SvNVX(sv) &&
+ seq > I_32(SvNVX(sv)) &&
strEQ(SvPVX(sv), name))
{
return (PADOFFSET)off;
# endif /* no flock() or fcntl(F_SETLK,...) */
# ifdef FLOCK
- static int FLOCK(int, int);
+ static int FLOCK _((int, int));
/*
* These are the flock() constants. Since this sytems doesn't have
goto nuts2;
break;
}
+#ifdef BOGUS_GETNAME_RETURN
+ /* Interactive Unix, getpeername() and getsockname()
+ does not return valid namelen */
+ if (aint == BOGUS_GETNAME_RETURN)
+ aint = sizeof(struct sockaddr);
+#endif
SvCUR_set(sv,aint);
*SvEND(sv) ='\0';
PUSHs(sv);
GV *gv;
SV *sv;
char *undef;
+ double req;
if(SvROK(ST(0))) {
sv = (SV*)SvRV(ST(0));
undef = "(undef)";
}
- if(items > 1 && (undef || SvNV(ST(1)) > SvNV(sv)))
+ if (items > 1 && (undef || (req = SvNV(ST(1)), req > SvNV(sv))))
croak("%s version %s required--this is only version %s",
- HvNAME(pkg),SvPV(ST(1),na),undef ? undef : SvPV(sv,na));
+ HvNAME(pkg), SvPV(ST(1),na), undef ? undef : SvPV(sv,na));
ST(0) = sv;