1.\" $NetBSD: cdefs.3,v 1.4 2013/10/27 10:05:15 apb Exp $ 2.\" 3.\" Copyright (c) 2010 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by Jukka Ruohonen. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28.\" POSSIBILITY OF SUCH DAMAGE. 29.\" 30.Dd April 8, 2011 31.Dt CDEFS 3 32.Os 33.Sh NAME 34.Nm cdefs 35.Nd common definitions and macros 36.Sh SYNOPSIS 37.In sys/cdefs.h 38.Sh DESCRIPTION 39The 40.In sys/cdefs.h 41header includes some common definitions and macros 42typical to the C language conventions of 43.Nx . 44Among these are: 45.Bl -bullet -offset indent 46.It 47Certain C language properties and definitions that 48are versioned according to the support in compilers. 49Examples include the 50.Em __func__ 51keyword and the 52.Em restrict 53type qualifier from 54.Tn C99 . 55.It 56Macros and definitions specific to compilers, preprocessors, and linkers; see 57.Xr __CONCAT 3 , 58.Xr __UNCONST 3 , 59.Xr __USE 3 , 60.Xr __insn_barrier 3 , 61and 62.Xr attribute 3 . 63.It 64Utility macros provided for convenience; see 65.Xr __arraycount 3 66and 67.Xr bits 3 . 68.El 69.Pp 70The header also contains the 71.Fn __RCSID 72and 73.Fn __KERNEL_RCSID 74macros used for version control system 75.Pq Tn VCS 76identifiers. 77Thus, all 78.Nx 79source code files typically include 80.In sys/cdefs.h , 81included as the first thing right after any possible copyright texts; 82.Bd -literal -offset indent 83/*- 84 * Copyright (c) 1984 John Doe 85 * All rights reserved. 86 * 87 * Redistribution and use in source and binary forms, 88 * with or without modification, are permitted. 89 */ 90 91#include <sys/cdefs.h> 92__RCSID("$NetBSD: cdefs.3,v 1.4 2013/10/27 10:05:15 apb Exp $"); 93.Ed 94.Pp 95It is possible to identify the 96.Tn RCS 97keyword strings by using 98.Xr ident 1 . 99.Sh SEE ALSO 100.Xr ident 1 , 101.Xr param 3 , 102.Xr stddef 3 , 103.Xr types 3 , 104.Xr c 7 105.Sh HISTORY 106The 107.In sys/cdefs.h 108header was originally imported from 109.Bx 386 . 110