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
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 31 Mar 2011 20:15:27 -0400
changeset 64617 b7bfd0871b3f0b4c08d9cd7139fd946521dee79b
parent 64616 ff09586ff85af69259b4bff616261854efd72709
child 64618 dde2eb6014058ac66eaf04bdfb95c28a3cabde4c
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs646071
milestone2.2a1pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
content/html/document/src/nsHTMLContentSink.cpp
embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp
embedding/components/webbrowserpersist/src/nsWebBrowserPersist.h
modules/libjar/nsJARChannel.cpp
modules/libpr0n/decoders/icon/mac/nsIconChannelCocoa.mm
modules/libpr0n/decoders/icon/os2/nsIconChannel.cpp
modules/libpr0n/decoders/icon/win/nsIconChannel.cpp
modules/plugin/base/src/nsPluginHost.cpp
modules/plugin/base/src/nsPluginStreamListenerPeer.cpp
netwerk/base/public/nsNetUtil.h
netwerk/base/src/nsBufferedStreams.cpp
netwerk/base/src/nsBufferedStreams.h
netwerk/base/src/nsFileStreams.cpp
netwerk/base/src/nsIncrementalDownload.cpp
netwerk/base/src/nsInputStreamPump.cpp
netwerk/base/src/nsSocketTransport2.cpp
netwerk/base/src/nsSocketTransport2.h
netwerk/base/src/nsStreamTransportService.cpp
netwerk/protocol/ftp/nsFtpConnectionThread.h
netwerk/protocol/http/nsHttpChannel.cpp
netwerk/protocol/http/nsHttpTransaction.cpp
netwerk/protocol/http/nsHttpTransaction.h
netwerk/streamconv/converters/nsMultiMixedConv.cpp
netwerk/streamconv/converters/nsMultiMixedConv.h
netwerk/test/TestProtocols.cpp
netwerk/test/TestStreamTransport.cpp
security/manager/boot/src/nsStrictTransportSecurityService.cpp
security/manager/ssl/src/nsNSSComponent.cpp
uriloader/base/nsDocLoader.cpp
uriloader/base/nsDocLoader.h
uriloader/exthandler/nsExternalHelperAppService.h
view/src/nsViewManager.cpp
xpcom/components/nsComponentManager.cpp
xpcom/ds/Makefile.in
xpcom/ds/nsInt64.h
xpcom/io/nsFastLoadFile.cpp
xpcom/io/nsMultiplexInputStream.cpp
xpcom/io/nsPipe3.cpp
xpcom/io/nsStorageStream.cpp
xpcom/io/nsStringStream.cpp
xpcom/reflect/xptinfo/src/xptiprivate.h
xpinstall/src/nsXPInstallManager.cpp
--- a/content/html/document/src/nsHTMLContentSink.cpp
+++ b/content/html/document/src/nsHTMLContentSink.cpp
@@ -55,17 +55,16 @@
 #include "nsIContentViewer.h"
 #include "nsIMarkupDocumentViewer.h"
 #include "nsINodeInfo.h"
 #include "nsHTMLTokens.h"
 #include "nsIAppShell.h"
 #include "nsCRT.h"
 #include "prtime.h"
 #include "prlog.h"
-#include "nsInt64.h"
 #include "nsNodeUtils.h"
 #include "nsIContent.h"
 #include "mozilla/dom/Element.h"
 
 #include "nsGenericHTMLElement.h"
 
 #include "nsIDOMText.h"
 #include "nsIDOMComment.h"
--- a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp
+++ b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp
@@ -57,17 +57,16 @@
 #include "nsIUploadChannel.h"
 #include "nsICachingChannel.h"
 #include "nsIFileChannel.h"
 #include "nsEscape.h"
 #include "nsUnicharUtils.h"
 #include "nsIStringEnumerator.h"
 #include "nsCRT.h"
 #include "nsSupportsArray.h"
-#include "nsInt64.h"
 #include "nsContentCID.h"
 #include "nsStreamUtils.h"
 
 #include "nsCExternalHandlerService.h"
 
 #include "nsIURL.h"
 #include "nsIFileURL.h"
 #include "nsIDocument.h"
@@ -163,18 +162,18 @@ struct URIData
 };
 
 // Information about the output stream
 struct OutputData
 {
     nsCOMPtr<nsIURI> mFile;
     nsCOMPtr<nsIURI> mOriginalLocation;
     nsCOMPtr<nsIOutputStream> mStream;
-    nsInt64 mSelfProgress;
-    nsInt64 mSelfProgressMax;
+    PRInt64 mSelfProgress;
+    PRInt64 mSelfProgressMax;
     PRPackedBool mCalcFileExt;
 
     OutputData(nsIURI *aFile, nsIURI *aOriginalLocation, PRBool aCalcFileExt) :
         mFile(aFile),
         mOriginalLocation(aOriginalLocation),
         mSelfProgress(0),
         mSelfProgressMax(10000),
         mCalcFileExt(aCalcFileExt)
@@ -187,18 +186,18 @@ struct OutputData
             mStream->Close();
         }
     }
 };
 
 struct UploadData
 {
     nsCOMPtr<nsIURI> mFile;
-    nsInt64 mSelfProgress;
-    nsInt64 mSelfProgressMax;
+    PRInt64 mSelfProgress;
+    PRInt64 mSelfProgressMax;
 
     UploadData(nsIURI *aFile) :
         mFile(aFile),
         mSelfProgress(0),
         mSelfProgressMax(10000)
     {
     }
 };
@@ -239,16 +238,18 @@ nsWebBrowserPersist::nsWebBrowserPersist
     mJustStartedLoading(PR_TRUE),
     mCompleted(PR_FALSE),
     mStartSaving(PR_FALSE),
     mReplaceExisting(PR_TRUE),
     mSerializingOutput(PR_FALSE),
     mPersistFlags(kDefaultPersistFlags),
     mPersistResult(NS_OK),
     mWrapColumn(72),
+    mTotalCurrentProgress(0),
+    mTotalMaxProgress(0),
     mEncodingFlags(0)
 {
 }
 
 nsWebBrowserPersist::~nsWebBrowserPersist()
 {
     Cleanup();
 }
--- a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.h
+++ b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.h
@@ -53,17 +53,16 @@
 #include "nsIDocumentEncoder.h"
 #include "nsITransport.h"
 #include "nsIProgressEventSink.h"
 #include "nsILocalFile.h"
 #include "nsIWebProgressListener2.h"
 
 #include "nsHashtable.h"
 #include "nsTArray.h"
-#include "nsInt64.h"
 
 #include "nsCWebBrowserPersist.h"
 
 class nsEncoderNodeFixup;
 class nsIStorageStream;
 
 struct URIData;
 struct CleanupData;
@@ -235,18 +234,18 @@ private:
     PRPackedBool              mCancel;
     PRPackedBool              mJustStartedLoading;
     PRPackedBool              mCompleted;
     PRPackedBool              mStartSaving;
     PRPackedBool              mReplaceExisting;
     PRPackedBool              mSerializingOutput;
     PRUint32                  mPersistFlags;
     PRUint32                  mPersistResult;
