🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Steven M. Schultz(Y) Thu, 15 Jun 1989 23:27
sa gets floating exception
#2
Author: 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;
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads