NetBSD Problem Report #368
From gnats Wed Jul 27 11:08:31 1994
Received: from post.demon.co.uk (post.demon.co.uk [158.152.1.72]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with SMTP id LAA08373 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Wed, 27 Jul 1994 11:08:24 -0700
Message-Id: <199407271706.SAA05321@alice.wonderland.org>
Date: Wed, 27 Jul 1994 18:06:36 +0100
From: Peter Galbavy <peter@alice.wonderland.org>
Reply-To: peter@alice.wonderland.org
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: comsat uses un-cast lseek
X-Send-Pr-Version: 3.2
>Number: 368
>Category: bin
>Synopsis: comsat does not work on my "endian" sparc, cause lseek is incorrectly used
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: deraadt
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jul 27 11:20:03 +0000 1994
>Closed-Date: Fri Sep 16 23:33:31 +0000 1994
>Last-Modified:
>Originator: Peter Galbavy
>Release: NetBSD-1.0_BETA
>Organization:
Wonderland
>Environment:
NetBSD/sparc
System: NetBSD alice.wonderland.org 1.0_BETA NetBSD 1.0_BETA (DUMPTY) #5: Mon Jul 25 20:36:25 BST 1994 peter@alice.wonderland.org:/usr/src/sys/arch/sparc/compile/DUMPTY sparc
>Description:
When I use biff 'y' I always get given the first few lines of my
mailbox, not the incoming message. Afetr further investigation I
found consat is using lseek without including <unistd.h> and not
decalring lseek's args (only return value).
>How-To-Repeat:
Use 'biff y' on a big-endian machine and watch it repeat your first
e-mail over and over again.
>Fix:
I guess include <unistd.h> in comsat.c ?
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->jtc
Responsible-Changed-By: jtc
Responsible-Changed-When: Thu Aug 4 18:01:52 1994
Responsible-Changed-Why:
I'll take it.
State-Changed-From-To: open->feedback
State-Changed-By: jtc
State-Changed-When: Thu Aug 4 18:02:49 1994
State-Changed-Why:
Our <sys/types.h> has a prototype for lseek(), which usually catches
these kind of problems. But comsat.c declared lseek() itself, which
seems to override the prototype (I don't have a copy of the ANSI spec
with me now, but I believe that this is correct behavior).
I've removed the explicit definitions and added #includes of the
<unistd.h>. This should work.
State-Changed-From-To: feedback->closed
State-Changed-By: deraadt
State-Changed-When: Fri Sep 16 16:33:31 PDT 1994
State-Changed-Why:
This was fixed quite some time ago..
Responsible-Changed-From-To: jtc->deraadt
Responsible-Changed-By: deraadt
Responsible-Changed-When: Fri Sep 16 16:33:31 PDT 1994
Responsible-Changed-Why:
I fixed it.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.