title: S_IFMT and S_IFREG undefined with -std=c11 or -std=gnu11
body: <p>It's my first time working with posix; I included:</p>
  
  <pre><code>#include &lt;sys/types.h&gt;
  #include &lt;sys/stat.h&gt;
  #include &lt;unistd.h&gt;
  </code></pre>
  
  <p>And I've this snippet.</p>
  
  <pre><code>stat(pathname, &amp;sb);
  if ((sb.st_mode &amp; S_IFMT) == S_IFREG) {
      /* Handle regular file */
  }
  </code></pre>
  
  <p>But using GCC 4.8.3 on Gentoo if I compiled with -std=c99 or -std=c11 or -std=gnu99 or -std=gnu11 I got this error:</p>
  
  <pre><code>error: ‘S_ISFMT’ undeclared (first use in this function)
  </code></pre>
  
  <p>If I omit -std=* I got no errors. But I want all the features of -std=c99 too (like the keyword restrict or for(int i;;) etc ...)
  How could I compile my code?</p>