title: Why does fseeko() fail with EINVAL?
body: <p>I need to add LFS to a C process which uses <code>fseek()</code>.
  gcc and glibc are of version 3.2.3 and 2.5, respectively.</p>
  
  <p>I made the following alterations:</p>
  
  <ol>
  <li>added <code>CFLAGS += -D_FILE_OFFSET_BITS=64</code> to the makefile.</li>
  <li>I replaced the call to <code>fseek()</code> with a call to <code>fseeko()</code> (I also need MSVC6 support, but one step at a time).  </li>
  <li>I've changed the 2nd argument's type to <code>off_t</code>. <code>sizeof()</code> on the variable returns 8.</li>
  </ol>
  
  <p>Here is as good a sample <code>main()</code> as I can get past our DLP and its output:</p>
  
  <pre><code>fd = fopen("large_file", "rb");
  off_t offset = 1ULL &lt;&lt; 32;
  rc = fseeko(fd, offset, SEEK_SET);
  </code></pre>
  
  <p><code>rc = -1 sizeof(offset)=8 errno=22 offset=2147483648</code></p>