title: Why a not-threaded Perl is not using off64_t type compared to a threads-enabled one?
body: <p>My initial task was to install mod_perl 2.0.6 + Apache 2.2.22.<br>
  The process stopped with a lot of errors related to <code>off64_t</code> when compiling mod_perl. So, I started to dig deeper. Firstly, I have installed two new instances of Perl 5.8.9 (because I'll have to use this version): a threaded version and a not-threaded one (they are identical, only <code>usethreads</code> differs). Trying to reproduce the same using the threaded Perl finished with success and no <code>off64_t</code> errors at all.<br>
  The conclusion is obvious: threaded Perl provides the neccessary <code>off64_t</code>, the non-threaded one doesn't.<br>
  Searching further, I have compared <code>config.h</code> (from <code>core/&lt;arch&gt;/CORE</code>) of both Perl'es, and at the line 3671 I can see this (in the non-threaded Perl):</p>
  
  <pre><code>    /* HAS_OFF64_T:
       *      This symbol will be defined if the C compiler supports off64_t.
       */
      /*#define       HAS_OFF64_T             / **/
  </code></pre>
  
  <p>and in the threads-enabled Perl:</p>
  
  <pre><code>    #define HAS_OFF64_T            /**/
  </code></pre>
  
  <p><code>perl -V</code> for both Perl instances reports <code>ccflags ='... -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 ...'</code> as used compiler flags.  </p>
  
  <p>As I understand, <code>off64_t</code> is used for <em>large files</em> and isn't related to threads. I found this information about <code>off_t</code> and <code>off64_t</code>:  </p>
  
  <blockquote>
    <p>If the source is compiled with <code>_FILE_OFFSET_BITS = 64</code> this type (i.e. <code>off_t</code>) is transparently replaced by <code>off64_t</code>. </p>
  </blockquote>
  
  <p><strong>Shortly</strong>: There are 2 identical Perl builds with a single difference: the <code>usethreads</code> configure parameter. Threaded Perl enables <code>off64_t</code>, non-threaded one doesn't.  </p>
  
  <p>My question is: <em>Why does this happen and how threads are connected to this <code>off64_t</code> data type that should be used for large files, not for threads</em> ?</p>
  
  <p>Info: Arch Linux OS 32-bit (kernel 2.6.33), gcc 4.5.0, libc 2.11.1, standard Perl 5.8.9  </p>
  
  <p>Notes: <code>off64_t</code> is processed in <code>Configure</code> at line 15526, a simple <code>try.c</code> is generated and tried to be compiled. The question is why the not-threaded Perl cannot compile it while threaded Perl can.</p>