Path: 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 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.