From owner-freebsd-questions Wed Jan 18 09:23:57 1995 Return-Path: questions-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id JAA09554 for questions-outgoing; Wed, 18 Jan 1995 09:23:57 -0800 Received: from NS.netvision.net.il (root@ns.NetVision.net.il [192.114.201.5]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id JAA09545; Wed, 18 Jan 1995 09:23:50 -0800 Received: from ugen.NetManage.co.il (ugen.netmanage.co.il [192.114.78.165]) by NS.netvision.net.il (8.6.9/8.6.9) with SMTP id TAA14390; Wed, 18 Jan 1995 19:23:33 +0200 Date: Wed, 18 Jan 95 19:27:46 IST From: "Ugen J.S.Antsilevich" Subject: Re: bug in GCC or in lseek/read??? To: freebsd-current@freefall.cdrom.com, freebsd-hackers@freefall.cdrom.com, freebsd-questions@freefall.cdrom.com, "Ugen J.S.Antsilevich" , "Andrew A. Chernov, Black Mage" X-Mailer: Chameleon 4.00-Arm-25, TCP/IP for Windows, NetManage Inc. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=us-ascii Sender: questions-owner@FreeBSD.org Precedence: bulk >In message Ugen > J.S.Antsilevich writes: > >>printf("seek %u\n",lseek(f,100,SEEK_SET)); /* move into the middle > >Here is a bug: must be %lu This is not the issue! The problemm is that the right cast makes wrong result for lseek and read fails while wrong cast works!!!Taht's the problemm and not how the result seems in printf.I could skip printf but read still will fail. > >-- >Andrew A. Chernov : And I rest so composedly, /Now, in my bed, >ache@astral.msk.su : That any beholder /Might fancy me dead - >FidoNet: 2:5020/230.3 : Might start at beholding me, /Thinking me dead. >RELCOM Team,FreeBSD Team : E.A.Poe From "For Annie" 1849 > -- -=Ugen J.S.Antsilevich=- NetVision - Israeli Commercial Internet | Learning E-mail: ugen@NetVision.net.il | To Fly. [c] Phone : +972-4-550330 |