Style(9) and portability

Colin Percival colin.percival at wadham.ox.ac.uk
Sat Mar 6 12:30:21 PST 2004


At 20:18 06/03/2004, Tim Kientzle wrote:
>I've been scratching my head over
>how to deal with the version ID code
>that is supposed to apear as the first
>two lines of any FreeBSD source file:
>
>#include <sys/cdefs.h>
>__FBSDID("$FreeBSD$");
>
>Clearly, I cannot reasonably assume that all
>platforms define a __FBSDID macro in
>sys/cdefs.h.

   Portability doesn't mean "the code wiil compile
on every platform and C compiler in the world".
Most platforms will have their own packaging
systems and directory hierarchy, so *some* changes
will have to be made every time code is ported; as
long as the necessary changes are obvious, I don't
see that there is any real problem.

Colin Percival




More information about the freebsd-hackers mailing list