Subject: sccsid's and rcsid's
To: None <tech-userlevel@netbsd.org>
From: Michael Graff <explorer@flame.org>
List: tech-userlevel
Date: 11/26/1999 12:16:58
I'd like to continue the ``static char fooid[] = "bar";'' cleanup
thing that was done some time ago. This would touch every file in
libc for one, and perhaps other libraries and files as well
eventually.
I'm going many many greps for "static" in libraries right now, and
these lines are getting annoying to see. If everyone called it sccsid
it wouldn't be as bad, but some don't.
Currently, we have many, many places that look like this in our
library files:
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: verr.c,v 1.4 1999/08/17 03:47:40 mycroft Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
I'd like to change this to look like:
#if defined(LIBC_SCCS) && !defined(lint)
__SCCSID("@(#)err.c 8.1 (Berkeley) 6/4/93");
__RCSID("$NetBSD: verr.c,v 1.4 1999/08/17 03:47:40 mycroft Exp $");
#endif /* LIBC_SCCS and not lint */
and then add to cdefs_elf.h and cdefs_aout.h:
Index: cdefs_aout.h
===================================================================
RCS file: /cvsroot/syssrc/sys/sys/cdefs_aout.h,v
retrieving revision 1.2
diff -u -r1.2 cdefs_aout.h
--- cdefs_aout.h 1999/09/13 10:31:44 1.2
+++ cdefs_aout.h 1999/11/26 20:14:22
@@ -42,9 +42,11 @@
static const char name[] __attribute__((__unused__)) = string
#define __RCSID(_s) __IDSTRING(rcsid,_s)
+#define __SCCSID(_s)
#define __COPYRIGHT(_s) __IDSTRING(copyright,_s)
#define __KERNEL_RCSID(_n, _s) __IDSTRING(__CONCAT(rcsid,_n),_s)
+#define __KERNEL_SCCSID(_n, _s)
#define __KERNEL_COPYRIGHT(_n, _s) __IDSTRING(__CONCAT(copyright,_n),_s)
#endif /* !_SYS_CDEFS_AOUT_H_ */
Index: cdefs_elf.h
===================================================================
RCS file: /cvsroot/syssrc/sys/sys/cdefs_elf.h,v
retrieving revision 1.5
diff -u -r1.5 cdefs_elf.h
--- cdefs_elf.h 1999/09/13 10:31:44 1.5
+++ cdefs_elf.h 1999/11/26 20:14:22
@@ -77,6 +77,7 @@
#define __IDSTRING(_n,_s) __SECTIONSTRING(.ident,_s)
#define __RCSID(_s) __IDSTRING(rcsid,_s)
+#define __SCCSID(_s)
#if 0 /* XXX userland __COPYRIGHTs have \ns in them */
#define __COPYRIGHT(_s) __SECTIONSTRING(.copyright,_s)
#else
@@ -85,6 +86,7 @@
#endif
#define __KERNEL_RCSID(_n, _s) __RCSID(_s)
+#define __KERNEL_SCCSID(_n, _s)
#if 0 /* XXX see above */
#define __KERNEL_COPYRIGHT(_n, _s) __COPYRIGHT(_s)
#else