Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 May 2018 15:52:22 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r334053 - head/lib/libkvm
Message-ID:  <201805221552.w4MFqMiI082208@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Tue May 22 15:52:22 2018
New Revision: 334053
URL: https://svnweb.freebsd.org/changeset/base/334053

Log:
  Use __SCCSID for SCCS IDs in libkvm sources.
  
  Rather than using #ifdef's around a static char array, use the
  existing helper macro from <sys/cdefs.h> for SCCS IDs.  To
  preserve existing behavior, add -DNO__SCCSID to CFLAGS to not
  include SCCS IDs in the built library by default.
  
  Reviewed by:	brooks, dab (older version)
  Reviewed by:	rgrimes
  Differential Revision:	https://reviews.freebsd.org/D15459

Modified:
  head/lib/libkvm/Makefile
  head/lib/libkvm/kvm.c
  head/lib/libkvm/kvm_amd64.c
  head/lib/libkvm/kvm_getloadavg.c
  head/lib/libkvm/kvm_i386.c
  head/lib/libkvm/kvm_proc.c
  head/lib/libkvm/kvm_sparc64.c

Modified: head/lib/libkvm/Makefile
==============================================================================
--- head/lib/libkvm/Makefile	Tue May 22 15:52:11 2018	(r334052)
+++ head/lib/libkvm/Makefile	Tue May 22 15:52:22 2018	(r334053)
@@ -6,7 +6,7 @@ LIB=	kvm
 
 SHLIBDIR?= /lib
 SHLIB_MAJOR=	7
-CFLAGS+=-DLIBC_SCCS -I${.CURDIR}
+CFLAGS+=-DNO__SCCSID -I${.CURDIR}
 
 WARNS?=	6
 

Modified: head/lib/libkvm/kvm.c
==============================================================================
--- head/lib/libkvm/kvm.c	Tue May 22 15:52:11 2018	(r334052)
+++ head/lib/libkvm/kvm.c	Tue May 22 15:52:22 2018	(r334053)
@@ -35,12 +35,7 @@
 
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)kvm.c	8.2 (Berkeley) 2/13/94";
-#endif
-#endif /* LIBC_SCCS and not lint */
+__SCCSID("@(#)kvm.c	8.2 (Berkeley) 2/13/94");
 
 #include <sys/param.h>
 #include <sys/fnv_hash.h>

Modified: head/lib/libkvm/kvm_amd64.c
==============================================================================
--- head/lib/libkvm/kvm_amd64.c	Tue May 22 15:52:11 2018	(r334052)
+++ head/lib/libkvm/kvm_amd64.c	Tue May 22 15:52:22 2018	(r334053)
@@ -35,12 +35,7 @@
 
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
-
-#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 */
+__SCCSID("@(#)kvm_hp300.c	8.1 (Berkeley) 6/4/93");
 
 /*
  * AMD64 machine dependent routines for kvm.  Hopefully, the forthcoming

Modified: head/lib/libkvm/kvm_getloadavg.c
==============================================================================
--- head/lib/libkvm/kvm_getloadavg.c	Tue May 22 15:52:11 2018	(r334052)
+++ head/lib/libkvm/kvm_getloadavg.c	Tue May 22 15:52:22 2018	(r334053)
@@ -31,12 +31,7 @@
 
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)kvm_getloadavg.c	8.1 (Berkeley) 6/4/93";
-#endif
-#endif /* LIBC_SCCS and not lint */
+__SCCSID("@(#)kvm_getloadavg.c	8.1 (Berkeley) 6/4/93");
 
 #include <sys/param.h>
 #include <sys/time.h>

Modified: head/lib/libkvm/kvm_i386.c
==============================================================================
--- head/lib/libkvm/kvm_i386.c	Tue May 22 15:52:11 2018	(r334052)
+++ head/lib/libkvm/kvm_i386.c	Tue May 22 15:52:22 2018	(r334053)
@@ -35,12 +35,7 @@
 
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
-
-#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 */
+__SCCSID("@(#)kvm_hp300.c	8.1 (Berkeley) 6/4/93");
 
 /*
  * i386 machine dependent routines for kvm.  Hopefully, the forthcoming

Modified: head/lib/libkvm/kvm_proc.c
==============================================================================
--- head/lib/libkvm/kvm_proc.c	Tue May 22 15:52:11 2018	(r334052)
+++ head/lib/libkvm/kvm_proc.c	Tue May 22 15:52:22 2018	(r334053)
@@ -33,14 +33,9 @@
  * SUCH DAMAGE.
  */
 
-#if 0
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)kvm_proc.c	8.3 (Berkeley) 9/23/93";
-#endif /* LIBC_SCCS and not lint */
-#endif
-
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
+__SCCSID("@(#)kvm_proc.c	8.3 (Berkeley) 9/23/93");
 
 /*
  * Proc traversal interface for kvm.  ps and w are (probably) the exclusive

Modified: head/lib/libkvm/kvm_sparc64.c
==============================================================================
--- head/lib/libkvm/kvm_sparc64.c	Tue May 22 15:52:11 2018	(r334052)
+++ head/lib/libkvm/kvm_sparc64.c	Tue May 22 15:52:22 2018	(r334053)
@@ -37,12 +37,7 @@
 
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
-
-#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 */
+__SCCSID("@(#)kvm_hp300.c	8.1 (Berkeley) 6/4/93");
 
 /*
  * sparc64 machine dependent routines for kvm.



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