Bug 788012: Fix build on OpenBSD after bug 579517. r=ehsan
authorLandry Breuil <landry@openbsd.org>
Thu, 06 Sep 2012 21:38:33 +0200
changeset 12249 66edec66017cc05bfed661cd38167479a6519796
parent 12248 8ad14cba8288a26e088b2fbbf72764f1f87a87fd
child 12250 6ed66e622bb08f2c0672898fdd09e27dd0cbecb9
push id738
push userbugzilla@standard8.plus.com
push dateMon, 08 Oct 2012 19:38:39 +0000
treeherdercomm-aurora@6694e4ec3767 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs788012, 579517
Bug 788012: Fix build on OpenBSD after bug 579517. r=ehsan
mailnews/base/src/nsMsgPurgeService.cpp
mailnews/imap/src/nsAutoSyncManager.cpp
mailnews/local/src/nsMsgBrkMBoxStore.cpp
mailnews/local/src/nsMsgMaildirStore.cpp
--- a/mailnews/base/src/nsMsgPurgeService.cpp
+++ b/mailnews/base/src/nsMsgPurgeService.cpp
@@ -190,17 +190,17 @@ nsresult nsMsgPurgeService::PerformPurge
               PRTime curFolderLastPurgeTime = 0;
               nsCString curFolderLastPurgeTimeString, curFolderUri;
               rv = childFolder->GetStringProperty("LastPurgeTime", curFolderLastPurgeTimeString);
               if (NS_FAILED(rv))
                 continue; // it is ok to fail, go on to next folder
 
               if (!curFolderLastPurgeTimeString.IsEmpty())
               {
-                int64_t theTime;
+                PRTime theTime;
                 PR_ParseTimeString(curFolderLastPurgeTimeString.get(), false, &theTime);
                 curFolderLastPurgeTime = theTime;
               }
 
               childFolder->GetURI(curFolderUri);
               PR_LOG(MsgPurgeLogModule, PR_LOG_ALWAYS, ("%s curFolderLastPurgeTime=%s (if blank, then never)", curFolderUri.get(), curFolderLastPurgeTimeString.get()));
 
               // check if this folder is due to purge
@@ -281,17 +281,17 @@ nsresult nsMsgPurgeService::PerformPurge
         PRTime curJunkFolderLastPurgeTime = 0;
         nsCString curJunkFolderLastPurgeTimeString;
         rv = junkFolder->GetStringProperty("curJunkFolderLastPurgeTime", curJunkFolderLastPurgeTimeString);
         if (NS_FAILED(rv))
           continue; // it is ok to fail, junk folder may not exist
 
         if (!curJunkFolderLastPurgeTimeString.IsEmpty())
         {
-          int64_t theTime;
+          PRTime theTime;
           PR_ParseTimeString(curJunkFolderLastPurgeTimeString.get(), false, &theTime);
           curJunkFolderLastPurgeTime = theTime;
         }
 
         PR_LOG(MsgPurgeLogModule, PR_LOG_ALWAYS, ("[%d] %s curJunkFolderLastPurgeTime=%s (if blank, then never)", serverIndex, junkFolderURI.get(), curJunkFolderLastPurgeTimeString.get()));
 
         // check if this account is due to purge
         // has to have been purged at least mMinDelayBetweenPurges minutes ago
--- a/mailnews/imap/src/nsAutoSyncManager.cpp
+++ b/mailnews/imap/src/nsAutoSyncManager.cpp
@@ -99,17 +99,17 @@ NS_IMETHODIMP nsDefaultAutoSyncMsgStrate
   nsCOMPtr<nsIMsgIncomingServer> server;
 
   nsresult rv = aFolder->GetServer(getter_AddRefs(server));
   NS_ENSURE_SUCCESS(rv, rv);
   nsCOMPtr<nsIImapIncomingServer> imapServer(do_QueryInterface(server, &rv));
   int32_t offlineMsgAgeLimit = -1;
   imapServer->GetAutoSyncMaxAgeDays(&offlineMsgAgeLimit);
   NS_ENSURE_SUCCESS(rv, rv);
-  int64_t msgDate;
+  PRTime msgDate;
   aMsgHdr->GetDate(&msgDate);
   *aDecision = offlineMsgAgeLimit > 0 &&
     msgDate < MsgConvertAgeInDaysToCutoffDate(offlineMsgAgeLimit);
   return NS_OK;
 }
 
 NS_IMPL_ISUPPORTS1(nsDefaultAutoSyncFolderStrategy, nsIAutoSyncFolderStrategy)
 
--- a/mailnews/local/src/nsMsgBrkMBoxStore.cpp
+++ b/mailnews/local/src/nsMsgBrkMBoxStore.cpp
@@ -168,17 +168,17 @@ void nsMsgBrkMBoxStore::GetMailboxModPro
   nsCOMPtr<nsIFile> pathFile;
   nsresult rv = aFolder->GetFilePath(getter_AddRefs(pathFile));
   NS_ENSURE_SUCCESS(rv, );
 
   rv = pathFile->GetFileSize(aSize);
   if (NS_FAILED(rv))
     return;
 
-  int64_t lastModTime;
+  PRTime lastModTime;
   rv = pathFile->GetLastModifiedTime(&lastModTime);
   if (NS_FAILED(rv))
     return;
 
   *aDate = (uint32_t) (lastModTime / PR_MSEC_PER_SEC);
 }
 
 NS_IMETHODIMP nsMsgBrkMBoxStore::HasSpaceAvailable(nsIMsgFolder *aFolder,
--- a/mailnews/local/src/nsMsgMaildirStore.cpp
+++ b/mailnews/local/src/nsMsgMaildirStore.cpp
@@ -605,17 +605,17 @@ nsMsgMaildirStore::GetNewMsgOutputStream
     PR_LOG(MailDirLog, PR_LOG_ALWAYS,
            ("GetNewMsgOutputStream - tmp subfolder does not exist!!\n"));
     rv = newFile->Create(nsIFile::DIRECTORY_TYPE, 0755);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   // generate new file name
   nsAutoCString newName;
-  newName.AppendInt(PR_Now());
+  newName.AppendInt(static_cast<int64_t>(PR_Now()));
   newFile->AppendNative(newName);
   // CreateUnique, in case we get more than one message per millisecond :-)
   newFile->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0600);
   newFile->GetNativeLeafName(newName);
   // save the file name in the message header - otherwise no way to retrieve it
   (*aNewMsgHdr)->SetStringProperty("storeToken", newName.get());
   return MsgNewBufferedFileOutputStream(aResult, newFile,
                                         PR_WRONLY | PR_CREATE_FILE, 00600);