Sample Header Ad - 728x90

Why is unistd.h named the way it is?

7 votes
0 answers
2610 views
Similar in spirit to this question about the etymology of linux commands , I'm curious about the origin of the name of unistd.h. **Does anyone know *for certain* what unistd.h stands for? If unistd.h was meant to be read as "Unix standard header", why wasn't it named unixstd.h?** From the Open Group's description of unistd.h (emphasis mine): > unistd.h - **standard** symbolic constants and types From Wikipedia (emphasis mine): > In the C and C++ programming languages, unistd.h is the name of the > header file that provides access to the POSIX operating system API. It > is defined by the POSIX.1 standard, the base of the Single **Unix** > Specification, and should therefore be available in any > POSIX-compliant operating system and compiler. Putting two and two together, it looks like unistd.h is likely a combination of *Unix* (uni) and *standard* (std), resulting in a "Unix standard header". Barath Ravikumar and Vicky Chijwani posit this in an answer to another, unrelated Stack Overflow question: > `` , stands for unix standard header ,the name says it all. > unistd **could just as well stand for "universal standard header"** (I realize that sounds a bit ridiculous). The point is, they should've named it unixstd.h -- instant clarity by adding just one character. If this is true, then it's possible that the omission of a single x character has helped spawn more than a few questions about the C standard library and why unistd.h isn't part of it (example 1 , example 2 , example 3 ).
Asked by Lukas Velikov (179 rep)
Mar 15, 2022, 09:43 PM
Last activity: Jun 9, 2023, 03:58 PM