title: How to use uint64_t and -m32?
body: <p>The following code is printing for example <code>1030432081</code> (which is wrong) when compiled with <code>gcc -m32 time.c</code> whereas it works fine when compiled without the <code>-m32</code> flag. Is there any way I can get this to work?</p>
  
  <pre><code>#include &lt;sys/time.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;stdint.h&gt;
  #include &lt;inttypes.h&gt;
  
  void test() {
    struct timeval t;  
    gettimeofday(&amp;t, NULL);
    uint64_t microseconds = t.tv_usec + t.tv_sec * 1000000;
    printf("%"PRId64, microseconds);
  }
  
  int main() {
    test();
  }
  </code></pre>