-    nsInt64                   mTotalCurrentProgress;
-    nsInt64                   mTotalMaxProgress;
+    PRInt64                   mTotalCurrentProgress;
+    PRInt64                   mTotalMaxProgress;
     PRInt16                   mWrapColumn;
     PRUint32                  mEncodingFlags;
     nsString                  mContentType;
 };
 
 // Helper class does node fixup during persistence
 class nsEncoderNodeFixup : public nsIDocumentEncoderNodeFixup
 {
--- a/modules/libjar/nsJARChannel.cpp
+++ b/modules/libjar/nsJARChannel.cpp
@@ -37,17 +37,16 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsJAR.h"
 #include "nsJARChannel.h"
 #include "nsJARProtocolHandler.h"
 #include "nsMimeTypes.h"
 #include "nsNetUtil.h"
-#include "nsInt64.h"
 #include "nsEscape.h"
 #include "nsIPrefService.h"
 #include "nsIPrefBranch.h"
 #include "nsIViewSourceChannel.h"
 #include "nsChannelProperties.h"
 
 #include "nsIScriptSecurityManager.h"
 #include "nsIPrincipal.h"
--- a/modules/libpr0n/decoders/icon/mac/nsIconChannelCocoa.mm
+++ b/modules/libpr0n/decoders/icon/mac/nsIconChannelCocoa.mm
@@ -51,17 +51,16 @@
 #include "nsIStringStream.h"
 #include "nsIURL.h"
 #include "nsNetUtil.h"
 #include "nsIMIMEService.h"
 #include "nsCExternalHandlerService.h"
 #include "plstr.h"
 #include "nsILocalFileMac.h"
 #include "nsIFileURL.h"
-#include "nsInt64.h"
 #include "nsTArray.h"
 #include "nsObjCExceptions.h"
 
 #include <Cocoa/Cocoa.h>
 
 // nsIconChannel methods
 nsIconChannel::nsIconChannel()
 {
@@ -215,17 +214,17 @@ nsresult nsIconChannel::ExtractIconInfoF
 
 NS_IMETHODIMP nsIconChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports *ctxt)
 {
   nsCOMPtr<nsIInputStream> inStream;
   nsresult rv = MakeInputStream(getter_AddRefs(inStream), PR_TRUE);
   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);
   if (NS_SUCCEEDED(rv)) {
     // Store our real listener
     mListener = aListener;
     // Add ourself to the load group, if available
     if (mLoadGroup)
--- a/modules/libpr0n/decoders/icon/os2/nsIconChannel.cpp
+++ b/modules/libpr0n/decoders/icon/os2/nsIconChannel.cpp
@@ -42,17 +42,16 @@
 
 //------------------------------------------------------------------------
 
 #include "nsIconChannel.h"
 #include "nsIIconURI.h"
 #include "nsReadableUtils.h"
 #include "nsMemory.h"
 #include "nsNetUtil.h"
-#include "nsInt64.h"
 #include "nsILocalFile.h"
 #include "nsIFileURL.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsIRwsService.h"
 
 #define INCL_PM
 #include <os2.h>
 
@@ -198,17 +197,17 @@ nsIconChannel::Open(nsIInputStream **_re
 NS_IMETHODIMP nsIconChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports *ctxt)
 {
   nsCOMPtr<nsIInputStream> inStream;
   nsresult rv = MakeInputStream(getter_AddRefs(inStream), PR_TRUE);
   if (NS_FAILED(rv))
     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;
 
   rv = mPump->AsyncRead(this, ctxt);
   if (NS_SUCCEEDED(rv)) {
     // Store our real listener
     mListener = aListener;
     // Add ourself to the load group, if available
--- a/modules/libpr0n/decoders/icon/win/nsIconChannel.cpp
+++ b/modules/libpr0n/decoders/icon/win/nsIconChannel.cpp
@@ -48,17 +48,16 @@
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsXPIDLString.h"
 #include "nsReadableUtils.h"
 #include "nsMimeTypes.h"
 #include "nsMemory.h"
 #include "nsIStringStream.h"
 #include "nsIURL.h"
 #include "nsNetUtil.h"
-#include "nsInt64.h"
 #include "nsIFile.h"
 #include "nsIFileURL.h"
 #include "nsIMIMEService.h"
 #include "nsCExternalHandlerService.h"
 #include "nsDirectoryServiceDefs.h"
 
 #if MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN
 #ifdef _WIN32_WINNT
@@ -244,17 +243,17 @@ nsresult nsIconChannel::ExtractIconInfoF
 NS_IMETHODIMP nsIconChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports *ctxt)
 {
   nsCOMPtr<nsIInputStream> inStream;
   nsresult rv = MakeInputStream(getter_AddRefs(inStream), PR_TRUE);
   if (NS_FAILED(rv))
     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;
 
   rv = mPump->AsyncRead(this, ctxt);
   if (NS_SUCCEEDED(rv)) {
     // Store our real listener
     mListener = aListener;
     // Add ourself to the load group, if available
--- a/modules/plugin/base/src/nsPluginHost.cpp
+++ b/modules/plugin/base/src/nsPluginHost.cpp
@@ -128,17 +128,16 @@
 #include "nsIPlatformCharset.h"
 
 #include "nsIDirectoryService.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsXULAppAPI.h"
 #include "nsAppDirectoryServiceDefs.h"
 #include "nsIFile.h"
 #include "nsPluginDirServiceProvider.h"
-#include "nsInt64.h"
 #include "nsPluginError.h"
 
 #include "nsUnicharUtils.h"
 #include "nsPluginManifestLineReader.h"
 
 #include "nsIWeakReferenceUtils.h"
 #include "nsIDOMElement.h"
 #include "nsIDOMHTMLObjectElement.h"
@@ -2885,17 +2884,17 @@ nsPluginHost::ReadPluginInfo()
   if (NS_FAILED(rv))
     return rv;
 
   PRInt64 fileSize;
   rv = localFile->GetFileSize(&fileSize);
   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
   }
 
   nsPluginManifestLineReader reader;
   char* registry = reader.Init(flen);
   if (!registry)
--- a/modules/plugin/base/src/nsPluginStreamListenerPeer.cpp
+++ b/modules/plugin/base/src/nsPluginStreamListenerPeer.cpp
@@ -964,17 +964,17 @@ NS_IMETHODIMP nsPluginStreamListenerPeer
     if (brr) {
       if (!mDataForwardToRequest)
         return NS_ERROR_FAILURE;
       
       PRInt64 absoluteOffset64 = LL_ZERO;
       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.
       
       // FIXME: http://bugzilla.mozilla.org/show_bug.cgi?id=240130
       //
       // Why couldn't this be tracked on the plugin info, and not in a
       // *hash table*?
@@ -1044,17 +1044,17 @@ NS_IMETHODIMP nsPluginStreamListenerPeer
               this, aStatus, request));
   
   // for ByteRangeRequest we're just updating the mDataForwardToRequest hash and return.
   nsCOMPtr<nsIByteRangeRequest> brr = do_QueryInterface(request);
   if (brr) {
     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);
     
     // remove the request from our data forwarding count hash.
     mDataForwardToRequest->Remove(&key);
     
     
     PLUGIN_LOG(PLUGIN_LOG_NOISY,
--- a/netwerk/base/public/nsNetUtil.h
+++ b/netwerk/base/public/nsNetUtil.h
@@ -85,17 +85,16 @@
 #include "nsIProxyInfo.h"
 #include "nsIFileStreams.h"
 #include "nsIBufferedStreams.h"
 #include "nsIInputStreamPump.h"
 #include "nsIAsyncStreamCopier.h"
 #include "nsIPersistentProperties2.h"
 #include "nsISyncStreamListener.h"
 #include "nsInterfaceRequestorAgg.h"
-#include "nsInt64.h"
 #include "nsINetUtil.h"
 #include "nsIURIWithPrincipal.h"
 #include "nsIAuthPrompt.h"
 #include "nsIAuthPrompt2.h"
 #include "nsIAuthPromptAdapterFactory.h"
 #include "nsComponentManagerUtils.h"
 #include "nsServiceManagerUtils.h"
 #include "nsINestedURI.h"
@@ -485,18 +484,18 @@ NS_NewInputStreamChannel(nsIChannel     
 {
     return NS_NewInputStreamChannel(result, uri, stream, contentType,
                                     &contentCharset);
 }
 
 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)
 {
     nsresult rv;
     nsCOMPtr<nsIInputStreamPump> pump =
         do_CreateInstance(NS_INPUTSTREAMPUMP_CONTRACTID, &rv);
     if (NS_SUCCEEDED(rv)) {
@@ -1035,17 +1034,17 @@ NS_BackgroundInputStream(nsIInputStream 
                          PRUint32         segmentSize  = 0,
                          PRUint32         segmentCount = 0)
 {
     nsresult rv;
     nsCOMPtr<nsIStreamTransportService> sts =
         do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &rv);
     if (NS_SUCCEEDED(rv)) {
         nsCOMPtr<nsITransport> 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,
                                               segmentSize, segmentCount,
                                               result);
     }
     return rv;
 }
@@ -1059,17 +1058,17 @@ NS_BackgroundOutputStream(nsIOutputStrea
                           PRUint32          segmentSize  = 0,
                           PRUint32          segmentCount = 0)
 {
     nsresult rv;
     nsCOMPtr<nsIStreamTransportService> sts =
         do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &rv);
     if (NS_SUCCEEDED(rv)) {
         nsCOMPtr<nsITransport> 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,
                                                segmentSize, segmentCount,
                                                result);
     }
     return rv;
 }
--- a/netwerk/base/src/nsBufferedStreams.cpp
+++ b/netwerk/base/src/nsBufferedStreams.cpp
@@ -160,17 +160,17 @@ nsBufferedStream::Seek(PRInt32 whence, P
     // If the underlying stream isn't a random access store, then fail early.
     // We could possibly succeed for the case where the seek position denotes
     // something that happens to be read into the buffer, but that would make
     // the failure data-dependent.
     nsresult rv;
     nsCOMPtr<nsISeekableStream> 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;
         break;
       case nsISeekableStream::NS_SEEK_CUR:
         absPos = mBufferStartOffset;
         absPos += mCursor;
         absPos += offset;
@@ -200,18 +200,18 @@ nsBufferedStream::Seek(PRInt32 whence, P
     rv = Flush();
     if (NS_FAILED(rv)) return rv;
 
     rv = ras->Seek(whence, offset);
     if (NS_FAILED(rv)) return rv;
 
     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;
         rv = ras->Tell(&tellPos);
         mBufferStartOffset = tellPos;
         if (NS_FAILED(rv)) return rv;
     }
     else {
@@ -226,17 +226,17 @@ nsBufferedStream::Seek(PRInt32 whence, P
 }
 
 NS_IMETHODIMP
 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;
 }
 
 NS_IMETHODIMP
 nsBufferedStream::SetEOF()
 {
--- a/netwerk/base/src/nsBufferedStreams.h
+++ b/netwerk/base/src/nsBufferedStreams.h
@@ -40,17 +40,16 @@
 
 #include "nsIBufferedStreams.h"
 #include "nsIInputStream.h"
 #include "nsIOutputStream.h"
 #include "nsISafeOutputStream.h"
 #include "nsISeekableStream.h"
 #include "nsIStreamBufferAccess.h"
 #include "nsCOMPtr.h"
-#include "nsInt64.h"
 #include "nsIIPCSerializable.h"
 
 ////////////////////////////////////////////////////////////////////////////////
 
 class nsBufferedStream : public nsISeekableStream
 {
 public:
     NS_DECL_ISUPPORTS
@@ -65,17 +64,17 @@ protected:
     nsresult Init(nsISupports* stream, PRUint32 bufferSize);
     NS_IMETHOD Fill() = 0;
     NS_IMETHOD Flush() = 0;
 
     PRUint32                    mBufferSize;
     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.
     PRUint32                    mCursor;
 
     // mFillPoint is the amount available in the buffer for input streams,
     // or the high watermark of bytes written into the buffer, and therefore
     // is relative to mBufferStartOffset.
--- a/netwerk/base/src/nsFileStreams.cpp
+++ b/netwerk/base/src/nsFileStreams.cpp
@@ -52,17 +52,16 @@
 
 #include "private/pprio.h"
 
 #include "nsFileStreams.h"
 #include "nsILocalFile.h"
 #include "nsXPIDLString.h"
 #include "prerror.h"
 #include "nsCRT.h"
-#include "nsInt64.h"
 #include "nsIFile.h"
 #include "nsDirectoryIndexStream.h"
 #include "nsMimeTypes.h"
 #include "nsReadLine.h"
 #include "nsNetUtil.h"
 #include "nsIClassInfoImpl.h"
 
 #define NS_NO_INPUT_BUFFERING 1 // see http://bugzilla.mozilla.org/show_bug.cgi?id=41067
@@ -102,34 +101,34 @@ NS_IMETHODIMP
 nsFileStream::Seek(PRInt32 whence, PRInt64 offset)
 {
     nsresult rv = DoPendingOpen();
     NS_ENSURE_SUCCESS(rv, rv);
 
     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;
 }
 
 NS_IMETHODIMP
 nsFileStream::Tell(PRInt64 *result)
 {
     nsresult rv = DoPendingOpen();
     NS_ENSURE_SUCCESS(rv, rv);
 
     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;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsFileStream::SetEOF()
--- a/netwerk/base/src/nsIncrementalDownload.cpp
+++ b/netwerk/base/src/nsIncrementalDownload.cpp
@@ -43,17 +43,16 @@
 #include "nsIAsyncVerifyRedirectCallback.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsIObserverService.h"
 #include "nsIObserver.h"
 #include "nsIPropertyBag2.h"
 #include "nsIServiceManager.h"
 #include "nsILocalFile.h"
 #include "nsITimer.h"
-#include "nsInt64.h"
 #include "nsNetUtil.h"
 #include "nsAutoPtr.h"
 #include "nsWeakReference.h"
 #include "nsChannelProperties.h"
 #include "prio.h"
 #include "prprf.h"
 
 // Error code used internally by the incremental downloader to cancel the
@@ -96,28 +95,28 @@ static nsresult
 AppendToFile(nsILocalFile *lf, const char *data, PRUint32 len)
 {
   PRInt32 flags = PR_WRONLY | PR_CREATE_FILE | PR_APPEND;
   return WriteToFile(lf, data, len, flags);
 }
 
 // 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=");
   rangeSpec.AppendInt(PRInt64(size));
   rangeSpec.Append('-');
 
   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;
 
   rangeSpec.AppendInt(PRInt64(end));
 }
 
 //-----------------------------------------------------------------------------
 
@@ -160,18 +159,18 @@ private:
   nsCOMPtr<nsIURI>                         mFinalURI;
   nsCOMPtr<nsILocalFile>                   mDest;
   nsCOMPtr<nsIChannel>                     mChannel;
   nsCOMPtr<nsITimer>                       mTimer;
   nsAutoArrayPtr<char>                     mChunk;
   PRInt32                                  mChunkLen;
   PRInt32                                  mChunkSize;
   PRInt32                                  mInterval;
-  nsInt64                                  mTotalSize;
-  nsInt64                                  mCurrentSize;
+  PRInt64                                  mTotalSize;
+  PRInt64                                  mCurrentSize;
   PRUint32                                 mLoadFlags;
   PRInt32                                  mNonPartialCount;
   nsresult                                 mStatus;
   PRPackedBool                             mIsPending;
   PRPackedBool                             mDidOnStartRequest;
   PRTime                                   mLastProgressUpdate;
   nsCOMPtr<nsIAsyncVerifyRedirectCallback> mRedirectCallback;
   nsCOMPtr<nsIChannel>                     mNewRedirectChannel;
@@ -192,26 +191,26 @@ nsIncrementalDownload::nsIncrementalDown
   , mRedirectCallback(nsnull)
   , mNewRedirectChannel(nsnull)
 {
 }
 
 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;
 
   nsresult rv = AppendToFile(mDest, mChunk, mChunkLen);
   if (NS_FAILED(rv))
     return rv;
 
-  mCurrentSize += nsInt64(mChunkLen);
+  mCurrentSize += PRInt64(mChunkLen);
   mChunkLen = 0;
 
   return NS_OK;
 }
 
 void
 nsIncrementalDownload::UpdateProgress()
 {
@@ -280,26 +279,26 @@ nsIncrementalDownload::ProcessTimeout()
                               nsnull, this, mLoadFlags);
   if (NS_FAILED(rv))
     return rv;
 
   nsCOMPtr<nsIHttpChannel> http = do_QueryInterface(channel, &rv);
   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);
   if (NS_FAILED(rv))
     return rv;
 
   // 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);
 
     rv = http->SetRequestHeader(NS_LITERAL_CSTRING("Range"), range, PR_FALSE);
     if (NS_FAILED(rv))
       return rv;
   }
 
@@ -314,17 +313,17 @@ nsIncrementalDownload::ProcessTimeout()
   mChannel = channel;
   return NS_OK;
 }
 
 // Reads the current file size and validates it.
 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) {
     mCurrentSize = 0;
     return NS_OK;
   }
   if (NS_FAILED(rv))
     return rv;
