[485] in NetBSD-Development

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

Re: login and login.krb changes

daemon@ATHENA.MIT.EDU (Greg Hudson)
Fri Jan 27 12:22:00 1995

To: John Hawkinson <jhawk@MIT.EDU>
Cc: netbsd-dev@MIT.EDU
In-Reply-To: Your message of "Fri, 27 Jan 1995 08:50:23 EST."
             <199501271350.IAA06602@lola-granola.MIT.EDU> 
Date: Fri, 27 Jan 1995 12:21:58 EST
From: Greg Hudson <ghudson@MIT.EDU>


> 	2) Makefile.netbsd with an @sys symlink from Makefile. Notice
> 	this is a 44BSD Makefile.

I would hardly call this a "paragon" of a way a source tree ought to
be set up.  Having a separate Makefile for each platform we port to is
generally the wrong answer, since it institutionalizes the notion that
we should spend lots of effort porting to each platform that we want.

To be fair, login is a very difficult program to make portable (there
are few standards in this area, and the standards like termios aren't
very backward-compatible with old practice), but that shouldn't stop
us from using common files whenever possible.  In particular, that
shouldn't stop us from using tools that aren't specific to a
particular operating system.  That is to say, imake, configure, and
vanilla Make are okay (except that imake sucks), whereas BSD 4.4 make
is not okay, since it will be completely useless to us on any other
platform.

We should also try to avoid "#ifdef __NetBSD__" when porting code,
because it won't help us port to operating systems like NetBSD.  You
tend to get lines in code like:

#if defined(_IBMR2) || defined(linux) || defined(__NetBSD__)
Do something POSIX-compliant
#else
Do something that works on the Vax and RT but no new platforms
#endif

When we port to a new architecture, this code will break.  It would be
better to simply forget about platforms that aren't POSIX-compliant or
specifically #ifdef for broken platforms.

(This is not to say that I do a very good job of avoiding #ifdef
__NetBSD__; the right solution often requires more work than the quick
and dirty hack.)


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