Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!think.com!mintaka!ogicse!littlei!gandalf!andyc From: andyc@bucky.intel.com (Andy Crump) Newsgroups: comp.unix.sysv386 Subject: Re: Problems with getwd() on V.4.2 with UFS file system? Message-ID: Date: 3 Dec 90 17:02:18 GMT References: <198@srwic.UUCP> Sender: news@littlei.UUCP Organization: Intel Corporation, Hillsboro, Oregon Lines: 31 In-reply-to: sralston@srwic.uucp's message of 29 Nov 90 06:58:40 GMT >>>>> On 29 Nov 90 06:58:40 GMT, sralston@srwic.uucp (Steve Ralston) said: Steve> Looking thru the RCS source code, the fatality appears to hinge on the Steve> following snippet of C code in ci.c: Steve> if (getwd(pathbuf)==NULL) Steve> faterror("Can't build current directory path"); Steve> So it appears that the call to getwd() works for a S51K file system, but Steve> does NOT work (returns NULL) for a UFS file system. Ideas, anyone? Yep, you're right. It's a bug in version 2 of SVR4. It is being addressed in version 3. The problem is the getwd() in /usr/ucblib/libucb.a uses the S5 filesystem data structures rathern than the UFS ones. There are 2 versions of opendir/readdir, one in libc and the other in libucb. The return slightly different structures. You should be able to work around the problem if you recompile not using /usr/ucbinclude and /usr/ucblib/libucb.a. Using the standard System V libraries and not the compatibility stuff should keep you out of trouble for now. -- -- Andy Crump ...!tektronix!reed!littlei!andyc | andyc@littlei.intel.com ...!uunet!littlei!andyc | andyc@littlei.uu.net Disclaimer: Any opinions expressed here are my own and not representive of Intel Corportation.