🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sequent
Article #488

Re: obsolete Sequent software

#488
From: David Haynes
Date: Fri, 22 Feb 1991 13:09
78 lines
3664 bytes
rbj@uunet.UU.NET (Root Boy Jim) writes:

>In <536@coatimundi.cs.arizona.edu> gmt@cs.arizona.edu (Gregg Townsend) writes:
>>Sequent's dual-universe approach is especially bad.  You can't write a program
>>that uses both memset() and mkdir() although such a program runs on the Unix
>>systems from Sun, Dec, MtXinu, SGI, HP, NeXT, and Encore -- and in either
>>universe of an Apollo.

>This is the real problem with dual universes. Almost every vendor has
>incorporated features from the both universes into their distribution.
>Thus, users expect and demand these features wherever they go.

>And where did they put getopt? Hidden away in a random library.

# ucb
# cd /usr/lib
# ar x libseq.a getopt.o
# cd /lib
# ar cr libc.a getopt.o
# ranlib libc.a
# rm /usr/lib/getopt.o

>Here's how we solved the problem when I was at NBS.
>First, I assumed I wanted a ucb system with att additions.
>I went to /usr/include and did: 'ln -s /usr/att/usr/include/* .',
>making available all the att include files that did not conflict with ucb.
>I also did this in /usr/include/sys.

>Then, I did a ln -s /usr/att/lib/libc.a /lib/libatt.a and linked
>with cc -o prog a.o b.o ... z.o -lc -latt.

>Notice that I used the real c library first!
>-- 
>		[rbj@uunet 1] stty sane

This may or may not get you into trouble. For example, what does 
sprintf() return? int? char *? Depends on the implementation.

I have taken a slightly different tack on all this by having a
library of the commonly misused functions. For example, this library
has copies of strtok, strcspn, strdup, as well as memset, memcpy, ...
Whenever I hit a program that needs these, I just include the
library (I call it libSun.a, since most of the code that has
these cross-overs seems to originate on Sun systems (*)).

Compilation then becomes an exercise of:

	cc -O -o out out.c -lSun

Currently libSun.a has the following entries:

memcpy.o, strpbrk.o, strspn.o, strchr.o, strrchr.o, strcspn.o, putenv.o,
vfprintf.o, vsprintf.o, strstr.o, strdup.o, memset.o, strtol.o, ctype.o,
memchr.o, rint.o, memcmp.o

Most of these were re-written by me (as an exercise) and some were taken
from the att universe libraries and placed in this library in the BSD
universe.

The advantage of this schema is that it can easily survive operating
system upgrades and re-installations and I can track which routines
are in common usage on other operating systems.

BTW: This library concept is not something I created specifically for
     running on the Sequent. I had a similar library (called libATT.a)
     on my old VAX 8650 running Ultrix.

-david-

(*) not all code that fails to find these functions comes from a 
    Sun environment. I really call it libSun.a so that my poor
    brain cells have a chance of remembering what the library is
    called. 
-- 
David Haynes	Sequent Computer Systems (Canada) Ltd.	 david@torsqnt.UUCP
----------------------------------------------------------------------------
Next week we will be discussing the Canadian High Tech industry. We will be
visiting both companies and talking with all eight people involved. -- C.R. 
Technical Details
Message-ID: <1438@torsqnt.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!bywater!scifi!hybrid!torsqnt!david
References: <53625@sequent.UUCP> <123459@uunet.UU.NET> <536@coatimundi.cs.arizona.edu> <123562@uunet.UU.NET>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!bywater!scifi!hybrid!torsqnt!david
From: david@torsqnt.UUCP (David Haynes)
Newsgroups: comp.sys.sequent
Subject: Re: obsolete Sequent software
Keywords: mv
Message-ID: <1438@torsqnt.UUCP>
Date: 22 Feb 91 13:09:28 GMT
References: <53625@sequent.UUCP> <123459@uunet.UU.NET> <536@coatimundi.cs.arizona.edu> <123562@uunet.UU.NET>
Organization: Sequent Computers (Canada) Ltd., Toronto, CANADA
Lines: 78