title: Difference between C standard library and C POSIX library
body: <p>I'm a little confused by "C standard lib" and "C POSIX lib", because I found that, many header files defined in "C POSIX lib" are also part of "C standard lib". </p>
  
  <p>So, I assume that, "C standard lib" is a lib defined by ANSI C organization, and there are different implementation on different platforms (Win32/Unix-like), and "C POSIX lib" is just a implementation for "C standard lib" on Unix-like OSes, right?</p>
  
  <p>But "C POSIX lib" contains some headers not specified in "C standard lib", such as <code>&lt;sys/types.h&gt;</code>, <code>&lt;sys/wait.h&gt;</code>, and <code>&lt;pthread.h&gt;</code>.</p>
  
  <p>Take <code>&lt;pthread.h&gt;</code> as an example, I presume its "C standard lib" counterpart is <code>&lt;threads.h&gt;</code>, then if I want to write a multi-threaded program on Linux, which header file should I include, <code>&lt;pthread.h&gt;</code> or <code>&lt;threads.h&gt;</code>?</p>