home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.12 / text0006.txt < prev    next >
Encoding:
Internet Message Format  |  1989-01-07  |  2.0 KB

  1. Cc: std-unix@sally.utexas.edu
  2. Cc: gwyn@brl.arpa
  3. From: henry@utzoo.uucp
  4.  
  5. > I just ran across the first use of the Posix directory access library
  6. > and was disappointed that it is not source-code compatible...
  7. > For some reason the ***&%^$ standard changed the names of the include
  8. > file and the struct!
  9.  
  10. For an excellent reason:  Berkeley's imbecilic decision to use the same
  11. names in the high-level library as in the implementation within the
  12. kernel causes endless trouble on non-Berkeley systems.
  13.  
  14. > The old #include <sys/dir.h>    is now    #include <dirent.h>
  15.  
  16. This is a godsend for those of us who have a *different* directory structure
  17. in our sys/dir.h, namely that used in the kernel.  User-level libraries
  18. have no business parking their include files in the sys subdirectory!
  19.  
  20. >   "    struct direct            struct dirent
  21.  
  22. And this is a godsend for those of us who want to include *other* kernel
  23. include files in the same program as the directory library.  The kernel
  24. include files are so interrelated that it is impossible to pick up, say,
  25. user.h without also picking up dir.h.  Which means that no program that
  26. uses any of the kernel include files can use the directory library, because
  27. the definitions of "struct direct" clash.  Yes, there are legitimate reasons
  28. for using some of the other include files, at least in non-Berkeley systems.
  29. Arguably these reasons themselves indicate problems that really ought to be
  30. fixed -- but we were talking about compatibility with existing practice!
  31.  
  32. In short, I can assure John that there *are* practical problems with using
  33. the Berkeley naming on non-Berkeley systems.  I have run into them too
  34. often myself to do anything but applaud this "incompatibility"; non-Berklix
  35. systems already find it necessary to engage in incompatible kludges to use
  36. the otherwise-praiseworthy directory library.  I am one of the (doubtless
  37. numerous) people who strongly urged P1003 to fix this bug.
  38.  
  39.                 Henry Spencer @ U of Toronto Zoology
  40.                 {allegra,ihnp4,decvax,pyramid}!utzoo!henry
  41.  
  42. Volume-Number: Volume 12, Number 7
  43.  
  44.