Date: Thu, 7 May 1998 08:03:12 +1000 (EST) From: John Birrell <jb@cimlogic.com.au> To: committers@FreeBSD.ORG Subject: Re: cvs commit: src/sys/sys termios.h Message-ID: <199805062203.IAA26919@cimlogic.com.au> In-Reply-To: <199805061522.JAA03326@pluto.plutotech.com> from "Justin T. Gibbs" at "May 6, 98 09:18:40 am"
next in thread | previous in thread | raw e-mail | index | archive | help
Justin T. Gibbs wrote: > >> Modified files: > >> sys/sys termios.h > >> Log: > >> Change a couple of long types to int to match NetBSD so that termios > >> works on alpha without any modifications. > > > >Unsigned long was correct (*). Unsigned int is incorrect because ints > >may be 16-bit. NetBSD should be more concerned about this than us. > > I believe that NetBSD decided that ints would be >= 32bits on all platforms > some time ago. I guess I should explain the theory behind these sort of changes. I'm not making any decisions about the "correctness" of code in FreeBSD's source tree for any mythical machines. As far as I am concerned, FreeBSD supports Intel i386 and above. That means int and long are 32 bits. To get a working FreeBSD/Alpha using a NetBSD kernel, I want to make as few changes to FreeBSD sources as possible, and avoid destabilizing i386 in the process. On alpha, that means int is 32 bits, long is 64 bits. Where there are variables in user-space that are passed to the kernel in FreeBSD/NetBSD and the size of these variables differs when compiled on alpha, I change the variable so that there is no effective change to i386. This commonly means that things coded as long and used as 32-bit integers are changed to int. And pointers that are cast to int are changed to cast to long. I am preparing a web page that lists the working status of programs and libraries on FreeBSD/Alpha. It won't be long before I start working on the kernel end. To do that, it would be helpful to be able to use the bus code that Mike Smith says that Justin will be/is using with CAM. I think this will simplfy the porting of NetBSD's alpha devices. -- John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/ CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805062203.IAA26919>