What is POSIX compliance and how does it affect me?

自作多情 提交于 2019-12-21 05:49:09

问题


I keep seeing this come up and every time I look it up I never get a good explanation of what it is or what it means to me.

What is POSIX compliance? How does assuming my program will only be run on POSIX-compliant machines simplify things for me as a programmer? Does it even?


回答1:


POSIX defines a set of C headers, System Interfaces, a Shell Command Language and Utilities, that a conforming system must implement.

As a developer, you can rely on these standard interfaces being available on every POSIX system. If your program uses the standard interfaces, it can operate on all POSIX systems.

Porting across non-standard systems is more work, as the system interfaces e.g. for multithreading or networking are different.



来源:https://stackoverflow.com/questions/8162669/what-is-posix-compliance-and-how-does-it-affect-me

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!