diff options
author | Winfried Koenig <win@in.rhein-main.de> | 1996-12-22 05:14:00 +0200 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1996-12-23 12:58:58 +1200 |
commit | 1ab5d0547ab7398ea9e3e00b1c1b0f1f8ea0dd94 (patch) | |
tree | a9f430d5e0de816261770016adfe6860555b7c10 | |
parent | d97d40b5b09d6d89f9fc39d5d51be2de4320c77b (diff) | |
download | perl-1ab5d0547ab7398ea9e3e00b1c1b0f1f8ea0dd94.tar.gz |
Fixes for Interactive Unix
This is a bug report for perl from win@in.rhein-main.de,
generated with the help of perlbug 1.14 running under perl 5.00313.
With the following patches, perl compiles and passes all tests on
Interactiv Unix Version 4.1. I tested with cc and with gcc.
p5p-msgid: <m0vbeNO-00003WC@incom.rhein-main.de>
-rw-r--r-- | hints/isc.sh | 2 | ||||
-rw-r--r-- | op.c | 4 | ||||
-rw-r--r-- | pp_sys.c | 8 | ||||
-rw-r--r-- | universal.c | 8 |
4 files changed, 19 insertions, 3 deletions
diff --git a/hints/isc.sh b/hints/isc.sh index df745a9b25..1aa14e1a47 100644 --- a/hints/isc.sh +++ b/hints/isc.sh @@ -27,6 +27,8 @@ case "$cc" in ldflags="$ldflags -Xp" ;; esac +# fix some errors of libinet.a and compiler +ccflags="$ccflags -D_SYS_ISC" # You can also include -D_SYSV3 to pick up "traditionally visible" # symbols hidden by name-space pollution rules. This raises some @@ -186,7 +186,7 @@ pad_findlex(char *name, PADOFFSET newoff, U32 seq, CV* startcv, I32 cx_ix) 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; @@ -277,7 +277,7 @@ char *name; 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; @@ -121,7 +121,7 @@ static int dooneliner _((char *cmd, char *filename)); # 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 @@ -1860,6 +1860,12 @@ PP(pp_getpeername) goto nuts2; break; } +#ifdef _SYS_ISC + /* Interactive Unix, getpeername() and getsockname() + does not return valid namelen */ + if (aint == 256) + aint = sizeof(struct sockaddr); +#endif SvCUR_set(sv,aint); *SvEND(sv) ='\0'; PUSHs(sv); diff --git a/universal.c b/universal.c index 476b60d3c0..3cd7166230 100644 --- a/universal.c +++ b/universal.c @@ -198,6 +198,9 @@ XS(XS_UNIVERSAL_VERSION) GV *gv; SV *sv; char *undef; +#ifdef _SYS_ISC + double req = SvNV(ST(1)); +#endif if(SvROK(ST(0))) { sv = (SV*)SvRV(ST(0)); @@ -222,7 +225,12 @@ XS(XS_UNIVERSAL_VERSION) undef = "(undef)"; } +#ifdef _SYS_ISC + /* needed for C compiler of Interactive Unix */ + if(items > 1 && (undef || (req = SvNV(ST(1)) && req > SvNV(sv)))) +#else if(items > 1 && (undef || SvNV(ST(1)) > SvNV(sv))) +#endif croak("%s version %s required--this is only version %s", HvNAME(pkg),SvPV(ST(1),na),undef ? undef : SvPV(sv,na)); |