Unix and Windows; A C API perspective

From the early days of UNIX, the OS has used the C programming language as its primary development language. UNIX always provided C bindings for its system API, and application development tended to use C for the compiled language requirements. Thus, in those times, the C API was the UNIX API, and the UNIX API was the C API.

Back in the early 1980's, UNIX systems proliferated and mutated. All provided similar services and a mostly consistant API, but there were enough differences between the various species of genus UNIX that compatibility became an issue. Some UNIX species provided API definitions in one #include file, while others scattered the API definitions into other #include files. Across species, system and standard library API definitions varied in minor details, taking additional arguments, or returning different values than others. There was chaos and fragmentation on the horizon.

In the 1990's, the IEEE stepped up to the plate and started an effort to standardize a single, common UNIX specification. (While the IEEE cast about for an appropriate name for this effort, Richard Stallman, who was intimately involved in similar efforts, suggested the name "POSIX" or "Portable Operating System Interface".) The IEEE ultimately settled on a definition that they called IEEE-1003, and which ISO adopted as ISO/IEC 9945.

The IEEE-1003 standard initially addressed only the system and standard library API (POSIX-1) and a validation suite, but, later, was extended to include common utilities, shell language, auxiliary libraries, and other "essential" components. In 2008, most of these extensions were rolled into the IEEE-1003 standard as IEEE-1003.1-2008, also known as POSIX.1-2008.

The US Government had an outside role in this standardization effort; in all areas, including the military, the government spent a lot of money on software. Most of this software was written by programmers using UNIX systems of one species or another. And, the government procurement process would not only have to purchase this software, but also the specific UNIX OS that it was written to run on. This got very expensive.

So, the US Government, through a Federal Information Processing Standard (FIPS-151), decreed that all operating systems purchased in support of purchased software must support a minimum common system and standard library API. This FIPS settled on POSIX-1 as that API.

Now, at that time, Microsoft did not support POSIX in any form and it realized that it would not be able to win government contracts because of this lack of support. So, in it's then newest Windows NT operating systems, it bolted in a subsystem (the NT POSIX subsystem) that supported the POSIX-1 API, and thus could handle programs coded to that level of compatibility. According to Wikipedia, "Windows NT versions 3.5, 3.51 and 4.0 were certified as compliant with FIPS 151-2."

Later, Microsoft would replace the NT POSIX subsystem with first "Windows Services for UNIX" (WSU), and (as Linux supplanted UNIX) the "Windows Services for Linux" (WSL). But, even with these changes, Windows supported, in some form or another, the basic UNIX API.

All this to say that, Windows, since the 1990's has supported, in one form or another, the basic UNIX system and standard library API, with C bindings. We've had thirty years of UNIX and UNIX-compatible C under Microsoft Windows.