From owner-freebsd-current Mon Sep 6 7:11:37 1999 Delivered-To: freebsd-current@freebsd.org Received: from hda.hda.com (hda-bicnet.bicnet.net [209.244.238.132]) by hub.freebsd.org (Postfix) with ESMTP id 007E014DC9 for ; Mon, 6 Sep 1999 07:11:33 -0700 (PDT) (envelope-from dufault@hda.hda.com) Received: (from dufault@localhost) by hda.hda.com (8.8.5/8.8.5) id KAA07292; Mon, 6 Sep 1999 10:08:21 -0400 (EDT) From: Peter Dufault Message-Id: <199909061408.KAA07292@hda.hda.com> Subject: Re: (P)review: sigset_t for more than 32 signals In-Reply-To: <37D3C7A5.1B8A4935@scc.nl> from Marcel Moolenaar at "Sep 6, 99 03:54:45 pm" To: marcel@scc.nl (Marcel Moolenaar) Date: Mon, 6 Sep 1999 10:08:21 -0400 (EDT) Cc: current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL25 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Peter Dufault wrote: > > > Firstly, you should get rid of any explicit 32, 31, etc and anything > > else tied to the assumed number of bits in an int. > > You first need to get rid of any code that assumes that siget_t is an > (unsigned) integer. Use macros to abstract the access to the new sigset_t > so that you don't replace one assumption with the other... But you want that code to break. > > > typedef struct { > > unsigned int n; > > uint64_t v; > > } sigset_t; > > You can't use any BSD or FreeBSD specific types (such as u_int32)t) in > publicly visible types (such as sigset_t). It breaks programs because it's > not ANSI and/or Posix. Further on you'll see I don't support this (this was a "dramatization" of the structure), however, because the typedef ends in "_t" it is reserved by POSIX for the implementation. This is a particularly safe implementation typedef, since I don't anticipate uint64_t ever being used in a future specification as a different data type. I don't know about ANSI. Peter -- Peter Dufault (dufault@hda.com) Realtime development, Machine control, HD Associates, Inc. Safety critical systems, Agency approval To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message