Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Apr 2018 08:28:24 -0700
From:      John Baldwin <jhb@freebsd.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        "freebsd-arch@freebsd.org" <arch@freebsd.org>
Subject:   Re: LIBC_SCCS
Message-ID:  <10594521.E4XjG3cQAG@ralph.baldwin.cx>
In-Reply-To: <CANCZdfrdKLuYiDinZV=G2smOo_wk%2B0Djk7BJkqXa0Mn%2BNyTxUg@mail.gmail.com>
References:  <1711113.VelFtdTVS7@ralph.baldwin.cx> <CANCZdfrdKLuYiDinZV=G2smOo_wk%2B0Djk7BJkqXa0Mn%2BNyTxUg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday, April 27, 2018 05:36:56 PM Warner Losh wrote:
> On Fri, Apr 27, 2018 at 4:19 PM, John Baldwin <jhb@freebsd.org> wrote:
> 
> > 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'm cool with it. Why not do __SCCS_ID( "@(#)kvm_hp300.c 8.1 (Berkeley)
> 6/4/93");?

I probably would use that, though perhaps still wrapped in the #ifdef so we
don't enable them by default as __SCCS_ID is enabled by default.  Alternatively
we could drop LIBC_SCCS entirely and define NO__SCCSID by default for the
affected libraries?

> I don't know if we need a separate #ifdef for each SCCS_ID subtree in our
> build. Either it's there, or it's not. Default: not. It would also let us
> put them in separate sections ala our freebsd id macros.
> 
> I'm slightly against removing it altogether, though I can see a good case
> for it. I have a visceral reaction that puts me in the 'against complete
> removal' camp, but only just.

I probably lean towards not outright removing them, but I don't feel too
strongly.

-- 
John Baldwin



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