aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmarshallnz <jmarshallnz@svn>2009-09-23 03:50:54 +0000
committerjmarshallnz <jmarshallnz@svn>2009-09-23 03:50:54 +0000
commitb572b147da974ab22064d4b5030fccda08de90cd (patch)
treeb465b93637426c23b9e114739a4fabd450a24cd4
parentadab057db495446713b6ff665614ef16a0d7f992 (diff)
cleanup: __int64 -> int64_t in FileSystem, FileItem, StringUtils, Archive etc.
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@23101 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r--guilib/tinyXML/tinyxml.cpp2
-rw-r--r--xbmc/APEv2Tag.h2
-rw-r--r--xbmc/FileItem.cpp2
-rw-r--r--xbmc/FileItem.h2
-rw-r--r--xbmc/FileSystem/CMythFile.cpp10
-rw-r--r--xbmc/FileSystem/CMythFile.h8
-rw-r--r--xbmc/FileSystem/CacheMemBuffer.cpp10
-rw-r--r--xbmc/FileSystem/CacheMemBuffer.h8
-rw-r--r--xbmc/FileSystem/CacheStrategy.cpp16
-rw-r--r--xbmc/FileSystem/CacheStrategy.h25
-rw-r--r--xbmc/FileSystem/File.cpp16
-rw-r--r--xbmc/FileSystem/File.h12
-rw-r--r--xbmc/FileSystem/FileCDDA.cpp8
-rw-r--r--xbmc/FileSystem/FileCDDA.h8
-rw-r--r--xbmc/FileSystem/FileCache.cpp14
-rw-r--r--xbmc/FileSystem/FileCache.h14
-rw-r--r--xbmc/FileSystem/FileCurl.cpp16
-rw-r--r--xbmc/FileSystem/FileCurl.h16
-rw-r--r--xbmc/FileSystem/FileDAAP.cpp8
-rw-r--r--xbmc/FileSystem/FileDAAP.h12
-rw-r--r--xbmc/FileSystem/FileFileReader.cpp10
-rw-r--r--xbmc/FileSystem/FileFileReader.h10
-rw-r--r--xbmc/FileSystem/FileHD.cpp12
-rw-r--r--xbmc/FileSystem/FileHD.h12
-rw-r--r--xbmc/FileSystem/FileISO.cpp10
-rw-r--r--xbmc/FileSystem/FileISO.h8
-rw-r--r--xbmc/FileSystem/FileMusicDatabase.cpp8
-rw-r--r--xbmc/FileSystem/FileMusicDatabase.h8
-rw-r--r--xbmc/FileSystem/FileRTV.cpp8
-rw-r--r--xbmc/FileSystem/FileRTV.h8
-rw-r--r--xbmc/FileSystem/FileRar.cpp16
-rw-r--r--xbmc/FileSystem/FileRar.h20
-rw-r--r--xbmc/FileSystem/FileShoutcast.cpp8
-rw-r--r--xbmc/FileSystem/FileShoutcast.h8
-rw-r--r--xbmc/FileSystem/FileSmb.cpp16
-rw-r--r--xbmc/FileSystem/FileSmb.h12
-rw-r--r--xbmc/FileSystem/FileSpecialProtocol.cpp10
-rw-r--r--xbmc/FileSystem/FileSpecialProtocol.h10
-rw-r--r--xbmc/FileSystem/FileTuxBox.cpp8
-rw-r--r--xbmc/FileSystem/FileTuxBox.h8
-rw-r--r--xbmc/FileSystem/FileXBMSP.cpp8
-rw-r--r--xbmc/FileSystem/FileXBMSP.h8
-rw-r--r--xbmc/FileSystem/FileZip.cpp10
-rw-r--r--xbmc/FileSystem/FileZip.h12
-rw-r--r--xbmc/FileSystem/HDHomeRun.cpp8
-rw-r--r--xbmc/FileSystem/HDHomeRun.h8
-rw-r--r--xbmc/FileSystem/HTTPDirectory.cpp2
-rw-r--r--xbmc/FileSystem/IFile.h14
-rw-r--r--xbmc/FileSystem/MultiPathFile.cpp8
-rw-r--r--xbmc/FileSystem/MultiPathFile.h8
-rw-r--r--xbmc/FileSystem/NptXbmcFile.cpp6
-rw-r--r--xbmc/FileSystem/RarManager.cpp6
-rw-r--r--xbmc/FileSystem/RarManager.h6
-rw-r--r--xbmc/FileSystem/SAPFile.cpp8
-rw-r--r--xbmc/FileSystem/SAPFile.h8
-rw-r--r--xbmc/FileSystem/SMBDirectory.cpp4
-rw-r--r--xbmc/FileSystem/VTPFile.cpp4
-rw-r--r--xbmc/FileSystem/VTPFile.h8
-rw-r--r--xbmc/FileSystem/XBMSDirectory.cpp2
-rw-r--r--xbmc/FileSystem/ZipManager.cpp8
-rw-r--r--xbmc/FileSystem/ZipManager.h6
-rw-r--r--xbmc/FileSystem/iso9660.cpp10
-rw-r--r--xbmc/FileSystem/iso9660.h14
-rw-r--r--xbmc/FlacTag.cpp2
-rw-r--r--xbmc/GUIDialogNumeric.h2
-rw-r--r--xbmc/GUIWindowFileManager.cpp12
-rw-r--r--xbmc/GUIWindowFileManager.h2
-rw-r--r--xbmc/MusicInfoTagLoaderMP3.cpp2
-rw-r--r--xbmc/MusicInfoTagLoaderMP4.cpp4
-rw-r--r--xbmc/MusicInfoTagLoaderMP4.h2
-rw-r--r--xbmc/ProgramDatabase.cpp4
-rw-r--r--xbmc/StringUtils.cpp10
-rw-r--r--xbmc/StringUtils.h3
-rw-r--r--xbmc/Util.cpp2
-rw-r--r--xbmc/cores/paplayer/PAPlayer.cpp2
-rw-r--r--xbmc/lib/libGoAhead/XBMChttp.cpp4
-rw-r--r--xbmc/lib/libGoAhead/XBMChttp.h2
-rw-r--r--xbmc/lib/libPython/xbmcmodule/listitem.cpp6
-rw-r--r--xbmc/lib/sqLite/qry_dat.cpp22
-rw-r--r--xbmc/utils/Archive.cpp8
-rw-r--r--xbmc/utils/Archive.h4
-rw-r--r--xbmc/win32/WINFileSMB.cpp12
-rw-r--r--xbmc/win32/WINFileSMB.h12
83 files changed, 357 insertions, 355 deletions
diff --git a/guilib/tinyXML/tinyxml.cpp b/guilib/tinyXML/tinyxml.cpp
index 595a0914e9..20a9e6ca3c 100644
--- a/guilib/tinyXML/tinyxml.cpp
+++ b/guilib/tinyXML/tinyxml.cpp
@@ -985,7 +985,7 @@ bool TiXmlDocument::LoadFile( const char* _filename, TiXmlEncoding encoding )
// Get the file size, so we can pre-allocate the string. HUGE speed impact.
long length = -1;
- __int64 filelen = file.GetLength();
+ int64_t filelen = file.GetLength();
if (filelen > 0)
length = (long)filelen;
diff --git a/xbmc/APEv2Tag.h b/xbmc/APEv2Tag.h
index e6310aa7cc..6c72c231b6 100644
--- a/xbmc/APEv2Tag.h
+++ b/xbmc/APEv2Tag.h
@@ -71,7 +71,7 @@ protected:
CStdString m_strComment;
CStdString m_strLyrics;
CReplayGain m_replayGain;
- __int64 m_nDuration;
+ int64_t m_nDuration;
char m_rating;
DllMACDll m_dll;
diff --git a/xbmc/FileItem.cpp b/xbmc/FileItem.cpp
index 3146dfaa1f..dfde17c522 100644
--- a/xbmc/FileItem.cpp
+++ b/xbmc/FileItem.cpp
@@ -2064,7 +2064,7 @@ void CFileItemList::Stack()
{
vector<int> stack;
stack.push_back(i);
- __int64 size = item->m_dwSize;
+ int64_t size = item->m_dwSize;
int j = i + 1;
while (j < Size())
diff --git a/xbmc/FileItem.h b/xbmc/FileItem.h
index 96814eff55..bb8d7e8bda 100644
--- a/xbmc/FileItem.h
+++ b/xbmc/FileItem.h
@@ -246,7 +246,7 @@ public:
bool m_bIsShareOrDrive; ///< is this a root share/drive
int m_iDriveType; ///< If \e m_bIsShareOrDrive is \e true, use to get the share type. Types see: CMediaSource::m_iDriveType
CDateTime m_dateTime; ///< file creation date & time
- __int64 m_dwSize; ///< file size (0 for folders)
+ int64_t m_dwSize; ///< file size (0 for folders)
CStdString m_strDVDLabel;
CStdString m_strTitle;
int m_iprogramCount;
diff --git a/xbmc/FileSystem/CMythFile.cpp b/xbmc/FileSystem/CMythFile.cpp
index f9005f23f8..2626e4f6c1 100644
--- a/xbmc/FileSystem/CMythFile.cpp
+++ b/xbmc/FileSystem/CMythFile.cpp
@@ -422,7 +422,7 @@ bool CCMythFile::Delete(const CURL& url)
return false;
}
-__int64 CCMythFile::Seek(__int64 pos, int whence)
+int64_t CCMythFile::Seek(int64_t pos, int whence)
{
CLog::Log(LOGDEBUG, "%s - seek to pos %"PRId64", whence %d", __FUNCTION__, pos, whence);
@@ -434,7 +434,7 @@ __int64 CCMythFile::Seek(__int64 pos, int whence)
return 1;
}
- __int64 result;
+ int64_t result;
if(m_recorder)
result = -1; //m_dll->livetv_seek(m_recorder, pos, whence);
else if(m_file)
@@ -445,7 +445,7 @@ __int64 CCMythFile::Seek(__int64 pos, int whence)
return result;
}
-__int64 CCMythFile::GetPosition()
+int64_t CCMythFile::GetPosition()
{
if(m_recorder)
return m_dll->livetv_seek(m_recorder, 0, SEEK_CUR);
@@ -454,14 +454,14 @@ __int64 CCMythFile::GetPosition()
return -1;
}
-__int64 CCMythFile::GetLength()
+int64_t CCMythFile::GetLength()
{
if(m_file)
return m_dll->file_length(m_file);
return -1;
}
-unsigned int CCMythFile::Read(void* buffer, __int64 size)
+unsigned int CCMythFile::Read(void* buffer, int64_t size)
{
/* check for any events */
HandleEvents();
diff --git a/xbmc/FileSystem/CMythFile.h b/xbmc/FileSystem/CMythFile.h
index d4ae2c66b8..63fef9e49b 100644
--- a/xbmc/FileSystem/CMythFile.h
+++ b/xbmc/FileSystem/CMythFile.h
@@ -47,12 +47,12 @@ public:
CCMythFile();
virtual ~CCMythFile();
virtual bool Open(const CURL& url);
- virtual __int64 Seek(__int64 pos, int whence=SEEK_SET);
- virtual __int64 GetPosition();
- virtual __int64 GetLength();
+ virtual int64_t Seek(int64_t pos, int whence=SEEK_SET);
+ virtual int64_t GetPosition();
+ virtual int64_t GetLength();
virtual int Stat(const CURL& url, struct __stat64* buffer) { return -1; }
virtual void Close();
- virtual unsigned int Read(void* buffer, __int64 size);
+ virtual unsigned int Read(void* buffer, int64_t size);
virtual CStdString GetContent() { return ""; }
virtual bool SkipNext();
diff --git a/xbmc/FileSystem/CacheMemBuffer.cpp b/xbmc/FileSystem/CacheMemBuffer.cpp
index 8dd66a0a8d..cfd4d92321 100644
--- a/xbmc/FileSystem/CacheMemBuffer.cpp
+++ b/xbmc/FileSystem/CacheMemBuffer.cpp
@@ -127,7 +127,7 @@ int CacheMemBuffer::ReadFromCache(char *pBuffer, size_t iMaxSize)
return nRead;
}
-__int64 CacheMemBuffer::WaitForData(unsigned int iMinAvail, unsigned int iMillis)
+int64_t CacheMemBuffer::WaitForData(unsigned int iMinAvail, unsigned int iMillis)
{
if (iMillis == 0 || IsEndOfInput())
return m_buffer.GetMaxReadSize();
@@ -139,7 +139,7 @@ __int64 CacheMemBuffer::WaitForData(unsigned int iMinAvail, unsigned int iMillis
return m_buffer.GetMaxReadSize();
}
-__int64 CacheMemBuffer::Seek(__int64 iFilePosition, int iWhence)
+int64_t CacheMemBuffer::Seek(int64_t iFilePosition, int iWhence)
{
if (iWhence != SEEK_SET)
{
@@ -178,11 +178,11 @@ __int64 CacheMemBuffer::Seek(__int64 iFilePosition, int iWhence)
return m_nStartPosition;
}
- __int64 iHistoryStart = m_nStartPosition - m_HistoryBuffer.GetMaxReadSize();
+ int64_t iHistoryStart = m_nStartPosition - m_HistoryBuffer.GetMaxReadSize();
if (iFilePosition < m_nStartPosition && iFilePosition > iHistoryStart)
{
CRingBuffer saveHist, saveUnRead;
- __int64 nToSkip = iFilePosition - iHistoryStart;
+ int64_t nToSkip = iFilePosition - iHistoryStart;
SEEK_CHECK_RET(m_HistoryBuffer.ReadBinary(saveHist, (int)nToSkip));
SEEK_CHECK_RET(saveUnRead.Copy(m_buffer));
@@ -210,7 +210,7 @@ __int64 CacheMemBuffer::Seek(__int64 iFilePosition, int iWhence)
return CACHE_RC_ERROR;
}
-void CacheMemBuffer::Reset(__int64 iSourcePosition)
+void CacheMemBuffer::Reset(int64_t iSourcePosition)
{
CSingleLock lock(m_sync);
m_nStartPosition = iSourcePosition;
diff --git a/xbmc/FileSystem/CacheMemBuffer.h b/xbmc/FileSystem/CacheMemBuffer.h
index 56557bbab6..fe1380c9d3 100644
--- a/xbmc/FileSystem/CacheMemBuffer.h
+++ b/xbmc/FileSystem/CacheMemBuffer.h
@@ -42,13 +42,13 @@ public:
virtual int WriteToCache(const char *pBuffer, size_t iSize) ;
virtual int ReadFromCache(char *pBuffer, size_t iMaxSize) ;
- virtual __int64 WaitForData(unsigned int iMinAvail, unsigned int iMillis) ;
+ virtual int64_t WaitForData(unsigned int iMinAvail, unsigned int iMillis) ;
- virtual __int64 Seek(__int64 iFilePosition, int iWhence) ;
- virtual void Reset(__int64 iSourcePosition) ;
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence) ;
+ virtual void Reset(int64_t iSourcePosition) ;
protected:
- __int64 m_nStartPosition;
+ int64_t m_nStartPosition;
CRingBuffer m_buffer;
CRingBuffer m_HistoryBuffer;
CRingBuffer m_forwardBuffer; // for seek cases, to store data already read
diff --git a/xbmc/FileSystem/CacheStrategy.cpp b/xbmc/FileSystem/CacheStrategy.cpp
index 87885175ee..e228c7fc18 100644
--- a/xbmc/FileSystem/CacheStrategy.cpp
+++ b/xbmc/FileSystem/CacheStrategy.cpp
@@ -148,14 +148,14 @@ int CSimpleFileCache::WriteToCache(const char *pBuffer, size_t iSize)
return iWritten;
}
-__int64 CSimpleFileCache::GetAvailableRead()
+int64_t CSimpleFileCache::GetAvailableRead()
{
return m_nWritePosition - m_nReadPosition;
}
int CSimpleFileCache::ReadFromCache(char *pBuffer, size_t iMaxSize)
{
- __int64 iAvailable = GetAvailableRead();
+ int64_t iAvailable = GetAvailableRead();
if ( iAvailable <= 0 ) {
return m_bEndOfInput?CACHE_RC_EOF : CACHE_RC_WOULD_BLOCK;
}
@@ -172,7 +172,7 @@ int CSimpleFileCache::ReadFromCache(char *pBuffer, size_t iMaxSize)
return iRead;
}
-__int64 CSimpleFileCache::WaitForData(unsigned int iMinAvail, unsigned int iMillis)
+int64_t CSimpleFileCache::WaitForData(unsigned int iMinAvail, unsigned int iMillis)
{
if( iMillis == 0 || IsEndOfInput() )
return GetAvailableRead();
@@ -181,7 +181,7 @@ __int64 CSimpleFileCache::WaitForData(unsigned int iMinAvail, unsigned int iMill
DWORD dwTime;
while ( !IsEndOfInput() && (dwTime = GetTickCount()) < dwTimeout )
{
- __int64 iAvail = GetAvailableRead();
+ int64_t iAvail = GetAvailableRead();
if (iAvail >= iMinAvail)
return iAvail;
@@ -197,12 +197,12 @@ __int64 CSimpleFileCache::WaitForData(unsigned int iMinAvail, unsigned int iMill
return CACHE_RC_TIMEOUT;
}
-__int64 CSimpleFileCache::Seek(__int64 iFilePosition, int iWhence)
+int64_t CSimpleFileCache::Seek(int64_t iFilePosition, int iWhence)
{
CLog::Log(LOGDEBUG,"CSimpleFileCache::Seek, seeking to %"PRId64, iFilePosition);
- __int64 iTarget = iFilePosition - m_nStartPosition;
+ int64_t iTarget = iFilePosition - m_nStartPosition;
if (SEEK_END == iWhence)
{
CLog::Log(LOGERROR,"%s, cant seek relative to end", __FUNCTION__);
@@ -217,7 +217,7 @@ __int64 CSimpleFileCache::Seek(__int64 iFilePosition, int iWhence)
return CACHE_RC_ERROR;
}
- __int64 nDiff = iTarget - m_nWritePosition;
+ int64_t nDiff = iTarget - m_nWritePosition;
if ( nDiff > 500000 || (nDiff > 0 && WaitForData((unsigned int)nDiff, 5000) == CACHE_RC_TIMEOUT) ) {
CLog::Log(LOGWARNING,"%s - attempt to seek pass read data (seek to %"PRId64". max: %"PRId64". reset read pointer. (%"PRId64":%d)", __FUNCTION__, iTarget, m_nWritePosition, iFilePosition, iWhence);
return CACHE_RC_ERROR;
@@ -234,7 +234,7 @@ __int64 CSimpleFileCache::Seek(__int64 iFilePosition, int iWhence)
return pos.QuadPart;
}
-void CSimpleFileCache::Reset(__int64 iSourcePosition)
+void CSimpleFileCache::Reset(int64_t iSourcePosition)
{
LARGE_INTEGER pos;
pos.QuadPart = 0;
diff --git a/xbmc/FileSystem/CacheStrategy.h b/xbmc/FileSystem/CacheStrategy.h
index f710c38752..9e193129a4 100644
--- a/xbmc/FileSystem/CacheStrategy.h
+++ b/xbmc/FileSystem/CacheStrategy.h
@@ -23,6 +23,7 @@
#ifndef XFILECACHESTRATEGY_H
#define XFILECACHESTRATEGY_H
+#include <stdint.h>
#ifdef _LINUX
#include "PlatformDefs.h"
#include "XHandlePublic.h"
@@ -59,10 +60,10 @@ public:
virtual int WriteToCache(const char *pBuffer, size_t iSize) = 0;
virtual int ReadFromCache(char *pBuffer, size_t iMaxSize) = 0;
- virtual __int64 WaitForData(unsigned int iMinAvail, unsigned int iMillis) = 0;
+ virtual int64_t WaitForData(unsigned int iMinAvail, unsigned int iMillis) = 0;
- virtual __int64 Seek(__int64 iFilePosition, int iWhence) = 0;
- virtual void Reset(__int64 iSourcePosition) = 0;
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence) = 0;
+ virtual void Reset(int64_t iSourcePosition) = 0;
virtual void EndOfInput(); // mark the end of the input stream so that Read will know when to return EOF
virtual bool IsEndOfInput();
@@ -77,30 +78,30 @@ protected:
*/
class CSimpleFileCache : public CCacheStrategy, ICacheInterface {
public:
- CSimpleFileCache();
- virtual ~CSimpleFileCache();
+ CSimpleFileCache();
+ virtual ~CSimpleFileCache();
virtual int Open() ;
virtual int Close() ;
virtual int WriteToCache(const char *pBuffer, size_t iSize) ;
virtual int ReadFromCache(char *pBuffer, size_t iMaxSize) ;
- virtual __int64 WaitForData(unsigned int iMinAvail, unsigned int iMillis) ;
+ virtual int64_t WaitForData(unsigned int iMinAvail, unsigned int iMillis) ;
- virtual __int64 Seek(__int64 iFilePosition, int iWhence);
- virtual void Reset(__int64 iSourcePosition);
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence);
+ virtual void Reset(int64_t iSourcePosition);
virtual void EndOfInput();
virtual ICacheInterface* GetInterface() { return (ICacheInterface*)this; }
- __int64 GetAvailableRead();
+ int64_t GetAvailableRead();
protected:
HANDLE m_hCacheFileRead;
HANDLE m_hCacheFileWrite;
HANDLE m_hDataAvailEvent;
- volatile __int64 m_nStartPosition;
- volatile __int64 m_nWritePosition;
- volatile __int64 m_nReadPosition;
+ volatile int64_t m_nStartPosition;
+ volatile int64_t m_nWritePosition;
+ volatile int64_t m_nReadPosition;
};
}
diff --git a/xbmc/FileSystem/File.cpp b/xbmc/FileSystem/File.cpp
index 1157976e7c..fe52de0642 100644
--- a/xbmc/FileSystem/File.cpp
+++ b/xbmc/FileSystem/File.cpp
@@ -483,7 +483,7 @@ int CFile::Stat(const CStdString& strFileName, struct __stat64* buffer)
return -1;
}
-unsigned int CFile::Read(void *lpBuf, __int64 uiBufSize)
+unsigned int CFile::Read(void *lpBuf, int64_t uiBufSize)
{
if (!m_pFile)
return 0;
@@ -590,7 +590,7 @@ void CFile::Flush()
}
//*********************************************************************************************
-__int64 CFile::Seek(__int64 iFilePosition, int iWhence)
+int64_t CFile::Seek(int64_t iFilePosition, int iWhence)
{
if (!m_pFile)
return -1;
@@ -609,7 +609,7 @@ __int64 CFile::Seek(__int64 iFilePosition, int iWhence)
{
if(iWhence == SEEK_POSSIBLE)
{
- __int64 ret = m_pFile->Seek(iFilePosition, iWhence);
+ int64_t ret = m_pFile->Seek(iFilePosition, iWhence);
if(ret >= 0)
return ret;
else
@@ -637,7 +637,7 @@ __int64 CFile::Seek(__int64 iFilePosition, int iWhence)
}
//*********************************************************************************************
-__int64 CFile::GetLength()
+int64_t CFile::GetLength()
{
try
{
@@ -658,7 +658,7 @@ __int64 CFile::GetLength()
}
//*********************************************************************************************
-__int64 CFile::GetPosition()
+int64_t CFile::GetPosition()
{
if (!m_pFile)
return -1;
@@ -750,7 +750,7 @@ bool CFile::ReadString(char *szLine, int iLineLength)
return false;
}
-int CFile::Write(const void* lpBuf, __int64 uiBufSize)
+int CFile::Write(const void* lpBuf, int64_t uiBufSize)
{
try
{
@@ -939,7 +939,7 @@ CFileStreamBuffer::pos_type CFileStreamBuffer::seekoff(
setg(0,0,0);
setp(0,0);
- __int64 position = -1;
+ int64_t position = -1;
#ifndef _LINUX
try
{
@@ -1006,7 +1006,7 @@ bool CFileStream::Open(const CURL& filename)
return false;
}
-__int64 CFileStream::GetLength()
+int64_t CFileStream::GetLength()
{
return m_file->GetLength();
}
diff --git a/xbmc/FileSystem/File.h b/xbmc/FileSystem/File.h
index 4256398a41..5a175d9587 100644
--- a/xbmc/FileSystem/File.h
+++ b/xbmc/FileSystem/File.h
@@ -68,13 +68,13 @@ public:
bool Open(const CStdString& strFileName, unsigned int flags = 0);
bool OpenForWrite(const CStdString& strFileName, bool bOverWrite = false);
- unsigned int Read(void* lpBuf, __int64 uiBufSize);
+ unsigned int Read(void* lpBuf, int64_t uiBufSize);
bool ReadString(char *szLine, int iLineLength);
- int Write(const void* lpBuf, __int64 uiBufSize);
+ int Write(const void* lpBuf, int64_t uiBufSize);
void Flush();
- __int64 Seek(__int64 iFilePosition, int iWhence = SEEK_SET);
- __int64 GetPosition();
- __int64 GetLength();
+ int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET);
+ int64_t GetPosition();
+ int64_t GetLength();
void Close();
int GetChunkSize() {if (m_pFile) return m_pFile->GetChunkSize(); return 0;}
bool SkipNext(){if (m_pFile) return m_pFile->SkipNext(); return false;}
@@ -136,7 +136,7 @@ public:
bool Open(const CURL& filename);
void Close();
- __int64 GetLength();
+ int64_t GetLength();
private:
CFileStreamBuffer m_buffer;
IFile* m_file;
diff --git a/xbmc/FileSystem/FileCDDA.cpp b/xbmc/FileSystem/FileCDDA.cpp
index 87d092c9d9..d85097c13a 100644
--- a/xbmc/FileSystem/FileCDDA.cpp
+++ b/xbmc/FileSystem/FileCDDA.cpp
@@ -115,7 +115,7 @@ int CFileCDDA::Stat(const CURL& url, struct __stat64* buffer)
return -1;
}
-unsigned int CFileCDDA::Read(void* lpBuf, __int64 uiBufSize)
+unsigned int CFileCDDA::Read(void* lpBuf, int64_t uiBufSize)
{
if (!m_pCdIo || !g_mediaManager.IsDiscInDrive())
return 0;
@@ -140,7 +140,7 @@ unsigned int CFileCDDA::Read(void* lpBuf, __int64 uiBufSize)
return iSectorCount*CDIO_CD_FRAMESIZE_RAW;
}
-__int64 CFileCDDA::Seek(__int64 iFilePosition, int iWhence /*=SEEK_SET*/)
+int64_t CFileCDDA::Seek(int64_t iFilePosition, int iWhence /*=SEEK_SET*/)
{
if (!m_pCdIo)
return -1;
@@ -177,7 +177,7 @@ void CFileCDDA::Close()
}
}
-__int64 CFileCDDA::GetPosition()
+int64_t CFileCDDA::GetPosition()
{
if (!m_pCdIo)
return 0;
@@ -185,7 +185,7 @@ __int64 CFileCDDA::GetPosition()
return ((m_lsnCurrent -m_lsnStart)*CDIO_CD_FRAMESIZE_RAW);
}
-__int64 CFileCDDA::GetLength()
+int64_t CFileCDDA::GetLength()
{
if (!m_pCdIo)
return 0;
diff --git a/xbmc/FileSystem/FileCDDA.h b/xbmc/FileSystem/FileCDDA.h
index 5866cc21e9..b8c94addb3 100644
--- a/xbmc/FileSystem/FileCDDA.h
+++ b/xbmc/FileSystem/FileCDDA.h
@@ -38,11 +38,11 @@ public:
virtual bool Exists(const CURL& url);
virtual int Stat(const CURL& url, struct __stat64* buffer);
- virtual unsigned int Read(void* lpBuf, __int64 uiBufSize);
- virtual __int64 Seek(__int64 iFilePosition, int iWhence = SEEK_SET);
+ virtual unsigned int Read(void* lpBuf, int64_t uiBufSize);
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET);
virtual void Close();
- virtual __int64 GetPosition();
- virtual __int64 GetLength();
+ virtual int64_t GetPosition();
+ virtual int64_t GetLength();
virtual int GetChunkSize();
protected:
diff --git a/xbmc/FileSystem/FileCache.cpp b/xbmc/FileSystem/FileCache.cpp
index dda0d81f9b..f226655525 100644
--- a/xbmc/FileSystem/FileCache.cpp
+++ b/xbmc/FileSystem/FileCache.cpp
@@ -245,14 +245,14 @@ int CFileCache::Stat(const CURL& url, struct __stat64* buffer)
return CFile::Stat(strPath, buffer);
}
-unsigned int CFileCache::Read(void* lpBuf, __int64 uiBufSize)
+unsigned int CFileCache::Read(void* lpBuf, int64_t uiBufSize)
{
CSingleLock lock(m_sync);
if (!m_pCache) {
CLog::Log(LOGERROR,"%s - sanity failed. no cache strategy!", __FUNCTION__);
return 0;
}
- __int64 iRc;
+ int64_t iRc;
retry:
// attempt to read
@@ -285,7 +285,7 @@ retry:
return 0;
}
-__int64 CFileCache::Seek(__int64 iFilePosition, int iWhence)
+int64_t CFileCache::Seek(int64_t iFilePosition, int iWhence)
{
CSingleLock lock(m_sync);
@@ -294,8 +294,8 @@ __int64 CFileCache::Seek(__int64 iFilePosition, int iWhence)
return -1;
}
- __int64 iCurPos = m_readPos;
- __int64 iTarget = iFilePosition;
+ int64_t iCurPos = m_readPos;
+ int64_t iTarget = iFilePosition;
if (iWhence == SEEK_END)
iTarget = GetLength() + iTarget;
else if (iWhence == SEEK_CUR)
@@ -339,12 +339,12 @@ void CFileCache::Close()
m_source.Close();
}
-__int64 CFileCache::GetPosition()
+int64_t CFileCache::GetPosition()
{
return m_readPos;
}
-__int64 CFileCache::GetLength()
+int64_t CFileCache::GetLength()
{
return m_source.GetLength();
}
diff --git a/xbmc/FileSystem/FileCache.h b/xbmc/FileSystem/FileCache.h
index c72b4510b5..6ce1c9bfa6 100644
--- a/xbmc/FileSystem/FileCache.h
+++ b/xbmc/FileSystem/FileCache.h
@@ -50,11 +50,11 @@ namespace XFILE
virtual bool Exists(const CURL& url);
virtual int Stat(const CURL& url, struct __stat64* buffer);
- virtual unsigned int Read(void* lpBuf, __int64 uiBufSize);
+ virtual unsigned int Read(void* lpBuf, int64_t uiBufSize);
- virtual __int64 Seek(__int64 iFilePosition, int iWhence);
- virtual __int64 GetPosition();
- virtual __int64 GetLength();
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence);
+ virtual int64_t GetPosition();
+ virtual int64_t GetLength();
virtual ICacheInterface* GetCache();
IFile *GetFileImp();
@@ -73,9 +73,9 @@ namespace XFILE
CEvent m_seekEnded;
int m_nBytesToBuffer;
time_t m_tmLastBuffering;
- __int64 m_nSeekResult;
- __int64 m_seekPos;
- __int64 m_readPos;
+ int64_t m_nSeekResult;
+ int64_t m_seekPos;
+ int64_t m_readPos;
CCriticalSection m_sync;
};
diff --git a/xbmc/FileSystem/FileCurl.cpp b/xbmc/FileSystem/FileCurl.cpp
index 27580f8da8..abf5a7c1b1 100644
--- a/xbmc/FileSystem/FileCurl.cpp
+++ b/xbmc/FileSystem/FileCurl.cpp
@@ -188,7 +188,7 @@ CFileCurl::CReadState::~CReadState()
g_curlInterface.easy_release(&m_easyHandle, &m_multiHandle);
}
-bool CFileCurl::CReadState::Seek(__int64 pos)
+bool CFileCurl::CReadState::Seek(int64_t pos)
{
if(pos == m_filePos)
return true;
@@ -251,7 +251,7 @@ long CFileCurl::CReadState::Connect(unsigned int size)
{
if (length < 0)
length = 0.0;
- m_fileSize = m_filePos + (__int64)length;
+ m_fileSize = m_filePos + (int64_t)length;
}
long response;
@@ -847,9 +847,9 @@ bool CFileCurl::Exists(const CURL& url)
}
-__int64 CFileCurl::Seek(__int64 iFilePosition, int iWhence)
+int64_t CFileCurl::Seek(int64_t iFilePosition, int iWhence)
{
- __int64 nextPos = m_state->m_filePos;
+ int64_t nextPos = m_state->m_filePos;
switch(iWhence)
{
case SEEK_SET:
@@ -916,13 +916,13 @@ __int64 CFileCurl::Seek(__int64 iFilePosition, int iWhence)
return m_state->m_filePos;
}
-__int64 CFileCurl::GetLength()
+int64_t CFileCurl::GetLength()
{
if (!m_opened) return 0;
return m_state->m_fileSize;
}
-__int64 CFileCurl::GetPosition()
+int64_t CFileCurl::GetPosition()
{
if (!m_opened) return 0;
return m_state->m_filePos;
@@ -1015,7 +1015,7 @@ int CFileCurl::Stat(const CURL& url, struct __stat64* buffer)
}
else
{
- buffer->st_size = (__int64)length;
+ buffer->st_size = (int64_t)length;
if(strstr(content, "text/html")) //consider html files directories
buffer->st_mode = _S_IFDIR;
else
@@ -1027,7 +1027,7 @@ int CFileCurl::Stat(const CURL& url, struct __stat64* buffer)
return 0;
}
-unsigned int CFileCurl::CReadState::Read(void* lpBuf, __int64 uiBufSize)
+unsigned int CFileCurl::CReadState::Read(void* lpBuf, int64_t uiBufSize)
{
/* only request 1 byte, for truncated reads (only if not eof) */
if((m_fileSize == 0 || m_filePos < m_fileSize) && !FillBuffer(1))
diff --git a/xbmc/FileSystem/FileCurl.h b/xbmc/FileSystem/FileCurl.h
index 64568cbb60..35ddf5792f 100644
--- a/xbmc/FileSystem/FileCurl.h
+++ b/xbmc/FileSystem/FileCurl.h
@@ -43,13 +43,13 @@ namespace XFILE
virtual ~CFileCurl();
virtual bool Open(const CURL& url);
virtual bool Exists(const CURL& url);
- virtual __int64 Seek(__int64 iFilePosition, int iWhence=SEEK_SET);
- virtual __int64 GetPosition();
- virtual __int64 GetLength();
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence=SEEK_SET);
+ virtual int64_t GetPosition();
+ virtual int64_t GetLength();
virtual int Stat(const CURL& url, struct __stat64* buffer);
virtual void Close();
virtual bool ReadString(char *szLine, int iLineLength) { return m_state->ReadString(szLine, iLineLength); }
- virtual unsigned int Read(void* lpBuf, __int64 uiBufSize) { return m_state->Read(lpBuf, uiBufSize); }
+ virtual unsigned int Read(void* lpBuf, int64_t uiBufSize) { return m_state->Read(lpBuf, uiBufSize); }
virtual CStdString GetContent() { return m_state->m_httpheader.GetContentType(); }
bool Post(const CStdString& strURL, const CStdString& strPostData, CStdString& strHTML);
@@ -97,8 +97,8 @@ namespace XFILE
unsigned int m_overflowSize; // size of the overflow buffer
int m_stillRunning; // Is background url fetch still in progress
bool m_cancelled;
- __int64 m_fileSize;
- __int64 m_filePos;
+ int64_t m_fileSize;
+ int64_t m_filePos;
bool m_bFirstLoop;
/* returned http header */
@@ -107,8 +107,8 @@ namespace XFILE
size_t WriteCallback(char *buffer, size_t size, size_t nitems);
size_t HeaderCallback(void *ptr, size_t size, size_t nmemb);
- bool Seek(__int64 pos);
- unsigned int Read(void* lpBuf, __int64 uiBufSize);
+ bool Seek(int64_t pos);
+ unsigned int Read(void* lpBuf, int64_t uiBufSize);
bool ReadString(char *szLine, int iLineLength);
bool FillBuffer(unsigned int want);
diff --git a/xbmc/FileSystem/FileDAAP.cpp b/xbmc/FileSystem/FileDAAP.cpp
index 392eb9083f..52a31d38d6 100644
--- a/xbmc/FileSystem/FileDAAP.cpp
+++ b/xbmc/FileSystem/FileDAAP.cpp
@@ -196,7 +196,7 @@ bool CFileDAAP::Open(const CURL& url)
//*********************************************************************************************
-unsigned int CFileDAAP::Read(void *lpBuf, __int64 uiBufSize)
+unsigned int CFileDAAP::Read(void *lpBuf, int64_t uiBufSize)
{
return m_curl.Read(lpBuf, uiBufSize);
}
@@ -209,7 +209,7 @@ void CFileDAAP::Close()
}
//*********************************************************************************************
-__int64 CFileDAAP::Seek(__int64 iFilePosition, int iWhence)
+int64_t CFileDAAP::Seek(int64_t iFilePosition, int iWhence)
{
CSingleLock lock(g_DaapClient);
@@ -228,13 +228,13 @@ __int64 CFileDAAP::Seek(__int64 iFilePosition, int iWhence)
}
//*********************************************************************************************
-__int64 CFileDAAP::GetLength()
+int64_t CFileDAAP::GetLength()
{
return m_curl.GetLength();
}
//*********************************************************************************************
-__int64 CFileDAAP::GetPosition()
+int64_t CFileDAAP::GetPosition()
{
return m_curl.GetPosition();
}
diff --git a/xbmc/FileSystem/FileDAAP.h b/xbmc/FileSystem/FileDAAP.h
index 8a59d14a2f..55c5d59b2f 100644
--- a/xbmc/FileSystem/FileDAAP.h
+++ b/xbmc/FileSystem/FileDAAP.h
@@ -68,13 +68,13 @@ class CFileDAAP : public IFile
public:
CFileDAAP();
virtual ~CFileDAAP();
- virtual __int64 GetPosition();
- virtual __int64 GetLength();
+ virtual int64_t GetPosition();
+ virtual int64_t GetLength();
virtual bool Open(const CURL& url);
virtual bool Exists(const CURL& url);
virtual int Stat(const CURL& url, struct __stat64* buffer);
- virtual unsigned int Read(void* lpBuf, __int64 uiBufSize);
- virtual __int64 Seek(__int64 iFilePosition, int iWhence = SEEK_SET);
+ virtual unsigned int Read(void* lpBuf, int64_t uiBufSize);
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET);
virtual void Close();
protected:
@@ -82,8 +82,8 @@ protected:
bool StartStreaming();
bool StopStreaming();
- __int64 m_fileSize; //holds full size
- __int64 m_filePos; //holds current position in file
+ int64_t m_fileSize; //holds full size
+ int64_t m_filePos; //holds current position in file
DAAP_SClient *m_thisClient;
diff --git a/xbmc/FileSystem/FileFileReader.cpp b/xbmc/FileSystem/FileFileReader.cpp
index 9b7930461a..cd14b71728 100644
--- a/xbmc/FileSystem/FileFileReader.cpp
+++ b/xbmc/FileSystem/FileFileReader.cpp
@@ -72,13 +72,13 @@ bool CFileFileReader::OpenForWrite(const CURL& url, bool bOverWrite)
}
//*********************************************************************************************
-unsigned int CFileFileReader::Read(void *lpBuf, __int64 uiBufSize)
+unsigned int CFileFileReader::Read(void *lpBuf, int64_t uiBufSize)
{
return m_reader.Read(lpBuf,uiBufSize);
}
//*********************************************************************************************
-int CFileFileReader::Write(const void *lpBuf, __int64 uiBufSize)
+int CFileFileReader::Write(const void *lpBuf, int64_t uiBufSize)
{
return 0;
}
@@ -90,19 +90,19 @@ void CFileFileReader::Close()
}
//*********************************************************************************************
-__int64 CFileFileReader::Seek(__int64 iFilePosition, int iWhence)
+int64_t CFileFileReader::Seek(int64_t iFilePosition, int iWhence)
{
return m_reader.Seek(iFilePosition,iWhence);
}
//*********************************************************************************************
-__int64 CFileFileReader::GetLength()
+int64_t CFileFileReader::GetLength()
{
return m_reader.GetLength();
}
//*********************************************************************************************
-__int64 CFileFileReader::GetPosition()
+int64_t CFileFileReader::GetPosition()
{
return m_reader.GetPosition();
}
diff --git a/xbmc/FileSystem/FileFileReader.h b/xbmc/FileSystem/FileFileReader.h
index e796c04e63..b9c9234e28 100644
--- a/xbmc/FileSystem/FileFileReader.h
+++ b/xbmc/FileSystem/FileFileReader.h
@@ -28,14 +28,14 @@ class CFileFileReader : public IFile
public:
CFileFileReader();
virtual ~CFileFileReader();
- virtual __int64 GetPosition();
- virtual __int64 GetLength();
+ virtual int64_t GetPosition();
+ virtual int64_t GetLength();
virtual bool Open(const CURL& url);
virtual bool Exists(const CURL& url);
virtual int Stat(const CURL& url, struct __stat64* buffer);
- virtual unsigned int Read(void* lpBuf, __int64 uiBufSize);
- virtual int Write(const void* lpBuf, __int64 uiBufSize);
- virtual __int64 Seek(__int64 iFilePosition, int iWhence = SEEK_SET);
+ virtual unsigned int Read(void* lpBuf, int64_t uiBufSize);
+ virtual int Write(const void* lpBuf, int64_t uiBufSize);
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET);
virtual void Close();
virtual bool OpenForWrite(const CURL& url, bool bOverWrite = false);
diff --git a/xbmc/FileSystem/FileHD.cpp b/xbmc/FileSystem/FileHD.cpp
index a3afb6613c..6955a187ed 100644
--- a/xbmc/FileSystem/FileHD.cpp
+++ b/xbmc/FileSystem/FileHD.cpp
@@ -179,7 +179,7 @@ bool CFileHD::OpenForWrite(const CURL& url, bool bOverWrite)
}
//*********************************************************************************************
-unsigned int CFileHD::Read(void *lpBuf, __int64 uiBufSize)
+unsigned int CFileHD::Read(void *lpBuf, int64_t uiBufSize)
{
if (!m_hFile.isValid()) return 0;
DWORD nBytesRead;
@@ -192,7 +192,7 @@ unsigned int CFileHD::Read(void *lpBuf, __int64 uiBufSize)
}
//*********************************************************************************************
-int CFileHD::Write(const void *lpBuf, __int64 uiBufSize)
+int CFileHD::Write(const void *lpBuf, int64_t uiBufSize)
{
if (!m_hFile.isValid())
return 0;
@@ -211,13 +211,13 @@ void CFileHD::Close()
}
//*********************************************************************************************
-__int64 CFileHD::Seek(__int64 iFilePosition, int iWhence)
+int64_t CFileHD::Seek(int64_t iFilePosition, int iWhence)
{
LARGE_INTEGER lPos, lNewPos;
lPos.QuadPart = iFilePosition;
int bSuccess;
- __int64 length = GetLength();
+ int64_t length = GetLength();
switch (iWhence)
{
@@ -252,7 +252,7 @@ __int64 CFileHD::Seek(__int64 iFilePosition, int iWhence)
}
//*********************************************************************************************
-__int64 CFileHD::GetLength()
+int64_t CFileHD::GetLength()
{
LARGE_INTEGER i64Size;
GetFileSizeEx((HANDLE)m_hFile, &i64Size);
@@ -260,7 +260,7 @@ __int64 CFileHD::GetLength()
}
//*********************************************************************************************
-__int64 CFileHD::GetPosition()
+int64_t CFileHD::GetPosition()
{
return m_i64FilePos;
}
diff --git a/xbmc/FileSystem/FileHD.h b/xbmc/FileSystem/FileHD.h
index ef7b85809f..6c4442090a 100644
--- a/xbmc/FileSystem/FileHD.h
+++ b/xbmc/FileSystem/FileHD.h
@@ -39,15 +39,15 @@ class CFileHD : public IFile
public:
CFileHD();
virtual ~CFileHD();
- virtual __int64 GetPosition();
- virtual __int64 GetLength();
+ virtual int64_t GetPosition();
+ virtual int64_t GetLength();
virtual bool Open(const CURL& url);
virtual bool Exists(const CURL& url);
virtual int Stat(const CURL& url, struct __stat64* buffer);
virtual int Stat(struct __stat64* buffer);
- virtual unsigned int Read(void* lpBuf, __int64 uiBufSize);
- virtual int Write(const void* lpBuf, __int64 uiBufSize);
- virtual __int64 Seek(__int64 iFilePosition, int iWhence = SEEK_SET);
+ virtual unsigned int Read(void* lpBuf, int64_t uiBufSize);
+ virtual int Write(const void* lpBuf, int64_t uiBufSize);
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET);
virtual void Close();
virtual void Flush();
@@ -59,7 +59,7 @@ public:
protected:
CStdString GetLocal(const CURL &url); /* crate a properly format path from an url */
AUTOPTR::CAutoPtrHandle m_hFile;
- __int64 m_i64FilePos;
+ int64_t m_i64FilePos;
};
}
diff --git a/xbmc/FileSystem/FileISO.cpp b/xbmc/FileSystem/FileISO.cpp
index 476ac1592e..085060cb6c 100644
--- a/xbmc/FileSystem/FileISO.cpp
+++ b/xbmc/FileSystem/FileISO.cpp
@@ -64,7 +64,7 @@ bool CFileISO::Open(const CURL& url)
}
//*********************************************************************************************
-unsigned int CFileISO::Read(void *lpBuf, __int64 uiBufSize)
+unsigned int CFileISO::Read(void *lpBuf, int64_t uiBufSize)
{
if (!m_bOpened) return 0;
char *pData = (char *)lpBuf;
@@ -110,24 +110,24 @@ void CFileISO::Close()
}
//*********************************************************************************************
-__int64 CFileISO::Seek(__int64 iFilePosition, int iWhence)
+int64_t CFileISO::Seek(int64_t iFilePosition, int iWhence)
{
if (!m_bOpened) return -1;
- __int64 lNewPos = m_isoReader.Seek(m_hFile, iFilePosition, iWhence);
+ int64_t lNewPos = m_isoReader.Seek(m_hFile, iFilePosition, iWhence);
if(lNewPos >= 0)
m_cache.Clear();
return lNewPos;
}
//*********************************************************************************************
-__int64 CFileISO::GetLength()
+int64_t CFileISO::GetLength()
{
if (!m_bOpened) return -1;
return m_isoReader.GetFileSize(m_hFile);
}
//*********************************************************************************************
-__int64 CFileISO::GetPosition()
+int64_t CFileISO::GetPosition()
{
if (!m_bOpened) return -1;
return m_isoReader.GetFilePosition(m_hFile);
diff --git a/xbmc/FileSystem/FileISO.h b/xbmc/FileSystem/FileISO.h
index cd411a0db8..ed83d45c31 100644
--- a/xbmc/FileSystem/FileISO.h
+++ b/xbmc/FileSystem/FileISO.h
@@ -42,13 +42,13 @@ class CFileISO : public IFile
public:
CFileISO();
virtual ~CFileISO();
- virtual __int64 GetPosition();
- virtual __int64 GetLength();
+ virtual int64_t GetPosition();
+ virtual int64_t GetLength();
virtual bool Open(const CURL& url);
virtual bool Exists(const CURL& url);
virtual int Stat(const CURL& url, struct __stat64* buffer);
- virtual unsigned int Read(void* lpBuf, __int64 uiBufSize);
- virtual __int64 Seek(__int64 iFilePosition, int iWhence = SEEK_SET);
+ virtual unsigned int Read(void* lpBuf, int64_t uiBufSize);
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET);
virtual void Close();
protected:
bool m_bOpened;
diff --git a/xbmc/FileSystem/FileMusicDatabase.cpp b/xbmc/FileSystem/FileMusicDatabase.cpp
index ac12165b40..c443295126 100644
--- a/xbmc/FileSystem/FileMusicDatabase.cpp
+++ b/xbmc/FileSystem/FileMusicDatabase.cpp
@@ -131,12 +131,12 @@ int CFileMusicDatabase::Stat(const CURL& url, struct __stat64* buffer)
return m_file.Stat(song.strFileName, buffer);
}
-unsigned int CFileMusicDatabase::Read(void* lpBuf, __int64 uiBufSize)
+unsigned int CFileMusicDatabase::Read(void* lpBuf, int64_t uiBufSize)
{
return m_file.Read(lpBuf, uiBufSize);
}
-__int64 CFileMusicDatabase::Seek(__int64 iFilePosition, int iWhence /*=SEEK_SET*/)
+int64_t CFileMusicDatabase::Seek(int64_t iFilePosition, int iWhence /*=SEEK_SET*/)
{
return m_file.Seek(iFilePosition, iWhence);
}
@@ -146,12 +146,12 @@ void CFileMusicDatabase::Close()
m_file.Close();
}
-__int64 CFileMusicDatabase::GetPosition()
+int64_t CFileMusicDatabase::GetPosition()
{
return m_file.GetPosition();
}
-__int64 CFileMusicDatabase::GetLength()
+int64_t CFileMusicDatabase::GetLength()
{
return m_file.GetLength();
}
diff --git a/xbmc/FileSystem/FileMusicDatabase.h b/xbmc/FileSystem/FileMusicDatabase.h
index 0da865fcc7..56fc2ad5eb 100644
--- a/xbmc/FileSystem/FileMusicDatabase.h
+++ b/xbmc/FileSystem/FileMusicDatabase.h
@@ -33,11 +33,11 @@ public:
virtual bool Exists(const CURL& url);
virtual int Stat(const CURL& url, struct __stat64* buffer);
- virtual unsigned int Read(void* lpBuf, __int64 uiBufSize);
- virtual __int64 Seek(__int64 iFilePosition, int iWhence = SEEK_SET);
+ virtual unsigned int Read(void* lpBuf, int64_t uiBufSize);
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET);
virtual void Close();
- virtual __int64 GetPosition();
- virtual __int64 GetLength();
+ virtual int64_t GetPosition();
+ virtual int64_t GetLength();
protected:
CFile m_file;
diff --git a/xbmc/FileSystem/FileRTV.cpp b/xbmc/FileSystem/FileRTV.cpp
index 71146b9dbb..547a771d59 100644
--- a/xbmc/FileSystem/FileRTV.cpp
+++ b/xbmc/FileSystem/FileRTV.cpp
@@ -112,7 +112,7 @@ bool CFileRTV::Open(const CURL& url)
//*********************************************************************************************
-unsigned int CFileRTV::Read(void *lpBuf, __int64 uiBufSize)
+unsigned int CFileRTV::Read(void *lpBuf, int64_t uiBufSize)
{
size_t lenread;
@@ -154,7 +154,7 @@ void CFileRTV::Close()
}
//*********************************************************************************************
-__int64 CFileRTV::Seek(__int64 iFilePosition, int iWhence)
+int64_t CFileRTV::Seek(int64_t iFilePosition, int iWhence)
{
UINT64 newpos;
@@ -204,14 +204,14 @@ __int64 CFileRTV::Seek(__int64 iFilePosition, int iWhence)
}
//*********************************************************************************************
-__int64 CFileRTV::GetLength()
+int64_t CFileRTV::GetLength()
{
if (!m_bOpened) return 0;
return m_fileSize;
}
//*********************************************************************************************
-__int64 CFileRTV::GetPosition()
+int64_t CFileRTV::GetPosition()
{
if (!m_bOpened) return 0;
return m_filePos;
diff --git a/xbmc/FileSystem/FileRTV.h b/xbmc/FileSystem/FileRTV.h
index 21ba54875a..6cba0caac9 100644
--- a/xbmc/FileSystem/FileRTV.h
+++ b/xbmc/FileSystem/FileRTV.h
@@ -42,14 +42,14 @@ class CFileRTV : public IFile
public:
CFileRTV();
virtual ~CFileRTV();
- virtual __int64 GetPosition();
- virtual __int64 GetLength();
+ virtual int64_t GetPosition();
+ virtual int64_t GetLength();
virtual bool Open(const CURL& url);
bool Open(const char* strHostName, const char* strFileName, int iport);
virtual bool Exists(const CURL& url) { return true;};
virtual int Stat(const CURL& url, struct __stat64* buffer) { errno = ENOENT; return -1; };
- virtual unsigned int Read(void* lpBuf, __int64 uiBufSize);
- virtual __int64 Seek(__int64 iFilePosition, int iWhence = SEEK_SET);
+ virtual unsigned int Read(void* lpBuf, int64_t uiBufSize);
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET);
virtual void Close();
protected:
UINT64 m_fileSize;
diff --git a/xbmc/FileSystem/FileRar.cpp b/xbmc/FileSystem/FileRar.cpp
index c129193b45..508c5e3baa 100644
--- a/xbmc/FileSystem/FileRar.cpp
+++ b/xbmc/FileSystem/FileRar.cpp
@@ -269,7 +269,7 @@ bool CFileRar::OpenForWrite(const CURL& url)
}
//*********************************************************************************************
-unsigned int CFileRar::Read(void *lpBuf, __int64 uiBufSize)
+unsigned int CFileRar::Read(void *lpBuf, int64_t uiBufSize)
{
#ifdef HAS_RAR
if (!m_bOpen)
@@ -289,10 +289,10 @@ unsigned int CFileRar::Read(void *lpBuf, __int64 uiBufSize)
byte* pBuf = (byte*)lpBuf;
- __int64 uicBufSize = uiBufSize;
+ int64_t uicBufSize = uiBufSize;
if (m_iDataInBuffer > 0)
{
- __int64 iCopy = uiBufSize<m_iDataInBuffer?uiBufSize:m_iDataInBuffer;
+ int64_t iCopy = uiBufSize<m_iDataInBuffer?uiBufSize:m_iDataInBuffer;
memcpy(lpBuf,m_szStartOfBuffer,size_t(iCopy));
m_szStartOfBuffer += iCopy;
m_iDataInBuffer -= int(iCopy);
@@ -350,7 +350,7 @@ unsigned int CFileRar::Read(void *lpBuf, __int64 uiBufSize)
}
//*********************************************************************************************
-unsigned int CFileRar::Write(void *lpBuf, __int64 uiBufSize)
+unsigned int CFileRar::Write(void *lpBuf, int64_t uiBufSize)
{
return 0;
}
@@ -382,7 +382,7 @@ void CFileRar::Close()
}
//*********************************************************************************************
-__int64 CFileRar::Seek(__int64 iFilePosition, int iWhence)
+int64_t CFileRar::Seek(int64_t iFilePosition, int iWhence)
{
#ifdef HAS_RAR
if (!m_bOpen)
@@ -492,7 +492,7 @@ __int64 CFileRar::Seek(__int64 iFilePosition, int iWhence)
}
//*********************************************************************************************
-__int64 CFileRar::GetLength()
+int64_t CFileRar::GetLength()
{
if (!m_bOpen)
return 0;
@@ -504,7 +504,7 @@ __int64 CFileRar::GetLength()
}
//*********************************************************************************************
-__int64 CFileRar::GetPosition()
+int64_t CFileRar::GetPosition()
{
if (!m_bOpen)
return -1;
@@ -515,7 +515,7 @@ __int64 CFileRar::GetPosition()
return m_iFilePosition;
}
-int CFileRar::Write(const void* lpBuf, __int64 uiBufSize)
+int CFileRar::Write(const void* lpBuf, int64_t uiBufSize)
{
return -1;
}
diff --git a/xbmc/FileSystem/FileRar.h b/xbmc/FileSystem/FileRar.h
index a25605ee54..b8a3490772 100644
--- a/xbmc/FileSystem/FileRar.h
+++ b/xbmc/FileSystem/FileRar.h
@@ -67,19 +67,19 @@ namespace XFILE
CFileRar();
CFileRar(bool bSeekable); // used for caching files
virtual ~CFileRar();
- virtual __int64 GetPosition();
- virtual __int64 GetLength();
+ virtual int64_t GetPosition();
+ virtual int64_t GetLength();
virtual bool Open(const CURL& url);
virtual bool Exists(const CURL& url);
virtual int Stat(const CURL& url, struct __stat64* buffer);
- virtual unsigned int Read(void* lpBuf, __int64 uiBufSize);
- virtual int Write(const void* lpBuf, __int64 uiBufSize);
- virtual __int64 Seek(__int64 iFilePosition, int iWhence=SEEK_SET);
+ virtual unsigned int Read(void* lpBuf, int64_t uiBufSize);
+ virtual int Write(const void* lpBuf, int64_t uiBufSize);
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence=SEEK_SET);
virtual void Close();
virtual void Flush();
virtual bool OpenForWrite(const CURL& url);
- unsigned int Write(void *lpBuf, __int64 uiBufSize);
+ unsigned int Write(void *lpBuf, int64_t uiBufSize);
protected:
CStdString m_strCacheDir;
@@ -94,8 +94,8 @@ namespace XFILE
bool OpenInArchive();
void CleanUp();
- __int64 m_iFilePosition;
- __int64 m_iFileSize;
+ int64_t m_iFilePosition;
+ int64_t m_iFileSize;
// rar stuff
bool m_bUseFile;
bool m_bOpen;
@@ -110,8 +110,8 @@ namespace XFILE
int m_iSize; // header size
byte* m_szBuffer;
byte* m_szStartOfBuffer;
- __int64 m_iDataInBuffer;
- __int64 m_iBufferStart;
+ int64_t m_iDataInBuffer;
+ int64_t m_iBufferStart;
};
}
diff --git a/xbmc/FileSystem/FileShoutcast.cpp b/xbmc/FileSystem/FileShoutcast.cpp
index ae89698be3..a1c8222957 100644
--- a/xbmc/FileSystem/FileShoutcast.cpp
+++ b/xbmc/FileSystem/FileShoutcast.cpp
@@ -194,12 +194,12 @@ void CFileShoutcast::StopRecording()
}
-__int64 CFileShoutcast::GetPosition()
+int64_t CFileShoutcast::GetPosition()
{
return 0;
}
-__int64 CFileShoutcast::GetLength()
+int64_t CFileShoutcast::GetLength()
{
return 0;
}
@@ -364,7 +364,7 @@ bool CFileShoutcast::Open(const CURL& url)
return true;
}
-unsigned int CFileShoutcast::Read(void* lpBuf, __int64 uiBufSize)
+unsigned int CFileShoutcast::Read(void* lpBuf, int64_t uiBufSize)
{
if (m_fileState.bRipDone)
{
@@ -394,7 +394,7 @@ void CFileShoutcast::outputTimeoutMessage(const char* message)
Sleep(1500);
}
-__int64 CFileShoutcast::Seek(__int64 iFilePosition, int iWhence)
+int64_t CFileShoutcast::Seek(int64_t iFilePosition, int iWhence)
{
return -1;
}
diff --git a/xbmc/FileSystem/FileShoutcast.h b/xbmc/FileSystem/FileShoutcast.h
index 98f0033b3d..836e472d41 100644
--- a/xbmc/FileSystem/FileShoutcast.h
+++ b/xbmc/FileSystem/FileShoutcast.h
@@ -55,13 +55,13 @@ class CFileShoutcast : public IFile
public:
CFileShoutcast();
virtual ~CFileShoutcast();
- virtual __int64 GetPosition();
- virtual __int64 GetLength();
+ virtual int64_t GetPosition();
+ virtual int64_t GetLength();
virtual bool Open(const CURL& url);
virtual bool Exists(const CURL& url) { return true;};
virtual int Stat(const CURL& url, struct __stat64* buffer) { errno = ENOENT; return -1; };
- virtual unsigned int Read(void* lpBuf, __int64 uiBufSize);
- virtual __int64 Seek(__int64 iFilePosition, int iWhence = SEEK_SET);
+ virtual unsigned int Read(void* lpBuf, int64_t uiBufSize);
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET);
virtual void Close();
virtual bool CanRecord();
virtual bool Record();
diff --git a/xbmc/FileSystem/FileSmb.cpp b/xbmc/FileSystem/FileSmb.cpp
index a17a8e5493..8f15965700 100644
--- a/xbmc/FileSystem/FileSmb.cpp
+++ b/xbmc/FileSystem/FileSmb.cpp
@@ -354,18 +354,18 @@ CFileSMB::~CFileSMB()
#endif
}
-__int64 CFileSMB::GetPosition()
+int64_t CFileSMB::GetPosition()
{
if (m_fd == -1) return 0;
smb.Init();
CSingleLock lock(smb);
- __int64 pos = smbc_lseek(m_fd, 0, SEEK_CUR);
+ int64_t pos = smbc_lseek(m_fd, 0, SEEK_CUR);
if ( pos < 0 )
return 0;
return pos;
}
-__int64 CFileSMB::GetLength()
+int64_t CFileSMB::GetLength()
{
if (m_fd == -1) return 0;
return m_fileSize;
@@ -419,7 +419,7 @@ bool CFileSMB::Open(const CURL& url)
m_fileSize = tmpBuffer.st_size;
- __int64 ret = smbc_lseek(m_fd, 0, SEEK_SET);
+ int64_t ret = smbc_lseek(m_fd, 0, SEEK_SET);
if ( ret < 0 )
{
smbc_close(m_fd);
@@ -589,7 +589,7 @@ int CFileSMB::Stat(const CURL& url, struct __stat64* buffer)
return iResult;
}
-unsigned int CFileSMB::Read(void *lpBuf, __int64 uiBufSize)
+unsigned int CFileSMB::Read(void *lpBuf, int64_t uiBufSize)
{
if (m_fd == -1) return 0;
CSingleLock lock(smb); // Init not called since it has to be "inited" by now
@@ -621,7 +621,7 @@ unsigned int CFileSMB::Read(void *lpBuf, __int64 uiBufSize)
return (unsigned int)bytesRead;
}
-__int64 CFileSMB::Seek(__int64 iFilePosition, int iWhence)
+int64_t CFileSMB::Seek(int64_t iFilePosition, int iWhence)
{
if (m_fd == -1) return -1;
if(iWhence == SEEK_POSSIBLE)
@@ -643,7 +643,7 @@ __int64 CFileSMB::Seek(__int64 iFilePosition, int iWhence)
return -1;
}
- return (__int64)pos;
+ return (int64_t)pos;
}
void CFileSMB::Close()
@@ -657,7 +657,7 @@ void CFileSMB::Close()
m_fd = -1;
}
-int CFileSMB::Write(const void* lpBuf, __int64 uiBufSize)
+int CFileSMB::Write(const void* lpBuf, int64_t uiBufSize)
{
if (m_fd == -1) return -1;
DWORD dwNumberOfBytesWritten = 0;
diff --git a/xbmc/FileSystem/FileSmb.h b/xbmc/FileSystem/FileSmb.h
index ea47b25ed7..beae9851cf 100644
--- a/xbmc/FileSystem/FileSmb.h
+++ b/xbmc/FileSystem/FileSmb.h
@@ -93,15 +93,15 @@ public:
int OpenFile(const CURL &url, CStdString& strAuth);
virtual ~CFileSMB();
virtual void Close();
- virtual __int64 Seek(__int64 iFilePosition, int iWhence = SEEK_SET);
- virtual unsigned int Read(void* lpBuf, __int64 uiBufSize);
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET);
+ virtual unsigned int Read(void* lpBuf, int64_t uiBufSize);
virtual bool Open(const CURL& url);
virtual bool Exists(const CURL& url);
virtual int Stat(const CURL& url, struct __stat64* buffer);
virtual int Stat(struct __stat64* buffer);
- virtual __int64 GetLength();
- virtual __int64 GetPosition();
- virtual int Write(const void* lpBuf, __int64 uiBufSize);
+ virtual int64_t GetLength();
+ virtual int64_t GetPosition();
+ virtual int Write(const void* lpBuf, int64_t uiBufSize);
virtual bool OpenForWrite(const CURL& url, bool bOverWrite = false);
virtual bool Delete(const CURL& url);
@@ -110,7 +110,7 @@ public:
protected:
CURL m_url;
bool IsValidFile(const CStdString& strFileName);
- __int64 m_fileSize;
+ int64_t m_fileSize;
int m_fd;
};
}
diff --git a/xbmc/FileSystem/FileSpecialProtocol.cpp b/xbmc/FileSystem/FileSpecialProtocol.cpp
index 28e6cf1ea2..bad584163e 100644
--- a/xbmc/FileSystem/FileSpecialProtocol.cpp
+++ b/xbmc/FileSystem/FileSpecialProtocol.cpp
@@ -97,17 +97,17 @@ int CFileSpecialProtocol::Stat(struct __stat64* buffer)
return m_file.Stat(buffer);
}
-unsigned int CFileSpecialProtocol::Read(void* lpBuf, __int64 uiBufSize)
+unsigned int CFileSpecialProtocol::Read(void* lpBuf, int64_t uiBufSize)
{
return m_file.Read(lpBuf, uiBufSize);
}
-int CFileSpecialProtocol::Write(const void* lpBuf, __int64 uiBufSize)
+int CFileSpecialProtocol::Write(const void* lpBuf, int64_t uiBufSize)
{
return m_file.Write(lpBuf,uiBufSize);
}
-__int64 CFileSpecialProtocol::Seek(__int64 iFilePosition, int iWhence /*=SEEK_SET*/)
+int64_t CFileSpecialProtocol::Seek(int64_t iFilePosition, int iWhence /*=SEEK_SET*/)
{
return m_file.Seek(iFilePosition, iWhence);
}
@@ -117,12 +117,12 @@ void CFileSpecialProtocol::Close()
m_file.Close();
}
-__int64 CFileSpecialProtocol::GetPosition()
+int64_t CFileSpecialProtocol::GetPosition()
{
return m_file.GetPosition();
}
-__int64 CFileSpecialProtocol::GetLength()
+int64_t CFileSpecialProtocol::GetLength()
{
return m_file.GetLength();
}
diff --git a/xbmc/FileSystem/FileSpecialProtocol.h b/xbmc/FileSystem/FileSpecialProtocol.h
index 7dcf8f3e58..cec91a06f1 100644
--- a/xbmc/FileSystem/FileSpecialProtocol.h
+++ b/xbmc/FileSystem/FileSpecialProtocol.h
@@ -37,12 +37,12 @@ public:
virtual bool Delete(const CURL& url);
virtual bool Rename(const CURL& url, const CURL& urlnew);
- virtual unsigned int Read(void* lpBuf, __int64 uiBufSize);
- virtual int Write(const void* lpBuf, __int64 uiBufSize);
- virtual __int64 Seek(__int64 iFilePosition, int iWhence = SEEK_SET);
+ virtual unsigned int Read(void* lpBuf, int64_t uiBufSize);
+ virtual int Write(const void* lpBuf, int64_t uiBufSize);
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET);
virtual void Close();
- virtual __int64 GetPosition();
- virtual __int64 GetLength();
+ virtual int64_t GetPosition();
+ virtual int64_t GetLength();
protected:
CFile m_file;
diff --git a/xbmc/FileSystem/FileTuxBox.cpp b/xbmc/FileSystem/FileTuxBox.cpp
index 2084dc0cc2..e63b14b886 100644
--- a/xbmc/FileSystem/FileTuxBox.cpp
+++ b/xbmc/FileSystem/FileTuxBox.cpp
@@ -32,12 +32,12 @@ CFileTuxBox::~CFileTuxBox()
{
}
-__int64 CFileTuxBox::GetPosition()
+int64_t CFileTuxBox::GetPosition()
{
return 0;
}
-__int64 CFileTuxBox::GetLength()
+int64_t CFileTuxBox::GetLength()
{
return 0;
}
@@ -47,12 +47,12 @@ bool CFileTuxBox::Open(const CURL& url)
return true;
}
-unsigned int CFileTuxBox::Read(void* lpBuf, __int64 uiBufSize)
+unsigned int CFileTuxBox::Read(void* lpBuf, int64_t uiBufSize)
{
return 0;
}
-__int64 CFileTuxBox::Seek(__int64 iFilePosition, int iWhence)
+int64_t CFileTuxBox::Seek(int64_t iFilePosition, int iWhence)
{
return 0;
}
diff --git a/xbmc/FileSystem/FileTuxBox.h b/xbmc/FileSystem/FileTuxBox.h
index 2e322ba40f..c0593180a7 100644
--- a/xbmc/FileSystem/FileTuxBox.h
+++ b/xbmc/FileSystem/FileTuxBox.h
@@ -29,14 +29,14 @@ namespace XFILE
public:
CFileTuxBox();
virtual ~CFileTuxBox();
- virtual __int64 GetPosition();
- virtual __int64 GetLength();
+ virtual int64_t GetPosition();
+ virtual int64_t GetLength();
virtual bool Open(const CURL& url);
virtual void Close();
virtual bool Exists(const CURL& url) { return true;};
virtual int Stat(const CURL& url, struct __stat64* buffer) { errno = ENOENT; return -1; };
- virtual unsigned int Read(void* lpBuf, __int64 uiBufSize);
- virtual __int64 Seek(__int64 iFilePosition, int iWhence = SEEK_SET);
+ virtual unsigned int Read(void* lpBuf, int64_t uiBufSize);
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET);
protected:
};
}
diff --git a/xbmc/FileSystem/FileXBMSP.cpp b/xbmc/FileSystem/FileXBMSP.cpp
index 569b67e508..da6d326dc9 100644
--- a/xbmc/FileSystem/FileXBMSP.cpp
+++ b/xbmc/FileSystem/FileXBMSP.cpp
@@ -256,7 +256,7 @@ int CFileXBMSP::Stat(const CURL& url, struct __stat64* buffer)
}
//*********************************************************************************************
-unsigned int CFileXBMSP::Read(void *lpBuf, __int64 uiBufSize)
+unsigned int CFileXBMSP::Read(void *lpBuf, int64_t uiBufSize)
{
unsigned char *buf = NULL;
size_t buflen = 0;
@@ -299,7 +299,7 @@ void CFileXBMSP::Close()
}
//*********************************************************************************************
-__int64 CFileXBMSP::Seek(__int64 iFilePosition, int iWhence)
+int64_t CFileXBMSP::Seek(int64_t iFilePosition, int iWhence)
{
UINT64 newpos;
@@ -385,14 +385,14 @@ __int64 CFileXBMSP::Seek(__int64 iFilePosition, int iWhence)
}
//*********************************************************************************************
-__int64 CFileXBMSP::GetLength()
+int64_t CFileXBMSP::GetLength()
{
if (!m_bOpened) return 0;
return m_fileSize;
}
//*********************************************************************************************
-__int64 CFileXBMSP::GetPosition()
+int64_t CFileXBMSP::GetPosition()
{
if (!m_bOpened) return 0;
return m_filePos;
diff --git a/xbmc/FileSystem/FileXBMSP.h b/xbmc/FileSystem/FileXBMSP.h
index 7260630242..665c566660 100644
--- a/xbmc/FileSystem/FileXBMSP.h
+++ b/xbmc/FileSystem/FileXBMSP.h
@@ -44,13 +44,13 @@ class CFileXBMSP : public IFile
public:
CFileXBMSP();
virtual ~CFileXBMSP();
- virtual __int64 GetPosition();
- virtual __int64 GetLength();
+ virtual int64_t GetPosition();
+ virtual int64_t GetLength();
virtual bool Open(const CURL& url);
virtual bool Exists(const CURL& url);
virtual int Stat(const CURL& url, struct __stat64* buffer);
- virtual unsigned int Read(void* lpBuf, __int64 uiBufSize);
- virtual __int64 Seek(__int64 iFilePosition, int iWhence = SEEK_SET);
+ virtual unsigned int Read(void* lpBuf, int64_t uiBufSize);
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET);
virtual void Close();
protected:
UINT64 m_fileSize;
diff --git a/xbmc/FileSystem/FileZip.cpp b/xbmc/FileSystem/FileZip.cpp
index 2906e831c0..c1fb71342c 100644
--- a/xbmc/FileSystem/FileZip.cpp
+++ b/xbmc/FileSystem/FileZip.cpp
@@ -116,12 +116,12 @@ bool CFileZip::InitDecompress()
return true;
}
-__int64 CFileZip::GetLength()
+int64_t CFileZip::GetLength()
{
return mZipItem.usize;
}
-__int64 CFileZip::GetPosition()
+int64_t CFileZip::GetPosition()
{
if (m_bCached)
return mFile.GetPosition();
@@ -129,13 +129,13 @@ __int64 CFileZip::GetPosition()
return m_iFilePos;
}
-__int64 CFileZip::Seek(__int64 iFilePosition, int iWhence)
+int64_t CFileZip::Seek(int64_t iFilePosition, int iWhence)
{
if (m_bCached)
return mFile.Seek(iFilePosition,iWhence);
if (mZipItem.method == 0) // this is easy
{
- __int64 iResult;
+ int64_t iResult;
switch (iWhence)
{
case SEEK_SET:
@@ -283,7 +283,7 @@ int CFileZip::Stat(const CURL& url, struct __stat64* buffer)
return 0;
}
-unsigned int CFileZip::Read(void* lpBuf, __int64 uiBufSize)
+unsigned int CFileZip::Read(void* lpBuf, int64_t uiBufSize)
{
if (m_bCached)
return mFile.Read(lpBuf,uiBufSize);
diff --git a/xbmc/FileSystem/FileZip.h b/xbmc/FileSystem/FileZip.h
index 457bddbd26..85fa100eee 100644
--- a/xbmc/FileSystem/FileZip.h
+++ b/xbmc/FileSystem/FileZip.h
@@ -37,15 +37,15 @@ namespace XFILE
CFileZip();
virtual ~CFileZip();
- virtual __int64 GetPosition();
- virtual __int64 GetLength();
+ virtual int64_t GetPosition();
+ virtual int64_t GetLength();
virtual bool Open(const CURL& url);
virtual bool Exists(const CURL& url);
virtual int Stat(struct __stat64* buffer);
virtual int Stat(const CURL& url, struct __stat64* buffer);
- virtual unsigned int Read(void* lpBuf, __int64 uiBufSize);
+ virtual unsigned int Read(void* lpBuf, int64_t uiBufSize);
//virtual bool ReadString(char *szLine, int iLineLength);
- virtual __int64 Seek(__int64 iFilePosition, int iWhence = SEEK_SET);
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET);
virtual void Close();
int UnpackFromMemory(std::string& strDest, const std::string& strInput, bool isGZ=false);
@@ -55,8 +55,8 @@ namespace XFILE
void DestroyBuffer(void* lpBuffer, int iBufSize);
CFile mFile;
SZipEntry mZipItem;
- __int64 m_iFilePos; // position in _uncompressed_ data read
- __int64 m_iZipFilePos; // position in _compressed_ data
+ int64_t m_iFilePos; // position in _uncompressed_ data read
+ int64_t m_iZipFilePos; // position in _compressed_ data
int m_iAvailBuffer;
z_stream m_ZStream;
char m_szBuffer[65535]; // 64k buffer for compressed data
diff --git a/xbmc/FileSystem/HDHomeRun.cpp b/xbmc/FileSystem/HDHomeRun.cpp
index 407ecbf81d..5ffcdfe838 100644
--- a/xbmc/FileSystem/HDHomeRun.cpp
+++ b/xbmc/FileSystem/HDHomeRun.cpp
@@ -175,7 +175,7 @@ bool CFileHomeRun::Exists(const CURL& url)
return(status);
}
-__int64 CFileHomeRun::Seek(__int64 iFilePosition, int iWhence)
+int64_t CFileHomeRun::Seek(int64_t iFilePosition, int iWhence)
{
return -1;
}
@@ -185,12 +185,12 @@ int CFileHomeRun::Stat(const CURL& url, struct __stat64* buffer)
return 0;
}
-__int64 CFileHomeRun::GetPosition()
+int64_t CFileHomeRun::GetPosition()
{
return 0;
}
-__int64 CFileHomeRun::GetLength()
+int64_t CFileHomeRun::GetLength()
{
return 0;
}
@@ -222,7 +222,7 @@ bool CFileHomeRun::Open(const CURL &url)
return true;
}
-unsigned int CFileHomeRun::Read(void* lpBuf, __int64 uiBufSize)
+unsigned int CFileHomeRun::Read(void* lpBuf, int64_t uiBufSize)
{
unsigned int datasize;
// for now, let it it time out after 5 seconds,
diff --git a/xbmc/FileSystem/HDHomeRun.h b/xbmc/FileSystem/HDHomeRun.h
index 2d2f8bac05..d6d5c2516e 100644
--- a/xbmc/FileSystem/HDHomeRun.h
+++ b/xbmc/FileSystem/HDHomeRun.h
@@ -94,14 +94,14 @@ namespace XFILE
~CFileHomeRun();
virtual bool Exists(const CURL& url);
- virtual __int64 Seek(__int64 iFilePosition, int iWhence);
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence);
virtual int Stat(const CURL& url, struct __stat64* buffer);
- virtual __int64 GetPosition();
- virtual __int64 GetLength();
+ virtual int64_t GetPosition();
+ virtual int64_t GetLength();
virtual bool Open(const CURL& url);
virtual void Close();
- virtual unsigned int Read(void* lpBuf, __int64 uiBufSize);
+ virtual unsigned int Read(void* lpBuf, int64_t uiBufSize);
private:
struct hdhomerun_device_t* m_device;
DllHdHomeRun m_dll;
diff --git a/xbmc/FileSystem/HTTPDirectory.cpp b/xbmc/FileSystem/HTTPDirectory.cpp
index 655c154529..6a0adf8bb3 100644
--- a/xbmc/FileSystem/HTTPDirectory.cpp
+++ b/xbmc/FileSystem/HTTPDirectory.cpp
@@ -110,7 +110,7 @@ bool CHTTPDirectory::GetDirectory(const CStdString& strPath, CFileItemList &item
else if (strUnit == "G")
Size = Size * 1000 * 1024;
- pItem->m_dwSize = (__int64)(Size * 1024);
+ pItem->m_dwSize = (int64_t)(Size * 1024);
}
}
diff --git a/xbmc/FileSystem/IFile.h b/xbmc/FileSystem/IFile.h
index 3dfa2ed204..5078f435c2 100644
--- a/xbmc/FileSystem/IFile.h
+++ b/xbmc/FileSystem/IFile.h
@@ -28,11 +28,11 @@
#pragma once
#endif // _MSC_VER > 1000
-#include "system.h" // for __int64
#include "URL.h"
#include <stdio.h>
#include <errno.h>
+#include <stdint.h>
#define SEEK_POSSIBLE 0x10 // flag used to check if protocol allows seeks
@@ -57,13 +57,13 @@ public:
errno = ENOENT;
return -1;
}
- virtual unsigned int Read(void* lpBuf, __int64 uiBufSize) = 0;
- virtual int Write(const void* lpBuf, __int64 uiBufSize) { return -1;};
+ virtual unsigned int Read(void* lpBuf, int64_t uiBufSize) = 0;
+ virtual int Write(const void* lpBuf, int64_t uiBufSize) { return -1;};
virtual bool ReadString(char *szLine, int iLineLength)
{
if(Seek(0, SEEK_CUR) < 0) return false;
- __int64 iFilePos = GetPosition();
+ int64_t iFilePos = GetPosition();
int iBytesRead = Read( (unsigned char*)szLine, iLineLength - 1);
if (iBytesRead <= 0)
return false;
@@ -105,10 +105,10 @@ public:
}
return true;
}
- virtual __int64 Seek(__int64 iFilePosition, int iWhence = SEEK_SET) = 0;
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET) = 0;
virtual void Close() = 0;
- virtual __int64 GetPosition() = 0;
- virtual __int64 GetLength() = 0;
+ virtual int64_t GetPosition() = 0;
+ virtual int64_t GetLength() = 0;
virtual void Flush() { }
virtual int GetChunkSize() {return 0;}
virtual bool SkipNext(){return false;}
diff --git a/xbmc/FileSystem/MultiPathFile.cpp b/xbmc/FileSystem/MultiPathFile.cpp
index e4fecaf527..b05f6969bb 100644
--- a/xbmc/FileSystem/MultiPathFile.cpp
+++ b/xbmc/FileSystem/MultiPathFile.cpp
@@ -98,12 +98,12 @@ int CMultiPathFile::Stat(const CURL& url, struct __stat64* buffer)
return -1;
}
-unsigned int CMultiPathFile::Read(void* lpBuf, __int64 uiBufSize)
+unsigned int CMultiPathFile::Read(void* lpBuf, int64_t uiBufSize)
{
return m_file.Read(lpBuf, uiBufSize);
}
-__int64 CMultiPathFile::Seek(__int64 iFilePosition, int iWhence /*=SEEK_SET*/)
+int64_t CMultiPathFile::Seek(int64_t iFilePosition, int iWhence /*=SEEK_SET*/)
{
return m_file.Seek(iFilePosition, iWhence);
}
@@ -113,12 +113,12 @@ void CMultiPathFile::Close()
m_file.Close();
}
-__int64 CMultiPathFile::GetPosition()
+int64_t CMultiPathFile::GetPosition()
{
return m_file.GetPosition();
}
-__int64 CMultiPathFile::GetLength()
+int64_t CMultiPathFile::GetLength()
{
return m_file.GetLength();
}
diff --git a/xbmc/FileSystem/MultiPathFile.h b/xbmc/FileSystem/MultiPathFile.h
index a2b59c6883..6f4b88a064 100644
--- a/xbmc/FileSystem/MultiPathFile.h
+++ b/xbmc/FileSystem/MultiPathFile.h
@@ -33,11 +33,11 @@ namespace XFILE
virtual bool Exists(const CURL& url);
virtual int Stat(const CURL& url, struct __stat64* buffer);
- virtual unsigned int Read(void* lpBuf, __int64 uiBufSize);
- virtual __int64 Seek(__int64 iFilePosition, int iWhence = SEEK_SET);
+ virtual unsigned int Read(void* lpBuf, int64_t uiBufSize);
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET);
virtual void Close();
- virtual __int64 GetPosition();
- virtual __int64 GetLength();
+ virtual int64_t GetPosition();
+ virtual int64_t GetLength();
protected:
CFile m_file;
diff --git a/xbmc/FileSystem/NptXbmcFile.cpp b/xbmc/FileSystem/NptXbmcFile.cpp
index 908afbfcb8..695de8af59 100644
--- a/xbmc/FileSystem/NptXbmcFile.cpp
+++ b/xbmc/FileSystem/NptXbmcFile.cpp
@@ -67,7 +67,7 @@ protected:
NPT_Result
NPT_XbmcFileStream::Seek(NPT_Position offset)
{
- __int64 result;
+ int64_t result;
result = m_FileReference->Seek(offset, SEEK_SET) ;
if (result >= 0) {
@@ -83,7 +83,7 @@ NPT_XbmcFileStream::Seek(NPT_Position offset)
NPT_Result
NPT_XbmcFileStream::Tell(NPT_Position& offset)
{
- __int64 result = m_FileReference->GetPosition();
+ int64_t result = m_FileReference->GetPosition();
if (result >= 0) {
offset = (NPT_Position)result;
return NPT_SUCCESS;
@@ -173,7 +173,7 @@ NPT_XbmcFileInputStream::GetSize(NPT_LargeSize& size)
NPT_Result
NPT_XbmcFileInputStream::GetAvailable(NPT_LargeSize& available)
{
- __int64 offset = m_FileReference->GetPosition();
+ int64_t offset = m_FileReference->GetPosition();
NPT_LargeSize size = 0;
if (NPT_SUCCEEDED(GetSize(size)) && offset >= 0 && (NPT_LargeSize)offset <= size) {
diff --git a/xbmc/FileSystem/RarManager.cpp b/xbmc/FileSystem/RarManager.cpp
index 5c8924f8c1..bd29489f35 100644
--- a/xbmc/FileSystem/RarManager.cpp
+++ b/xbmc/FileSystem/RarManager.cpp
@@ -68,7 +68,7 @@ CRarManager::~CRarManager()
ClearCache(true);
}
-bool CRarManager::CacheRarredFile(CStdString& strPathInCache, const CStdString& strRarPath, const CStdString& strPathInRar, BYTE bOptions, const CStdString& strDir, const __int64 iSize)
+bool CRarManager::CacheRarredFile(CStdString& strPathInCache, const CStdString& strRarPath, const CStdString& strPathInRar, BYTE bOptions, const CStdString& strDir, const int64_t iSize)
{
#ifdef HAS_RAR
CSingleLock lock(m_CritSection);
@@ -151,7 +151,7 @@ bool CRarManager::CacheRarredFile(CStdString& strPathInCache, const CStdString&
#endif
//g_charsetConverter.unknownToUTF8(strPath);
- __int64 iOffset = -1;
+ int64_t iOffset = -1;
if (iRes != 2)
{
if (pFile)
@@ -451,7 +451,7 @@ void CRarManager::ExtractArchive(const CStdString& strArchive, const CStdString&
#endif
}
-__int64 CRarManager::CheckFreeSpace(const CStdString& strDrive)
+int64_t CRarManager::CheckFreeSpace(const CStdString& strDrive)
{
ULARGE_INTEGER lTotalFreeBytes;
if (GetDiskFreeSpaceEx(_P(strDrive.c_str()), NULL, NULL, &lTotalFreeBytes))
diff --git a/xbmc/FileSystem/RarManager.h b/xbmc/FileSystem/RarManager.h
index a018fdfefb..05b753f684 100644
--- a/xbmc/FileSystem/RarManager.h
+++ b/xbmc/FileSystem/RarManager.h
@@ -49,7 +49,7 @@ public:
CStdString m_strPathInRar;
bool m_bAutoDel;
int m_iUsed;
- __int64 m_iOffset;
+ int64_t m_iOffset;
bool m_bIsCanceled()
{
@@ -71,7 +71,7 @@ public:
~CRarManager();
bool CacheRarredFile(CStdString& strPathInCache, const CStdString& strRarPath,
const CStdString& strPathInRar, BYTE bOptions = EXFILE_AUTODELETE,
- const CStdString& strDir =RAR_DEFAULT_CACHE, const __int64 iSize=-1);
+ const CStdString& strDir =RAR_DEFAULT_CACHE, const int64_t iSize=-1);
bool GetPathInCache(CStdString& strPathInCache, const CStdString& strRarPath,
const CStdString& strPathInRar = "");
bool GetFilesInRar(CFileItemList& vecpItems, const CStdString& strRarPath,
@@ -88,7 +88,7 @@ protected:
std::map<CStdString, std::pair<ArchiveList_struct*,std::vector<CFileInfo> > > m_ExFiles;
CCriticalSection m_CritSection;
- __int64 CheckFreeSpace(const CStdString& strDrive);
+ int64_t CheckFreeSpace(const CStdString& strDrive);
bool m_bWipe;
};
diff --git a/xbmc/FileSystem/SAPFile.cpp b/xbmc/FileSystem/SAPFile.cpp
index 00107bbd02..112de5c0b5 100644
--- a/xbmc/FileSystem/SAPFile.cpp
+++ b/xbmc/FileSystem/SAPFile.cpp
@@ -111,7 +111,7 @@ int CSAPFile::Stat(const CURL& url, struct __stat64* buffer)
}
-unsigned int CSAPFile::Read(void *lpBuf, __int64 uiBufSize)
+unsigned int CSAPFile::Read(void *lpBuf, int64_t uiBufSize)
{
return m_stream.readsome((char*)lpBuf, (streamsize)uiBufSize);
}
@@ -121,7 +121,7 @@ void CSAPFile::Close()
}
//*********************************************************************************************
-__int64 CSAPFile::Seek(__int64 iFilePosition, int iWhence)
+int64_t CSAPFile::Seek(int64_t iFilePosition, int iWhence)
{
switch (iWhence)
{
@@ -143,13 +143,13 @@ __int64 CSAPFile::Seek(__int64 iFilePosition, int iWhence)
}
//*********************************************************************************************
-__int64 CSAPFile::GetLength()
+int64_t CSAPFile::GetLength()
{
return m_len;
}
//*********************************************************************************************
-__int64 CSAPFile::GetPosition()
+int64_t CSAPFile::GetPosition()
{
return m_stream.tellg();
}
diff --git a/xbmc/FileSystem/SAPFile.h b/xbmc/FileSystem/SAPFile.h
index e9dd00eab9..abb07cf6b7 100644
--- a/xbmc/FileSystem/SAPFile.h
+++ b/xbmc/FileSystem/SAPFile.h
@@ -33,13 +33,13 @@ class CSAPFile : public IFile
public:
CSAPFile();
virtual ~CSAPFile();
- virtual __int64 GetPosition();
- virtual __int64 GetLength();
+ virtual int64_t GetPosition();
+ virtual int64_t GetLength();
virtual bool Open(const CURL& url);
virtual bool Exists(const CURL& url);
virtual int Stat(const CURL& url, struct __stat64* buffer);
- virtual unsigned int Read(void* lpBuf, __int64 uiBufSize);
- virtual __int64 Seek(__int64 iFilePosition, int iWhence = SEEK_SET);
+ virtual unsigned int Read(void* lpBuf, int64_t uiBufSize);
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET);
virtual void Close();
virtual bool Delete(const CURL& url);
diff --git a/xbmc/FileSystem/SMBDirectory.cpp b/xbmc/FileSystem/SMBDirectory.cpp
index f2c196eaa1..6b604a7fa0 100644
--- a/xbmc/FileSystem/SMBDirectory.cpp
+++ b/xbmc/FileSystem/SMBDirectory.cpp
@@ -133,9 +133,9 @@ bool CSMBDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items
if (!strFile.Equals(".") && !strFile.Equals("..")
&& aDir.type != SMBC_PRINTER_SHARE && aDir.type != SMBC_IPC_SHARE)
{
- __int64 iSize = 0;
+ int64_t iSize = 0;
bool bIsDir = true;
- __int64 lTimeDate = 0;
+ int64_t lTimeDate = 0;
bool hidden = false;
if(strFile.Right(1).Equals("$") && aDir.type == SMBC_FILE_SHARE )
diff --git a/xbmc/FileSystem/VTPFile.cpp b/xbmc/FileSystem/VTPFile.cpp
index dc20fabd77..0c2d0e712a 100644
--- a/xbmc/FileSystem/VTPFile.cpp
+++ b/xbmc/FileSystem/VTPFile.cpp
@@ -73,7 +73,7 @@ bool CVTPFile::Open(const CURL& url2)
return true;
}
-unsigned int CVTPFile::Read(void* buffer, __int64 size)
+unsigned int CVTPFile::Read(void* buffer, int64_t size)
{
if(m_socket == INVALID_SOCKET)
return 0;
@@ -116,7 +116,7 @@ unsigned int CVTPFile::Read(void* buffer, __int64 size)
return res;
}
-__int64 CVTPFile::Seek(__int64 pos, int whence)
+int64_t CVTPFile::Seek(int64_t pos, int whence)
{
CLog::Log(LOGDEBUG, "CVTPFile::Seek - seek to pos %"PRId64", whence %d", pos, whence);
diff --git a/xbmc/FileSystem/VTPFile.h b/xbmc/FileSystem/VTPFile.h
index 892da83392..42401ac15b 100644
--- a/xbmc/FileSystem/VTPFile.h
+++ b/xbmc/FileSystem/VTPFile.h
@@ -37,12 +37,12 @@ public:
CVTPFile();
virtual ~CVTPFile();
virtual bool Open(const CURL& url);
- virtual __int64 Seek(__int64 pos, int whence=SEEK_SET);
- virtual __int64 GetPosition() { return -1; }
- virtual __int64 GetLength() { return -1; }
+ virtual int64_t Seek(int64_t pos, int whence=SEEK_SET);
+ virtual int64_t GetPosition() { return -1; }
+ virtual int64_t GetLength() { return -1; }
virtual int Stat(const CURL& url, struct __stat64* buffer) { return -1; }
virtual void Close();
- virtual unsigned int Read(void* buffer, __int64 size);
+ virtual unsigned int Read(void* buffer, int64_t size);
virtual CStdString GetContent() { return ""; }
virtual bool SkipNext() { return m_socket ? true : false; }
diff --git a/xbmc/FileSystem/XBMSDirectory.cpp b/xbmc/FileSystem/XBMSDirectory.cpp
index 555ba00b4b..b8963dbfcb 100644
--- a/xbmc/FileSystem/XBMSDirectory.cpp
+++ b/xbmc/FileSystem/XBMSDirectory.cpp
@@ -204,7 +204,7 @@ bool CXBMSDirectory::GetDirectory(const CStdString& strPathUtf8, CFileItemList &
pstrModificationStart += strlen("<MODIFICATION>");
strncpy(szModification, pstrModificationStart, pstrModificationEnd - pstrModificationStart);
szModification[pstrModificationEnd - pstrModificationStart] = 0;
- __int64 lTimeDate = _atoi64(szModification);
+ int64_t lTimeDate = _atoi64(szModification);
FILETIME fileTime, localTime;
LONGLONG ll = Int32x32To64(lTimeDate, 10000000) + 116444736000000000LL;
diff --git a/xbmc/FileSystem/ZipManager.cpp b/xbmc/FileSystem/ZipManager.cpp
index f55d9e9194..1ef37987c6 100644
--- a/xbmc/FileSystem/ZipManager.cpp
+++ b/xbmc/FileSystem/ZipManager.cpp
@@ -59,7 +59,7 @@ bool CZipManager::GetZipList(const CStdString& strPath, vector<SZipEntry>& items
map<CStdString,vector<SZipEntry> >::iterator it = mZipMap.find(strFile);
if (it != mZipMap.end()) // already listed, just return it if not changed, else release and reread
{
- map<CStdString,__int64>::iterator it2=mZipDate.find(strFile);
+ map<CStdString,int64_t>::iterator it2=mZipDate.find(strFile);
if (CFile::Stat(strFile,&m_StatData))
#ifndef _LINUX
CLog::Log(LOGDEBUG,"statdata: %i, new: %i",it2->second,m_StatData.st_mtime);
@@ -100,7 +100,7 @@ bool CZipManager::GetZipList(const CStdString& strPath, vector<SZipEntry>& items
// Zipfile comment may be up to 65535 bytes
// End of central directory record is 22 bytes (ECDREC_SIZE)
// -> need to check the last 65557 bytes
- __int64 fileSize = mFile.GetLength();
+ int64_t fileSize = mFile.GetLength();
// Don't need to look in the last 18 bytes (ECDREC_SIZE-4)
// But as we need to do overlapping between blocks (3 bytes),
// we start the search at ECDREC_SIZE-1 from the end of file
@@ -187,7 +187,7 @@ bool CZipManager::GetZipList(const CStdString& strPath, vector<SZipEntry>& items
strncpy(ze.name, strName.c_str(), strName.size()>254 ? 254 : strName.size());
// Save the current position
- __int64 savePos = mFile.GetPosition();
+ int64_t savePos = mFile.GetPosition();
// Go to the local file header to get the extra field length
// !! local header extra field length != central file header extra field length !!
@@ -318,7 +318,7 @@ void CZipManager::release(const CStdString& strPath)
map<CStdString,vector<SZipEntry> >::iterator it= mZipMap.find(url.GetHostName());
if (it != mZipMap.end())
{
- map<CStdString,__int64>::iterator it2=mZipDate.find(url.GetHostName());
+ map<CStdString,int64_t>::iterator it2=mZipDate.find(url.GetHostName());
mZipMap.erase(it);
mZipDate.erase(it2);
}
diff --git a/xbmc/FileSystem/ZipManager.h b/xbmc/FileSystem/ZipManager.h
index 78ba59874d..462ef420c1 100644
--- a/xbmc/FileSystem/ZipManager.h
+++ b/xbmc/FileSystem/ZipManager.h
@@ -51,7 +51,7 @@ struct SZipEntry {
unsigned short eclength; // extra field length (central file header)
unsigned short clength; // file comment length (central file header)
unsigned int lhdrOffset; // Relative offset of local header
- __int64 offset; // offset in file to compressed data
+ int64_t offset; // offset in file to compressed data
char name[255];
SZipEntry()
@@ -90,7 +90,7 @@ struct SZipEntry {
memcpy(&eclength,&SNewItem.eclength,sizeof(unsigned short));
memcpy(&clength,&SNewItem.clength,sizeof(unsigned short));
memcpy(&lhdrOffset,&SNewItem.lhdrOffset,sizeof(unsigned int));
- memcpy(&offset,&SNewItem.offset,sizeof(__int64));
+ memcpy(&offset,&SNewItem.offset,sizeof(int64_t));
memcpy(name,SNewItem.name,255*sizeof(char));
}
};
@@ -110,7 +110,7 @@ public:
static void readCHeader(const char* buffer, SZipEntry& info);
private:
std::map<CStdString,std::vector<SZipEntry> > mZipMap;
- std::map<CStdString,__int64> mZipDate;
+ std::map<CStdString,int64_t> mZipDate;
};
extern CZipManager g_ZipManager;
diff --git a/xbmc/FileSystem/iso9660.cpp b/xbmc/FileSystem/iso9660.cpp
index 2739a517bd..71dd615c2f 100644
--- a/xbmc/FileSystem/iso9660.cpp
+++ b/xbmc/FileSystem/iso9660.cpp
@@ -902,7 +902,7 @@ long iso9660::ReadFile(HANDLE hFile, byte *pBuffer, long lSize)
while (lSize > 0 && pContext->m_dwFilePos <= pContext->m_dwFileSize)
{
pContext->m_dwCurrentBlock = (DWORD) (pContext->m_dwFilePos / sectorSize);
- __int64 iOffsetInBuffer = pContext->m_dwFilePos - (sectorSize * pContext->m_dwCurrentBlock);
+ int64_t iOffsetInBuffer = pContext->m_dwFilePos - (sectorSize * pContext->m_dwCurrentBlock);
pContext->m_dwCurrentBlock += pContext->m_dwStartBlock;
//char szBuf[256];
@@ -940,12 +940,12 @@ long iso9660::ReadFile(HANDLE hFile, byte *pBuffer, long lSize)
return iBytesRead;
}
//************************************************************************************
-__int64 iso9660::Seek(HANDLE hFile, __int64 lOffset, int whence)
+int64_t iso9660::Seek(HANDLE hFile, int64_t lOffset, int whence)
{
iso9660::isofile* pContext = GetFileContext(hFile);
if (!pContext) return -1;
- __int64 dwFilePos = pContext->m_dwFilePos;
+ int64_t dwFilePos = pContext->m_dwFilePos;
switch (whence)
{
case SEEK_SET:
@@ -975,7 +975,7 @@ __int64 iso9660::Seek(HANDLE hFile, __int64 lOffset, int whence)
//************************************************************************************
-__int64 iso9660::GetFileSize(HANDLE hFile)
+int64_t iso9660::GetFileSize(HANDLE hFile)
{
iso9660::isofile* pContext = GetFileContext(hFile);
if (!pContext) return -1;
@@ -983,7 +983,7 @@ __int64 iso9660::GetFileSize(HANDLE hFile)
}
//************************************************************************************
-__int64 iso9660::GetFilePosition(HANDLE hFile)
+int64_t iso9660::GetFilePosition(HANDLE hFile)
{
iso9660::isofile* pContext = GetFileContext(hFile);
if (!pContext) return -1;
diff --git a/xbmc/FileSystem/iso9660.h b/xbmc/FileSystem/iso9660.h
index 0215e29d09..760d8943cb 100644
--- a/xbmc/FileSystem/iso9660.h
+++ b/xbmc/FileSystem/iso9660.h
@@ -171,9 +171,9 @@ public:
DWORD m_dwStartBlock;
DWORD m_dwCurrentBlock; // Current being read Block
- __int64 m_dwFilePos;
+ int64_t m_dwFilePos;
BYTE* m_pBuffer;
- __int64 m_dwFileSize;
+ int64_t m_dwFileSize;
};
iso9660( );
virtual ~iso9660( );
@@ -182,9 +182,9 @@ public:
int FindNextFile( HANDLE szLocalFolder, WIN32_FIND_DATA *wfdFile );
bool FindClose( HANDLE szLocalFolder );
DWORD SetFilePointer(HANDLE hFile, LONG lDistanceToMove, PLONG lpDistanceToMoveHigh, DWORD dwMoveMethod );
- __int64 GetFileSize(HANDLE hFile);
- __int64 GetFilePosition(HANDLE hFile);
- __int64 Seek(HANDLE hFile, __int64 lOffset, int whence);
+ int64_t GetFileSize(HANDLE hFile);
+ int64_t GetFilePosition(HANDLE hFile);
+ int64_t Seek(HANDLE hFile, int64_t lOffset, int whence);
HANDLE OpenFile( const char* filename );
long ReadFile(HANDLE fd, byte *pBuffer, long lSize);
void CloseFile(HANDLE hFile);
@@ -226,9 +226,9 @@ protected:
DWORD m_dwStartBlock;
DWORD m_dwCurrentBlock; // Current being read Block
- __int64 m_dwFilePos;
+ int64_t m_dwFilePos;
BYTE* m_pBuffer;
- __int64 m_dwFileSize;
+ int64_t m_dwFileSize;
*/
};
diff --git a/xbmc/FlacTag.cpp b/xbmc/FlacTag.cpp
index 59f2653a02..ee9d6f4a12 100644
--- a/xbmc/FlacTag.cpp
+++ b/xbmc/FlacTag.cpp
@@ -181,7 +181,7 @@ int CFlacTag::ReadFlacHeader(void)
m_file->Seek(iPos + 14, SEEK_SET); // seek to the frequency and duration data
m_file->Read(buffer, 8); // read 64 bits of data
int iFreq = (buffer[0] << 12) | (buffer[1] << 4) | (buffer[2] >> 4);
- __int64 iNumSamples = ( (__int64) (buffer[3] & 0x0F) << 32) | ( (__int64) buffer[4] << 24) | (buffer[5] << 16) | (buffer[6] << 8) | buffer[7];
+ int64_t iNumSamples = ( (int64_t) (buffer[3] & 0x0F) << 32) | ( (int64_t) buffer[4] << 24) | (buffer[5] << 16) | (buffer[6] << 8) | buffer[7];
m_musicInfoTag.SetDuration((int)((iNumSamples) / iFreq));
return iPos + 38;
}
diff --git a/xbmc/GUIDialogNumeric.h b/xbmc/GUIDialogNumeric.h
index 3a9f1ee842..5afeff1efc 100644
--- a/xbmc/GUIDialogNumeric.h
+++ b/xbmc/GUIDialogNumeric.h
@@ -66,7 +66,7 @@ protected:
INPUT_MODE m_mode; // the current input mode
SYSTEMTIME m_datetime; // for time and date modes
WORD m_ip[4]; // for ip address mode
- __int64 m_integer; // for numeric input modes
+ int64_t m_integer; // for numeric input modes
unsigned int m_block; // for time, date, and IP methods.
unsigned int m_lastblock;
bool m_dirty; // true if the current block has been changed.
diff --git a/xbmc/GUIWindowFileManager.cpp b/xbmc/GUIWindowFileManager.cpp
index 6bcb8fb914..16f1e5706e 100644
--- a/xbmc/GUIWindowFileManager.cpp
+++ b/xbmc/GUIWindowFileManager.cpp
@@ -402,8 +402,8 @@ void CGUIWindowFileManager::UpdateItemCounts()
{
unsigned int selectedCount = 0;
unsigned int totalCount = 0;
- __int64 selectedSize = 0;
- __int64 totalSize = 0;
+ int64_t selectedSize = 0;
+ int64_t totalSize = 0;
for (int j = 0; j < m_vecItems[i]->Size(); j++)
{
CFileItemPtr item = m_vecItems[i]->Get(j);
@@ -1365,7 +1365,7 @@ void CGUIWindowFileManager::OnPopupMenu(int list, int item, bool bContextDriven
CFileItemPtr pItem2=m_vecItems[list]->Get(i);
if (pItem2->m_bIsFolder && pItem2->IsSelected())
{
- __int64 folderSize = CalculateFolderSize(pItem2->m_strPath, progress);
+ int64_t folderSize = CalculateFolderSize(pItem2->m_strPath, progress);
if (folderSize >= 0)
{
pItem2->m_dwSize = folderSize;
@@ -1419,7 +1419,7 @@ bool CGUIWindowFileManager::SelectItem(int list, int &item)
}
// recursively calculates the selected folder size
-__int64 CGUIWindowFileManager::CalculateFolderSize(const CStdString &strDirectory, CGUIDialogProgress *pProgress)
+int64_t CGUIWindowFileManager::CalculateFolderSize(const CStdString &strDirectory, CGUIDialogProgress *pProgress)
{
if (pProgress)
{ // update our progress control
@@ -1429,7 +1429,7 @@ __int64 CGUIWindowFileManager::CalculateFolderSize(const CStdString &strDirector
return -1;
}
// start by calculating the size of the files in this folder...
- __int64 totalSize = 0;
+ int64_t totalSize = 0;
CFileItemList items;
CVirtualDirectory rootDir;
rootDir.SetSources(g_settings.m_fileSources);
@@ -1438,7 +1438,7 @@ __int64 CGUIWindowFileManager::CalculateFolderSize(const CStdString &strDirector
{
if (items[i]->m_bIsFolder && !items[i]->IsParentFolder()) // folder
{
- __int64 folderSize = CalculateFolderSize(items[i]->m_strPath, pProgress);
+ int64_t folderSize = CalculateFolderSize(items[i]->m_strPath, pProgress);
if (folderSize < 0) return -1;
totalSize += folderSize;
}
diff --git a/xbmc/GUIWindowFileManager.h b/xbmc/GUIWindowFileManager.h
index bd2af6531a..86b56762b9 100644
--- a/xbmc/GUIWindowFileManager.h
+++ b/xbmc/GUIWindowFileManager.h
@@ -52,7 +52,7 @@ public:
static bool MoveItem(const CFileItem *pItem, const CStdString& strDest, bool bSilent=false, CGUIDialogProgress* pProgress = NULL);
void ResetProgressBar(bool showProgress = true);
- static __int64 CalculateFolderSize(const CStdString &strDirectory, CGUIDialogProgress *pProgress = NULL);
+ static int64_t CalculateFolderSize(const CStdString &strDirectory, CGUIDialogProgress *pProgress = NULL);
protected:
virtual void OnInitWindow();
void SetInitialPath(const CStdString &path);
diff --git a/xbmc/MusicInfoTagLoaderMP3.cpp b/xbmc/MusicInfoTagLoaderMP3.cpp
index 9954f2ae01..a8cc7dd2a0 100644
--- a/xbmc/MusicInfoTagLoaderMP3.cpp
+++ b/xbmc/MusicInfoTagLoaderMP3.cpp
@@ -526,7 +526,7 @@ int CMusicInfoTagLoaderMP3::ReadDuration(const CStdString& strFileName)
if (ReadLAMETagInfo(xing - 0x24))
{
// calculate new (more accurate) duration:
- __int64 lastSample = (__int64)frame_count * (__int64)tpfbs[layer] - m_seekInfo.GetFirstSample() - m_seekInfo.GetLastSample();
+ int64_t lastSample = (int64_t)frame_count * (int64_t)tpfbs[layer] - m_seekInfo.GetFirstSample() - m_seekInfo.GetLastSample();
m_seekInfo.SetDuration((float)lastSample / frequency);
}
}
diff --git a/xbmc/MusicInfoTagLoaderMP4.cpp b/xbmc/MusicInfoTagLoaderMP4.cpp
index 0321aa03b4..738796e597 100644
--- a/xbmc/MusicInfoTagLoaderMP4.cpp
+++ b/xbmc/MusicInfoTagLoaderMP4.cpp
@@ -262,9 +262,9 @@ int CMusicInfoTagLoaderMP4::GetILSTOffset( const char* pBuffer, int bufferSize )
//
// I hope to make this particular function more readable/structured when time permits.
-int CMusicInfoTagLoaderMP4::ParseAtom( __int64 startOffset, __int64 stopOffset, CMusicInfoTag& tag )
+int CMusicInfoTagLoaderMP4::ParseAtom( int64_t startOffset, int64_t stopOffset, CMusicInfoTag& tag )
{
- __int64 currentOffset;
+ int64_t currentOffset;
int atomSize;
unsigned int atomName;
char atomHeader[ 10 ];
diff --git a/xbmc/MusicInfoTagLoaderMP4.h b/xbmc/MusicInfoTagLoaderMP4.h
index 1277d42558..e09483c462 100644
--- a/xbmc/MusicInfoTagLoaderMP4.h
+++ b/xbmc/MusicInfoTagLoaderMP4.h
@@ -38,7 +38,7 @@ private:
unsigned int ReadUnsignedInt( const char* pData );
void ParseTag( unsigned int metaKey, const char* pMetaData, int metaSize, CMusicInfoTag& tag);
int GetILSTOffset( const char* pBuffer, int bufferSize );
- int ParseAtom( __int64 startOffset, __int64 stopOffset, CMusicInfoTag& tag );
+ int ParseAtom( int64_t startOffset, int64_t stopOffset, CMusicInfoTag& tag );
unsigned int m_thumbSize;
BYTE *m_thumbData;
diff --git a/xbmc/ProgramDatabase.cpp b/xbmc/ProgramDatabase.cpp
index 1f50dd92f4..2bed247714 100644
--- a/xbmc/ProgramDatabase.cpp
+++ b/xbmc/ProgramDatabase.cpp
@@ -201,7 +201,7 @@ DWORD CProgramDatabase::GetProgramInfo(CFileItem *item)
{
CStdString strPath;
CUtil::GetDirectory(item->m_strPath,strPath);
- __int64 iSize = CGUIWindowFileManager::CalculateFolderSize(strPath);
+ int64_t iSize = CGUIWindowFileManager::CalculateFolderSize(strPath);
CStdString strSQL=FormatSQL("update files set iSize=%I64u where strFileName like '%s'",iSize,item->m_strPath.c_str());
m_pDS->exec(strSQL.c_str());
}
@@ -240,7 +240,7 @@ bool CProgramDatabase::AddProgramInfo(CFileItem *item, unsigned int titleID)
// special case - programs in root of sources
bool bIsShare=false;
CUtil::GetMatchingSource(strPath,g_settings.m_programSources,bIsShare);
- __int64 iSize=0;
+ int64_t iSize=0;
if (bIsShare || !item->IsDefaultXBE())
{
struct __stat64 stat;
diff --git a/xbmc/StringUtils.cpp b/xbmc/StringUtils.cpp
index 4226beb219..0b968384f4 100644
--- a/xbmc/StringUtils.cpp
+++ b/xbmc/StringUtils.cpp
@@ -261,7 +261,7 @@ void StringUtils::RemoveCRLF(CStdString& strLine)
}
}
-CStdString StringUtils::SizeToString(__int64 size)
+CStdString StringUtils::SizeToString(int64_t size)
{
CStdString strLabel;
if (size == 0)
@@ -281,7 +281,7 @@ CStdString StringUtils::SizeToString(__int64 size)
strLabel.Format("%2.1f KB", (((float)size) / 1024.0f) + fToAdd);
return strLabel;
}
- const __int64 iOneMeg = 1024 * 1024;
+ const int64_t iOneMeg = 1024 * 1024;
// file < 1 megabyte?
if (size < iOneMeg)
@@ -291,8 +291,8 @@ CStdString StringUtils::SizeToString(__int64 size)
}
// file < 1 GByte?
- __int64 iOneGigabyte = iOneMeg;
- iOneGigabyte *= (__int64)1000;
+ int64_t iOneGigabyte = iOneMeg;
+ iOneGigabyte *= 1000;
if (size < iOneGigabyte)
{
strLabel.Format("%02.1f MB", ((float)size) / ((float)iOneMeg));
@@ -300,7 +300,7 @@ CStdString StringUtils::SizeToString(__int64 size)
}
//file > 1 GByte
int iGigs = 0;
- __int64 dwFileSize = size;
+ int64_t dwFileSize = size;
while (dwFileSize >= iOneGigabyte)
{
dwFileSize -= iOneGigabyte;
diff --git a/xbmc/StringUtils.h b/xbmc/StringUtils.h
index 7ffef9e0ee..41bb0e3616 100644
--- a/xbmc/StringUtils.h
+++ b/xbmc/StringUtils.h
@@ -35,6 +35,7 @@
#include "DateTime.h"
#include "StdString.h"
#include <vector>
+#include <stdint.h>
class StringUtils
{
@@ -47,7 +48,7 @@ public:
static void RemoveCRLF(CStdString& strLine);
static void SecondsToTimeString( long lSeconds, CStdString& strHMS, TIME_FORMAT format = TIME_FORMAT_GUESS);
static bool IsNaturalNumber(const CStdString& str);
- static CStdString SizeToString(__int64 size);
+ static CStdString SizeToString(int64_t size);
static const CStdString EmptyString;
static size_t FindWords(const char *str, const char *wordLowerCase);
static int FindEndBracket(const CStdString &str, char opener, char closer, int startPos = 0);
diff --git a/xbmc/Util.cpp b/xbmc/Util.cpp
index c7a915963c..b2caa4b294 100644
--- a/xbmc/Util.cpp
+++ b/xbmc/Util.cpp
@@ -1987,7 +1987,7 @@ void CUtil::StatToStatI64(struct _stati64 *result, struct stat *stat)
result->st_uid = stat->st_uid;
result->st_gid = stat->st_gid;
result->st_rdev = stat->st_rdev;
- result->st_size = (__int64)stat->st_size;
+ result->st_size = (int64_t)stat->st_size;
#ifndef _LINUX
result->st_atime = (long)(stat->st_atime & 0xFFFFFFFF);
diff --git a/xbmc/cores/paplayer/PAPlayer.cpp b/xbmc/cores/paplayer/PAPlayer.cpp
index f9cbdb2db1..93b048c0bf 100644
--- a/xbmc/cores/paplayer/PAPlayer.cpp
+++ b/xbmc/cores/paplayer/PAPlayer.cpp
@@ -232,7 +232,7 @@ bool PAPlayer::QueueNextFile(const CFileItem &file, bool checkCrossFading)
// check if we can handle this file at all
int decoder = 1 - m_currentDecoder;
- __int64 seekOffset = (file.m_lStartOffset * 1000) / 75;
+ int64_t seekOffset = (file.m_lStartOffset * 1000) / 75;
if (!m_decoder[decoder].Create(file, seekOffset, m_crossFading))
{
m_bQueueFailed = true;
diff --git a/xbmc/lib/libGoAhead/XBMChttp.cpp b/xbmc/lib/libGoAhead/XBMChttp.cpp
index 833e074a73..1974f1210a 100644
--- a/xbmc/lib/libGoAhead/XBMChttp.cpp
+++ b/xbmc/lib/libGoAhead/XBMChttp.cpp
@@ -221,7 +221,7 @@ bool CXbmcHttp::decodeBase64ToFile( const CStdString &inString, const CStdString
return ret;
}
-__int64 CXbmcHttp::fileSize(const CStdString &filename)
+int64_t CXbmcHttp::fileSize(const CStdString &filename)
{
if (CFile::Exists(filename))
{
@@ -2420,7 +2420,7 @@ int CXbmcHttp::xbmcFileSize(int numParas, CStdString paras[])
return SetResponse(openTag+"Error:Missing parameter");
else
{
- __int64 filesize=fileSize(paras[0]);
+ int64_t filesize=fileSize(paras[0]);
if (filesize>-1)
{
CStdString tmp;
diff --git a/xbmc/lib/libGoAhead/XBMChttp.h b/xbmc/lib/libGoAhead/XBMChttp.h
index b25bd03643..c9ccc59d4b 100644
--- a/xbmc/lib/libGoAhead/XBMChttp.h
+++ b/xbmc/lib/libGoAhead/XBMChttp.h
@@ -150,7 +150,7 @@ private:
CStdString encodeFileToBase64(const CStdString &inFilename, int linesize );
void decodeblock( unsigned char in[4], unsigned char out[3] );
bool decodeBase64ToFile( const CStdString &inString, const CStdString &outfilename, bool append = false );
- __int64 fileSize(const CStdString &filename);
+ int64_t fileSize(const CStdString &filename);
void resetTags();
CStdString procMask(CStdString mask);
int splitParameter(const CStdString &parameter, CStdString& command, CStdString paras[], const CStdString &sep);
diff --git a/xbmc/lib/libPython/xbmcmodule/listitem.cpp b/xbmc/lib/libPython/xbmcmodule/listitem.cpp
index 61f30fc53f..d365143b3d 100644
--- a/xbmc/lib/libPython/xbmcmodule/listitem.cpp
+++ b/xbmc/lib/libPython/xbmcmodule/listitem.cpp
@@ -387,7 +387,7 @@ namespace PYXBMC
else if (strcmpi(PyString_AsString(key), "rating") == 0)
self->item->GetVideoInfoTag()->m_fRating = (float)PyFloat_AsDouble(value);
else if (strcmpi(PyString_AsString(key), "size") == 0)
- self->item->m_dwSize = (__int64)PyLong_AsLongLong(value);
+ self->item->m_dwSize = (int64_t)PyLong_AsLongLong(value);
else if (strcmpi(PyString_AsString(key), "watched") == 0) // backward compat - do we need it?
self->item->GetVideoInfoTag()->m_playCount = PyInt_AsLong(value);
else if (strcmpi(PyString_AsString(key), "playcount") == 0)
@@ -465,7 +465,7 @@ namespace PYXBMC
else if (strcmpi(PyString_AsString(key), "count") == 0)
self->item->m_iprogramCount = PyInt_AsLong(value);
else if (strcmpi(PyString_AsString(key), "size") == 0)
- self->item->m_dwSize = (__int64)PyLong_AsLongLong(value);
+ self->item->m_dwSize = (int64_t)PyLong_AsLongLong(value);
else if (strcmpi(PyString_AsString(key), "duration") == 0)
self->item->GetMusicInfoTag()->SetDuration(PyInt_AsLong(value));
else
@@ -494,7 +494,7 @@ namespace PYXBMC
if (strcmpi(PyString_AsString(key), "count") == 0)
self->item->m_iprogramCount = PyInt_AsLong(value);
else if (strcmpi(PyString_AsString(key), "size") == 0)
- self->item->m_dwSize = (__int64)PyLong_AsLongLong(value);
+ self->item->m_dwSize = (int64_t)PyLong_AsLongLong(value);
else
{
if (!PyGetUnicodeString(tmp, value, 1)) continue;
diff --git a/xbmc/lib/sqLite/qry_dat.cpp b/xbmc/lib/sqLite/qry_dat.cpp
index e8867bf33d..da04fd7598 100644
--- a/xbmc/lib/sqLite/qry_dat.cpp
+++ b/xbmc/lib/sqLite/qry_dat.cpp
@@ -109,7 +109,7 @@ field_value::field_value(const double d) {
is_null = false;
}
-field_value::field_value(const __int64 i) {
+field_value::field_value(const int64_t i) {
int64_value = i;
field_type = ft_Int64;
is_null = false;
@@ -556,34 +556,34 @@ double field_value::get_asDouble() const {
}
}
-__int64 field_value::get_asInt64() const {
+int64_t field_value::get_asInt64() const {
switch (field_type) {
case ft_String: {
return _atoi64(str_value.c_str());
}
case ft_Boolean:{
- return (__int64)bool_value;
+ return (int64_t)bool_value;
}
case ft_Char: {
- return (__int64)char_value;
+ return (int64_t)char_value;
}
case ft_Short: {
- return (__int64)short_value;
+ return (int64_t)short_value;
}
case ft_UShort: {
- return (__int64)ushort_value;
+ return (int64_t)ushort_value;
}
case ft_Long: {
- return (__int64)long_value;
+ return (int64_t)long_value;
}
case ft_ULong: {
- return (__int64)ulong_value;
+ return (int64_t)ulong_value;
}
case ft_Float: {
- return (__int64)float_value;
+ return (int64_t)float_value;
}
case ft_Double: {
- return (__int64)double_value;
+ return (int64_t)double_value;
}
case ft_Int64: {
return int64_value;
@@ -705,7 +705,7 @@ void field_value::set_asDouble(const double d) {
double_value = d;
field_type = ft_Double;}
-void field_value::set_asInt64(const __int64 i) {
+void field_value::set_asInt64(const int64_t i) {
int64_value = i;
field_type = ft_Int64;}
diff --git a/xbmc/utils/Archive.cpp b/xbmc/utils/Archive.cpp
index 4102013567..6b481be2da 100644
--- a/xbmc/utils/Archive.cpp
+++ b/xbmc/utils/Archive.cpp
@@ -109,9 +109,9 @@ CArchive& CArchive::operator<<(unsigned int i)
return *this;
}
-CArchive& CArchive::operator<<(__int64 i64)
+CArchive& CArchive::operator<<(int64_t i64)
{
- int size = sizeof(__int64);
+ int size = sizeof(int64_t);
if (m_BufferPos + size >= BUFFER_MAX)
FlushBuffer();
@@ -252,9 +252,9 @@ CArchive& CArchive::operator>>(unsigned int& i)
return *this;
}
-CArchive& CArchive::operator>>(__int64& i64)
+CArchive& CArchive::operator>>(int64_t& i64)
{
- m_pFile->Read((void*)&i64, sizeof(__int64));
+ m_pFile->Read((void*)&i64, sizeof(int64_t));
return *this;
}
diff --git a/xbmc/utils/Archive.h b/xbmc/utils/Archive.h
index dd0951b011..db815e7940 100644
--- a/xbmc/utils/Archive.h
+++ b/xbmc/utils/Archive.h
@@ -48,7 +48,7 @@ public:
CArchive& operator<<(double d);
CArchive& operator<<(int i);
CArchive& operator<<(unsigned int i);
- CArchive& operator<<(__int64 i64);
+ CArchive& operator<<(int64_t i64);
CArchive& operator<<(long l);
CArchive& operator<<(bool b);
CArchive& operator<<(char c);
@@ -62,7 +62,7 @@ public:
CArchive& operator>>(double& d);
CArchive& operator>>(int& i);
CArchive& operator>>(unsigned int& i);
- CArchive& operator>>(__int64& i64);
+ CArchive& operator>>(int64_t& i64);
CArchive& operator>>(long& l);
CArchive& operator>>(bool& b);
CArchive& operator>>(char& c);
diff --git a/xbmc/win32/WINFileSMB.cpp b/xbmc/win32/WINFileSMB.cpp
index bbc9435bfa..de911f1139 100644
--- a/xbmc/win32/WINFileSMB.cpp
+++ b/xbmc/win32/WINFileSMB.cpp
@@ -138,7 +138,7 @@ bool CWINFileSMB::OpenForWrite(const CURL& url, bool bOverWrite)
}
//*********************************************************************************************
-unsigned int CWINFileSMB::Read(void *lpBuf, __int64 uiBufSize)
+unsigned int CWINFileSMB::Read(void *lpBuf, int64_t uiBufSize)
{
if (!m_hFile.isValid()) return 0;
DWORD nBytesRead;
@@ -151,7 +151,7 @@ unsigned int CWINFileSMB::Read(void *lpBuf, __int64 uiBufSize)
}
//*********************************************************************************************
-int CWINFileSMB::Write(const void *lpBuf, __int64 uiBufSize)
+int CWINFileSMB::Write(const void *lpBuf, int64_t uiBufSize)
{
if (!m_hFile.isValid())
return 0;
@@ -170,13 +170,13 @@ void CWINFileSMB::Close()
}
//*********************************************************************************************
-__int64 CWINFileSMB::Seek(__int64 iFilePosition, int iWhence)
+int64_t CWINFileSMB::Seek(int64_t iFilePosition, int iWhence)
{
LARGE_INTEGER lPos, lNewPos;
lPos.QuadPart = iFilePosition;
int bSuccess;
- __int64 length = GetLength();
+ int64_t length = GetLength();
switch (iWhence)
{
@@ -211,7 +211,7 @@ __int64 CWINFileSMB::Seek(__int64 iFilePosition, int iWhence)
}
//*********************************************************************************************
-__int64 CWINFileSMB::GetLength()
+int64_t CWINFileSMB::GetLength()
{
LARGE_INTEGER i64Size;
GetFileSizeEx((HANDLE)m_hFile, &i64Size);
@@ -219,7 +219,7 @@ __int64 CWINFileSMB::GetLength()
}
//*********************************************************************************************
-__int64 CWINFileSMB::GetPosition()
+int64_t CWINFileSMB::GetPosition()
{
return m_i64FilePos;
}
diff --git a/xbmc/win32/WINFileSMB.h b/xbmc/win32/WINFileSMB.h
index f453d31f84..ce6ebf3604 100644
--- a/xbmc/win32/WINFileSMB.h
+++ b/xbmc/win32/WINFileSMB.h
@@ -36,15 +36,15 @@ class CWINFileSMB : public IFile
public:
CWINFileSMB();
virtual ~CWINFileSMB();
- virtual __int64 GetPosition();
- virtual __int64 GetLength();
+ virtual int64_t GetPosition();
+ virtual int64_t GetLength();
virtual bool Open(const CURL& url);
virtual bool Exists(const CURL& url);
virtual int Stat(const CURL& url, struct __stat64* buffer);
virtual int Stat(struct __stat64* buffer);
- virtual unsigned int Read(void* lpBuf, __int64 uiBufSize);
- virtual int Write(const void* lpBuf, __int64 uiBufSize);
- virtual __int64 Seek(__int64 iFilePosition, int iWhence = SEEK_SET);
+ virtual unsigned int Read(void* lpBuf, int64_t uiBufSize);
+ virtual int Write(const void* lpBuf, int64_t uiBufSize);
+ virtual int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET);
virtual void Close();
virtual void Flush();
@@ -56,7 +56,7 @@ public:
protected:
CStdString GetLocal(const CURL &url); /* crate a properly format path from an url */
AUTOPTR::CAutoPtrHandle m_hFile;
- __int64 m_i64FilePos;
+ int64_t m_i64FilePos;
};
}