For thise that care...
Tony Bates
Mon May 8 18:46:06 CEST 1995
This is what was done to fix perl 4.036 such that setsockopt would work under solaris set of correctly. --Tony. *** doio.c.orig Wed May 3 10:29:05 1995 --- doio.c Wed May 3 15:13:34 1995 *************** *** 1604,1610 **** --- 1604,1616 ---- register STR **st = stack->ary_array; register int sp = arglast[1]; register STIO *stio; + /* + * FIX - for crappy OPTVAL value being passed wrong + */ + int on; + char *buf; int fd; + int len; unsigned int lvl; unsigned int optname; *************** *** 1629,1635 **** break; case O_SSOCKOPT: st[sp] = st[sp+3]; ! if (setsockopt(fd, lvl, optname, st[sp]->str_ptr, st[sp]->str_cur) < 0) goto nuts; st[sp] = &str_yes; break; --- 1635,1652 ---- break; case O_SSOCKOPT: st[sp] = st[sp+3]; ! if(st[sp]->str_pok) { ! buf = (char *)st[sp]->str_ptr; ! len = st[sp]->str_cur; ! } else if (st[sp]->str_nok) { ! on = (int) st[sp]->str_u.str_nval; ! buf = (char *)&on; ! len = sizeof(on); ! } else { ! buf = (char *)(0); ! len = 0; ! } ! if (setsockopt(fd, lvl, optname, buf, len) < 0) goto nuts; st[sp] = &str_yes; break; -------- Logged at Tue May 9 13:32:11 MET DST 1995 ---------
[ rr-impl Archive ]