From owner-svn-src-head@FreeBSD.ORG Tue Jan 24 15:30:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49D8110656AC; Tue, 24 Jan 2012 15:30:19 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 25B348FC13; Tue, 24 Jan 2012 15:30:18 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 372F125D386D; Tue, 24 Jan 2012 15:30:17 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 5F216BD9DE5; Tue, 24 Jan 2012 15:30:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id Fg+DnWH4PPVb; Tue, 24 Jan 2012 15:30:15 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 42DBABD9DE3; Tue, 24 Jan 2012 15:30:15 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201201241513.q0OFDtfM080661@svn.freebsd.org> Date: Tue, 24 Jan 2012 15:30:14 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <85825935-7581-4CDB-8D4F-DA5CF935492C@FreeBSD.org> References: <201201241513.q0OFDtfM080661@svn.freebsd.org> To: Alexander Leidinger X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r230509 - head/tools/kerneldoc/subsys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jan 2012 15:30:19 -0000 On 24. Jan 2012, at 15:13 , Alexander Leidinger wrote: > Author: netchild > Date: Tue Jan 24 15:13:55 2012 > New Revision: 230509 > URL: http://svn.freebsd.org/changeset/base/230509 >=20 > Log: > Just define __FreeBSD__ to 1 instead of doing what the compiler does. > The kernel is supposed to DTRT based upon the __FreeBSD_version = value, > not the value of __FreeBSD__. >=20 > Discussed with: bz >=20 > Modified: > head/tools/kerneldoc/subsys/common-Doxyfile >=20 > Modified: head/tools/kerneldoc/subsys/common-Doxyfile > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/tools/kerneldoc/subsys/common-Doxyfile Tue Jan 24 = 14:27:14 2012 (r230508) > +++ head/tools/kerneldoc/subsys/common-Doxyfile Tue Jan 24 = 15:13:55 2012 (r230509) > @@ -230,8 +230,12 @@ SEARCH_INCLUDES =3D YES > INCLUDE_PATH =3D $(DOXYGEN_SRC_INCLUDE_PATH) \ > . > INCLUDE_FILE_PATTERNS =3D *.h > +# __FreeBSD__ is normally defined to the the major version number of > +# FreeBSD. In the kernel source it is just checked for !=3D 0, and That's not what it is and not what I said. It's checked to be defined. = Defining it to 0 or even nothing will still be perfectly ok. Try cpp on this: #define FOO #ifdef FOO #warning "It works" #endif #define BAR 0 #ifdef BAR #warning "It still works" #endif #define BAZ 42 #ifdef BAZ #warning "You guessed it. It still works" #endif #ifdef NOWAY #warning "You shall never see this" #endif > +# __FreeBSD_version is used for version dependend code. > +# To make live simple on major version bumps, just define __FreeBSD__ = to 1. > PREDEFINED =3D _KERNEL \ > - __FreeBSD__=3D10 \ > + __FreeBSD__=3D1 \ > __${TARGET_ARCH}__=3D1 \ > __${TARGET_ARCH}=3D1 > EXPAND_AS_DEFINED =3D=20 --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do!