home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / sys5 / r4 / 851 < prev    next >
Encoding:
Text File  |  1992-12-16  |  1.7 KB  |  57 lines

  1. Newsgroups: comp.unix.sys5.r4
  2. Path: sparky!uunet!munnari.oz.au!mel.dit.csiro.au!yarra!kenj
  3. From: kenj@yarra.pyramid.com.au (Ken McDonell)
  4. Subject: Re: Problems with "dirent"
  5. Message-ID: <1992Dec17.040758.20268@yarra.pyramid.com.au>
  6. Organization: Pyramid Technology Corp PL, Melb., Australia
  7. References: <1992Dec13.193122.22173@osnbe.Olivetti.ch>
  8. Date: Thu, 17 Dec 1992 04:07:58 GMT
  9. Lines: 46
  10.  
  11. rheiger@renext.open.ch (Richard H. E. Eiger) writes:
  12.  
  13. >While trying to compile and install tayllor uucp I stumbled over a very strange  
  14. >behaveiour of the dirent directory reading routines (opendir and readdir).  
  15.  
  16. This is one (of many) botches in the BSD Compatibility Package.
  17.  
  18. If your code looks like
  19.  
  20.     #include <dirent.h>
  21.     ...
  22.     struct dirent    *de;
  23.  
  24. it is vanilla SVR4 or SVR3.
  25.  
  26. If you code looks like
  27.  
  28.     #include <sys/dir.h>
  29.     ...
  30.     struct direct      *de;
  31.  
  32. it is vanilla BSD.
  33.  
  34. The problem is that the SVR4 code _will_ compile with the /usr/ucb/cc compiler
  35. (using SVR4 #includes) and link with the UCB libraries -- the resultant
  36. a.out behaves as you have described.
  37.  
  38. In summary, ...
  39.  
  40. Source Code            SVR4            UCB
  41.  
  42. Compiler    
  43.     /usr/bin/ccs/cc (SVR4)    ok            syntax errs
  44.     /usr/ucb/cc (UCB)        compiles, but bad code    ok
  45. Libraries
  46.     SVR4            ok            links, but bad code
  47.     UCB                links, but bad code    ok
  48.  
  49. Of course if there was a man page for the readdir() that is hidden in
  50. the BSD Compatibility Package library, you'd at least get a warning
  51. of danger ahead when you tried "man readdir".
  52. -- 
  53. Ken McDonell              E-mail:     kenj@pyramid.com
  54. Systems Technology Laboratory              kenj@yarra.pyramid.com.au
  55. Pyramid Technology Corporation      Phone:      +61 3 521 3799
  56. Melbourne, Australia          Disclaimer: I speak for me alone, of course.
  57.