From bd51cb9b94fac8c6b1c8dac263d955ea39c9a5dc Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 31 Mar 2011 20:15:27 -0400 Subject: [PATCH] Bug 646071 - Part 3: Remove nsInt64.h, and convert all uses of nsInt64 and nsUint64 in the tree to PRInt64 and PRUint64, respectively; r=bsmedberg --- .../html/document/src/nsHTMLContentSink.cpp | 1 - .../src/nsWebBrowserPersist.cpp | 11 ++--- .../src/nsWebBrowserPersist.h | 5 +-- modules/libjar/nsJARChannel.cpp | 1 - .../decoders/icon/mac/nsIconChannelCocoa.mm | 3 +- .../decoders/icon/os2/nsIconChannel.cpp | 3 +- .../decoders/icon/win/nsIconChannel.cpp | 3 +- modules/plugin/base/src/nsPluginHost.cpp | 3 +- .../base/src/nsPluginStreamListenerPeer.cpp | 4 +- netwerk/base/public/nsNetUtil.h | 9 ++-- netwerk/base/src/nsBufferedStreams.cpp | 8 ++-- netwerk/base/src/nsBufferedStreams.h | 3 +- netwerk/base/src/nsFileStreams.cpp | 9 ++-- netwerk/base/src/nsIncrementalDownload.cpp | 33 +++++++------- netwerk/base/src/nsInputStreamPump.cpp | 2 +- netwerk/base/src/nsSocketTransport2.cpp | 1 - netwerk/base/src/nsSocketTransport2.h | 1 - netwerk/base/src/nsStreamTransportService.cpp | 1 - netwerk/protocol/ftp/nsFtpConnectionThread.h | 1 - netwerk/protocol/http/nsHttpChannel.cpp | 11 +++-- netwerk/protocol/http/nsHttpTransaction.cpp | 10 ++--- netwerk/protocol/http/nsHttpTransaction.h | 5 +-- .../converters/nsMultiMixedConv.cpp | 3 +- .../streamconv/converters/nsMultiMixedConv.h | 9 ++-- netwerk/test/TestProtocols.cpp | 8 ++-- netwerk/test/TestStreamTransport.cpp | 6 +-- .../src/nsStrictTransportSecurityService.cpp | 1 - security/manager/ssl/src/nsNSSComponent.cpp | 1 - uriloader/base/nsDocLoader.cpp | 41 +++++++++-------- uriloader/base/nsDocLoader.h | 11 +++-- .../exthandler/nsExternalHelperAppService.h | 6 +-- view/src/nsViewManager.cpp | 1 - xpcom/components/nsComponentManager.cpp | 1 - xpcom/ds/Makefile.in | 1 - xpcom/ds/nsInt64.h | 44 ------------------- xpcom/io/nsFastLoadFile.cpp | 1 - xpcom/io/nsMultiplexInputStream.cpp | 3 +- xpcom/io/nsPipe3.cpp | 5 +-- xpcom/io/nsStorageStream.cpp | 1 - xpcom/io/nsStringStream.cpp | 1 - xpcom/reflect/xptinfo/src/xptiprivate.h | 1 - xpinstall/src/nsXPInstallManager.cpp | 1 - 42 files changed, 100 insertions(+), 174 deletions(-) delete mode 100644 xpcom/ds/nsInt64.h diff --git a/content/html/document/src/nsHTMLContentSink.cpp b/content/html/document/src/nsHTMLContentSink.cpp index 9cce367833de..821151794d51 100644 --- a/content/html/document/src/nsHTMLContentSink.cpp +++ b/content/html/document/src/nsHTMLContentSink.cpp @@ -60,7 +60,6 @@ #include "nsCRT.h" #include "prtime.h" #include "prlog.h" -#include "nsInt64.h" #include "nsNodeUtils.h" #include "nsIContent.h" #include "mozilla/dom/Element.h" diff --git a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp index f95d7b18e238..1607b87dd7d3 100644 --- a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp +++ b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp @@ -62,7 +62,6 @@ #include "nsIStringEnumerator.h" #include "nsCRT.h" #include "nsSupportsArray.h" -#include "nsInt64.h" #include "nsContentCID.h" #include "nsStreamUtils.h" @@ -168,8 +167,8 @@ struct OutputData nsCOMPtr mFile; nsCOMPtr mOriginalLocation; nsCOMPtr mStream; - nsInt64 mSelfProgress; - nsInt64 mSelfProgressMax; + PRInt64 mSelfProgress; + PRInt64 mSelfProgressMax; PRPackedBool mCalcFileExt; OutputData(nsIURI *aFile, nsIURI *aOriginalLocation, PRBool aCalcFileExt) : @@ -192,8 +191,8 @@ struct OutputData struct UploadData { nsCOMPtr mFile; - nsInt64 mSelfProgress; - nsInt64 mSelfProgressMax; + PRInt64 mSelfProgress; + PRInt64 mSelfProgressMax; UploadData(nsIURI *aFile) : mFile(aFile), @@ -244,6 +243,8 @@ nsWebBrowserPersist::nsWebBrowserPersist() : mPersistFlags(kDefaultPersistFlags), mPersistResult(NS_OK), mWrapColumn(72), + mTotalCurrentProgress(0), + mTotalMaxProgress(0), mEncodingFlags(0) { } diff --git a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.h b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.h index 54871d135dc7..fd7894f0be62 100644 --- a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.h +++ b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.h @@ -58,7 +58,6 @@ #include "nsHashtable.h" #include "nsTArray.h" -#include "nsInt64.h" #include "nsCWebBrowserPersist.h" @@ -240,8 +239,8 @@ private: PRPackedBool mSerializingOutput; PRUint32 mPersistFlags; PRUint32 mPersistResult; - nsInt64 mTotalCurrentProgress; - nsInt64 mTotalMaxProgress; + PRInt64 mTotalCurrentProgress; + PRInt64 mTotalMaxProgress; PRInt16 mWrapColumn; PRUint32 mEncodingFlags; nsString mContentType; diff --git a/modules/libjar/nsJARChannel.cpp b/modules/libjar/nsJARChannel.cpp index d65675d60349..64726a51ca08 100644 --- a/modules/libjar/nsJARChannel.cpp +++ b/modules/libjar/nsJARChannel.cpp @@ -42,7 +42,6 @@ #include "nsJARProtocolHandler.h" #include "nsMimeTypes.h" #include "nsNetUtil.h" -#include "nsInt64.h" #include "nsEscape.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" diff --git a/modules/libpr0n/decoders/icon/mac/nsIconChannelCocoa.mm b/modules/libpr0n/decoders/icon/mac/nsIconChannelCocoa.mm index f043d2297af1..ab915cea270a 100644 --- a/modules/libpr0n/decoders/icon/mac/nsIconChannelCocoa.mm +++ b/modules/libpr0n/decoders/icon/mac/nsIconChannelCocoa.mm @@ -56,7 +56,6 @@ #include "plstr.h" #include "nsILocalFileMac.h" #include "nsIFileURL.h" -#include "nsInt64.h" #include "nsTArray.h" #include "nsObjCExceptions.h" @@ -220,7 +219,7 @@ NS_IMETHODIMP nsIconChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports NS_ENSURE_SUCCESS(rv, rv); // Init our stream pump - rv = mPump->Init(inStream, nsInt64(-1), nsInt64(-1), 0, 0, PR_FALSE); + rv = mPump->Init(inStream, PRInt64(-1), PRInt64(-1), 0, 0, PR_FALSE); NS_ENSURE_SUCCESS(rv, rv); rv = mPump->AsyncRead(this, ctxt); diff --git a/modules/libpr0n/decoders/icon/os2/nsIconChannel.cpp b/modules/libpr0n/decoders/icon/os2/nsIconChannel.cpp index a597abcaa50e..e06ebe2084e1 100644 --- a/modules/libpr0n/decoders/icon/os2/nsIconChannel.cpp +++ b/modules/libpr0n/decoders/icon/os2/nsIconChannel.cpp @@ -47,7 +47,6 @@ #include "nsReadableUtils.h" #include "nsMemory.h" #include "nsNetUtil.h" -#include "nsInt64.h" #include "nsILocalFile.h" #include "nsIFileURL.h" #include "nsDirectoryServiceDefs.h" @@ -203,7 +202,7 @@ NS_IMETHODIMP nsIconChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports return rv; // Init our streampump - rv = mPump->Init(inStream, nsInt64(-1), nsInt64(-1), 0, 0, PR_FALSE); + rv = mPump->Init(inStream, PRInt64(-1), PRInt64(-1), 0, 0, PR_FALSE); if (NS_FAILED(rv)) return rv; diff --git a/modules/libpr0n/decoders/icon/win/nsIconChannel.cpp b/modules/libpr0n/decoders/icon/win/nsIconChannel.cpp index 526034926829..0d5e1728938b 100644 --- a/modules/libpr0n/decoders/icon/win/nsIconChannel.cpp +++ b/modules/libpr0n/decoders/icon/win/nsIconChannel.cpp @@ -53,7 +53,6 @@ #include "nsIStringStream.h" #include "nsIURL.h" #include "nsNetUtil.h" -#include "nsInt64.h" #include "nsIFile.h" #include "nsIFileURL.h" #include "nsIMIMEService.h" @@ -249,7 +248,7 @@ NS_IMETHODIMP nsIconChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports return rv; // Init our streampump - rv = mPump->Init(inStream, nsInt64(-1), nsInt64(-1), 0, 0, PR_FALSE); + rv = mPump->Init(inStream, PRInt64(-1), PRInt64(-1), 0, 0, PR_FALSE); if (NS_FAILED(rv)) return rv; diff --git a/modules/plugin/base/src/nsPluginHost.cpp b/modules/plugin/base/src/nsPluginHost.cpp index ae101fb138e7..344b8c1fd12b 100644 --- a/modules/plugin/base/src/nsPluginHost.cpp +++ b/modules/plugin/base/src/nsPluginHost.cpp @@ -133,7 +133,6 @@ #include "nsAppDirectoryServiceDefs.h" #include "nsIFile.h" #include "nsPluginDirServiceProvider.h" -#include "nsInt64.h" #include "nsPluginError.h" #include "nsUnicharUtils.h" @@ -2949,7 +2948,7 @@ nsPluginHost::ReadPluginInfo() if (NS_FAILED(rv)) return rv; - PRInt32 flen = nsInt64(fileSize); + PRInt32 flen = PRInt64(fileSize); if (flen == 0) { NS_WARNING("Plugins Registry Empty!"); return NS_OK; // ERROR CONDITION diff --git a/modules/plugin/base/src/nsPluginStreamListenerPeer.cpp b/modules/plugin/base/src/nsPluginStreamListenerPeer.cpp index 238953b324af..a5fbabaa2761 100644 --- a/modules/plugin/base/src/nsPluginStreamListenerPeer.cpp +++ b/modules/plugin/base/src/nsPluginStreamListenerPeer.cpp @@ -969,7 +969,7 @@ NS_IMETHODIMP nsPluginStreamListenerPeer::OnDataAvailable(nsIRequest *request, brr->GetStartRange(&absoluteOffset64); // XXX handle 64-bit for real - PRInt32 absoluteOffset = (PRInt32)nsInt64(absoluteOffset64); + PRInt32 absoluteOffset = (PRInt32)PRInt64(absoluteOffset64); // we need to track how much data we have forwarded to the // plugin. @@ -1049,7 +1049,7 @@ NS_IMETHODIMP nsPluginStreamListenerPeer::OnStopRequest(nsIRequest *request, PRInt64 absoluteOffset64 = LL_ZERO; brr->GetStartRange(&absoluteOffset64); // XXX support 64-bit offsets - PRInt32 absoluteOffset = (PRInt32)nsInt64(absoluteOffset64); + PRInt32 absoluteOffset = (PRInt32)PRInt64(absoluteOffset64); nsPRUintKey key(absoluteOffset); diff --git a/netwerk/base/public/nsNetUtil.h b/netwerk/base/public/nsNetUtil.h index 82d88a68fd8a..2ef06d942a53 100644 --- a/netwerk/base/public/nsNetUtil.h +++ b/netwerk/base/public/nsNetUtil.h @@ -90,7 +90,6 @@ #include "nsIPersistentProperties2.h" #include "nsISyncStreamListener.h" #include "nsInterfaceRequestorAgg.h" -#include "nsInt64.h" #include "nsINetUtil.h" #include "nsIURIWithPrincipal.h" #include "nsIAuthPrompt.h" @@ -490,8 +489,8 @@ NS_NewInputStreamChannel(nsIChannel **result, inline nsresult NS_NewInputStreamPump(nsIInputStreamPump **result, nsIInputStream *stream, - PRInt64 streamPos = nsInt64(-1), - PRInt64 streamLen = nsInt64(-1), + PRInt64 streamPos = PRInt64(-1), + PRInt64 streamLen = PRInt64(-1), PRUint32 segsize = 0, PRUint32 segcount = 0, PRBool closeWhenDone = PR_FALSE) @@ -1040,7 +1039,7 @@ NS_BackgroundInputStream(nsIInputStream **result, do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &rv); if (NS_SUCCEEDED(rv)) { nsCOMPtr inTransport; - rv = sts->CreateInputTransport(stream, nsInt64(-1), nsInt64(-1), + rv = sts->CreateInputTransport(stream, PRInt64(-1), PRInt64(-1), PR_TRUE, getter_AddRefs(inTransport)); if (NS_SUCCEEDED(rv)) rv = inTransport->OpenInputStream(nsITransport::OPEN_BLOCKING, @@ -1064,7 +1063,7 @@ NS_BackgroundOutputStream(nsIOutputStream **result, do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &rv); if (NS_SUCCEEDED(rv)) { nsCOMPtr inTransport; - rv = sts->CreateOutputTransport(stream, nsInt64(-1), nsInt64(-1), + rv = sts->CreateOutputTransport(stream, PRInt64(-1), PRInt64(-1), PR_TRUE, getter_AddRefs(inTransport)); if (NS_SUCCEEDED(rv)) rv = inTransport->OpenOutputStream(nsITransport::OPEN_BLOCKING, diff --git a/netwerk/base/src/nsBufferedStreams.cpp b/netwerk/base/src/nsBufferedStreams.cpp index 0daae5d7f4b5..a2248a098e6e 100644 --- a/netwerk/base/src/nsBufferedStreams.cpp +++ b/netwerk/base/src/nsBufferedStreams.cpp @@ -165,7 +165,7 @@ nsBufferedStream::Seek(PRInt32 whence, PRInt64 offset) nsCOMPtr ras = do_QueryInterface(mStream, &rv); if (NS_FAILED(rv)) return rv; - nsInt64 absPos; + PRInt64 absPos = 0; switch (whence) { case nsISeekableStream::NS_SEEK_SET: absPos = offset; @@ -205,8 +205,8 @@ nsBufferedStream::Seek(PRInt32 whence, PRInt64 offset) METER(if (bufstats.mBigSeekIndex < MAX_BIG_SEEKS) bufstats.mBigSeek[bufstats.mBigSeekIndex].mOldOffset = - mBufferStartOffset + nsInt64(mCursor)); - const nsInt64 minus1 = -1; + mBufferStartOffset + PRInt64(mCursor)); + const PRInt64 minus1 = -1; if (absPos == minus1) { // then we had the SEEK_END case, above PRInt64 tellPos; @@ -231,7 +231,7 @@ nsBufferedStream::Tell(PRInt64 *result) if (mStream == nsnull) return NS_BASE_STREAM_CLOSED; - nsInt64 result64 = mBufferStartOffset; + PRInt64 result64 = mBufferStartOffset; result64 += mCursor; *result = result64; return NS_OK; diff --git a/netwerk/base/src/nsBufferedStreams.h b/netwerk/base/src/nsBufferedStreams.h index 231244a9b863..3206ef986d5f 100644 --- a/netwerk/base/src/nsBufferedStreams.h +++ b/netwerk/base/src/nsBufferedStreams.h @@ -45,7 +45,6 @@ #include "nsISeekableStream.h" #include "nsIStreamBufferAccess.h" #include "nsCOMPtr.h" -#include "nsInt64.h" #include "nsIIPCSerializable.h" //////////////////////////////////////////////////////////////////////////////// @@ -70,7 +69,7 @@ protected: char* mBuffer; // mBufferStartOffset is the offset relative to the start of mStream. - nsInt64 mBufferStartOffset; + PRInt64 mBufferStartOffset; // mCursor is the read cursor for input streams, or write cursor for // output streams, and is relative to mBufferStartOffset. diff --git a/netwerk/base/src/nsFileStreams.cpp b/netwerk/base/src/nsFileStreams.cpp index 025907bd5d87..7828cd38d6bd 100644 --- a/netwerk/base/src/nsFileStreams.cpp +++ b/netwerk/base/src/nsFileStreams.cpp @@ -57,7 +57,6 @@ #include "nsXPIDLString.h" #include "prerror.h" #include "nsCRT.h" -#include "nsInt64.h" #include "nsIFile.h" #include "nsDirectoryIndexStream.h" #include "nsMimeTypes.h" @@ -107,8 +106,8 @@ nsFileStream::Seek(PRInt32 whence, PRInt64 offset) if (mFD == nsnull) return NS_BASE_STREAM_CLOSED; - nsInt64 cnt = PR_Seek64(mFD, offset, (PRSeekWhence)whence); - if (cnt == nsInt64(-1)) { + PRInt64 cnt = PR_Seek64(mFD, offset, (PRSeekWhence)whence); + if (cnt == PRInt64(-1)) { return NS_ErrorAccordingToNSPR(); } return NS_OK; @@ -123,8 +122,8 @@ nsFileStream::Tell(PRInt64 *result) if (mFD == nsnull) return NS_BASE_STREAM_CLOSED; - nsInt64 cnt = PR_Seek64(mFD, 0, PR_SEEK_CUR); - if (cnt == nsInt64(-1)) { + PRInt64 cnt = PR_Seek64(mFD, 0, PR_SEEK_CUR); + if (cnt == PRInt64(-1)) { return NS_ErrorAccordingToNSPR(); } *result = cnt; diff --git a/netwerk/base/src/nsIncrementalDownload.cpp b/netwerk/base/src/nsIncrementalDownload.cpp index 4b7826f2241f..265a3e48c27b 100644 --- a/netwerk/base/src/nsIncrementalDownload.cpp +++ b/netwerk/base/src/nsIncrementalDownload.cpp @@ -48,7 +48,6 @@ #include "nsIServiceManager.h" #include "nsILocalFile.h" #include "nsITimer.h" -#include "nsInt64.h" #include "nsNetUtil.h" #include "nsAutoPtr.h" #include "nsWeakReference.h" @@ -101,7 +100,7 @@ AppendToFile(nsILocalFile *lf, const char *data, PRUint32 len) // maxSize may be -1 if unknown static void -MakeRangeSpec(const nsInt64 &size, const nsInt64 &maxSize, PRInt32 chunkSize, +MakeRangeSpec(const PRInt64 &size, const PRInt64 &maxSize, PRInt32 chunkSize, PRBool fetchRemaining, nsCString &rangeSpec) { rangeSpec.AssignLiteral("bytes="); @@ -111,8 +110,8 @@ MakeRangeSpec(const nsInt64 &size, const nsInt64 &maxSize, PRInt32 chunkSize, if (fetchRemaining) return; - nsInt64 end = size + nsInt64(chunkSize); - if (maxSize != nsInt64(-1) && end > maxSize) + PRInt64 end = size + PRInt64(chunkSize); + if (maxSize != PRInt64(-1) && end > maxSize) end = maxSize; end -= 1; @@ -165,8 +164,8 @@ private: PRInt32 mChunkLen; PRInt32 mChunkSize; PRInt32 mInterval; - nsInt64 mTotalSize; - nsInt64 mCurrentSize; + PRInt64 mTotalSize; + PRInt64 mCurrentSize; PRUint32 mLoadFlags; PRInt32 mNonPartialCount; nsresult mStatus; @@ -197,7 +196,7 @@ nsIncrementalDownload::nsIncrementalDownload() nsresult nsIncrementalDownload::FlushChunk() { - NS_ASSERTION(mTotalSize != nsInt64(-1), "total size should be known"); + NS_ASSERTION(mTotalSize != PRInt64(-1), "total size should be known"); if (mChunkLen == 0) return NS_OK; @@ -206,7 +205,7 @@ nsIncrementalDownload::FlushChunk() if (NS_FAILED(rv)) return rv; - mCurrentSize += nsInt64(mChunkLen); + mCurrentSize += PRInt64(mChunkLen); mChunkLen = 0; return NS_OK; @@ -285,7 +284,7 @@ nsIncrementalDownload::ProcessTimeout() if (NS_FAILED(rv)) return rv; - NS_ASSERTION(mCurrentSize != nsInt64(-1), + NS_ASSERTION(mCurrentSize != PRInt64(-1), "we should know the current file size by now"); rv = ClearRequestHeader(http); @@ -294,7 +293,7 @@ nsIncrementalDownload::ProcessTimeout() // Don't bother making a range request if we are just going to fetch the // entire document. - if (mInterval || mCurrentSize != nsInt64(0)) { + if (mInterval || mCurrentSize != PRInt64(0)) { nsCAutoString range; MakeRangeSpec(mCurrentSize, mTotalSize, mChunkSize, mInterval == 0, range); @@ -319,7 +318,7 @@ nsIncrementalDownload::ProcessTimeout() nsresult nsIncrementalDownload::ReadCurrentSize() { - nsInt64 size; + PRInt64 size; nsresult rv = mDest->GetFileSize((PRInt64 *) &size); if (rv == NS_ERROR_FILE_NOT_FOUND || rv == NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) { @@ -553,7 +552,7 @@ nsIncrementalDownload::OnStartRequest(nsIRequest *request, // We may already have the entire file downloaded, in which case // our request for a range beyond the end of the file would have // been met with an error response code. - if (code == 416 && mTotalSize == nsInt64(-1)) { + if (code == 416 && mTotalSize == PRInt64(-1)) { mTotalSize = mCurrentSize; // Return an error code here to suppress OnDataAvailable. return NS_ERROR_DOWNLOAD_COMPLETE; @@ -587,7 +586,7 @@ nsIncrementalDownload::OnStartRequest(nsIRequest *request, } // Do special processing after the first response. - if (mTotalSize == nsInt64(-1)) { + if (mTotalSize == PRInt64(-1)) { // Update knowledge of mFinalURI rv = http->GetURI(getter_AddRefs(mFinalURI)); if (NS_FAILED(rv)) @@ -616,7 +615,7 @@ nsIncrementalDownload::OnStartRequest(nsIRequest *request, rv = props->GetPropertyAsInt64(NS_CHANNEL_PROP_CONTENT_LENGTH, &mTotalSize); // We need to know the total size of the thing we're trying to download. - if (mTotalSize == nsInt64(-1)) { + if (mTotalSize == PRInt64(-1)) { NS_WARNING("server returned no content-length header!"); return NS_ERROR_UNEXPECTED; } @@ -633,13 +632,13 @@ nsIncrementalDownload::OnStartRequest(nsIRequest *request, } // Adjust mChunkSize accordingly if mCurrentSize is close to mTotalSize. - nsInt64 diff = mTotalSize - mCurrentSize; - if (diff <= nsInt64(0)) { + PRInt64 diff = mTotalSize - mCurrentSize; + if (diff <= PRInt64(0)) { NS_WARNING("about to set a bogus chunk size; giving up"); return NS_ERROR_UNEXPECTED; } - if (diff < nsInt64(mChunkSize)) + if (diff < PRInt64(mChunkSize)) mChunkSize = PRUint32(diff); mChunk = new char[mChunkSize]; diff --git a/netwerk/base/src/nsInputStreamPump.cpp b/netwerk/base/src/nsInputStreamPump.cpp index 11685e326660..cbfdaa0c48a8 100644 --- a/netwerk/base/src/nsInputStreamPump.cpp +++ b/netwerk/base/src/nsInputStreamPump.cpp @@ -287,7 +287,7 @@ nsInputStreamPump::Init(nsIInputStream *stream, NS_ENSURE_TRUE(mState == STATE_IDLE, NS_ERROR_IN_PROGRESS); mStreamOffset = PRUint64(streamPos); - if (nsInt64(streamLen) >= nsInt64(0)) + if (PRInt64(streamLen) >= PRInt64(0)) mStreamLength = PRUint64(streamLen); mStream = stream; mSegSize = segsize; diff --git a/netwerk/base/src/nsSocketTransport2.cpp b/netwerk/base/src/nsSocketTransport2.cpp index 54d34341e7bc..152734c34d7a 100644 --- a/netwerk/base/src/nsSocketTransport2.cpp +++ b/netwerk/base/src/nsSocketTransport2.cpp @@ -54,7 +54,6 @@ #include "nsAutoPtr.h" #include "nsCOMPtr.h" #include "netCore.h" -#include "nsInt64.h" #include "prmem.h" #include "plstr.h" #include "prnetdb.h" diff --git a/netwerk/base/src/nsSocketTransport2.h b/netwerk/base/src/nsSocketTransport2.h index 22ed97859671..f9ba209164d1 100644 --- a/netwerk/base/src/nsSocketTransport2.h +++ b/netwerk/base/src/nsSocketTransport2.h @@ -45,7 +45,6 @@ #include "nsSocketTransportService2.h" #include "nsString.h" #include "nsCOMPtr.h" -#include "nsInt64.h" #include "nsISocketTransport.h" #include "nsIInterfaceRequestor.h" diff --git a/netwerk/base/src/nsStreamTransportService.cpp b/netwerk/base/src/nsStreamTransportService.cpp index e8e31ef0746b..0cb8acb3511e 100644 --- a/netwerk/base/src/nsStreamTransportService.cpp +++ b/netwerk/base/src/nsStreamTransportService.cpp @@ -39,7 +39,6 @@ #include "nsXPCOMCIDInternal.h" #include "nsNetSegmentUtils.h" #include "nsAutoLock.h" -#include "nsInt64.h" #include "nsTransportUtils.h" #include "nsStreamUtils.h" #include "nsNetError.h" diff --git a/netwerk/protocol/ftp/nsFtpConnectionThread.h b/netwerk/protocol/ftp/nsFtpConnectionThread.h index 499d689bad68..439b66a99280 100644 --- a/netwerk/protocol/ftp/nsFtpConnectionThread.h +++ b/netwerk/protocol/ftp/nsFtpConnectionThread.h @@ -43,7 +43,6 @@ #include "nsFTPChannel.h" #include "nsBaseContentStream.h" -#include "nsInt64.h" #include "nsIThread.h" #include "nsIRunnable.h" #include "nsISocketTransportService.h" diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp index f2b07e347dc8..5cb4af8b08ca 100644 --- a/netwerk/protocol/http/nsHttpChannel.cpp +++ b/netwerk/protocol/http/nsHttpChannel.cpp @@ -64,7 +64,6 @@ #include "prprf.h" #include "prnetdb.h" #include "nsEscape.h" -#include "nsInt64.h" #include "nsStreamUtils.h" #include "nsIOService.h" #include "nsICacheService.h" @@ -2501,20 +2500,20 @@ nsHttpChannel::CheckCache() // size of the cached content, then the cached response is partial... // either we need to issue a byte range request or we need to refetch // the entire document. - nsInt64 contentLength = mCachedResponseHead->ContentLength(); - if (contentLength != nsInt64(-1)) { + PRInt64 contentLength = mCachedResponseHead->ContentLength(); + if (contentLength != PRInt64(-1)) { PRUint32 size; rv = mCacheEntry->GetDataSize(&size); NS_ENSURE_SUCCESS(rv, rv); - if (nsInt64(size) != contentLength) { + if (PRInt64(size) != contentLength) { LOG(("Cached data size does not match the Content-Length header " "[content-length=%lld size=%u]\n", PRInt64(contentLength), size)); PRBool hasContentEncoding = mCachedResponseHead->PeekHeader(nsHttp::Content_Encoding) != nsnull; - if ((nsInt64(size) < contentLength) && + if ((PRInt64(size) < contentLength) && size > 0 && !hasContentEncoding && mCachedResponseHead->IsResumable() && @@ -2834,7 +2833,7 @@ nsHttpChannel::ReadFromCache() if (NS_FAILED(rv)) return rv; rv = nsInputStreamPump::Create(getter_AddRefs(mCachePump), - stream, nsInt64(-1), nsInt64(-1), 0, 0, + stream, PRInt64(-1), PRInt64(-1), 0, 0, PR_TRUE); if (NS_FAILED(rv)) return rv; diff --git a/netwerk/protocol/http/nsHttpTransaction.cpp b/netwerk/protocol/http/nsHttpTransaction.cpp index 91679c366b8c..813ee7d62a46 100644 --- a/netwerk/protocol/http/nsHttpTransaction.cpp +++ b/netwerk/protocol/http/nsHttpTransaction.cpp @@ -988,7 +988,7 @@ nsHttpTransaction::HandleContentStart() mContentLength = -1; } #if defined(PR_LOGGING) - else if (mContentLength == nsInt64(-1)) + else if (mContentLength == PRInt64(-1)) LOG(("waiting for the server to close the connection.\n")); #endif } @@ -1028,21 +1028,21 @@ nsHttpTransaction::HandleContent(char *buf, rv = mChunkedDecoder->HandleChunkedContent(buf, count, contentRead, contentRemaining); if (NS_FAILED(rv)) return rv; } - else if (mContentLength >= nsInt64(0)) { + else if (mContentLength >= PRInt64(0)) { // HTTP/1.0 servers have been known to send erroneous Content-Length // headers. So, unless the connection is persistent, we must make // allowances for a possibly invalid Content-Length header. Thus, if // NOT persistent, we simply accept everything in |buf|. if (mConnection->IsPersistent()) { - nsInt64 remaining = mContentLength - mContentRead; - nsInt64 count64 = count; + PRInt64 remaining = mContentLength - mContentRead; + PRInt64 count64 = count; *contentRead = PR_MIN(count64, remaining); *contentRemaining = count - *contentRead; } else { *contentRead = count; // mContentLength might need to be increased... - nsInt64 position = mContentRead + nsInt64(count); + PRInt64 position = mContentRead + PRInt64(count); if (position > mContentLength) { mContentLength = position; //mResponseHead->SetContentLength(mContentLength); diff --git a/netwerk/protocol/http/nsHttpTransaction.h b/netwerk/protocol/http/nsHttpTransaction.h index 51abdaa76e5d..67ecf25b2b81 100644 --- a/netwerk/protocol/http/nsHttpTransaction.h +++ b/netwerk/protocol/http/nsHttpTransaction.h @@ -44,7 +44,6 @@ #include "nsAHttpTransaction.h" #include "nsAHttpConnection.h" #include "nsCOMPtr.h" -#include "nsInt64.h" #include "nsIPipe.h" #include "nsIInputStream.h" @@ -179,8 +178,8 @@ private: nsCString mLineBuf; // may contain a partial line - nsInt64 mContentLength; // equals -1 if unknown - nsInt64 mContentRead; // count of consumed content bytes + PRInt64 mContentLength; // equals -1 if unknown + PRInt64 mContentRead; // count of consumed content bytes // After a 304/204 or other "no-content" style response we will skip over // up to MAX_INVALID_RESPONSE_BODY_SZ bytes when looking for the next diff --git a/netwerk/streamconv/converters/nsMultiMixedConv.cpp b/netwerk/streamconv/converters/nsMultiMixedConv.cpp index d5872ef1a6e9..6ecc16e4b7b2 100644 --- a/netwerk/streamconv/converters/nsMultiMixedConv.cpp +++ b/netwerk/streamconv/converters/nsMultiMixedConv.cpp @@ -37,7 +37,6 @@ #include "nsMultiMixedConv.h" #include "nsMemory.h" -#include "nsInt64.h" #include "plstr.h" #include "nsIHttpChannel.h" #include "nsIServiceManager.h" @@ -980,7 +979,7 @@ nsMultiMixedConv::ParseHeaders(nsIChannel *aChannel, char *&aPtr, mIsByteRangeRequest = PR_TRUE; if (mContentLength == LL_MAXUINT) - mContentLength = PRUint64(PRInt64(mByteRangeEnd - mByteRangeStart + nsInt64(1))); + mContentLength = PRUint64(PRInt64(mByteRangeEnd - mByteRangeStart + PRInt64(1))); } } *newLine = tmpChar; diff --git a/netwerk/streamconv/converters/nsMultiMixedConv.h b/netwerk/streamconv/converters/nsMultiMixedConv.h index d927d30f7364..ac919a5b7119 100644 --- a/netwerk/streamconv/converters/nsMultiMixedConv.h +++ b/netwerk/streamconv/converters/nsMultiMixedConv.h @@ -43,7 +43,6 @@ #include "nsString.h" #include "nsXPIDLString.h" #include "nsCOMPtr.h" -#include "nsInt64.h" #include "nsIByteRangeRequest.h" #include "nsIMultiPartChannel.h" #include "nsAutoPtr.h" @@ -102,8 +101,8 @@ protected: PRUint64 mContentLength; PRBool mIsByteRangeRequest; - nsInt64 mByteRangeStart; - nsInt64 mByteRangeEnd; + PRInt64 mByteRangeStart; + PRInt64 mByteRangeEnd; PRUint32 mPartID; // unique ID that can be used to identify // this part of the multipart document @@ -190,8 +189,8 @@ protected: // The following members are for tracking the byte ranges in // multipart/mixed content which specified the 'Content-Range:' // header... - nsInt64 mByteRangeStart; - nsInt64 mByteRangeEnd; + PRInt64 mByteRangeStart; + PRInt64 mByteRangeEnd; PRBool mIsByteRangeRequest; PRUint32 mCurrentPartID; diff --git a/netwerk/test/TestProtocols.cpp b/netwerk/test/TestProtocols.cpp index e23d8fc3046a..8a498c8e6b7b 100644 --- a/netwerk/test/TestProtocols.cpp +++ b/netwerk/test/TestProtocols.cpp @@ -87,8 +87,6 @@ #include "prlog.h" #include "prtime.h" -#include "nsInt64.h" - namespace TestProtocols { #if defined(PR_LOGGING) @@ -195,7 +193,7 @@ public: NS_DECL_ISUPPORTS const char* Name() { return mURLString.get(); } - nsInt64 mBytesRead; + PRInt64 mBytesRead; PRTime mTotalTime; PRTime mConnectTime; nsCString mURLString; @@ -541,9 +539,9 @@ InputTestConsumer::OnStopRequest(nsIRequest *request, nsISupports* context, LOG(("\tTime to connect: %.3f seconds\n", connectTime)); LOG(("\tTime to read: %.3f seconds.\n", readTime)); LOG(("\tRead: %lld bytes.\n", info->mBytesRead.mValue)); - if (info->mBytesRead == nsInt64(0)) { + if (info->mBytesRead == PRInt64(0)) { } else if (readTime > 0.0) { - LOG(("\tThroughput: %.0f bps.\n", (PRFloat64)(info->mBytesRead*nsInt64(8))/readTime)); + LOG(("\tThroughput: %.0f bps.\n", (PRFloat64)(info->mBytesRead*PRInt64(8))/readTime)); } else { LOG(("\tThroughput: REAL FAST!!\n")); } diff --git a/netwerk/test/TestStreamTransport.cpp b/netwerk/test/TestStreamTransport.cpp index 7b1ee1d18e66..2a54cb976423 100644 --- a/netwerk/test/TestStreamTransport.cpp +++ b/netwerk/test/TestStreamTransport.cpp @@ -225,12 +225,12 @@ RunTest(nsIFile *srcFile, nsIFile *destFile) if (NS_FAILED(rv)) return rv; nsCOMPtr srcTransport; - rv = sts->CreateInputTransport(srcStr, nsInt64(-1), nsInt64(-1), PR_TRUE, + rv = sts->CreateInputTransport(srcStr, PRInt64(-1), PRInt64(-1), PR_TRUE, getter_AddRefs(srcTransport)); if (NS_FAILED(rv)) return rv; nsCOMPtr destTransport; - rv = sts->CreateOutputTransport(destStr, nsInt64(-1), nsInt64(-1), PR_TRUE, + rv = sts->CreateOutputTransport(destStr, PRInt64(-1), PRInt64(-1), PR_TRUE, getter_AddRefs(destTransport)); if (NS_FAILED(rv)) return rv; @@ -270,7 +270,7 @@ RunBlockingTest(nsIFile *srcFile, nsIFile *destFile) if (NS_FAILED(rv)) return rv; nsCOMPtr destTransport; - rv = sts->CreateOutputTransport(fileOut, nsInt64(-1), nsInt64(-1), + rv = sts->CreateOutputTransport(fileOut, PRInt64(-1), PRInt64(-1), PR_TRUE, getter_AddRefs(destTransport)); if (NS_FAILED(rv)) return rv; diff --git a/security/manager/boot/src/nsStrictTransportSecurityService.cpp b/security/manager/boot/src/nsStrictTransportSecurityService.cpp index 1c07b5782920..759733daca73 100644 --- a/security/manager/boot/src/nsStrictTransportSecurityService.cpp +++ b/security/manager/boot/src/nsStrictTransportSecurityService.cpp @@ -45,7 +45,6 @@ #include "nsISSLStatusProvider.h" #include "nsStrictTransportSecurityService.h" #include "nsIURI.h" -#include "nsInt64.h" #include "nsNetUtil.h" #include "nsThreadUtils.h" #include "nsStringGlue.h" diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/src/nsNSSComponent.cpp index f17c6eeb6d1b..fec5207573bd 100644 --- a/security/manager/ssl/src/nsNSSComponent.cpp +++ b/security/manager/ssl/src/nsNSSComponent.cpp @@ -94,7 +94,6 @@ #include "nsReadableUtils.h" #include "nsIDateTimeFormat.h" #include "prtypes.h" -#include "nsInt64.h" #include "nsTime.h" #include "nsIEntropyCollector.h" #include "nsIBufEntropyCollector.h" diff --git a/uriloader/base/nsDocLoader.cpp b/uriloader/base/nsDocLoader.cpp index 78e4d9b1c76b..7e5dd5b1d683 100644 --- a/uriloader/base/nsDocLoader.cpp +++ b/uriloader/base/nsDocLoader.cpp @@ -107,8 +107,8 @@ struct nsRequestInfo : public PLDHashEntryHdr } const void* mKey; // Must be first for the pldhash stubs to work - nsInt64 mCurrentProgress; - nsInt64 mMaxProgress; + PRInt64 mCurrentProgress; + PRInt64 mMaxProgress; PRBool mUploading; PRBool mIsDone; @@ -151,6 +151,11 @@ struct nsListenerInfo { nsDocLoader::nsDocLoader() : mParent(nsnull), mListenerInfoList(8), + mCurrentSelfProgress(0), + mMaxSelfProgress(0), + mCurrentTotalProgress(0), + mMaxTotalProgress(0), + mCompletedTotalProgress(0), mIsLoadingDocument(PR_FALSE), mIsRestoringDocument(PR_FALSE), mDontFlushLayout(PR_FALSE), @@ -598,7 +603,7 @@ nsDocLoader::OnStopRequest(nsIRequest *aRequest, if (info) { info->mIsDone = PR_TRUE; - nsInt64 oldMax = info->mMaxProgress; + PRInt64 oldMax = info->mMaxProgress; info->mMaxProgress = info->mCurrentProgress; @@ -607,7 +612,7 @@ nsDocLoader::OnStopRequest(nsIRequest *aRequest, // finished loading, then use this new data to try to calculate a // mMaxSelfProgress... // - if ((oldMax < nsInt64(0)) && (mMaxSelfProgress < nsInt64(0))) { + if ((oldMax < PRInt64(0)) && (mMaxSelfProgress < PRInt64(0))) { mMaxSelfProgress = CalculateMaxProgress(); } @@ -1015,31 +1020,31 @@ nsDocLoader::GetIsLoadingDocument(PRBool *aIsLoadingDocument) PRInt64 nsDocLoader::GetMaxTotalProgress() { - nsInt64 newMaxTotal = 0; + PRInt64 newMaxTotal = 0; PRInt32 count = mChildList.Count(); nsCOMPtr webProgress; for (PRInt32 i=0; i < count; i++) { - nsInt64 individualProgress = 0; + PRInt64 individualProgress = 0; nsIDocumentLoader* docloader = ChildAt(i); if (docloader) { // Cast is safe since all children are nsDocLoader too individualProgress = ((nsDocLoader *) docloader)->GetMaxTotalProgress(); } - if (individualProgress < nsInt64(0)) // if one of the elements doesn't know it's size + if (individualProgress < PRInt64(0)) // if one of the elements doesn't know it's size // then none of them do { - newMaxTotal = nsInt64(-1); + newMaxTotal = PRInt64(-1); break; } else newMaxTotal += individualProgress; } - nsInt64 progress = -1; - if (mMaxSelfProgress >= nsInt64(0) && newMaxTotal >= nsInt64(0)) + PRInt64 progress = -1; + if (mMaxSelfProgress >= PRInt64(0) && newMaxTotal >= PRInt64(0)) progress = newMaxTotal + mMaxSelfProgress; return progress; @@ -1055,7 +1060,7 @@ NS_IMETHODIMP nsDocLoader::OnProgress(nsIRequest *aRequest, nsISupports* ctxt, PRUint64 aProgress, PRUint64 aProgressMax) { nsRequestInfo *info; - nsInt64 progressDelta = 0; + PRInt64 progressDelta = 0; // // Update the RequestInfo entry with the new progress data @@ -1063,7 +1068,7 @@ NS_IMETHODIMP nsDocLoader::OnProgress(nsIRequest *aRequest, nsISupports* ctxt, info = GetRequestInfo(aRequest); if (info) { // suppress sending STATE_TRANSFERRING if this is upload progress (see bug 240053) - if (!info->mUploading && (nsInt64(0) == info->mCurrentProgress) && (nsInt64(0) == info->mMaxProgress)) { + if (!info->mUploading && (PRInt64(0) == info->mCurrentProgress) && (PRInt64(0) == info->mMaxProgress)) { // // If we receive an OnProgress event from a toplevel channel that the URI Loader // has not yet targeted, then we must suppress the event. This is necessary to @@ -1088,8 +1093,8 @@ NS_IMETHODIMP nsDocLoader::OnProgress(nsIRequest *aRequest, nsISupports* ctxt, mMaxSelfProgress += PRInt64(aProgressMax); info->mMaxProgress = PRInt64(aProgressMax); } else { - mMaxSelfProgress = nsInt64(-1); - info->mMaxProgress = nsInt64(-1); + mMaxSelfProgress = PRInt64(-1); + info->mMaxProgress = PRInt64(-1); } // Send a STATE_TRANSFERRING notification for the request. @@ -1111,7 +1116,7 @@ NS_IMETHODIMP nsDocLoader::OnProgress(nsIRequest *aRequest, nsISupports* ctxt, } // Update the current progress count... - progressDelta = nsInt64(PRInt64(aProgress)) - info->mCurrentProgress; + progressDelta = PRInt64(aProgress) - info->mCurrentProgress; mCurrentSelfProgress += progressDelta; info->mCurrentProgress = PRInt64(aProgress); @@ -1565,10 +1570,10 @@ CalcMaxProgressCallback(PLDHashTable *table, PLDHashEntryHdr *hdr, PRUint32 number, void *arg) { const nsRequestInfo *info = static_cast(hdr); - nsInt64 *max = static_cast(arg); + PRInt64 *max = static_cast(arg); if (info->mMaxProgress < info->mCurrentProgress) { - *max = nsInt64(-1); + *max = PRInt64(-1); return PL_DHASH_STOP; } @@ -1580,7 +1585,7 @@ CalcMaxProgressCallback(PLDHashTable *table, PLDHashEntryHdr *hdr, PRInt64 nsDocLoader::CalculateMaxProgress() { - nsInt64 max = mCompletedTotalProgress; + PRInt64 max = mCompletedTotalProgress; PL_DHashTableEnumerate(&mRequestInfoHash, CalcMaxProgressCallback, &max); return max; } diff --git a/uriloader/base/nsDocLoader.h b/uriloader/base/nsDocLoader.h index 1f5b189cc94c..b29ff0a75728 100644 --- a/uriloader/base/nsDocLoader.h +++ b/uriloader/base/nsDocLoader.h @@ -57,7 +57,6 @@ #include "nsIChannelEventSink.h" #include "nsISecurityEventSink.h" #include "nsISupportsPriority.h" -#include "nsInt64.h" #include "nsCOMPtr.h" #include "pldhash.h" @@ -226,14 +225,14 @@ protected: // feedback interfaces that travis cooked up. PRInt32 mProgressStateFlags; - nsInt64 mCurrentSelfProgress; - nsInt64 mMaxSelfProgress; + PRInt64 mCurrentSelfProgress; + PRInt64 mMaxSelfProgress; - nsInt64 mCurrentTotalProgress; - nsInt64 mMaxTotalProgress; + PRInt64 mCurrentTotalProgress; + PRInt64 mMaxTotalProgress; PLDHashTable mRequestInfoHash; - nsInt64 mCompletedTotalProgress; + PRInt64 mCompletedTotalProgress; /* * This flag indicates that the loader is loading a document. It is set diff --git a/uriloader/exthandler/nsExternalHelperAppService.h b/uriloader/exthandler/nsExternalHelperAppService.h index a81c1f8e7537..7e10fc5b2fd9 100644 --- a/uriloader/exthandler/nsExternalHelperAppService.h +++ b/uriloader/exthandler/nsExternalHelperAppService.h @@ -49,8 +49,6 @@ #include "prlog.h" #include "prtime.h" -#include "nsInt64.h" - #include "nsIExternalHelperAppService.h" #include "nsIExternalProtocolService.h" #include "nsIWebProgressListener2.h" @@ -341,8 +339,8 @@ protected: PRBool mTempFileIsExecutable; PRTime mTimeDownloadStarted; - nsInt64 mContentLength; - nsInt64 mProgress; /**< Number of bytes received (for sending progress notifications). */ + PRInt64 mContentLength; + PRInt64 mProgress; /**< Number of bytes received (for sending progress notifications). */ /** * When we are told to save the temp file to disk (in a more permament diff --git a/view/src/nsViewManager.cpp b/view/src/nsViewManager.cpp index f94463bbadef..c297302f978d 100644 --- a/view/src/nsViewManager.cpp +++ b/view/src/nsViewManager.cpp @@ -53,7 +53,6 @@ #include "nsIPrefBranch.h" #include "nsIPrefService.h" #include "nsRegion.h" -#include "nsInt64.h" #include "nsHashtable.h" #include "nsCOMArray.h" #include "nsThreadUtils.h" diff --git a/xpcom/components/nsComponentManager.cpp b/xpcom/components/nsComponentManager.cpp index e8c1d52a76bb..296ff0b7558b 100644 --- a/xpcom/components/nsComponentManager.cpp +++ b/xpcom/components/nsComponentManager.cpp @@ -91,7 +91,6 @@ #include "mozilla/FunctionTimer.h" #include "ManifestParser.h" -#include "nsInt64.h" #include "nsManifestLineReader.h" #include "mozilla/GenericFactory.h" #include "nsSupportsPrimitives.h" diff --git a/xpcom/ds/Makefile.in b/xpcom/ds/Makefile.in index 1bc27ddad5eb..e51ea13ce5a5 100644 --- a/xpcom/ds/Makefile.in +++ b/xpcom/ds/Makefile.in @@ -100,7 +100,6 @@ EXPORTS = \ nsHashtable.h \ nsIByteBuffer.h \ nsIUnicharBuffer.h \ - nsInt64.h \ nsMathUtils.h \ nsObserverService.h \ nsRecyclingAllocator.h \ diff --git a/xpcom/ds/nsInt64.h b/xpcom/ds/nsInt64.h deleted file mode 100644 index 304eab63f151..000000000000 --- a/xpcom/ds/nsInt64.h +++ /dev/null @@ -1,44 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either of the GNU General Public License Version 2 or later (the "GPL"), - * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#ifndef nsInt64_h__ -#define nsInt64_h__ - -typedef PRInt64 nsInt64; -typedef PRUint64 nsUint64; - -#endif // nsInt64_h__ diff --git a/xpcom/io/nsFastLoadFile.cpp b/xpcom/io/nsFastLoadFile.cpp index aaf7dcb279d2..6d8036807ccb 100644 --- a/xpcom/io/nsFastLoadFile.cpp +++ b/xpcom/io/nsFastLoadFile.cpp @@ -56,7 +56,6 @@ #include "nsBinaryStream.h" #include "nsFastLoadFile.h" -#include "nsInt64.h" #ifdef XP_UNIX #include #endif diff --git a/xpcom/io/nsMultiplexInputStream.cpp b/xpcom/io/nsMultiplexInputStream.cpp index c670ba215acf..25a9bd023b38 100644 --- a/xpcom/io/nsMultiplexInputStream.cpp +++ b/xpcom/io/nsMultiplexInputStream.cpp @@ -51,7 +51,6 @@ #include "nsISeekableStream.h" #include "nsCOMPtr.h" #include "nsCOMArray.h" -#include "nsInt64.h" #include "nsIIPCSerializable.h" #include "nsIClassInfoImpl.h" @@ -384,7 +383,7 @@ nsMultiplexInputStream::Tell(PRInt64 *_retval) return mStatus; nsresult rv; - nsInt64 ret64 = 0; + PRInt64 ret64 = 0; PRUint32 i, last; last = mStartedReadingCurrent ? mCurrentStream+1 : mCurrentStream; for (i = 0; i < last; ++i) { diff --git a/xpcom/io/nsPipe3.cpp b/xpcom/io/nsPipe3.cpp index b5765af29096..9318e9e3728d 100644 --- a/xpcom/io/nsPipe3.cpp +++ b/xpcom/io/nsPipe3.cpp @@ -45,7 +45,6 @@ #include "nsCOMPtr.h" #include "nsCRT.h" #include "prlog.h" -#include "nsInt64.h" #include "nsIClassInfoImpl.h" #include "nsAtomicRefcnt.h" @@ -152,7 +151,7 @@ private: // separate refcnt so that we know when to close the consumer nsrefcnt mReaderRefCnt; - nsInt64 mLogicalOffset; + PRInt64 mLogicalOffset; PRPackedBool mBlocking; // these variables can only be accessed while inside the pipe's monitor @@ -206,7 +205,7 @@ private: // separate refcnt so that we know when to close the producer nsrefcnt mWriterRefCnt; - nsInt64 mLogicalOffset; + PRInt64 mLogicalOffset; PRPackedBool mBlocking; // these variables can only be accessed while inside the pipe's monitor diff --git a/xpcom/io/nsStorageStream.cpp b/xpcom/io/nsStorageStream.cpp index cd953597bb79..95e085a7f7f9 100644 --- a/xpcom/io/nsStorageStream.cpp +++ b/xpcom/io/nsStorageStream.cpp @@ -54,7 +54,6 @@ #include "nsIInputStream.h" #include "nsISeekableStream.h" #include "prlog.h" -#include "nsInt64.h" #if defined(PR_LOGGING) // diff --git a/xpcom/io/nsStringStream.cpp b/xpcom/io/nsStringStream.cpp index 64c1b2bb3942..32ed7331fecb 100644 --- a/xpcom/io/nsStringStream.cpp +++ b/xpcom/io/nsStringStream.cpp @@ -61,7 +61,6 @@ #include "nsReadableUtils.h" #include "nsISeekableStream.h" #include "nsISupportsPrimitives.h" -#include "nsInt64.h" #include "nsCRT.h" #include "prerror.h" #include "plstr.h" diff --git a/xpcom/reflect/xptinfo/src/xptiprivate.h b/xpcom/reflect/xptinfo/src/xptiprivate.h index f27ccff7806e..3f831924b4a8 100644 --- a/xpcom/reflect/xptinfo/src/xptiprivate.h +++ b/xpcom/reflect/xptinfo/src/xptiprivate.h @@ -66,7 +66,6 @@ #include "nsMemory.h" #include "nsCOMArray.h" -#include "nsInt64.h" #include "nsQuickSort.h" #include "nsXPIDLString.h" diff --git a/xpinstall/src/nsXPInstallManager.cpp b/xpinstall/src/nsXPInstallManager.cpp index c9c1f5fbf624..41b9f033ff33 100644 --- a/xpinstall/src/nsXPInstallManager.cpp +++ b/xpinstall/src/nsXPInstallManager.cpp @@ -40,7 +40,6 @@ #include "nscore.h" #include "prprf.h" #include "plstr.h" -#include "nsInt64.h" #include "nsISupports.h" #include "nsIServiceManager.h"