Ronak Sharma
Ronak Sharma

Reputation: 109

Does POSIX-standard require it's specifications to be implemented in the C language only?

Based on the articles I've read on wikipedia and other sources, I've learnt that operating systems like the ones based on UNIX implement the POSIX-API in C. Moreover, I'm yet to find a POSIX-compliant operating system that implements the POSIX-functionalities in any language other than C.

So, does the POSIX-standard require it's specifications to be implemented in the C language only? Can someone implement the POSIX-functionalities for their own(self-made) operating systems in any other programming language like (pure)Rust and get that operating system certified as a POSIX-compliant OS?

Upvotes: 2

Views: 802

Answers (1)

Jay-Pi
Jay-Pi

Reputation: 428

It is highly unlikely anybody will ever use header definitions other than for C/C++ again, which are necessary to comply with the standard.

So while technically not necessary, it is practically a necessity or you need to simulate C header behavior from another language + c99 by ISO specification. "The C-language Development utility c99 shall be supported." (ISO C standard) https://pubs.opengroup.org/onlinepubs/9699919799/

It is however possible and often practical to conform to the POSIX System Interfaces(what people usual refer to as POSIX-API) and parts of "Shell and Utilities". To that regard POSIX is "flawed", because it has a "language-lockin".

Upvotes: 2

Related Questions