title: GCC declarations: typedef __pid_t pid_t?
body: <p>I am confused about the declaration of (for example) pid_t. What does __pid_t mean? Is it another type defined elsewhere? If yes, where? Why is my types.h in ubuntu 13.04 64bit defining pid_t like:</p>
  
  <pre><code>#ifndef __pid_t_defined
  typedef __pid_t pid_t;
  #define __pid_t_defined
  #endif
  </code></pre>
  
  <p>and not something like</p>
  
  <pre><code>typedef int pid_t;
  </code></pre>
  
  <p>I saw some websites that have types.h headers with the declaration done the last way. This is one:
  <a href="http://www.sde.cs.titech.ac.jp/~gondow/dwarf2-xml/HTML-rxref/app/gcc-3.3.2/lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/include/sys/types.h.html" rel="noreferrer">http://www.sde.cs.titech.ac.jp/~gondow/dwarf2-xml/HTML-rxref/app/gcc-3.3.2/lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/include/sys/types.h.html</a></p>
  
  <p>UPDATE:</p>
  
  <p>Ok I found out that a pid_t is an __pid_t which is an __PID_T_TYPE which is which is an __S32_TYPE which is an int. My question now is why is this? POSIX only states that pid_t has to be a signed integer, so why make the declaration enter soo deep in header files? </p>