Changed i64 to LL at the end of some integers for gcc. unlabeled-3.8.20
authorcls%seawood.org
Fri, 09 Jul 1999 11:14:55 +0000
branchunlabeled-3.8.20
changeset 693 7ce88408952e
parent 687 81875b89c1a2
push idunknown
push userunknown
push dateunknown
Changed i64 to LL at the end of some integers for gcc.
pr/src/md/windows/w95io.c
--- a/pr/src/md/windows/w95io.c
+++ b/pr/src/md/windows/w95io.c
@@ -27,17 +27,21 @@
 
 struct _MDLock               _pr_ioq_lock;
 
 /*
  * The NSPR epoch (00:00:00 1 Jan 1970 UTC) in FILETIME.
  * We store the value in a PRTime variable for convenience.
  * This constant is used by _PR_FileTimeToPRTime().
  */
+#if defined(__MINGW32__)
+static const PRTime _pr_filetime_offset = 116444736000000000LL;
+#else
 static const PRTime _pr_filetime_offset = 116444736000000000i64;
+#endif
 
 void
 _PR_MD_INIT_IO()
 {
     WORD WSAVersion = 0x0101;
     WSADATA WSAData;
 
     WSAStartup(	WSAVersion, &WSAData );
@@ -459,17 +463,21 @@ PRInt32
     }
 }
 
 static void
 _PR_FileTimeToPRTime(const FILETIME *filetime, PRTime *prtm)
 {
     PR_ASSERT(sizeof(FILETIME) == sizeof(PRTime));
     CopyMemory(prtm, filetime, sizeof(PRTime));
+#if defined(__MINGW32__)
+    *prtm = (*prtm - _pr_filetime_offset) / 10LL;
+#else
     *prtm = (*prtm - _pr_filetime_offset) / 10i64;
+#endif
 
 #ifdef DEBUG
     /* Doublecheck our calculation. */
     {
         SYSTEMTIME systime;
         PRExplodedTime etm;
         PRTime cmp; /* for comparison */
         BOOL rv;