@@ -548,17 +547,17 @@ nsIncrementalDownload::OnStartRequest(ns
   PRUint32 code;
   rv = http->GetResponseStatus(&code);
   if (NS_FAILED(rv))
     return rv;
   if (code != 206) {
     // 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;
     }
     // The server may have decided to give us all of the data in one chunk.  If
     // we requested a partial range, then we don't want to download all of the
     // data at once.  So, we'll just try again, but if this keeps happening then
     // we'll eventually give up.
@@ -582,17 +581,17 @@ nsIncrementalDownload::OnStartRequest(ns
     }
   } else {
     // We got a partial response, so clear this counter in case the next chunk
     // results in a 200 response.
     mNonPartialCount = 0;
   }
 
   // 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))
       return rv;
 
     if (code == 206) {
       // OK, read the Content-Range header to determine the total size of this
       // download file.
@@ -611,40 +610,40 @@ nsIncrementalDownload::OnStartRequest(ns
       // Use nsIPropertyBag2 to fetch the content length as it exposes the
       // value as a 64-bit number.
       nsCOMPtr<nsIPropertyBag2> props = do_QueryInterface(request, &rv);
       if (NS_FAILED(rv))
         return rv;
       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;
       }
       // Need to truncate (or create, if it doesn't exist) the file since we
       // are downloading the whole thing.
       WriteToFile(mDest, nsnull, 0, PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE);
       mCurrentSize = 0;
     }
 
     // Notify observer that we are starting...
     rv = CallOnStartRequest();
     if (NS_FAILED(rv))
       return rv;
   }
 
   // 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];
   if (!mChunk)
     rv = NS_ERROR_OUT_OF_MEMORY;
 
   return rv;
 }
