From owner-freebsd-audit Sun Jul 1 2: 6: 3 2001 Delivered-To: freebsd-audit@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id D68E637B401 for ; Sun, 1 Jul 2001 02:05:59 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id TAA08607; Sun, 1 Jul 2001 19:05:38 +1000 Date: Sun, 1 Jul 2001 19:03:40 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Mike Barcroft Cc: audit@FreeBSD.ORG Subject: Re: src/bin/ed patch In-Reply-To: <200106290428.f5T4S0C97998@coffee.q9media.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 29 Jun 2001, Mike Barcroft wrote: > ed.20010628.patch > > o Since the rcsids are generating warnings, switch to __RCSID(). Please don't. obrien and I are trying to decide whether ids (initially in libc) should be changed to use __RCSID() when they are cleaned up. I think we are unlikely to use it. One problem is that it is also used in other BSDs, so it can't be used to hide messy ifdefs to control the visibility of the id string in a system-dependent way. > Index: ed/buf.c > =================================================================== > RCS file: /home/ncvs/src/bin/ed/buf.c,v > retrieving revision 1.17 > diff -u -r1.17 buf.c > --- ed/buf.c 1999/08/27 23:14:12 1.17 > +++ ed/buf.c 2001/06/29 04:05:43 > @@ -24,15 +24,13 @@ > * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > * SUCH DAMAGE. > + * > + * @(#)buf.c,v 1.4 1994/02/01 00:34:35 alm Exp > */ This is a regression to approximately rev.1.10 (rev.1.11 moved the id from here to the rcsid). > #ifndef lint > -#if 0 > -static char * const rcsid = "@(#)buf.c,v 1.4 1994/02/01 00:34:35 alm Exp"; This is just a corrupted vendor id (1.4 is for FreeBSD rev.1.4), except it is more corrupt than most (it misspells "sccsid", declares rcsid as a pointer instead of an array, and uses an insufficient number of "const"s to compensate for rcsid being a pointer. The id in rev.1.1 was: #ifndef lint static char sccsid[] = "@(#)buf.c 5.5 (Berkeley) 3/28/93"; #endif /* not lint */ but I'm not sure if this file ever had anything to do with CSRG (it is not in Lite2). I would just remove this id (don't move it even further from where a vendor should have put it). > -#else > -static char * const rcsid = > - "$FreeBSD: src/bin/ed/buf.c,v 1.17 1999/08/27 23:14:12 peter Exp $"; The correct fix is to declare rcsid normally: static const char rcsid[] = > -#endif > +#include > +__RCSID("$FreeBSD: src/bin/ed/buf.c,v 1.17 1999/08/27 23:14:12 peter Exp $"); > #endif /* not lint */ Similarly in the other files, except for the history of the id breakage. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message