Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!pyramid!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: net.unix-wizards Subject: Re: merging 4BSD and SysV utilities Message-ID: <6313@sun.uucp> Date: Tue, 19-Aug-86 04:11:32 EDT Article-I.D.: sun.6313 Posted: Tue Aug 19 04:11:32 1986 Date-Received: Wed, 20-Aug-86 08:32:23 EDT References: <2711@brl-smoke.ARPA> <2000042@ccvaxa> <3122@brl-smoke.ARPA> Organization: Sun Microsystems, Inc. Lines: 43 > One has to maintain two versions of most libraries, since for example the > data structures included via differ between the two environments. Not on my machine, they don't! Both environments use the 4.3BSD FILE structure. The "_flag" is a "short", and includes _IOSTRG; this is necessary since FILE structures are "malloc"ed except for "stdin", "stdout", and "stderr" and _NFILE no longer exists (4.3ism). The "_bufendtab" array is superfluous, since there's a "_bufsize" element in the FILE structure; the only reason the USDL didn't stick it in also was probably that they wanted to allow old ".o" files to be linked with the new library. Since all our old ".o" files were built with the 4.[23]BSD structure, this didn't apply to us. Most of the code of the standard I/O library actually comes from S5R2, modified as necessary to work in our environment. For the few routines that behave differently, two versions are provided in two different libraries. Any code written to conform to the SVID will work, since it won't be mucking with the innards of standard I/O. Any code that mucks with the innards of standard I/O is taking its chances; other implementations, now or in the future, may not have the same innards. > Another, relatively less severe, drawback to split environments is the > extra storage space required to maintain two copies of everything. Then don't maintain two copies of *everything*, just of the stuff that's incompatibly different. We supply only one version of most commands. > but the long-term goal of the UNIX community should be to merge > the strengths of these environments while gradually leaving their > weaknesses behind. Some systems may still have to provide a "4BSD compatiblity library and command set", for things like old scripts that use "tr" and old programs that assume "sprintf" returns a pointer to its first argument. (Neither of these, BTW, are the direct result of anything Berkeley has done; one version of AT&T UNIX, namely V7, worked one way, and 4BSD is derived from that. Both were different in S3 and S5; the first because S3/S5 had the older V6 version, and the second because it was changed from the V7 version.) -- Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com (or guy@sun.arpa)