🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.sys5
Article #333

Re: Bug in SVR4 BSD-compatibility library (libucb)

#333
From: Doug Gwyn
Date: Sat, 26 Jan 1991 07:09
22 lines
1597 bytes
In article <867@dptspd.sat.datapoint.com> lcz@sat.datapoint.com (Lee Ziegenhals) writes:
>There appears to be a bug in the BSD compatibility library in SVR4.  The
>library includes the BSD version of readdir(3) which returns (struct direct *).

There is the real problem.  Even on BSD systems, it would be preferable to
use a POSIX-compatible interface (one of which I provide), and future
releases of BSD will provide that.

I understand the desire for the "compatibility library" to support
struct direct etc. in order to permit recompilation of obsolete code
without having to edit it first.  However, it would be much better to
modernize the out-of-date source code than to promulgate support for
obsolete interfaces forever.

>My temporary solution was to remove readdir from libucb, so that getwd and
>scandir call the SYSV readdir.  The proper solution appears to be to modify
>getwd and scandir to use the BSD readdir.

Gack!  Your "temporary" solution is MUCH better than your "proper" one.
We should NOT be encouraging the proliferation of the obsolete non-POSIX
*dir() interfaces.  As for the next BSD release, getwd() and scandir()
should use the POSIX interface.
Technical Details
Message-ID: <14987@smoke.brl.mil>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!linac!uwm.edu!rpi!uupsi!cmcl2!adm!smoke!gwyn
References: <867@dptspd.sat.datapoint.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!linac!uwm.edu!rpi!uupsi!cmcl2!adm!smoke!gwyn
From: gwyn@smoke.brl.mil (Doug Gwyn)
Newsgroups: comp.bugs.sys5
Subject: Re: Bug in SVR4 BSD-compatibility library (libucb)
Message-ID: <14987@smoke.brl.mil>
Date: 26 Jan 91 07:09:01 GMT
References: <867@dptspd.sat.datapoint.com>
Organization: U.S. Army Ballistic Research Laboratory, APG, MD.
Lines: 22