Bug in SVR4 BSD-compatibility library (libucb)

Andrew H. Marrinson andy at xwkg.Icom.Com
Mon Jan 28 16:46:07 AEST 1991


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 at icom.icom.com)



More information about the Comp.bugs.sys5 mailing list