Problems with getwd() on V.4.2 with UFS file system?

Andy Crump andyc at bucky.intel.com
Tue Dec 4 04:02:18 AEST 1990


>>>>> On 29 Nov 90 06:58:40 GMT, sralston at 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 at littlei.intel.com
    ...!uunet!littlei!andyc          | andyc at littlei.uu.net

Disclaimer: Any opinions expressed here are my own and 
            not representive of Intel Corportation.



More information about the Comp.unix.sysv386 mailing list