Subject: Re: MAKEDEV is not portable
To: NetBSD/sparc Discussion List <port-sparc@netbsd.org>
From: Greg A. Woods <woods@most.weird.com>
List: port-sparc
Date: 01/06/1999 19:00:05
[ On Wed, January 6, 1999 at 15:48:14 (-0500), I wrote: ]
> Subject: Re: MAKEDEV is not portable
>
> support arithmetic expressions (I'd be surprised to find even one legacy
> system that supports NFSv2 but which doesn't have Ksh or some near-POSIX
> shell available -- I never ran into one in all the time I was porting
> systems software to legacy systems even back in 1993).

(to just carry on this discussion with myself one wee bit further...)

The platform in question, i.e. Sparc based systems, might be running a
legacy OS (such as SunOS-4.1 or earlier) that isn't shipped with Ksh or
some similarly capable shell -- I keep forgetting about that fact
because the first thing I normally do to every SunOS-4 machine I have to
live with for any amount of time is to download the official Ksh
binaries from <URL:http://www.research.att.com/sw/tools/reuse/> and
install them.

Of course anyone capable of finding and downloading Ksh is probably
equally capable of installing pd-ksh from sources too....

The ideal solution (in so far as this problem can be solved) would be to
generate the MAKEDEV script at the same time the kernel configuration
file is processed by config(8), and in a generated script every mknod
could be iterated and expressed exactly as it needs to be with no need
to call upon either the shell or expr(1) to do any arithmetic.

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>      <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>