Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Apr 2018 18:23:46 -0500
From:      Mike Karels <mike@karels.net>
To:        John Baldwin <jhb@freebsd.org>
Cc:        arch@freebsd.org
Subject:   Re: LIBC_SCCS
Message-ID:  <201804272323.w3RNNksd002470@mail.karels.net>
In-Reply-To: Your message of Fri, 27 Apr 2018 15:19:06 -0700. <1711113.VelFtdTVS7@ralph.baldwin.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
> I suspect no one cares, but for whatever reason our current handling of the
> LIBC_SCCS macro in some of our libraries annoys me.  In theory it seems like
> LIBC_SCCS's purpose is to control whether or not old SCCS IDs from Berkeley
> are included in libc's sources when libc is built.  (Similar to how macros
> control the behavior of __FBSDID().)  However, we use an odd construct in
> the tree.  First, we define LIBC_SCCS by default in the CFLAGS of various
> libraries (libkvm, libutil, libthr, libc, etc.) which in theory would enable
> the IDs, but then we explicitly wrap them in #if 0, e.g.:

> #if defined(LIBC_SCCS) && !defined(lint)
> #if 0
> static char sccsid[] = "@(#)kvm_hp300.c 8.1 (Berkeley) 6/4/93";
> #endif
> #endif /* LIBC_SCCS and not lint */

> I'd rather that we make LIBC_SCCS actually work by removing the #if 0 (and
> perhaps the lint baggage) but then remove it from the default CFLAGS to
> preserve the existing behavior by default.  Does anyone else care if I do
> this?

I don't object to this, but I wonder whether anyone will ever want these
ancient IDs in libc.  They were useful when libc was not a shared library,
but (a) libc is shared, and (b) the sccsid is not changing much, at least
not for the last 25 years.  But "#ifdef LIBC_SCCS" is as good a way as
any to turn this into a comment.

You picked an interesting example; I wonder when someone last ran a
BSD system on an HP 300.  IIRC, it was a 68030-based system.

		Mike



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804272323.w3RNNksd002470>