From owner-freebsd-hackers Mon Jan 12 11:44:43 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA19205 for hackers-outgoing; Mon, 12 Jan 1998 11:44:43 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp03.primenet.com (smtp03.primenet.com [206.165.6.133]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id LAA19184 for ; Mon, 12 Jan 1998 11:44:32 -0800 (PST) (envelope-from tlambert@usr04.primenet.com) Received: (from daemon@localhost) by smtp03.primenet.com (8.8.8/8.8.8) id MAA18105; Mon, 12 Jan 1998 12:44:31 -0700 (MST) Received: from usr04.primenet.com(206.165.6.204) via SMTP by smtp03.primenet.com, id smtpd018082; Mon Jan 12 12:44:29 1998 Received: (from tlambert@localhost) by usr04.primenet.com (8.8.5/8.8.5) id MAA28476; Mon, 12 Jan 1998 12:44:29 -0700 (MST) From: Terry Lambert Message-Id: <199801121944.MAA28476@usr04.primenet.com> Subject: Re: New typedefs in sys/types.h To: brian@awfulhak.org (Brian Somers) Date: Mon, 12 Jan 1998 19:44:29 +0000 (GMT) Cc: freebsd-hackers@FreeBSD.ORG In-Reply-To: <199801111544.PAA27565@awfulhak.demon.co.uk> from "Brian Somers" at Jan 11, 98 03:44:07 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk > With the upcoming Alpha stuff, it looks like there are going to be > some problems..... I'm assuming that a `long' is gonna be 64 bits > rather than 32. I don't know about this. Clearly, the u_long should be replaced by u_int32_t; that's a given. But if a long is 64 bits, then what's 32 bits... a short? And if a short is 32 bits, what's 16 bits? Technically, long should be 64 bits because sizeof(int) is <= sizeof(long); but just as technically, a 64 bit int meets the "register size test" and the "single bus cycle test" for "int-ness" (the same test that *should* have made compiler writers use 16 bit int's on 68000/68010 chips). The problem is that C fails to have sized types. I'm not sure if the NetBSD/Alpha compiler uses int/long = 64 bits, or uses "long long" (I'm not a home, so it's hard to check; I always used sized types instead of int or long or long long). It sort of points up another dichotomy, though... I guess a 16 bit atomic type could be a short short? Bletch; that's as bad as a 64 bit value being a long long... Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.