System V -vs- 4.2bsd portability

Guy Harris guy at rlgvax.UUCP
Tue Aug 14 09:04:43 AEST 1984


> 2. Makefiles. System V's make is more powerful and in going to 4.2bsd they
>    will need to be beefed up.

We have a version of the System III "make" (the System V "make" seems to
differ only in a couple of small things like minor bug fixes) which runs
under 4.2BSD, and also can automatically check files out of RCS; it's
available if you have a System III or later license.

> 4. Use of library routines only available on one of the systems.

One of the most common instances of that problem is that "index" was renamed
"strchr" and "rindex" was renamed "strrchr" in System n.  The routines have
identical functionality, so a "#define" or "-Dstrchr=index" should clear up that
problem.

> 5. More significant characters in variable names on 4.2bsd.

If the code is going to or from a non-PDP-11 version of System V Release 2,
this shouldn't be a problem as S5R2 on non-PDP-11 processors has "flexnames"
as well.

> 6. One musn't scan directories on 4.2bsd the way one does on System V. Lib-
>    rary routines are supplied with 4.2bsd to use; versions of the library is
>    available for System V.

The libraries are, at worst, marked "Copyright ... Regents of the University
of California"; I make a plea here (again) that all vendors of non-4.2BSD-based
UNIX systems (including AT&T Technologies) include it in "libc" in their next
release.  (We have.)  It makes a directory a reasonable abstraction, not only
making it easier to move code between 4.2BSD and non-4.2BSD systems, but also
makes it easier to deal with non-UNIX systems which may not even permit you to
open a directory as a regular file.  Furthermore, the routines incorporate the
code needed to null-terminate file names and skip empty space in directories;
how many times has that code been written?

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy



More information about the Comp.unix.wizards mailing list