🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.2bsd
Article #2

sa gets floating exception

#2
From: Steven M. Schultz(Y)
Date: Thu, 15 Jun 1989 23:27
69 lines
1859 bytes
Index:	etc/sa.c 2.10BSD

Description:
	'sa' gets a floating point exception and drops core after
	being recompiled with the shadow password package installed
	in the system.

Repeat-By:
	Install the shadow password file on the system.  Recompile/link
	'sa'.  Run it and observe the floating point exception.

Fix:
	Apply the following patch.  The problem was that 'sa' was
	redefining the 'bcmp()' routine which 'getpwent()' calls.
	

*** sa.c.old	Wed Jun 14 23:29:06 1989
--- sa.c	Wed Jun 14 23:29:39 1989
***************
*** 280,286 ****
  int	pgdiv;
  #define	pgtok(x)	((x) / pgdiv)
  
! extern	tcmp(), ncmp(), bcmp(), dcmp(), Dcmp(), kcmp(), Kcmp();
  extern	double sum();
  
  main(argc, argv)
--- 280,286 ----
  int	pgdiv;
  #define	pgtok(x)	((x) / pgdiv)
  
! extern	tcmp(), ncmp(), Bcmp(), dcmp(), Dcmp(), kcmp(), Kcmp();
  extern	double sum();
  
  main(argc, argv)
***************
*** 317,323 ****
  
  		case 'b':
  			bflg++;
! 			cmp = bcmp;
  			break;
  
  		case 'l':
--- 317,323 ----
  
  		case 'b':
  			bflg++;
! 			cmp = Bcmp;
  			break;
  
  		case 'l':
***************
*** 741,747 ****
  	return(p2->p.count - p1->p.count);
  }
  
! bcmp(p1, p2)
  	cell *p1, *p2;
  {
  	double f1, f2;
--- 741,747 ----
  	return(p2->p.count - p1->p.count);
  }
  
! Bcmp(p1, p2)
  	cell *p1, *p2;
  {
  	double f1, f2;
Technical Details
Message-ID: <32623@wlbr.IMSD.CONTEL.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!voder!wlbr!wlv.imsd.contel.com!sms

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!voder!wlbr!wlv.imsd.contel.com!sms
From: sms@wlv.imsd.contel.com (Steven M. Schultz(Y))
Newsgroups: comp.bugs.2bsd
Subject: sa gets floating exception
Message-ID: <32623@wlbr.IMSD.CONTEL.COM>
Date: 15 Jun 89 23:27:20 GMT
Sender: news@wlbr.IMSD.CONTEL.COM
Reply-To: sms@wlv.imsd.contel.com (Steven M. Schultz(Y))
Organization: Contel Federal Systems
Lines: 69