[494] in NetBSD-Development

home help back first fref pref prev next nref lref last post

Re: __NetBSD__

daemon@ATHENA.MIT.EDU (Greg Hudson)
Fri Jan 27 14:38:31 1995

To: yoav@MIT.EDU
Cc: netbsd-dev@MIT.EDU
In-Reply-To: Your message of "Fri, 27 Jan 1995 14:18:52 EST."
             <199501271918.OAA00343@I-See-Everything-Twice.MIT.EDU> 
Date: Fri, 27 Jan 1995 14:38:07 EST
From: Greg Hudson <ghudson@MIT.EDU>


I evidently confused a couple of people with my comment about using
#ifdef __NetBSD__.

First, I wasn't directly addressing jhawk or the code in
/afs/sipb/project/sipb-athena/login; I was expanding on a general
point, which is this:

	* Generally, code that doesn't just build for NetBSD is
	  unportable.
	* Rather than #ifdef __NetBSD__ to get it to build on NetBSD,
	  we should make the code more portable.

For things like login.c, we may have few alternatives except for
#ifdef __NetBSD__, but for cases like "long lseek();", we should
simply remove the declaration and #include <unistd.h> instead.  This
will work on the next operating system, on operating systems which
make lseek() return a 128-bit type, etc..

Oftentimes, the "right" answer is using configure, which is much more
work than people want to do, so we resort to the wrong answer of using
#ifdef __NetBSD__.  This is fine, as long as we don't consider it the
right answer.


home help back first fref pref prev next nref lref last post