From owner-freebsd-hackers Sun Jun 2 16:32:35 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id QAA19098 for hackers-outgoing; Sun, 2 Jun 1996 16:32:35 -0700 (PDT) Received: from harbor.silcom.com (harbor.silcom.com [199.201.128.1]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id QAA19092; Sun, 2 Jun 1996 16:32:32 -0700 (PDT) Received: from beach.silcom.com (root@beach.silcom.com [199.201.128.19]) by harbor.silcom.com (8.6.12/8.6.9) with ESMTP id QAA05123; Sun, 2 Jun 1996 16:33:48 -0700 Received: from zoof.cts.com by beach.silcom.com (8.6.12/SMI-4.1) id QAA21127; Sun, 2 Jun 1996 16:31:42 -0700 Received: from zoof.cts.com ([127.0.0.1]) by zoof.cts.com (post.office MTA v2.0 pre-alpha ID# 0-1001) with SMTP id AAA131; Sun, 2 Jun 1996 16:29:31 -0700 From: pjf@cts.com (Paul Falstad) Message-Id: <9606021629.ZM129@zoof> Date: Sun, 2 Jun 1996 16:29:30 -0700 In-Reply-To: Bruce Evans "Re: bugs" (Jun 3, 6:52am) In-Reply-To: Alex Nash "Re: bugs" (Jun 2, 5:25pm) References: <199606022052.GAA06199@godzilla.zeta.org.au> <199606022225.RAA23224@zen.nash.org> X-Face: ECcdcE"#6HK`bju2deH)DfABe@eZcG/9(w';j/n-Hat1joHF.d|1HwhhOBX+3{zjfAH$@C@ og1k*RjD=WSww/5"ZDk_FIabxydm\%u*)TDP@Q;Ag5'p@lnm*0LV(zcvPE<=X~nnL2g(f3t;>pjz#a `{^{6TBs5x~x(Z/R[VT@k"oW!][:+eW{Lj!*v{B/iCyOrx1x:|6}y_G@Z,qe$3)P\Da[_W!fTGW$Kr "pn#Y7SrNc5VAoh3qD5WHlWhC`]\n-W:Hl9Xj,6.-DPr&]NcLeP"a^Z83F-|QJ3|Y1Km)UB&p+ruM$ jc X-Anagram: Salad, Flat Up X-Shakespearean-Insult: Thou mangled fen-sucked clack-dish! X-Face-Info: Fly comedian from the Far Side Reply-To: Paul Falstad To: bde@freebsd.org Subject: Re: bugs Cc: hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Bruce Evans says: | Subject: Re: bugs | The ftruncate() works if a prototype for ftruncate() is in scope or if | the `length' arg to ftruncate has the correct type (off_t = long long). | Otherwise the top 32 bits of the length are random. ftruncate() is | prototyped in . You should also include before | including . The above happens to work because | bogusly includes . You should also include | instead of except on old systems. Sorry, bogus example again. Our real code has a proper set of #includes. | The strcpy() doesn't work unless PROT_WRITE is changed to | `PROT_READ | PROT_WRITE', and this isn't because strcpy() reads its | target - `buf[0] = 1' fails in the same way. Interesting. Well, that's a simple enough workaround... Alex Nash says: | Subject: Re: bugs | >This works on all of our 10 existing UNIX platforms except BSDI and | >Linux. BSDI has the same problem with ftruncate, I think; Linux's | >ftruncate works, but its mmap() appears to be totally broken, at least | >in 1.2.13. | | TRUNCATE(2) FreeBSD Programmer's Manual TRUNCATE(2) | [...] | DESCRIPTION | Truncate() causes the file named by path or referenced by fd to be trun- | cated to at most length bytes in size. | ^^^^^^^ All I can say is that your ftruncate() seems to work right (i.e. the same as everyone else) in spite of the documentation. :-) | As far as mmap is concerned, you cannot write beyond 'len' bytes as | specified in the call to mmap. [...] Nor would I wish to. -- Another problem: % vidcontrol VGA_80x50 Cannot set videomode: Invalid argument VGA_80x25 and VGA_40x25 work fine, for what it's worth. -- Paul Falstad, pjf@cts.com, 805-966-4935, http://www.ttinet.com/pjf/ work: pf@software.com, 805-882-2470, http://www.software.com Williams and Holland's Law: If enough data is collected, anything may be proven by statistical methods.