gwyn@brl-smoke.ARPA (Doug Gwyn ) (06/01/88)
In article <7841@ncoast.UUCP> allbery@ncoast.UUCP (Brandon S. Allbery) writes: >I hate to say this, AT&T: but "struct direNt" was a DUMB idea. >Incompatibility still reigns supreme. AAAAARGH!!!!! Excuse me for interjecting some facts here. When McKusick wrote the original 4BSD directory access routines, he called the new directory entry structure "struct direct", even though it was radically different from what all UNIX systems had called "struct direct" up to that time. When the same access interface started to be used for non-BSD UNIX systems (which in itself was a step forward), this incompatibility started getting seriously in the way. IEEE P1003 (NOT AT&T), in the process of standardizing the UNIX programming environment decided to fix this; the IEEE 1003.1 structure is called "struct dirent". AT&T based their routines supplied with SVR3 (which started out as my earlier public-domain implementation of the directory access library, which had followed Berkeley and used "struct direct") on the draft POSIX specification, thus "struct dirent". (AT&T also introduced a getdents() system call rather than reading the directory file directly; like the similar Sun system call getdirentries(), this helps with network file systems.) Later I also changed my public-domain implementation to match POSIX, AT&T, and the rest of the non-BSD world. (It is also much more generally portable than previous versions, and has the fastest seekdir() I know of.) I believe I heard Berkeley say they would also switch to "struct dirent", and that calling it "struct direct" in the first place had been a mistake.