From owner-freebsd-current@FreeBSD.ORG Wed Aug 11 22:47:32 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9587D16A4CE for ; Wed, 11 Aug 2004 22:47:32 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F43143D31 for ; Wed, 11 Aug 2004 22:47:31 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id 6A8E17A3D2 for ; Wed, 11 Aug 2004 15:47:31 -0700 (PDT) Message-ID: <411AA203.1020502@elischer.org> Date: Wed, 11 Aug 2004 15:47:31 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030516 X-Accept-Language: en, hu MIME-Version: 1.0 To: current@freebsd.org Content-Type: multipart/mixed; boundary="------------040706030807060502090005" Subject: [Fwd: RFC.. defining __rangeof() in cdefs.h] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Aug 2004 22:47:32 -0000 This is a multi-part message in MIME format. --------------040706030807060502090005 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Interresting.. not a single comment.. :-/ --------------040706030807060502090005 Content-Type: message/rfc822; name="RFC.. defining __rangeof() in cdefs.h" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="RFC.. defining __rangeof() in cdefs.h" Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by idiom.com (8.12.9p2/8.12.9) with ESMTP id i79LeqOZ063959 for ; Mon, 9 Aug 2004 14:40:53 -0700 (PDT) (envelope-from owner-freebsd-current@freebsd.org) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 372F356A1D for ; Mon, 9 Aug 2004 21:40:45 +0000 (GMT) (envelope-from owner-freebsd-current@freebsd.org) Received: by hub.freebsd.org (Postfix) id 7CF5C16A4E7; Mon, 9 Aug 2004 21:40:43 +0000 (GMT) Delivered-To: julian@freebsd.org Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 6457C16A4E4; Mon, 9 Aug 2004 21:40:43 +0000 (GMT) Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE71916A4CE for ; Mon, 9 Aug 2004 21:40:38 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 75ED643D5A for ; Mon, 9 Aug 2004 21:40:38 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id 12E377A3D2 for ; Mon, 9 Aug 2004 14:40:38 -0700 (PDT) Message-ID: <4117EF55.4090409@elischer.org> Date: Mon, 09 Aug 2004 14:40:37 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030516 X-Accept-Language: en, hu MIME-Version: 1.0 To: current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: RFC.. defining __rangeof() in cdefs.h X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org X-Accessio-Status: NO, score=0.00,none version=6.0 count=0 X-Accessio-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on idiom.com X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63 X-Idiom-Reporting: If this was spam, please forward it to spambox@idiom.com I'm considdereing adding: Index: sys/cdefs.h =================================================================== RCS file: /home/ncvs/src/sys/sys/cdefs.h,v retrieving revision 1.83 diff -u -r1.83 cdefs.h --- sys/cdefs.h 28 Jul 2004 07:03:42 -0000 1.83 +++ sys/cdefs.h 9 Aug 2004 21:36:41 -0000 @@ -241,6 +241,8 @@ * require it. */ #define __offsetof(type, field) ((size_t)(&((type *)0)->field)) +#define __rangeof(type, start, end) \ + (__offsetof(type, end) - __offsetof(type, start)) /* * Compiler-dependent macros to declare that functions take printf-like it is used in several places. most importantly in fork1() and it is defined in several files (*).. we should probably just have one copy... (*) in the form RANGEOF() but if we define it in cdefs.h I'd change that to __rangeof() to match __offsetof() _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" --------------040706030807060502090005--