title: ftell errors on really large files
body: <p>According to the unix man pages <code>ftell</code> either returns -1 to indicate an error.</p>
  
  <p>The function definition is:</p>
  
  <pre><code>long int ftell ( FILE * stream );
  </code></pre>
  
  <p>Where <code>long int</code> is a 32 bit integer (you need <code>long long</code> for 64 bit)</p>
  
  <p>however <code>(-1L) == 0x00000000FFFFFFFF LL</code> which should be a valid value for really large files (round about 4GB) in which case, how do we know whether an error has occurred or we just have a really large file?</p>