Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!std-unix From: henry@utzoo.uucp Newsgroups: comp.std.unix Subject: Re: Changed names in POSIX directory access library Message-ID: <844@uunet.UU.NET> Date: Sun, 9-Aug-87 05:28:52 EDT Article-I.D.: uunet.844 Posted: Sun Aug 9 05:28:52 1987 Date-Received: Wed, 12-Aug-87 01:47:12 EDT Sender: std-unix@uunet.UU.NET Reply-To: henry@utzoo.uucp Lines: 43 Approved: jsq@uunet (Moderator, John Quarterman) 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 is now #include 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