--- a/netwerk/base/src/nsInputStreamPump.cpp
+++ b/netwerk/base/src/nsInputStreamPump.cpp
@@ -282,17 +282,17 @@ NS_IMETHODIMP
 nsInputStreamPump::Init(nsIInputStream *stream,
                         PRInt64 streamPos, PRInt64 streamLen,
                         PRUint32 segsize, PRUint32 segcount,
                         PRBool closeWhenDone)
 {
     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;
     mSegCount = segcount;
     mCloseWhenDone = closeWhenDone;
 
     return NS_OK;
 }
--- a/netwerk/base/src/nsSocketTransport2.cpp
+++ b/netwerk/base/src/nsSocketTransport2.cpp
@@ -48,17 +48,16 @@
 #include "nsStreamUtils.h"
 #include "nsNetSegmentUtils.h"
 #include "nsTransportUtils.h"
 #include "nsProxyInfo.h"
 #include "nsNetCID.h"
 #include "nsAutoPtr.h"
 #include "nsCOMPtr.h"
 #include "netCore.h"
-#include "nsInt64.h"
 #include "prmem.h"
 #include "plstr.h"
 #include "prnetdb.h"
 #include "prerror.h"
 #include "prerr.h"
 
 #include "nsIServiceManager.h"
 #include "nsIProxyObjectManager.h"
--- a/netwerk/base/src/nsSocketTransport2.h
+++ b/netwerk/base/src/nsSocketTransport2.h
@@ -41,17 +41,16 @@
 #ifdef DEBUG_darinf
 #define ENABLE_SOCKET_TRACING
 #endif
 
 #include "mozilla/Mutex.h"
 #include "nsSocketTransportService2.h"
 #include "nsString.h"
 #include "nsCOMPtr.h"
-#include "nsInt64.h"
 
 #include "nsISocketTransport.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsIAsyncInputStream.h"
 #include "nsIAsyncOutputStream.h"
 #include "nsIDNSListener.h"
 #include "nsIDNSRecord.h"
 #include "nsICancelable.h"
--- a/netwerk/base/src/nsStreamTransportService.cpp
+++ b/netwerk/base/src/nsStreamTransportService.cpp
@@ -33,17 +33,16 @@
  * 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 ***** */
 
 #include "nsStreamTransportService.h"
 #include "nsXPCOMCIDInternal.h"
 #include "nsNetSegmentUtils.h"
-#include "nsInt64.h"
 #include "nsTransportUtils.h"
 #include "nsStreamUtils.h"
 #include "nsNetError.h"
 #include "nsNetCID.h"
 
 #include "nsIServiceManager.h"
 #include "nsIAsyncInputStream.h"
 #include "nsIAsyncOutputStream.h"
--- a/netwerk/protocol/ftp/nsFtpConnectionThread.h
+++ b/netwerk/protocol/ftp/nsFtpConnectionThread.h
@@ -38,17 +38,16 @@
 
 #ifndef __nsFtpState__h_
 #define __nsFtpState__h_
 
 #include "ftpCore.h"
 #include "nsFTPChannel.h"
 #include "nsBaseContentStream.h"
 
