summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2001-09-16 21:43:34 +0000
committerdillon <dillon@FreeBSD.org>2001-09-16 21:43:34 +0000
commite87db392b9e2f3953c5514a93923c7f05b31de49 (patch)
tree73c2ad6385e7ddada32696b2d020b418dcd77666 /sys
parent41abc6d4e41c16aaf60fbf44b2ffe0c561b27318 (diff)
downloadFreeBSD-src-e87db392b9e2f3953c5514a93923c7f05b31de49.zip
FreeBSD-src-e87db392b9e2f3953c5514a93923c7f05b31de49.tar.gz
Avoid empty decls when __FBSDIDs are turned off.
Suggested by: bde MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/cdefs.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index 492b234..e871c35 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -211,11 +211,17 @@
#define __RCSID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s)
#endif
+/*
+ * Embed the rcs id of a source file in the resulting library. Note that in
+ * more recent ELF binutils, we use .ident allowing the ID to be stripped.
+ * Usage:
+ * __FBSDID("$FreeBSD$");
+ */
#ifndef __FBSDID
#if !defined(lint) && !defined(STRIP_FBSDID)
#define __FBSDID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s)
#else
-#define __FBSDID(s)
+#define __FBSDID(s) struct __hack
#endif
#endif
OpenPOWER on IntegriCloud