From owner-freebsd-ports Mon Oct 2 12:30: 5 2000 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id BE69D37B503 for ; Mon, 2 Oct 2000 12:30:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id MAA56439; Mon, 2 Oct 2000 12:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from h132-197-97-45.gte.com (h132-197-97-45.gte.com [132.197.97.45]) by hub.freebsd.org (Postfix) with ESMTP id 6061937B502 for ; Mon, 2 Oct 2000 12:25:41 -0700 (PDT) Received: (from ak03@localhost) by h132-197-97-45.gte.com (8.11.0/8.11.0) id e92JPeA19141; Mon, 2 Oct 2000 15:25:40 -0400 (EDT) (envelope-from ak03) Message-Id: <200010021925.e92JPeA19141@h132-197-97-45.gte.com> Date: Mon, 2 Oct 2000 15:25:40 -0400 (EDT) From: ak03@gte.com Reply-To: ak03@gte.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: ports/21705: CSCOPE writes incorrect offset into index file Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 21705 >Category: ports >Synopsis: CSCOPE writes incorrect offset into index file >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Oct 02 12:30:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Alexander Kabaev >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: Ports tree cvsupped on Oct 2 2000, FreeBSD 5.0-CURRENT (not relevant) >Description: Due to the fact, that FreeBSD fputs does not return exact number of bytes written, wrong value for 'tailerofset' is getting written into the cross-reference file. That makes it impossible to reuse index file when running cscope under cbrowser control, for instance. Cbrowser runs cscope with the command which looks like: cscope -dl -f cscope.out where -d instructs cscope not to rebuild index file and assume it is up-to-date. While trying to reopen pre-existing data file cscope seeks at incorrect offset and then fails with an error message. >How-To-Repeat: Run cscope with above command line and watch it fail. >Fix: Add attached file to the patches directory. --- src/constants.h.orig Mon Oct 2 14:36:07 2000 +++ src/constants.h Mon Oct 2 14:37:09 2000 @@ -43,7 +43,7 @@ /* database output macros that update its offset */ #define dbputc(c) (++dboffset, (void) putc(c, newrefs)) -#if Linux || BSD && !sun +#if Linux || __FreeBSD__ || BSD && !sun #define dbfputs(s) (dboffset += strlen(s), fputs(s, newrefs)) #else #define dbfputs(s) (dboffset += fputs(s, newrefs)) >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message