🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by goldberg Thu, 20 Feb 1986 23:46
Last problem -- int vs. long
#295
Author: goldberg
Date: Thu, 20 Feb 1986 23:46
22 lines
1382 bytes
Date: Thu, 20 Feb 86 10:53:16 cst
From: stevea@uiphysed.PE.UIUC.EDU (Steve Alexander)
To: goldberg@a.cs.uiuc.edu
Subject: bug report, please post to bugs.2bsd

Subject: Last won't work with more than 128 utmp records
Index:	ucb/last.c 2.9bsd (Harvard/CSS) Fix

Description:
	Last was moved from a VAX where sizeof(int) == sizeof(long).  This
	breaks on a PDP-11, because lseek is being called with a 16-bit
	offset.

Repeat-By:
	Wait for your /usr/adm/wtmp file to grow larger than 4608 bytes,
	which is 128 struct utmps.
	Run last, noticing that it does not reflect current system status.
	Flame about Berkeley, and their aversion to lint.
Fix:
	In last.c, routine main, in the lseek call, cast the expression
	(bl * sizeof(buf)) to a long.  Flame some more.
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