-#include "nsInt64.h"
 #include "nsIThread.h"
 #include "nsIRunnable.h"
 #include "nsISocketTransportService.h"
 #include "nsISocketTransport.h"
 #include "nsIServiceManager.h"
 #include "nsIStreamListener.h"
 #include "nsICacheListener.h"
 #include "nsIURI.h"
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -59,17 +59,16 @@
 #include "nsIStreamListenerTee.h"
 #include "nsISeekableStream.h"
 #include "nsMimeTypes.h"
 #include "nsPrintfCString.h"
 #include "nsNetUtil.h"
 #include "prprf.h"
 #include "prnetdb.h"
 #include "nsEscape.h"
-#include "nsInt64.h"
 #include "nsStreamUtils.h"
 #include "nsIOService.h"
 #include "nsICacheService.h"
 #include "nsDNSPrefetch.h"
 #include "nsChannelClassifier.h"
 #include "nsIRedirectResultListener.h"
 
 // True if the local cache should be bypassed when processing a request.
@@ -2496,30 +2495,30 @@ nsHttpChannel::CheckCache()
         mRequestHead.PeekHeader(nsHttp::If_Match) ||
         mRequestHead.PeekHeader(nsHttp::If_Range);
 
     if (method != nsHttp::Head && !isCachedRedirect) {
         // If the cached content-length is set and it does not match the data
         // 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() &&
                      !mCustomConditionalRequest &&
                      !mCachedResponseHead->NoStore()) {
                     // looks like a partial entry we can reuse
                     rv = SetupByteRangeRequest(size);
                     NS_ENSURE_SUCCESS(rv, rv);
@@ -2829,17 +2828,17 @@ nsHttpChannel::ReadFromCache()
     }
 
     // open input stream for reading...
     nsCOMPtr<nsIInputStream> stream;
     rv = mCacheEntry->OpenInputStream(0, getter_AddRefs(stream));
     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;
 
     rv = mCachePump->AsyncRead(this, mListenerContext);
     if (NS_FAILED(rv)) return rv;
 
     PRUint32 suspendCount = mSuspendCount;
     while (suspendCount--)
--- a/netwerk/protocol/http/nsHttpTransaction.cpp
+++ b/netwerk/protocol/http/nsHttpTransaction.cpp
@@ -982,17 +982,17 @@ nsHttpTransaction::HandleContentStart()
                 mChunkedDecoder = new nsHttpChunkedDecoder();
                 if (!mChunkedDecoder)
                     return NS_ERROR_OUT_OF_MEMORY;
                 LOG(("chunked decoder created\n"));
                 // Ignore server specified Content-Length.
                 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
         }
     }
 
     mDidContentStart = PR_TRUE;
     return NS_OK;
 }
@@ -1022,31 +1022,31 @@ nsHttpTransaction::HandleContent(char *b
     }
 
     if (mChunkedDecoder) {
         // give the buf over to the chunked decoder so it can reformat the
         // data and tell us how much is really there.
         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);
             }
         }
     }
     else {
         // when we are just waiting for the server to close the connection...
--- a/netwerk/protocol/http/nsHttpTransaction.h
+++ b/netwerk/protocol/http/nsHttpTransaction.h
@@ -39,17 +39,16 @@
 #ifndef nsHttpTransaction_h__
 #define nsHttpTransaction_h__
 
 #include "nsHttp.h"
 #include "nsHttpHeaderArray.h"
 #include "nsAHttpTransaction.h"
 #include "nsAHttpConnection.h"
 #include "nsCOMPtr.h"
-#include "nsInt64.h"
 
 #include "nsIPipe.h"
 #include "nsIInputStream.h"
 #include "nsIOutputStream.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsISocketTransportService.h"
 #include "nsITransport.h"
 #include "nsIEventTarget.h"
@@ -174,18 +173,18 @@ private:
     nsHttpRequestHead              *mRequestHead;     // weak ref
     nsHttpResponseHead             *mResponseHead;    // hard ref
 
     nsAHttpSegmentReader           *mReader;
     nsAHttpSegmentWriter           *mWriter;
 
     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
     // response header to deal with servers that actually sent a response
     // body where they should not have. This member tracks how many bytes have
     // so far been skipped.
     PRUint32                        mInvalidResponseBytesRead;
 
--- a/netwerk/streamconv/converters/nsMultiMixedConv.cpp
+++ b/netwerk/streamconv/converters/nsMultiMixedConv.cpp
@@ -32,17 +32,16 @@
  * 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 ***** */
 
 #include "nsMultiMixedConv.h"
 #include "nsMemory.h"
-#include "nsInt64.h"
 #include "plstr.h"
 #include "nsIHttpChannel.h"
 #include "nsIServiceManager.h"
 #include "nsNetUtil.h"
 #include "nsMimeTypes.h"
 #include "nsIStringStream.h"
 #include "nsReadableUtils.h"
 #include "nsCRT.h"
@@ -975,17 +974,17 @@ nsMultiMixedConv::ParseHeaders(nsIChanne
                     
                     mByteRangeStart = atoi(range); // XXX want 64-bit conv
                     tmpPtr++;
                     mByteRangeEnd = atoi(tmpPtr);
                 }
 
                 mIsByteRangeRequest = PR_TRUE;
                 if (mContentLength == LL_MAXUINT)
-                    mContentLength = PRUint64(PRInt64(mByteRangeEnd - mByteRangeStart + nsInt64(1)));
+                    mContentLength = PRUint64(PRInt64(mByteRangeEnd - mByteRangeStart + PRInt64(1)));
             }
         }
         *newLine = tmpChar;
         newLine += lineFeedIncrement;
         cursorLen -= (newLine - cursor);
         cursor = newLine;
     }
 
--- a/netwerk/streamconv/converters/nsMultiMixedConv.h
+++ b/netwerk/streamconv/converters/nsMultiMixedConv.h
@@ -38,17 +38,16 @@
 #define __nsmultimixedconv__h__
 
 #include "nsIStreamConverter.h"
 #include "nsIChannel.h"
 #include "nsIURI.h"
 #include "nsString.h"
 #include "nsXPIDLString.h"
 #include "nsCOMPtr.h"
-#include "nsInt64.h"
 #include "nsIByteRangeRequest.h"
 #include "nsIMultiPartChannel.h"
 #include "nsAutoPtr.h"
 
 #define NS_MULTIMIXEDCONVERTER_CID                         \
 { /* 7584CE90-5B25-11d3-A175-0050041CAF44 */         \
     0x7584ce90,                                      \
     0x5b25,                                          \
@@ -97,18 +96,18 @@ protected:
   nsCOMPtr<nsILoadGroup>  mLoadGroup;
 
   nsCString               mContentType;
   nsCString               mContentCharset;
   nsCString               mContentDisposition;
   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
   PRBool                  mIsLastPart;
 };
 
 // The nsMultiMixedConv stream converter converts a stream of type "multipart/x-mixed-replace"
 // to it's subparts. There was some debate as to whether or not the functionality desired
@@ -185,16 +184,16 @@ protected:
     char                *mBuffer;
     PRUint32            mBufLen;
     PRUint64            mTotalSent;
     PRBool              mFirstOnData;   // used to determine if we're in our first OnData callback.
 
     // 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;
 };
 
 #endif /* __nsmultimixedconv__h__ */
