Date: Thu, 21 Mar 2002 19:08:01 +0200 From: Alexey Zelkin <phantom@freebsd.org> To: arch@freebsd.org Subject: rcsid's in libc Message-ID: <20020321190801.A25339@gate.sim.ionidea.com>
next in thread | raw e-mail | index | archive | help
hi,
We have a mess of definitions to include RCS IDs into object files
while building libc. Currently we're using following defitions
in libc's sources: SYSLIBC_RCS, LIBC_RCS, LIBC_SCCS. Actually only
first two defines are enabled by default in libc/Makefile. First
one is used to include RCS ID in syscalls object files (asm), second
in all others (c). LIBC_SCCS is used in lots of files, but never
defined in Makefiles.
I'd like to remove LIBC_RCS and LIBC_SCCS usages and switch them
to __FBSDID() macro. Also as part of this cleanup I'd like to move
all "#if 0"'ed CSRG/Sun/etc SCCS strings to comments area (bottom
of copyright as done in many places of our source tree).
I've made a small patch against libc/Makefile, libc/sys/*.c and
libc/xdr/*.c to show way that I prefer and receive feedback/objections
against this cleanup. If no objections will be received I'll hack out
other files and commit it.
I already tried to show up this question for few times before, but
due to different reasons it was postponed. But now (since __FBSDID()
macro is introduced and things settled up) I see no reasons to not
to do it.
Index: Makefile
===================================================================
RCS file: /cvs/freebsd/src/lib/libc/Makefile,v
retrieving revision 1.31
diff -u -u -r1.31 Makefile
--- Makefile 13 Aug 2001 21:48:43 -0000 1.31
+++ Makefile 21 Mar 2002 16:57:20 -0000
@@ -3,18 +3,23 @@
#
# All library objects contain rcsid strings by default; they may be
# excluded as a space-saving measure. To produce a library that does
-# not contain these strings, delete -DLIBC_RCS and -DSYSLIBC_RCS
-# from CFLAGS below. To remove these strings from just the system call
-# stubs, remove just -DSYSLIBC_RCS from CFLAGS.
+# not contain these strings use -DNO_LIBCRCS make's option to build.
+
LIB=c
SHLIB_MAJOR= 5
SHLIB_MINOR= 0
-CFLAGS+=-DLIBC_RCS -DSYSLIBC_RCS -I${.CURDIR}/include -I${.CURDIR}/../../include
+CFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include
CFLAGS+=-DLIBC_MAJOR=${SHLIB_MAJOR}
AINC= -I${.CURDIR}/${MACHINE_ARCH}
CLEANFILES+=tags
INSTALL_PIC_ARCHIVE= yes
PRECIOUSLIB= yes
+
+.if defined(NO_LIBCRCS)
+CFLAGS+=-DSTRIP_FBSDID
+.else
+CFLAGS+=-DSYSLIBC_RCS
+.endif
#
# Include make rules that are shared with libc_r.
Index: sys/__error.c
===================================================================
RCS file: /cvs/freebsd/src/lib/libc/sys/__error.c,v
retrieving revision 1.3
diff -u -u -r1.3 __error.c
--- sys/__error.c 10 Apr 2001 04:11:50 -0000 1.3
+++ sys/__error.c 21 Mar 2002 16:32:10 -0000
@@ -29,10 +29,10 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/lib/libc/sys/__error.c,v 1.3 2001/04/10 04:11:50 deischen Exp $
*/
#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
extern int errno;
Index: sys/ftruncate.c
===================================================================
RCS file: /cvs/freebsd/src/lib/libc/sys/ftruncate.c,v
retrieving revision 1.4
diff -u -u -r1.4 ftruncate.c
--- sys/ftruncate.c 24 Jan 2001 13:01:07 -0000 1.4
+++ sys/ftruncate.c 21 Mar 2002 16:33:58 -0000
@@ -30,12 +30,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/lib/libc/sys/ftruncate.c,v 1.4 2001/01/24 13:01:07 deischen Exp $
+ * @(#)ftruncate.c 8.1 (Berkeley) 6/17/93
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ftruncate.c 8.1 (Berkeley) 6/17/93";
-#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/syscall.h>
Index: sys/lseek.c
===================================================================
RCS file: /cvs/freebsd/src/lib/libc/sys/lseek.c,v
retrieving revision 1.4
diff -u -u -r1.4 lseek.c
--- sys/lseek.c 24 Jan 2001 13:01:07 -0000 1.4
+++ sys/lseek.c 21 Mar 2002 16:34:39 -0000
@@ -30,12 +30,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/lib/libc/sys/lseek.c,v 1.4 2001/01/24 13:01:07 deischen Exp $
+ * @(#)lseek.c 8.1 (Berkeley) 6/17/93
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)lseek.c 8.1 (Berkeley) 6/17/93";
-#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/syscall.h>
Index: sys/mmap.c
===================================================================
RCS file: /cvs/freebsd/src/lib/libc/sys/mmap.c,v
retrieving revision 1.3
diff -u -u -r1.3 mmap.c
--- sys/mmap.c 9 Mar 1998 07:27:58 -0000 1.3
+++ sys/mmap.c 21 Mar 2002 16:35:19 -0000
@@ -29,11 +29,12 @@
* 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.
+ *
+ * @(#)mmap.c 8.1 (Berkeley) 6/17/93
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)mmap.c 8.1 (Berkeley) 6/17/93";
-#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/mman.h>
Index: sys/pread.c
===================================================================
RCS file: /cvs/freebsd/src/lib/libc/sys/pread.c,v
retrieving revision 1.1
diff -u -u -r1.1 pread.c
--- sys/pread.c 4 Apr 1999 21:46:24 -0000 1.1
+++ sys/pread.c 21 Mar 2002 16:35:51 -0000
@@ -29,11 +29,12 @@
* 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.
+ *
+ * @(#)mmap.c 8.1 (Berkeley) 6/17/93
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)mmap.c 8.1 (Berkeley) 6/17/93";
-#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/syscall.h>
Index: sys/pwrite.c
===================================================================
RCS file: /cvs/freebsd/src/lib/libc/sys/pwrite.c,v
retrieving revision 1.1
diff -u -u -r1.1 pwrite.c
--- sys/pwrite.c 4 Apr 1999 21:46:24 -0000 1.1
+++ sys/pwrite.c 21 Mar 2002 16:36:24 -0000
@@ -29,11 +29,12 @@
* 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.
+ *
+ * @(#)mmap.c 8.1 (Berkeley) 6/17/93
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)mmap.c 8.1 (Berkeley) 6/17/93";
-#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/syscall.h>
Index: sys/truncate.c
===================================================================
RCS file: /cvs/freebsd/src/lib/libc/sys/truncate.c,v
retrieving revision 1.2
diff -u -u -r1.2 truncate.c
--- sys/truncate.c 14 Apr 1997 15:14:58 -0000 1.2
+++ sys/truncate.c 21 Mar 2002 16:36:55 -0000
@@ -29,15 +29,15 @@
* 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.
+ *
+ * @(#)truncate.c 8.1 (Berkeley) 6/17/93
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)truncate.c 8.1 (Berkeley) 6/17/93";
-#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/syscall.h>
-
#include <unistd.h>
/*
Index: xdr/xdr.c
===================================================================
RCS file: /cvs/freebsd/src/lib/libc/xdr/xdr.c,v
retrieving revision 1.11
diff -u -u -r1.11 xdr.c
--- xdr/xdr.c 19 Mar 2001 12:49:57 -0000 1.11
+++ xdr/xdr.c 21 Mar 2002 16:39:16 -0000
@@ -27,14 +27,13 @@
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
+ *
+ * from: @(#)xdr.c 1.35 87/08/12
+ * from: @(#)xdr.c 2.1 88/07/29 4.0 RPCSRC
*/
#include <sys/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)xdr.c 1.35 87/08/12";*/
-/*static char *sccsid = "from: @(#)xdr.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$FreeBSD: src/lib/libc/xdr/xdr.c,v 1.11 2001/03/19 12:49:57 alfred Exp $";
-#endif
+__FBSDID("$FreeBSD$");
/*
* xdr.c, Generic XDR routines implementation.
Index: xdr/xdr_array.c
===================================================================
RCS file: /cvs/freebsd/src/lib/libc/xdr/xdr_array.c,v
retrieving revision 1.9
diff -u -u -r1.9 xdr_array.c
--- xdr/xdr_array.c 19 Mar 2001 12:49:57 -0000 1.9
+++ xdr/xdr_array.c 21 Mar 2002 16:40:03 -0000
@@ -27,14 +27,13 @@
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
+ *
+ * from: @(#)xdr_array.c 1.10 87/08/11 Copyr 1984 Sun Micro
+ * from: @(#)xdr_array.c 2.1 88/07/29 4.0 RPCSRC
*/
#include <sys/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)xdr_array.c 1.10 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)xdr_array.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$FreeBSD: src/lib/libc/xdr/xdr_array.c,v 1.9 2001/03/19 12:49:57 alfred Exp $";
-#endif
+__FBSDID("$FreeBSD$");
/*
* xdr_array.c, Generic XDR routines impelmentation.
Index: xdr/xdr_float.c
===================================================================
RCS file: /cvs/freebsd/src/lib/libc/xdr/xdr_float.c,v
retrieving revision 1.10
diff -u -u -r1.10 xdr_float.c
--- xdr/xdr_float.c 23 Feb 2002 19:05:26 -0000 1.10
+++ xdr/xdr_float.c 21 Mar 2002 16:40:46 -0000
@@ -27,14 +27,13 @@
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
+ *
+ * from: @(#)xdr_float.c 1.12 87/08/11 Copyr 1984 Sun Micro
+ * from: @(#)xdr_float.c 2.1 88/07/29 4.0 RPCSRC
*/
#include <sys/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-static char *sccsid = "@(#)xdr_float.c 1.12 87/08/11 Copyr 1984 Sun Micro";
-static char *sccsid = "@(#)xdr_float.c 2.1 88/07/29 4.0 RPCSRC";
-static char *rcsid = "$FreeBSD: src/lib/libc/xdr/xdr_float.c,v 1.10 2002/02/23 19:05:26 jake Exp $";
-#endif
+__FBSDID("$FreeBSD$");
/*
* xdr_float.c, Generic XDR routines implementation.
Index: xdr/xdr_mem.c
===================================================================
RCS file: /cvs/freebsd/src/lib/libc/xdr/xdr_mem.c,v
retrieving revision 1.9
diff -u -u -r1.9 xdr_mem.c
--- xdr/xdr_mem.c 19 Mar 2001 12:49:57 -0000 1.9
+++ xdr/xdr_mem.c 21 Mar 2002 16:41:54 -0000
@@ -27,14 +27,13 @@
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
+ *
+ * from: @(#)xdr_mem.c 1.19 87/08/11 Copyr 1984 Sun Micro
+ * from: @(#)xdr_mem.c 2.1 88/07/29 4.0 RPCSRC
*/
#include <sys/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)xdr_mem.c 1.19 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)xdr_mem.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$FreeBSD: src/lib/libc/xdr/xdr_mem.c,v 1.9 2001/03/19 12:49:57 alfred Exp $";
-#endif
+__FBSDID("$FreeBSD$");
/*
* xdr_mem.h, XDR implementation using memory buffers.
Index: xdr/xdr_rec.c
===================================================================
RCS file: /cvs/freebsd/src/lib/libc/xdr/xdr_rec.c,v
retrieving revision 1.13
diff -u -u -r1.13 xdr_rec.c
--- xdr/xdr_rec.c 19 Mar 2001 12:49:57 -0000 1.13
+++ xdr/xdr_rec.c 21 Mar 2002 16:42:29 -0000
@@ -27,14 +27,13 @@
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
+ *
+ * from: @(#)xdr_rec.c 1.21 87/08/11 Copyr 1984 Sun Micro
+ * from: @(#)xdr_rec.c 2.2 88/08/01 4.0 RPCSRC
*/
#include <sys/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)xdr_rec.c 1.21 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)xdr_rec.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$FreeBSD: src/lib/libc/xdr/xdr_rec.c,v 1.13 2001/03/19 12:49:57 alfred Exp $";
-#endif
+__FBSDID("$FreeBSD$");
/*
* xdr_rec.c, Implements TCP/IP based XDR streams with a "record marking"
Index: xdr/xdr_reference.c
===================================================================
RCS file: /cvs/freebsd/src/lib/libc/xdr/xdr_reference.c,v
retrieving revision 1.10
diff -u -u -r1.10 xdr_reference.c
--- xdr/xdr_reference.c 10 Apr 2001 03:47:40 -0000 1.10
+++ xdr/xdr_reference.c 21 Mar 2002 16:43:05 -0000
@@ -27,14 +27,13 @@
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
+ *
+ * from: @(#)xdr_reference.c 1.11 87/08/11 SMI
+ * from: @(#)xdr_reference.c 2.1 88/07/29 4.0 RPCSRC
*/
#include <sys/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)xdr_reference.c 1.11 87/08/11 SMI";*/
-/*static char *sccsid = "from: @(#)xdr_reference.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$FreeBSD: src/lib/libc/xdr/xdr_reference.c,v 1.10 2001/04/10 03:47:40 deischen Exp $";
-#endif
+__FBSDID("$FreeBSD$");
/*
* xdr_reference.c, Generic XDR routines impelmentation.
Index: xdr/xdr_sizeof.c
===================================================================
RCS file: /cvs/freebsd/src/lib/libc/xdr/xdr_sizeof.c,v
retrieving revision 1.3
diff -u -u -r1.3 xdr_sizeof.c
--- xdr/xdr_sizeof.c 19 Mar 2001 12:49:57 -0000 1.3
+++ xdr/xdr_sizeof.c 21 Mar 2002 16:46:07 -0000
@@ -1,6 +1,4 @@
/*
- * $FreeBSD: src/lib/libc/xdr/xdr_sizeof.c,v 1.3 2001/03/19 12:49:57 alfred Exp $
- *
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
* unrestricted use provided that this legend is included on all tape
* media and as a part of the software program in whole or part. Users
@@ -28,6 +26,10 @@
* 2550 Garcia Avenue
* Mountain View, California 94043
*/
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
/*
* xdr_sizeof.c
*
Index: xdr/xdr_stdio.c
===================================================================
RCS file: /cvs/freebsd/src/lib/libc/xdr/xdr_stdio.c,v
retrieving revision 1.9
diff -u -u -r1.9 xdr_stdio.c
--- xdr/xdr_stdio.c 18 Feb 2002 20:35:18 -0000 1.9
+++ xdr/xdr_stdio.c 21 Mar 2002 16:44:08 -0000
@@ -27,14 +27,13 @@
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
+ *
+ * from: @(#)xdr_stdio.c 1.16 87/08/11 Copyr 1984 Sun Micro
+ * from: @(#)xdr_stdio.c 2.1 88/07/29 4.0 RPCSRC
*/
#include <sys/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)xdr_stdio.c 1.16 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)xdr_stdio.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$FreeBSD: src/lib/libc/xdr/xdr_stdio.c,v 1.9 2002/02/18 20:35:18 mike Exp $";
-#endif
+__FBSDID("$FreeBSD$");
/*
* xdr_stdio.c, XDR implementation on standard i/o file.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020321190801.A25339>
