From d9795318e5b7abd02d912afbe5a8bf788f3c32b4 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 3 Jan 2014 11:47:08 +0100 Subject: [PATCH] cdefs.h: ignore known rcs id macros This helps to retain history, reduces FreeBSD porting diffs slightly and won't introduce binary changes. Adjust the porting doc accordingly. Discussed-with: swildner Taken-from: FreeBSD --- doc/porting_drivers.txt | 2 -- sys/sys/cdefs.h | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/doc/porting_drivers.txt b/doc/porting_drivers.txt index af6a91c591..7e529f7ddb 100644 --- a/doc/porting_drivers.txt +++ b/doc/porting_drivers.txt @@ -9,8 +9,6 @@ files' IDs manually, either in the files themselves or in the commit message. The general idea is that it must not get lost. -* Remove FBSDID declaration and '#include ' as well. - * Driver local #include's probably use a path. These need to be changed to "blah.h". '.' is not included in the #include path in FreeBSD builds, but it is in DragonFly builds. diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 9c4094239e..59a062141a 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -596,4 +596,28 @@ #define __GLOBL1(sym) __asm__(".globl " #sym) #define __GLOBL(sym) __GLOBL1(sym) +/* + * Ignore the rcs id of a source file. + */ + +#ifndef __FBSDID +#define __FBSDID(s) struct __hack +#endif + +#ifndef __RCSID +#define __RCSID(s) struct __hack +#endif + +#ifndef __RCSID_SOURCE +#define __RCSID_SOURCE(s) struct __hack +#endif + +#ifndef __SCCSID +#define __SCCSID(s) struct __hack +#endif + +#ifndef __COPYRIGHT +#define __COPYRIGHT(s) struct __hack +#endif + #endif /* !_SYS_CDEFS_H_ */ -- 2.41.0