--- a/netwerk/test/TestProtocols.cpp
+++ b/netwerk/test/TestProtocols.cpp
@@ -82,18 +82,16 @@
 #include "nsChannelProperties.h"
 
 #include "nsISimpleEnumerator.h"
 #include "nsStringAPI.h"
 #include "nsNetUtil.h"
 #include "prlog.h"
 #include "prtime.h"
 
-#include "nsInt64.h"
-
 namespace TestProtocols {
 
 #if defined(PR_LOGGING)
 //
 // set NSPR_LOG_MODULES=Test:5
 //
 static PRLogModuleInfo *gTestLog = nsnull;
 #endif
@@ -190,17 +188,17 @@ public:
 
   URLLoadInfo(const char* aUrl);
   virtual ~URLLoadInfo();
 
   // ISupports interface...
   NS_DECL_ISUPPORTS
 
   const char* Name() { return mURLString.get(); }
-  nsInt64   mBytesRead;
+  PRInt64   mBytesRead;
   PRTime    mTotalTime;
   PRTime    mConnectTime;
   nsCString mURLString;
 };
 
 URLLoadInfo::URLLoadInfo(const char *aUrl) : mURLString(aUrl)
 {
   mBytesRead = 0;
@@ -536,19 +534,19 @@ InputTestConsumer::OnStopRequest(nsIRequ
         LOG(("\tHTTP Status: %u\n", httpStatus));
      if (NS_ERROR_UNKNOWN_HOST == aStatus ||
          NS_ERROR_UNKNOWN_PROXY_HOST == aStatus) {
          LOG(("\tDNS lookup failed.\n"));
      }
     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"));
     }
   } else {
     LOG(("\nFinished loading: UNKNOWN URL. Status Code: %x\n", aStatus));
   }
 
   if (--gKeepRunning == 0)
