Module Name: src Committed By: jruoho Date: Thu Dec 16 10:19:14 UTC 2010
Modified Files: src/distrib/sets/lists/comp: mi src/share/man/man3: Makefile Added Files: src/share/man/man3: cdefs.3 Log Message: Now that <sys/cdefs.h> is mostly documented, include a small summary page for it, cdefs(3). To generate a diff of this commit: cvs rdiff -u -r1.1546 -r1.1547 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.59 -r1.60 src/share/man/man3/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man3/cdefs.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1546 src/distrib/sets/lists/comp/mi:1.1547 --- src/distrib/sets/lists/comp/mi:1.1546 Thu Dec 16 08:35:36 2010 +++ src/distrib/sets/lists/comp/mi Thu Dec 16 10:19:13 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1546 2010/12/16 08:35:36 jruoho Exp $ +# $NetBSD: mi,v 1.1547 2010/12/16 10:19:13 jruoho Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -4897,6 +4897,8 @@ ./usr/share/man/cat3/__BIT.0 comp-c-catman .cat ./usr/share/man/cat3/__BITS.0 comp-c-catman .cat ./usr/share/man/cat3/__CONCAT.0 comp-c-catman .cat +./usr/share/man/cat3/__KERNEL_RCSID.0 comp-c-catman .cat +./usr/share/man/cat3/__RCSID.0 comp-c-catman .cat ./usr/share/man/cat3/__SHIFTIN.0 comp-c-catman .cat ./usr/share/man/cat3/__SHIFTOUT.0 comp-c-catman .cat ./usr/share/man/cat3/__SHIFTOUT_MASK.0 comp-c-catman .cat @@ -5393,6 +5395,7 @@ ./usr/share/man/cat3/cdbw_put.0 comp-c-catman .cat ./usr/share/man/cat3/cdbw_put_data.0 comp-c-catman .cat ./usr/share/man/cat3/cdbw_put_key.0 comp-c-catman .cat +./usr/share/man/cat3/cdefs.0 comp-c-catman .cat ./usr/share/man/cat3/cdk.0 comp-obsolete obsolete ./usr/share/man/cat3/cdk_alphalist.0 comp-obsolete obsolete ./usr/share/man/cat3/cdk_binding.0 comp-obsolete obsolete @@ -10961,6 +10964,8 @@ ./usr/share/man/html3/__BIT.html comp-c-htmlman html ./usr/share/man/html3/__BITS.html comp-c-htmlman html ./usr/share/man/html3/__CONCAT.html comp-c-htmlman html +./usr/share/man/html3/__KERNEL_RCSID.html comp-c-htmlman html +./usr/share/man/html3/__RCSID.html comp-c-htmlman html ./usr/share/man/html3/__SHIFTIN.html comp-c-htmlman html ./usr/share/man/html3/__SHIFTOUT.html comp-c-htmlman html ./usr/share/man/html3/__SHIFTOUT_MASK.html comp-c-htmlman html @@ -11446,6 +11451,7 @@ ./usr/share/man/html3/cdbw_put.html comp-c-htmlman html ./usr/share/man/html3/cdbw_put_data.html comp-c-htmlman html ./usr/share/man/html3/cdbw_put_key.html comp-c-htmlman html +./usr/share/man/html3/cdefs.html comp-c-htmlman html ./usr/share/man/html3/ceil.html comp-c-htmlman html ./usr/share/man/html3/ceilf.html comp-c-htmlman html ./usr/share/man/html3/cexp.html comp-c-htmlman complex,html @@ -16825,6 +16831,8 @@ ./usr/share/man/man3/__BIT.3 comp-c-man .man ./usr/share/man/man3/__BITS.3 comp-c-man .man ./usr/share/man/man3/__CONCAT.3 comp-c-man .man +./usr/share/man/man3/__KERNEL_RCSID.3 comp-c-man .man +./usr/share/man/man3/__RCSID.3 comp-c-man .man ./usr/share/man/man3/__SHIFTIN.3 comp-c-man .man ./usr/share/man/man3/__SHIFTOUT.3 comp-c-man .man ./usr/share/man/man3/__SHIFTOUT_MASK.3 comp-c-man .man @@ -17321,6 +17329,7 @@ ./usr/share/man/man3/cdbw_put.3 comp-c-man .man ./usr/share/man/man3/cdbw_put_data.3 comp-c-man .man ./usr/share/man/man3/cdbw_put_key.3 comp-c-man .man +./usr/share/man/man3/cdefs.3 comp-c-man .man ./usr/share/man/man3/cdk.3 comp-obsolete obsolete ./usr/share/man/man3/cdk_alphalist.3 comp-obsolete obsolete ./usr/share/man/man3/cdk_binding.3 comp-obsolete obsolete Index: src/share/man/man3/Makefile diff -u src/share/man/man3/Makefile:1.59 src/share/man/man3/Makefile:1.60 --- src/share/man/man3/Makefile:1.59 Thu Dec 16 08:35:35 2010 +++ src/share/man/man3/Makefile Thu Dec 16 10:19:14 2010 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.59 2010/12/16 08:35:35 jruoho Exp $ +# $NetBSD: Makefile,v 1.60 2010/12/16 10:19:14 jruoho Exp $ # @(#)Makefile 8.2 (Berkeley) 12/13/93 MAN= _DIAGASSERT.3 __CONCAT.3 __UNCONST.3 CMSG_DATA.3 \ - __arraycount.3 assert.3 attribute.3 bits.3 bitstring.3 dirent.3 \ - dlfcn.3 dl_iterate_phdr.3 end.3 \ + __arraycount.3 assert.3 attribute.3 bits.3 bitstring.3 \ + cdefs.3 dirent.3 dlfcn.3 dl_iterate_phdr.3 end.3 \ fast_divide32.3 ffs32.3 gcq.3 \ ilog2.3 intro.3 inttypes.3 iso646.3 \ makedev.3 offsetof.3 queue.3 rbtree.3 sigevent.3 \ @@ -32,6 +32,8 @@ bits.3 __SHIFTIN.3 \ bits.3 __SHIFTOUT.3 \ bits.3 __SHIFTOUT_MASK.3 +MLINKS+=cdefs.3 __RCSID.3 \ + cdefs.3 __KERNEL_RCSID.3 MLINKS+=end.3 edata.3 end.3 etext.3 MLINKS+=fast_divide32.3 fast_divide32_prepare.3 \ fast_divide32.3 fast_remainder32.3 Added files: Index: src/share/man/man3/cdefs.3 diff -u /dev/null src/share/man/man3/cdefs.3:1.1 --- /dev/null Thu Dec 16 10:19:14 2010 +++ src/share/man/man3/cdefs.3 Thu Dec 16 10:19:14 2010 @@ -0,0 +1,106 @@ +.\" $NetBSD: cdefs.3,v 1.1 2010/12/16 10:19:14 jruoho Exp $ +.\" +.\" Copyright (c) 2010 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Jukka Ruohonen. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT 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. +.\" +.Dd December 16, 2010 +.Dt CDEFS 3 +.Os +.Sh NAME +.Nm cdefs +.Nd common definitions and macros +.Sh SYNOPSIS +.In sys/cdefs.h +.Sh DESCRIPTION +The +.In sys/cdefs.h +header includes some common definitions and macros +typical to the C language conventions of +.Nx . +Among these are: +.Bl -bullet -offset indent +.It +Certain C language properties and definitions that +are versioned according to the support in compilers. +Examples include the +.Em __func__ +keyword and the +.Em restrict +type qualifier from +.Tn C99 . +.It +Macros and definitions specific to compilers, preprocessors, and linkers; see +.Xr attribute 3 , +.Xr __CONCAT 3 , +and +.Xr __UNCONST 3 . +.It +Utility macros provided for convenience; see +.Xr __arraycount 3 +and +.Xr bits 3 . +.El +.Pp +The header also contains the +.Fn __RCSID +and +.Fn __KERNEL_RCSID +macros used for version control system +.Pq Tn VCS +identifiers. +Thus, all +.Nx +source code files typically include +.In sys/cdefs.h , +included as the first thing right after any possible copyright texts; +.Bd -literal -offset indent +/*- + * Copyright (c) 1984 John Doe + * All rights reserved. + * + * Redistribution and use in source and binary forms, + * with or without modification, are permitted. + */ + +#include <sys/cdefs.h> +__RCSID("$NetBSD: cdefs.3,v 1.1 2010/12/16 10:19:14 jruoho Exp $"); +.Ed +.Pp +It is possible to identify the +.Tn RCS +keyword strings by using +.Xr ident 1 . +.Sh SEE ALSO +.Xr ident 1 , +.Xr stddef 3 , +.Xr types 3 , +.Xr c 7 +.Sh HISTORY +The +.In sys/cdefs.h +header was originally imported from +.Bx 386 .