Path: utzoo!utgpu!watserv1!watmath!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!samsung!uunet!icom!xwkg.Icom.Com!andy From: andy@xwkg.Icom.Com (Andrew H. Marrinson) Newsgroups: comp.bugs.sys5 Subject: Re: Bug in SVR4 BSD-compatibility library (libucb) Message-ID: Date: 28 Jan 91 05:46:07 GMT References: <867@dptspd.sat.datapoint.com> Sender: news@icom.icom.com (News Feed) Organization: Icom Systems, Inc. Lines: 24 It seems to me that we want to be able to use BSD compatible readdir because of the wealth of programs that rely on them (non-standard though they may be). It also seems that this situation is very similar to the problem involving POSIX compliant implementation of fread and fwrite. These functions must continue to work even if the user redefines the read and write functions on which they are based. The solution taken was to have fread and fwrite call functions called _read and _write. The functions read and write in libc.so are then defined to be the same as read and write unless the user redefines them (using a piece of hair called #pragma weak, but that's not important here). I think the best solution would be fore getwd, and similar functions that use readdir to call _readdir instead. This way, programs that link with libucb.a would get ucb compatible readdir, but the library routines that depend on System V readdir would get what they need too. Everything continues to work just fine. Anyone from USL listening? (1/2 :-)) -- Andrew H. Marrinson Icom Systems, Inc. Wheeling, IL, USA (andy@icom.icom.com)