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