From owner-freebsd-questions Thu Jan 13 5:37:16 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mx2.x-treme.gr (mx2.x-treme.gr [212.120.192.15]) by hub.freebsd.org (Postfix) with ESMTP id BA25D14E4D for ; Thu, 13 Jan 2000 05:37:05 -0800 (PST) (envelope-from keramida@diogenis.ceid.upatras.gr) Received: from hades.hell.gr (pat41.x-treme.gr [212.120.197.233]) by mx2.x-treme.gr (8.9.3/8.9.3/IPNG-ADV-ANTISPAM-0.1) with ESMTP id PAA23419; Thu, 13 Jan 2000 15:37:00 +0200 Received: (from charon@localhost) by hades.hell.gr (8.9.3/8.9.3) id OAA02690; Thu, 13 Jan 2000 14:36:20 +0200 (EET) (envelope-from keramida@diogenis.ceid.upatras.gr) Date: Thu, 13 Jan 2000 14:36:19 +0200 From: Giorgos Keramidas To: Mikhail Evstiounin Cc: freebsd-questions@freebsd.org Subject: Re: Giving a sighandler more information Message-ID: <20000113143619.A2590@hades.hell.gr> Reply-To: keramida@ceid.upatras.gr References: <00a201bf5d70$fb0cbea0$fc353018@evstiouninadelphia.net.pit.adelphia.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre3i In-Reply-To: <00a201bf5d70$fb0cbea0$fc353018@evstiouninadelphia.net.pit.adelphia.net> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Jan 12, 2000 at 09:50:41PM -0500, Mikhail Evstiounin wrote: > > -----Original Message----- > From: Oliver Fromme > To: freebsd-questions@FreeBSD.ORG > Date: Wednesday, January 12, 2000 9:37 PM > Subject: Re: Giving a sighandler more information > > > >Laurence Berland wrote in list.freebsd-questions: > > > Followup question: is a sig_atomic_t appropriate to hold the value of a > > > FILE * ? > > > >No. It is only guaranteed to be large enough to hold an int. > >Of course, on intel PCs, a pointer has the same size as an int, > >but not on other platforms (e.g. the Alpha). Therefore, > >portable programs cannot store a pointer in a sig_atomic_t. In fact in most Unix incarnations that I've worked with so far, the size of `int' is the same as the size of `long'. However, `long' has the size of the longest value that can be stored in a word on a given architecture, and this is usually just the right size for storing pointers ;) > Sorry, guys, but it requirenments of ANSI that sizeof(void*) == > sizeof(int). Don't get me wrong, I like Alpha, but alpha compiler is > not 100% ANSI compatible. If you take a look at HP aCC and 64 bit > architecture - you will see the same. So, let me rephrase it - in > ANSI world you could do it. and question does it mean that alpha > integer is 32 bit, or pointer has more than 64? I used GNU C a couple > of times there and everything was OK. Is it a special compiler? GNU cc is a different compiler than those usually shipped from the so called `vendors'. It is not 100% ANSI compliant either, but those few features that are not ANSI-safe can be turned off with an option. To qquote the GCC manuals, one can use -ansi to "turn off certain features of GNU C that are incompatible with ANSI C, such as `asm', `inline' and `typeof' keywords". For even stricter ANSI support, the use of -pedantic will "cause non-ANSI programs to be rejected gratuitously". -- Giorgos Keramidas, < keramida @ ceid . upatras . gr > "What we have to learn to do, we learn by doing." [Aristotle] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message