Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jul 2001 19:03:40 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Mike Barcroft <mike@q9media.com>
Cc:        audit@FreeBSD.ORG
Subject:   Re: src/bin/ed patch
Message-ID:  <Pine.BSF.4.21.0107011737260.29983-100000@besplex.bde.org>
In-Reply-To: <200106290428.f5T4S0C97998@coffee.q9media.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <sys/cdefs.h>
> +__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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0107011737260.29983-100000>