How about O_CREAT_DIRECTORY?
How about O_CREAT_DIRECTORY?
Posted Jul 31, 2026 19:48 UTC (Fri) by farnz (subscriber, #17727)In reply to: How about O_CREAT_DIRECTORY? by huntermatthews
Parent article: Reconsidering O_CREAT|O_DIRECTORY
My understanding is that this all comes down to IBM SQUOZE and DEC RADIX 50 (and I suspect that DEC RADIX 50 was what influenced early UNIX, since it started on a PDP-7, an 18-bit DEC machine).
Those encodings get you 6 characters and a few flag bits in two 18-bit machine words, which is useful for both linkers and preprocessors alike; they were commonly used on the PDP-7 (and a slight variant on 16-bit minis like the PDP-11) for linkers, and almost certainly explain where the 6 significant character limit comes from - you squish the first 6 characters into a fixed 32 bit (on PDP-11) or 36-bit (on PDP-7) word, making lookup etc much simpler.
