🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.bugs.2bsd
Article #295

Last problem -- int vs. long

#295
From: 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.
Technical Details
Message-ID: <8100006@uiucdcs>
Path: arc1-ca.pugleaf.net!utzoo!linus!decvax!bellcore!ulysses!mhuxr!mhuxn!ihnp4!inuxc!pur-ee!uiucdcs!goldberg

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: Notesfiles $Revision: 1.7.0.10 $; site uiucdcs
Path: arc1-ca.pugleaf.net!utzoo!linus!decvax!bellcore!ulysses!mhuxr!mhuxn!ihnp4!inuxc!pur-ee!uiucdcs!goldberg
From: goldberg@uiucdcs.CS.UIUC.EDU
Newsgroups: net.bugs.2bsd
Subject: Last problem -- int vs. long
Message-ID: <8100006@uiucdcs>
Date: Thu, 20-Feb-86 18:46:00 EST
Article-I.D.: uiucdcs.8100006
Posted: Thu Feb 20 18:46:00 1986
Date-Received: Mon, 24-Feb-86 07:19:49 EST
Lines: 22
Nf-ID: #N:uiucdcs:8100006:000:761
Nf-From: uiucdcs.CS.UIUC.EDU!goldberg    Feb 20 17:46:00 1986