From owner-cvs-src@FreeBSD.ORG Mon Jul 7 10:37:13 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 287D537B401; Mon, 7 Jul 2003 10:37:13 -0700 (PDT) Received: from smtp1.server.rpi.edu (smtp1.server.rpi.edu [128.113.2.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0750C43F3F; Mon, 7 Jul 2003 10:37:12 -0700 (PDT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp1.server.rpi.edu (8.12.9/8.12.9) with ESMTP id h67Hb59t027788; Mon, 7 Jul 2003 13:37:05 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20030707040326.GB26228@dragon.nuxi.com> References: <200307061244.h66CiBqg079835@repoman.freebsd.org> <20030707003216.GI72093@elvis.mu.org> <20030707040326.GB26228@dragon.nuxi.com> Date: Mon, 7 Jul 2003 13:37:04 -0400 To: obrien@FreeBSD.org, Bruce Evans From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-CanItPRO-Stream: unclaimed-spam X-Scanned-By: CanIt (www . canit . ca) cc: cvs-src@FreeBSD.org cc: Alfred Perlstein cc: src-committers@FreeBSD.org cc: Philippe Charnier Subject: Re: cvs commit: src/usr.sbin/lpr/lpd lpd.c ... X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2003 17:37:13 -0000 At 9:03 PM -0700 7/6/03, David O'Brien wrote: >On Sun, Jul 06, 2003, Garance A Drosihn wrote: > > Well, any change to use __FBSDID() has to #include >> to get FBSDID() to work. Of course, /usr/include/sys/cdefs.h >> does not exist on all platforms either (and is certainly not >> likely to define __FBSDID even if the file does exist), so that's >> just more of an annoyance when I'm doing cross-platform work. > >#ifdef __FreeBSD__ >#include >__FBSDID("$FreeBSD$"); >#endif I'm willing to go with the above for the sources in lpr if it is reasonable to everyone. It's not quite what I want, but I probably should do something along these lines. Actually, let me take that a step further. How about I change all the source files to have: #include "lpr_cdefs.h" __FBSDID("$FreeBSD$"); And then add lpr/common_source/lpr_cdefs.h as: #if !defined(__FreeBSD__) #include #endif #if !defined(__FBSDID) # if !defined(lint) && !defined(STRIP_FBSDID) # define __FBSDID(s) rcsid[] = s # else # define __FBSDID(s) struct skip_rcsid_hack # endif #endif (note that I sometimes still compile lpr on an older release of freebsd, old enough that it does not have __FBSDID in it) That's probably a little ugly, but I could use it to get all of lpr using __FBSDID() so other developers will not feel tempted to add it "for me". And, all the ugliness is off in the one lpr_cdefs.h file. The nice thing about this for me is that I *might* even be able to use the "#ident" directive when compiling under IRIX, and I'll only have to change one file to do that. Would people mind if I changed all of lpr to use something along these lines? The more I think about this, the more I think I like it... -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu