home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.sys5.r4
- Path: sparky!uunet!munnari.oz.au!mel.dit.csiro.au!yarra!kenj
- From: kenj@yarra.pyramid.com.au (Ken McDonell)
- Subject: Re: Problems with "dirent"
- Message-ID: <1992Dec17.040758.20268@yarra.pyramid.com.au>
- Organization: Pyramid Technology Corp PL, Melb., Australia
- References: <1992Dec13.193122.22173@osnbe.Olivetti.ch>
- Date: Thu, 17 Dec 1992 04:07:58 GMT
- Lines: 46
-
- rheiger@renext.open.ch (Richard H. E. Eiger) writes:
-
- >While trying to compile and install tayllor uucp I stumbled over a very strange
- >behaveiour of the dirent directory reading routines (opendir and readdir).
-
- This is one (of many) botches in the BSD Compatibility Package.
-
- If your code looks like
-
- #include <dirent.h>
- ...
- struct dirent *de;
-
- it is vanilla SVR4 or SVR3.
-
- If you code looks like
-
- #include <sys/dir.h>
- ...
- struct direct *de;
-
- it is vanilla BSD.
-
- The problem is that the SVR4 code _will_ compile with the /usr/ucb/cc compiler
- (using SVR4 #includes) and link with the UCB libraries -- the resultant
- a.out behaves as you have described.
-
- In summary, ...
-
- Source Code SVR4 UCB
-
- Compiler
- /usr/bin/ccs/cc (SVR4) ok syntax errs
- /usr/ucb/cc (UCB) compiles, but bad code ok
- Libraries
- SVR4 ok links, but bad code
- UCB links, but bad code ok
-
- Of course if there was a man page for the readdir() that is hidden in
- the BSD Compatibility Package library, you'd at least get a warning
- of danger ahead when you tried "man readdir".
- --
- Ken McDonell E-mail: kenj@pyramid.com
- Systems Technology Laboratory kenj@yarra.pyramid.com.au
- Pyramid Technology Corporation Phone: +61 3 521 3799
- Melbourne, Australia Disclaimer: I speak for me alone, of course.
-