title: Issue in porting application from 32bit to 64bit
body: <p>Below code is working fine as 32bit application.(Compiled on gcc 4.6.3), I ported same code to 64bit application,it doesn't give the correct output.</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;stdint.h&gt;
  using namespace std;
  typedef unsigned long DWORD;
  typedef unsigned long long int  uint64;
  typedef long long LONGLONG;
  typedef struct _SND_FILETIME
  {
      DWORD dwLowDateTime;
      DWORD dwHighDateTime;
  } SND_FILETIME, *SND_PFILETIME, *SND_LPFILETIME;
  
  void FileTimeToUnixTime(const SND_FILETIME *pft, time_t *t)
  {
  #if BYTE_ORDER == LITTLE_ENDIAN
          LONGLONG ll = (LONGLONG)pft-&gt;dwHighDateTime;
          ll &lt;&lt;= 32;
          ll |= (LONGLONG)pft-&gt;dwLowDateTime;
  #else
          LONGLONG ll = (LONGLONG)pft-&gt;dwLowDateTime;
          ll &lt;&lt;= 32;
          ll |= (LONGLONG)pft-&gt;dwHighDateTime;
  #endif
          ll -= 116444736000000000LL;
          ll /= 10000000;
          *t = (time_t)ll;
          struct tm *info = localtime(t);
         cout &lt;&lt; &quot;Time&quot; &lt;&lt; asctime(info) &lt;&lt; std::endl;
  }
  int main()
  {
      uint64 time64 = 132385716359962190;
      SND_FILETIME* ptr = (SND_FILETIME*)&amp;time64;
      cout &lt;&lt;&quot;HighPart = &quot; &lt;&lt; ptr-&gt;dwHighDateTime &lt;&lt;endl;
      cout &lt;&lt;&quot;lowPart = &quot; &lt;&lt; ptr-&gt;dwLowDateTime &lt;&lt;endl;
      time_t t;
      FileTimeToUnixTime(ptr,&amp;t);
      return 0;
  }
  </code></pre>
  <p>Output I'm getting for 32bit application:</p>
  <p>HighPart = 30823451
  lowPart = 2365103694
  TimeTue Jul  7 10:30:35 2020</p>
  <p>for 64bit application :
  HighPart = 140730490267024
  lowPart = 132385716359962190
  TimeTue Aug 11 02:12:08 23514</p>
  <p>If I change the input to something like,</p>
  <pre><code>uint64 time64 = 132385716359962190;
      SND_FILETIME filetime;
      filetime.dwHighDateTime = 0;
      filetime.dwLowDateTime = 132385716359962190;
      SND_FILETIME* ptr=&amp;filetime;
     
      cout &lt;&lt;&quot;HighPart = &quot; &lt;&lt; ptr-&gt;dwHighDateTime &lt;&lt;endl;
      cout &lt;&lt;&quot;lowPart = &quot; &lt;&lt; ptr-&gt;dwLowDateTime &lt;&lt;endl;
      time_t t;
      FileTimeToUnixTime(ptr,&amp;t);
  </code></pre>
  <p>64bit application works. but I don't want to do this, as I'll have to change all code. Is there any way to get this work without changing code.</p>
  <p>Please help!!!</p>
  <p>Thanks,</p>