Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!samsung!uunet!stephsf!wengland From: wengland@stephsf.stephsf.com (Bill England) Newsgroups: comp.lang.perl Subject: Re: directory entries chopped on SCO Unix Message-ID: <497@stephsf.stephsf.com> Date: 4 Mar 91 22:19:53 GMT References: <18097@ogicse.ogi.edu> Organization: Stephen Software Systems Inc., Seattle, +1 206 564 2122 Lines: 37 In article <18097@ogicse.ogi.edu> schaefer@ogicse.ogi.edu (Barton E. Schaefer) writes: >In article djm@eng.umd.edu (David J. MacKenzie) writes: >} I just built pl44 on SCO Unix 3.2.2 and find that the filenames >} returned by Perl's readdir function are missing the first two >} characters. It works fine on SunOS. Anyone have a fix for this >} problem? >} -- >} David J. MacKenzie > >Yeah, make sure you DO NOT use -lx when linking. It has (incorrect, >ore more accurately, outdated) opendir(), readdir(), closedir() etc. >calls, which get used in place of the (correct) ones in libc. > >As far as I know, the only thing -lx is needed for in 3.2.2 is the >ancient rdchk() call, which Perl surely isn't using. You can replace >it with select() or an ioctl() if it is used. You might notice that SCO defines both dirent.h, sys/ndir.h, and sys/dir.h . This is a bit of overkill and would be ok, I guess, except that dirent defines a strange type on the length of the file and throws off the offset of the name by two bytes. What I did was modify the config.h file after running Configure and commented out DIRENT, uncommented NDIR and also uncommented the directory length variable. If the above does not help give me a call. Bill England wengland@stehpsf.com -- +- Bill England, wengland@stephsf.COM -----------------------------------+ | * * H -> He +24Mev | | * * * ... Oooo, we're having so much fun making itty bitty suns * | |__ * * ___________________________________________________________________|