--- a/netwerk/test/TestStreamTransport.cpp
+++ b/netwerk/test/TestStreamTransport.cpp
@@ -220,22 +220,22 @@ RunTest(nsIFile *srcFile, nsIFile *destF
     rv = NS_NewLocalFileInputStream(getter_AddRefs(srcStr), srcFile);
     if (NS_FAILED(rv)) return rv;
 
     nsCOMPtr<nsIOutputStream> destStr;
     rv = NS_NewLocalFileOutputStream(getter_AddRefs(destStr), destFile);
     if (NS_FAILED(rv)) return rv;
 
     nsCOMPtr<nsITransport> 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<nsITransport> 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;
 
     MyCopier *copier = new MyCopier();
     if (copier == nsnull)
         return NS_ERROR_OUT_OF_MEMORY;
     NS_ADDREF(copier);
 
@@ -265,17 +265,17 @@ RunBlockingTest(nsIFile *srcFile, nsIFil
     rv = NS_NewLocalFileInputStream(getter_AddRefs(srcIn), srcFile);
     if (NS_FAILED(rv)) return rv;
 
     nsCOMPtr<nsIOutputStream> fileOut;
     rv = NS_NewLocalFileOutputStream(getter_AddRefs(fileOut), destFile);
     if (NS_FAILED(rv)) return rv;
     
     nsCOMPtr<nsITransport> 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;
 
     nsCOMPtr<nsIOutputStream> destOut;
     rv = destTransport->OpenOutputStream(nsITransport::OPEN_BLOCKING, 100, 10, getter_AddRefs(destOut));
     if (NS_FAILED(rv)) return rv;
 
     char buf[120];
--- a/security/manager/boot/src/nsStrictTransportSecurityService.cpp
+++ b/security/manager/boot/src/nsStrictTransportSecurityService.cpp
@@ -40,17 +40,16 @@
 #include "prprf.h"
 #include "nsCRTGlue.h"
 #include "nsIPermissionManager.h"
 #include "nsIPrivateBrowsingService.h"
 #include "nsISSLStatus.h"
 #include "nsISSLStatusProvider.h"
 #include "nsStrictTransportSecurityService.h"
 #include "nsIURI.h"
-#include "nsInt64.h"
 #include "nsNetUtil.h"
 #include "nsThreadUtils.h"
 #include "nsStringGlue.h"
 
 #if defined(PR_LOGGING)
 PRLogModuleInfo *gSTSLog = PR_NewLogModule("nsSTSService");
 #endif
 
--- a/security/manager/ssl/src/nsNSSComponent.cpp
+++ b/security/manager/ssl/src/nsNSSComponent.cpp
@@ -88,17 +88,16 @@
 
 #include "nsIWindowWatcher.h"
 #include "nsIPrompt.h"
 #include "nsProxiedService.h"
 #include "nsIPrincipal.h"
 #include "nsReadableUtils.h"
 #include "nsIDateTimeFormat.h"
 #include "prtypes.h"
-#include "nsInt64.h"
 #include "nsTime.h"
 #include "nsIEntropyCollector.h"
 #include "nsIBufEntropyCollector.h"
 #include "nsIServiceManager.h"
 #include "nsILocalFile.h"
 #include "nsITokenPasswordDialogs.h"
 #include "nsICRLManager.h"
 #include "nsNSSShutDown.h"
--- a/uriloader/base/nsDocLoader.cpp
+++ b/uriloader/base/nsDocLoader.cpp
@@ -102,18 +102,18 @@ struct nsRequestInfo : public PLDHashEnt
   {
   }
 
   nsIRequest* Request() {
     return static_cast<nsIRequest*>(const_cast<void*>(mKey));
   }
 
   const void* mKey; // Must be first for the pldhash stubs to work
-  nsInt64 mCurrentProgress;
-  nsInt64 mMaxProgress;
+  PRInt64 mCurrentProgress;
+  PRInt64 mMaxProgress;
   PRBool mUploading;
 
   PRBool mIsDone;
   nsString mLastStatus;
   nsresult mLastStatusCode;
 };
 
 
@@ -146,16 +146,21 @@ struct nsListenerInfo {
   // Mask indicating which notifications the listener wants to receive.
   unsigned long mNotifyMask;
 };
 
 
 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),
     mIsFlushingLayout(PR_FALSE)
 {
 #if defined(PR_LOGGING)
   if (nsnull == gDocLoaderLog) {
       gDocLoaderLog = PR_NewLogModule("DocLoader");
@@ -593,26 +598,26 @@ nsDocLoader::OnStopRequest(nsIRequest *a
   // Since the URI has finished loading, all the data is there.  Also,
   // this will allow a more accurate estimation of the max progress (in case
   // the old value was unknown ie. -1)
   //
   nsRequestInfo *info = GetRequestInfo(aRequest);
   if (info) {
     info->mIsDone = PR_TRUE;
 
-    nsInt64 oldMax = info->mMaxProgress;
+    PRInt64 oldMax = info->mMaxProgress;
 
     info->mMaxProgress = info->mCurrentProgress;
     
     //
     // If a request whose content-length was previously unknown has just
     // 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();
     }
 
     // As we know the total progress of this request now, save it to be part
     // of CalculateMaxProgress() result. We need to remove the info from the
     // hash, see bug 480713.
     mCompletedTotalProgress += info->mMaxProgress;
     
@@ -1010,65 +1015,65 @@ nsDocLoader::GetIsLoadingDocument(PRBool
 {
   *aIsLoadingDocument = mIsLoadingDocument;
 
   return NS_OK;
 }
 
 PRInt64 nsDocLoader::GetMaxTotalProgress()
 {
-  nsInt64 newMaxTotal = 0;
+  PRInt64 newMaxTotal = 0;
 
   PRInt32 count = mChildList.Count();
   nsCOMPtr<nsIWebProgress> 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;
 }
 
 ////////////////////////////////////////////////////////////////////////////////////
 // The following section contains support for nsIProgressEventSink which is used to 
 // pass progress and status between the actual request and the doc loader. The doc loader
 // then turns around and makes the right web progress calls based on this information.
 ////////////////////////////////////////////////////////////////////////////////////
 
 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
   //
   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
       // ensure that webprogresslisteners do not get confused when the channel is
       // finally targeted.  See bug 257308.
       //
       nsLoadFlags lf = 0;
       aRequest->GetLoadFlags(&lf);
@@ -1083,18 +1088,18 @@ NS_IMETHODIMP nsDocLoader::OnProgress(ns
       // (aMaxProgress > 0) then the content-length of the data is known,
       // so update mMaxSelfProgress...  Otherwise, set it to -1 to indicate
       // that the content-length is no longer known.
       //
       if (PRUint64(aProgressMax) != LL_MAXUINT) {
         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.
       PRInt32 flags;
     
       flags = nsIWebProgressListener::STATE_TRANSFERRING | 
               nsIWebProgressListener::STATE_IS_REQUEST;
       //
@@ -1106,17 +1111,17 @@ NS_IMETHODIMP nsDocLoader::OnProgress(ns
         // Send STATE_TRANSFERRING for the document too...
         flags |= nsIWebProgressListener::STATE_IS_DOCUMENT;
       }
 
       FireOnStateChange(this, aRequest, flags, NS_OK);
     }
 
     // Update the current progress count...
-    progressDelta = nsInt64(PRInt64(aProgress)) - info->mCurrentProgress;
+    progressDelta = PRInt64(aProgress) - info->mCurrentProgress;
     mCurrentSelfProgress += progressDelta;
 
     info->mCurrentProgress = PRInt64(aProgress);
   }
   //
   // The request is not part of the load group, so ignore its progress
   // information...
   //
@@ -1560,32 +1565,32 @@ void nsDocLoader::ClearRequestInfoHash(v
 }
 
 // PLDHashTable enumeration callback that calculates the max progress.
 static PLDHashOperator
 CalcMaxProgressCallback(PLDHashTable *table, PLDHashEntryHdr *hdr,
                         PRUint32 number, void *arg)
 {
   const nsRequestInfo *info = static_cast<const nsRequestInfo *>(hdr);
-  nsInt64 *max = static_cast<nsInt64 *>(arg);
+  PRInt64 *max = static_cast<PRInt64 *>(arg);
 
   if (info->mMaxProgress < info->mCurrentProgress) {
-    *max = nsInt64(-1);
+    *max = PRInt64(-1);
 
     return PL_DHASH_STOP;
   }
 
   *max += info->mMaxProgress;
 
   return PL_DHASH_NEXT;
 }
 
 PRInt64 nsDocLoader::CalculateMaxProgress()
 {
-  nsInt64 max = mCompletedTotalProgress;
+  PRInt64 max = mCompletedTotalProgress;
   PL_DHashTableEnumerate(&mRequestInfoHash, CalcMaxProgressCallback, &max);
   return max;
 }
 
 NS_IMETHODIMP nsDocLoader::AsyncOnChannelRedirect(nsIChannel *aOldChannel,
                                                   nsIChannel *aNewChannel,
                                                   PRUint32 aFlags,
                                                   nsIAsyncVerifyRedirectCallback *cb)
--- a/uriloader/base/nsDocLoader.h
+++ b/uriloader/base/nsDocLoader.h
@@ -52,17 +52,16 @@
 #include "nsString.h"
 #include "nsIChannel.h"
 #include "nsIProgressEventSink.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIChannelEventSink.h"
 #include "nsISecurityEventSink.h"
 #include "nsISupportsPriority.h"
-#include "nsInt64.h"
 #include "nsCOMPtr.h"
 #include "pldhash.h"
 
 struct nsRequestInfo;
 struct nsListenerInfo;
 
 /****************************************************************************
  * nsDocLoader implementation...
@@ -221,24 +220,24 @@ protected:
     nsCOMPtr<nsILoadGroup>        mLoadGroup;
     // We hold weak refs to all our kids
     nsVoidArray                   mChildList;
 
     // The following member variables are related to the new nsIWebProgress 
     // 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
      * from the call to LoadDocument(...) until the OnConnectionsComplete(...)
      * notification is fired...
      */
     PRPackedBool mIsLoadingDocument;
 
--- a/uriloader/exthandler/nsExternalHelperAppService.h
+++ b/uriloader/exthandler/nsExternalHelperAppService.h
@@ -44,18 +44,16 @@
 #define nsExternalHelperAppService_h__
 
 #ifdef MOZ_LOGGING
 #define FORCE_PR_LOG
 #endif
 #include "prlog.h"
 #include "prtime.h"
 
-#include "nsInt64.h"
-
 #include "nsIExternalHelperAppService.h"
 #include "nsIExternalProtocolService.h"
 #include "nsIWebProgressListener2.h"
 #include "nsIHelperAppLauncherDialog.h"
 
 #include "nsIMIMEInfo.h"
 #include "nsIMIMEService.h"
 #include "nsIStreamListener.h"
@@ -336,18 +334,18 @@ protected:
   PRUint32 mReason;
 
   /**
    * Track the executable-ness of the temporary file.
    */
   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
    * location) before we are done writing the content to a temp file, then
    * we need to remember the final destination until we are ready to use it.
    */
   nsCOMPtr<nsIFile> mFinalFileDestination;
 
--- a/view/src/nsViewManager.cpp
+++ b/view/src/nsViewManager.cpp
@@ -48,17 +48,16 @@
 #include "nsView.h"
 #include "nsISupportsArray.h"
 #include "nsCOMPtr.h"
 #include "nsIServiceManager.h"
 #include "nsGUIEvent.h"
 #include "nsIPrefBranch.h"
 #include "nsIPrefService.h"
 #include "nsRegion.h"
-#include "nsInt64.h"
 #include "nsHashtable.h"
 #include "nsCOMArray.h"
 #include "nsThreadUtils.h"
 #include "nsContentUtils.h"
 #include "nsIPluginWidget.h"
 #include "nsXULPopupManager.h"
 #include "nsIPresShell.h"
 #include "nsPresContext.h"
--- a/xpcom/components/nsComponentManager.cpp
+++ b/xpcom/components/nsComponentManager.cpp
@@ -85,17 +85,16 @@
 #include "nsThreadUtils.h"
 #include "prthread.h"
 #include "private/pprthred.h"
 #include "nsTArray.h"
 #include "prio.h"
 #include "mozilla/FunctionTimer.h"
 #include "ManifestParser.h"
 
-#include "nsInt64.h"
 #include "nsManifestLineReader.h"
 #include "mozilla/GenericFactory.h"
 #include "nsSupportsPrimitives.h"
 #include "nsArrayEnumerator.h"
 #include "nsStringEnumerator.h"
 
 #include NEW_H     // for placement new
 
--- a/xpcom/ds/Makefile.in
+++ b/xpcom/ds/Makefile.in
@@ -95,17 +95,16 @@ EXPORTS		= \
 		nsCRT.h \
 		nsDoubleHashtable.h \
 		nsExpirationTracker.h \
 		nsFixedSizeAllocator.h \
 		nsHashSets.h \
 		nsHashtable.h \
 		nsIByteBuffer.h \
 		nsIUnicharBuffer.h \
-		nsInt64.h \
 		nsMathUtils.h \
 		nsObserverService.h \
 		nsRecyclingAllocator.h \
 		nsStaticNameTable.h \
 		nsStaticAtom.h \
 		nsSupportsArray.h \
 		nsSupportsPrimitives.h \
 		nsTime.h \
deleted file mode 100644
--- 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__
--- a/xpcom/io/nsFastLoadFile.cpp
+++ b/xpcom/io/nsFastLoadFile.cpp
@@ -51,17 +51,16 @@
 #include "nsILocalFile.h"
 #include "nsISeekableStream.h"
 #include "nsISerializable.h"
 #include "nsIStreamBufferAccess.h"
 #include "nsIClassInfo.h"
 
 #include "nsBinaryStream.h"
 #include "nsFastLoadFile.h"
-#include "nsInt64.h"
 #ifdef XP_UNIX
 #include <sys/mman.h>
 #endif
 
 #ifdef DEBUG_brendan
 # define METERING
 # define DEBUG_MUX
 #endif
--- a/xpcom/io/nsMultiplexInputStream.cpp
+++ b/xpcom/io/nsMultiplexInputStream.cpp
@@ -46,17 +46,16 @@
 #include "mozilla/net/NeckoMessageUtils.h"
 #endif
 
 #include "nsMultiplexInputStream.h"
 #include "nsIMultiplexInputStream.h"
 #include "nsISeekableStream.h"
 #include "nsCOMPtr.h"
 #include "nsCOMArray.h"
-#include "nsInt64.h"
 #include "nsIIPCSerializable.h"
 #include "nsIClassInfoImpl.h"
 
 class nsMultiplexInputStream : public nsIMultiplexInputStream,
                                public nsISeekableStream,
                                public nsIIPCSerializable
 {
 public:
@@ -379,17 +378,17 @@ nsMultiplexInputStream::Seek(PRInt32 aWh
 /* PRUint32 tell (); */
 NS_IMETHODIMP
 nsMultiplexInputStream::Tell(PRInt64 *_retval)
 {
     if (NS_FAILED(mStatus))
         return mStatus;
 
     nsresult rv;
-    nsInt64 ret64 = 0;
+    PRInt64 ret64 = 0;
     PRUint32 i, last;
     last = mStartedReadingCurrent ? mCurrentStream+1 : mCurrentStream;
     for (i = 0; i < last; ++i) {
         nsCOMPtr<nsISeekableStream> stream = do_QueryInterface(mStreams[i]);
         NS_ENSURE_TRUE(stream, NS_ERROR_NO_INTERFACE);
 
         PRInt64 pos;
         rv = stream->Tell(&pos);
--- a/xpcom/io/nsPipe3.cpp
+++ b/xpcom/io/nsPipe3.cpp
@@ -40,17 +40,16 @@
 #include "nsIEventTarget.h"
 #include "nsISeekableStream.h"
 #include "nsIProgrammingLanguage.h"
 #include "nsSegmentedBuffer.h"
 #include "nsStreamUtils.h"
 #include "nsCOMPtr.h"
 #include "nsCRT.h"
 #include "prlog.h"
-#include "nsInt64.h"
 #include "nsIClassInfoImpl.h"
 #include "nsAtomicRefcnt.h"
 
 using namespace mozilla;
 
 #if defined(PR_LOGGING)
 //
 // set NSPR_LOG_MODULES=nsPipe:5
@@ -149,17 +148,17 @@ public:
     PRBool   OnInputReadable(PRUint32 bytesWritten, nsPipeEvents &);
     PRBool   OnInputException(nsresult, nsPipeEvents &);
 
 private:
     nsPipe                        *mPipe;
 
     // 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
     PRPackedBool                   mBlocked;
     PRUint32                       mAvailable;
     nsCOMPtr<nsIInputStreamCallback> mCallback;
     PRUint32                       mCallbackFlags;
 };
@@ -203,17 +202,17 @@ public:
     PRBool   OnOutputWritable(nsPipeEvents &);
     PRBool   OnOutputException(nsresult, nsPipeEvents &);
 
 private:
     nsPipe                         *mPipe;
 
     // 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
     PRPackedBool                    mBlocked;
     PRPackedBool                    mWritable;
     nsCOMPtr<nsIOutputStreamCallback> mCallback;
     PRUint32                        mCallbackFlags;
 };
--- a/xpcom/io/nsStorageStream.cpp
+++ b/xpcom/io/nsStorageStream.cpp
@@ -49,17 +49,16 @@
 #include "nsStorageStream.h"
 #include "nsSegmentedBuffer.h"
 #include "nsStreamUtils.h"
 #include "nsCOMPtr.h"
 #include "prbit.h"
 #include "nsIInputStream.h"
 #include "nsISeekableStream.h"
 #include "prlog.h"
-#include "nsInt64.h"
 
 #if defined(PR_LOGGING)
 //
 // Log module for StorageStream logging...
 //
 // To enable logging (see prlog.h for full details):
 //
 //    set NSPR_LOG_MODULES=StorageStreamLog:5
--- a/xpcom/io/nsStringStream.cpp
+++ b/xpcom/io/nsStringStream.cpp
@@ -56,17 +56,16 @@
 #include "IPC/IPCMessageUtils.h"
 #endif
 
 #include "nsStringStream.h"
 #include "nsStreamUtils.h"
 #include "nsReadableUtils.h"
 #include "nsISeekableStream.h"
 #include "nsISupportsPrimitives.h"
-#include "nsInt64.h"
 #include "nsCRT.h"
 #include "prerror.h"
 #include "plstr.h"
 #include "nsIClassInfoImpl.h"
 #include "nsIIPCSerializable.h"
 
 //-----------------------------------------------------------------------------
 // nsIStringInputStream implementation
--- a/xpcom/reflect/xptinfo/src/xptiprivate.h
+++ b/xpcom/reflect/xptinfo/src/xptiprivate.h
@@ -64,17 +64,16 @@
 
 #include "mozilla/Monitor.h"
 #include "mozilla/Mutex.h"
 
 #include "nsCRT.h"
 #include "nsMemory.h"
 
 #include "nsCOMArray.h"
-#include "nsInt64.h"
 #include "nsQuickSort.h"
 
 #include "nsXPIDLString.h"
 
 #include "nsIInputStream.h"
 
 #include "nsHashKeys.h"
 #include "nsDataHashtable.h"
--- a/xpinstall/src/nsXPInstallManager.cpp
+++ b/xpinstall/src/nsXPInstallManager.cpp
@@ -35,17 +35,16 @@
  * 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 ***** */
 
 #include "nscore.h"
 #include "prprf.h"
 #include "plstr.h"
-#include "nsInt64.h"
 
 #include "nsISupports.h"
 #include "nsIServiceManager.h"
 
 #include "nsIURL.h"
 #include "nsIFileURL.h"
 
 #include "nsITransport.h"