diff options
author | AlTheKiller <AlTheKiller@svn> | 2009-09-23 06:04:19 +0000 |
---|---|---|
committer | AlTheKiller <AlTheKiller@svn> | 2009-09-23 06:04:19 +0000 |
commit | 0a1b4b92230658c50dd8db8da435456f2098a618 (patch) | |
tree | 80de330f18cfed68bad23ed13cd2734290a6fb1b | |
parent | b572b147da974ab22064d4b5030fccda08de90cd (diff) |
fixed: LINUX build errors
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@23102 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
31 files changed, 191 insertions, 130 deletions
diff --git a/guilib/GUIButtonControl.h b/guilib/GUIButtonControl.h index 8602bd954b..2cbe87150e 100644 --- a/guilib/GUIButtonControl.h +++ b/guilib/GUIButtonControl.h @@ -85,7 +85,7 @@ protected: CGUITexture m_imgFocus; CGUITexture m_imgNoFocus; - DWORD m_dwFocusCounter; + uint32_t m_dwFocusCounter; unsigned char m_alpha; CGUIInfoLabel m_info; diff --git a/guilib/GUITexture.cpp b/guilib/GUITexture.cpp index adb8877f40..dd1204c408 100644 --- a/guilib/GUITexture.cpp +++ b/guilib/GUITexture.cpp @@ -27,6 +27,30 @@ using namespace std; +CTextureInfo::CTextureInfo() + { + memset(&border, 0, sizeof(FRECT)); + orientation = 0; + useLarge = false; + }; + +CTextureInfo::CTextureInfo(const CStdString &file) + { + memset(&border, 0, sizeof(FRECT)); + orientation = 0; + useLarge = false; + filename = file; + } + +void CTextureInfo::operator=(const CTextureInfo &right) + { + memcpy(&border, &right.border, sizeof(FRECT)); + orientation = right.orientation; + diffuse = right.diffuse; + filename = right.filename; + useLarge = right.useLarge; + }; + CGUITextureBase::CGUITextureBase(float posX, float posY, float width, float height, const CTextureInfo& texture) { m_posX = posX; diff --git a/guilib/GUITexture.h b/guilib/GUITexture.h index 91816a52a5..33fe251879 100644 --- a/guilib/GUITexture.h +++ b/guilib/GUITexture.h @@ -31,6 +31,7 @@ #include "TextureManager.h" #include "Geometry.h" +#include "system.h" // HAS_GL, HAS_DX, etc typedef uint32_t color_t; @@ -78,29 +79,9 @@ public: class CTextureInfo { public: - CTextureInfo() - { - memset(&border, 0, sizeof(FRECT)); - orientation = 0; - useLarge = false; - }; - - CTextureInfo(const CStdString &file) - { - memset(&border, 0, sizeof(FRECT)); - orientation = 0; - useLarge = false; - filename = file; - } - - void operator=(const CTextureInfo &right) - { - memcpy(&border, &right.border, sizeof(FRECT)); - orientation = right.orientation; - diffuse = right.diffuse; - filename = right.filename; - useLarge = right.useLarge; - }; + CTextureInfo(); + CTextureInfo(const CStdString &file); + void operator=(const CTextureInfo &right); bool useLarge; FRECT border; // scaled - unneeded if we get rid of scale on load int orientation; // orientation of the texture (0 - 7 == EXIForientation - 1) @@ -179,7 +160,7 @@ protected: // animations int m_currentLoop; unsigned int m_currentFrame; - DWORD m_frameCounter; + uint32_t m_frameCounter; float m_diffuseU, m_diffuseV; // size of the diffuse frame (in tex coords) float m_diffuseScaleU, m_diffuseScaleV; // scale factor of the diffuse frame (from texture coords to diffuse tex coords) diff --git a/guilib/TextureManager.h b/guilib/TextureManager.h index 8907714011..e4c85e8ef2 100644 --- a/guilib/TextureManager.h +++ b/guilib/TextureManager.h @@ -80,7 +80,7 @@ public: const CStdString& GetName() const; const CTextureArray& GetTexture(); void Dump() const; - DWORD GetMemoryUsage() const; + uint32_t GetMemoryUsage() const; void Flush(); bool IsEmpty() const; protected: @@ -89,7 +89,7 @@ protected: CStdString m_textureName; CTextureArray m_texture; unsigned int m_referenceCount; - DWORD m_memUsage; + uint32_t m_memUsage; }; /*! @@ -112,7 +112,7 @@ public: void ReleaseTexture(const CStdString& strTextureName); void Cleanup(); void Dump() const; - DWORD GetMemoryUsage() const; + uint32_t GetMemoryUsage() const; void Flush(); CStdString GetTexturePath(const CStdString& textureName, bool directory = false); void GetBundledTexturesFromPath(const CStdString& texturePath, std::vector<CStdString> &items); diff --git a/guilib/XMLUtils.cpp b/guilib/XMLUtils.cpp index 83cb226d55..3bea7fc7b0 100644 --- a/guilib/XMLUtils.cpp +++ b/guilib/XMLUtils.cpp @@ -112,7 +112,7 @@ bool XMLUtils::GetString(const TiXmlNode* pRootNode, const char* strTag, CStdStr if (pNode != NULL) { strStringValue = pNode->Value(); - if (encoded && stricmp(encoded,"yes") == 0) + if (encoded && strcasecmp(encoded,"yes") == 0) CUtil::UrlDecode(strStringValue); return true; } @@ -133,7 +133,7 @@ bool XMLUtils::GetAdditiveString(const TiXmlNode* pRootNode, const char* strTag, bResult = true; strTemp = node->FirstChild()->Value(); const char* clear=node->Attribute("clear"); - if (strStringValue.IsEmpty() || (clear && stricmp(clear,"true")==0)) + if (strStringValue.IsEmpty() || (clear && strcasecmp(clear,"true")==0)) strStringValue = strTemp; else strStringValue += strSeparator+strTemp; @@ -188,7 +188,7 @@ bool XMLUtils::GetPath(const TiXmlNode* pRootNode, const char* strTag, CStdStrin if (pNode != NULL) { strStringValue = pNode->Value(); - if (encoded && stricmp(encoded,"yes") == 0) + if (encoded && strcasecmp(encoded,"yes") == 0) CUtil::UrlDecode(strStringValue); strStringValue = CSpecialProtocol::ReplaceOldPath(strStringValue, pathVersion); return true; diff --git a/xbmc/Database.h b/xbmc/Database.h index 44b2c69285..d4fb313b87 100644 --- a/xbmc/Database.h +++ b/xbmc/Database.h @@ -45,7 +45,7 @@ public: static CStdString FormatSQL(CStdString strStmt, ...); protected: void Split(const CStdString& strFileNameAndPath, CStdString& strPath, CStdString& strFileName); - DWORD ComputeCRC(const CStdString &text); + uint32_t ComputeCRC(const CStdString &text); virtual bool CreateTables(); virtual bool UpdateOldVersion(int version); diff --git a/xbmc/FileSystem/File.cpp b/xbmc/FileSystem/File.cpp index fe52de0642..59c52037ec 100644 --- a/xbmc/FileSystem/File.cpp +++ b/xbmc/FileSystem/File.cpp @@ -453,12 +453,12 @@ bool CFile::Exists(const CStdString& strFileName) return false; } -int CFile::Stat(struct __stat64 *buffer) +int CFile::Stat(struct stat64 *buffer) { return m_pFile->Stat(buffer); } -int CFile::Stat(const CStdString& strFileName, struct __stat64* buffer) +int CFile::Stat(const CStdString& strFileName, struct stat64* buffer) { try { diff --git a/xbmc/FileSystem/FileCurl.cpp b/xbmc/FileSystem/FileCurl.cpp index abf5a7c1b1..747e201d6c 100644 --- a/xbmc/FileSystem/FileCurl.cpp +++ b/xbmc/FileSystem/FileCurl.cpp @@ -27,7 +27,6 @@ #include "SystemInfo.h" #include "File.h" -#include <sys/stat.h> #include <vector> #include <climits> diff --git a/xbmc/FileSystem/FileRTV.cpp b/xbmc/FileSystem/FileRTV.cpp index 547a771d59..dcd4d634d2 100644 --- a/xbmc/FileSystem/FileRTV.cpp +++ b/xbmc/FileSystem/FileRTV.cpp @@ -27,7 +27,7 @@ #include "SectionLoader.h" #include "URL.h" #include "utils/log.h" - +#include <errno.h> #include <sys/stat.h> extern "C" { @@ -110,6 +110,16 @@ bool CFileRTV::Open(const CURL& url) return Open(url.GetHostName(), url.GetFileName(), url.GetPort()); } +bool CFileRTV::Exists(const CURL& url) +{ + return true; +} + +int CFileRTV::Stat(const CURL& url, struct stat64* buffer) +{ + errno = ENOENT; + return -1; +} //********************************************************************************************* unsigned int CFileRTV::Read(void *lpBuf, int64_t uiBufSize) diff --git a/xbmc/FileSystem/FileRTV.h b/xbmc/FileSystem/FileRTV.h index 6cba0caac9..9e7dcda6fa 100644 --- a/xbmc/FileSystem/FileRTV.h +++ b/xbmc/FileSystem/FileRTV.h @@ -46,14 +46,14 @@ public: 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 bool Exists(const CURL& url); + virtual int Stat(const CURL& url, struct stat64* buffer); 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; - UINT64 m_filePos; + uint64_t m_fileSize; + uint64_t m_filePos; char m_hostName[255]; char m_fileName[255]; int m_iport; diff --git a/xbmc/FileSystem/FileTuxBox.cpp b/xbmc/FileSystem/FileTuxBox.cpp index e63b14b886..0422dd1092 100644 --- a/xbmc/FileSystem/FileTuxBox.cpp +++ b/xbmc/FileSystem/FileTuxBox.cpp @@ -20,6 +20,7 @@ */ #include "FileTuxBox.h" +#include <errno.h> //Reserved for TuxBox Recording! @@ -61,4 +62,14 @@ void CFileTuxBox::Close() { } +bool CFileTuxBox::Exists(const CURL& url) +{ + return true; +} + +int CFileTuxBox::Stat(const CURL& url, struct stat64* buffer) +{ + errno = ENOENT; + return -1; +} diff --git a/xbmc/FileSystem/FileTuxBox.h b/xbmc/FileSystem/FileTuxBox.h index c0593180a7..d567bfc476 100644 --- a/xbmc/FileSystem/FileTuxBox.h +++ b/xbmc/FileSystem/FileTuxBox.h @@ -33,8 +33,8 @@ namespace XFILE 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 bool Exists(const CURL& url); + virtual int Stat(const CURL& url, struct stat64* buffer); 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.h b/xbmc/FileSystem/FileXBMSP.h index 665c566660..e19fd9a2d1 100644 --- a/xbmc/FileSystem/FileXBMSP.h +++ b/xbmc/FileSystem/FileXBMSP.h @@ -30,6 +30,10 @@ #include "IFile.h" +#ifdef _LINUX +#include "PlatformDefs.h" // SOCKET +#endif + extern "C" { #include "lib/libXBMS/ccincludes.h" @@ -53,8 +57,8 @@ public: virtual int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET); virtual void Close(); protected: - UINT64 m_fileSize; - UINT64 m_filePos; + uint64_t m_fileSize; + uint64_t m_filePos; SOCKET m_socket; private: CcXstreamServerConnection m_connection; diff --git a/xbmc/FileSystem/IFile.cpp b/xbmc/FileSystem/IFile.cpp index 307d880e86..0e97042436 100644 --- a/xbmc/FileSystem/IFile.cpp +++ b/xbmc/FileSystem/IFile.cpp @@ -19,6 +19,8 @@ */ #include "IFile.h" +#include <cstring> +#include <errno.h> using namespace XFILE; @@ -33,3 +35,56 @@ IFile::IFile() IFile::~IFile() { } + +int IFile::Stat(struct stat64* buffer) +{ + memset(buffer, 0, sizeof (buffer)); + errno = ENOENT; + return -1; +} +bool IFile::ReadString(char *szLine, int iLineLength) +{ + if(Seek(0, SEEK_CUR) < 0) return false; + + int64_t iFilePos = GetPosition(); + int iBytesRead = Read( (unsigned char*)szLine, iLineLength - 1); + if (iBytesRead <= 0) + return false; + + szLine[iBytesRead] = 0; + + for (int i = 0; i < iBytesRead; i++) + { + if ('\n' == szLine[i]) + { + if ('\r' == szLine[i + 1]) + { + szLine[i + 1] = 0; + Seek(iFilePos + i + 2, SEEK_SET); + } + else + { + // end of line + szLine[i + 1] = 0; + Seek(iFilePos + i + 1, SEEK_SET); + } + break; + } + else if ('\r' == szLine[i]) + { + if ('\n' == szLine[i + 1]) + { + szLine[i + 1] = 0; + Seek(iFilePos + i + 2, SEEK_SET); + } + else + { + // end of line + szLine[i + 1] = 0; + Seek(iFilePos + i + 1, SEEK_SET); + } + break; + } + } + return true; +} diff --git a/xbmc/FileSystem/IFile.h b/xbmc/FileSystem/IFile.h index 5078f435c2..68531c2c29 100644 --- a/xbmc/FileSystem/IFile.h +++ b/xbmc/FileSystem/IFile.h @@ -31,8 +31,8 @@ #include "URL.h" #include <stdio.h> -#include <errno.h> #include <stdint.h> +#include <sys/stat.h> #define SEEK_POSSIBLE 0x10 // flag used to check if protocol allows seeks @@ -50,61 +50,11 @@ public: virtual bool Open(const CURL& url) = 0; virtual bool OpenForWrite(const CURL& url, bool bOverWrite = false) { return false; }; virtual bool Exists(const CURL& url) = 0; - virtual int Stat(const CURL& url, struct __stat64* buffer) = 0; - virtual int Stat(struct __stat64* buffer) - { - memset(buffer, 0, sizeof (buffer)); - errno = ENOENT; - return -1; - } + virtual int Stat(const CURL& url, struct stat64* buffer) = 0; + virtual int Stat(struct stat64* buffer); 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_t iFilePos = GetPosition(); - int iBytesRead = Read( (unsigned char*)szLine, iLineLength - 1); - if (iBytesRead <= 0) - return false; - - szLine[iBytesRead] = 0; - - for (int i = 0; i < iBytesRead; i++) - { - if ('\n' == szLine[i]) - { - if ('\r' == szLine[i + 1]) - { - szLine[i + 1] = 0; - Seek(iFilePos + i + 2, SEEK_SET); - } - else - { - // end of line - szLine[i + 1] = 0; - Seek(iFilePos + i + 1, SEEK_SET); - } - break; - } - else if ('\r' == szLine[i]) - { - if ('\n' == szLine[i + 1]) - { - szLine[i + 1] = 0; - Seek(iFilePos + i + 2, SEEK_SET); - } - else - { - // end of line - szLine[i + 1] = 0; - Seek(iFilePos + i + 1, SEEK_SET); - } - break; - } - } - return true; - } + virtual bool ReadString(char *szLine, int iLineLength); virtual int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET) = 0; virtual void Close() = 0; virtual int64_t GetPosition() = 0; diff --git a/xbmc/FileSystem/SAPFile.h b/xbmc/FileSystem/SAPFile.h index abb07cf6b7..1055ef1380 100644 --- a/xbmc/FileSystem/SAPFile.h +++ b/xbmc/FileSystem/SAPFile.h @@ -37,7 +37,7 @@ public: 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(const CURL& url, struct stat64* buffer); virtual unsigned int Read(void* lpBuf, int64_t uiBufSize); virtual int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET); virtual void Close(); diff --git a/xbmc/ProgramDatabase.cpp b/xbmc/ProgramDatabase.cpp index 2bed247714..1c51f1a418 100644 --- a/xbmc/ProgramDatabase.cpp +++ b/xbmc/ProgramDatabase.cpp @@ -89,7 +89,7 @@ bool CProgramDatabase::UpdateOldVersion(int version) return true; } -DWORD CProgramDatabase::GetTitleId(const CStdString& strFilenameAndPath) +uint32_t CProgramDatabase::GetTitleId(const CStdString& strFilenameAndPath) { if (NULL == m_pDB.get()) return 0; if (NULL == m_pDS.get()) return 0; @@ -106,7 +106,7 @@ DWORD CProgramDatabase::GetTitleId(const CStdString& strFilenameAndPath) m_pDS->close(); return 0; } - DWORD dwTitleId = m_pDS->fv("files.TitleId").get_asLong(); + uint32_t dwTitleId = m_pDS->fv("files.TitleId").get_asLong(); m_pDS->close(); return dwTitleId; } @@ -117,7 +117,7 @@ DWORD CProgramDatabase::GetTitleId(const CStdString& strFilenameAndPath) return 0; } -bool CProgramDatabase::SetTitleId(const CStdString& strFileName, DWORD dwTitleId) +bool CProgramDatabase::SetTitleId(const CStdString& strFileName, uint32_t dwTitleId) { try { @@ -151,7 +151,7 @@ bool CProgramDatabase::SetTitleId(const CStdString& strFileName, DWORD dwTitleId return false; } -bool CProgramDatabase::GetXBEPathByTitleId(const DWORD titleId, CStdString& strPathAndFilename) +bool CProgramDatabase::GetXBEPathByTitleId(const uint32_t titleId, CStdString& strPathAndFilename) { try { @@ -178,9 +178,9 @@ bool CProgramDatabase::GetXBEPathByTitleId(const DWORD titleId, CStdString& strP return false; } -DWORD CProgramDatabase::GetProgramInfo(CFileItem *item) +uint32_t CProgramDatabase::GetProgramInfo(CFileItem *item) { - DWORD titleID = 0; + uint32_t titleID = 0; try { if (NULL == m_pDB.get()) return false; @@ -243,7 +243,7 @@ bool CProgramDatabase::AddProgramInfo(CFileItem *item, unsigned int titleID) int64_t iSize=0; if (bIsShare || !item->IsDefaultXBE()) { - struct __stat64 stat; + struct stat64 stat; if (CFile::Stat(item->m_strPath,&stat) == 0) iSize = stat.st_size; } @@ -262,7 +262,7 @@ bool CProgramDatabase::AddProgramInfo(CFileItem *item, unsigned int titleID) return true; } -FILETIME CProgramDatabase::TimeStampToLocalTime( unsigned __int64 timeStamp ) +FILETIME CProgramDatabase::TimeStampToLocalTime(uint64_t timeStamp ) { FILETIME fileTime; ::FileTimeToLocalFileTime( (const FILETIME *)&timeStamp, &fileTime); diff --git a/xbmc/ProgramDatabase.h b/xbmc/ProgramDatabase.h index 656a498aa2..1fcf75857e 100644 --- a/xbmc/ProgramDatabase.h +++ b/xbmc/ProgramDatabase.h @@ -21,6 +21,10 @@ */ #include "Database.h" +#ifdef _LINUX +#include "PlatformDefs.h" // FILETIME +#endif + typedef std::vector<CStdString> VECPROGRAMPATHS; #define COMPARE_PERCENTAGE 0.90f // 90% @@ -49,13 +53,13 @@ public: int GetRegion(const CStdString& strFilenameAndPath); bool SetRegion(const CStdString& strFilenameAndPath, int iRegion=-1); - DWORD GetTitleId(const CStdString& strFilenameAndPath); - bool SetTitleId(const CStdString& strFilenameAndPath, DWORD dwTitleId); + uint32_t GetTitleId(const CStdString& strFilenameAndPath); + bool SetTitleId(const CStdString& strFilenameAndPath, uint32_t dwTitleId); bool IncTimesPlayed(const CStdString& strFileName1); bool SetDescription(const CStdString& strFileName1, const CStdString& strDescription); - bool GetXBEPathByTitleId(const DWORD titleId, CStdString& strPathAndFilename); + bool GetXBEPathByTitleId(const uint32_t titleId, CStdString& strPathAndFilename); - DWORD GetProgramInfo(CFileItem *item); + uint32_t GetProgramInfo(CFileItem *item); bool AddProgramInfo(CFileItem *item, unsigned int titleID); protected: diff --git a/xbmc/ScriptSettings.cpp b/xbmc/ScriptSettings.cpp index 516c6860a0..39f2ebfa72 100644 --- a/xbmc/ScriptSettings.cpp +++ b/xbmc/ScriptSettings.cpp @@ -54,7 +54,7 @@ bool CScriptSettings::Load(const CStdString& strPath) // Make sure that the script XML has the settings element TiXmlElement *setting = m_pluginXmlDoc.RootElement(); - if (!setting || strcmpi(setting->Value(), "settings") != 0) + if (!setting || strcasecmp(setting->Value(), "settings") != 0) { CLog::Log(LOGERROR, "Error loading Settings %s: cannot find root element 'settings'", scriptFileName.c_str()); return false; @@ -116,7 +116,7 @@ bool CScriptSettings::SettingsExist(const CStdString& strPath) // Make sure that the script XML has the settings element TiXmlElement *setting = xmlDoc.RootElement(); - if (!setting || strcmpi(setting->Value(), "settings") != 0) + if (!setting || strcasecmp(setting->Value(), "settings") != 0) return false; return true; diff --git a/xbmc/URL.cpp b/xbmc/URL.cpp index 48218e0cff..da50601d0e 100644 --- a/xbmc/URL.cpp +++ b/xbmc/URL.cpp @@ -116,7 +116,7 @@ CURL::CURL(const CStdString& strURL1) } iPos += extLen + 1; CStdString archiveName = strURL.Left(iPos); - struct __stat64 s; + struct stat64 s; if (XFILE::CFile::Stat(archiveName, &s) == 0) { #ifdef _LINUX diff --git a/xbmc/Util.h b/xbmc/Util.h index e5e17c3eb1..493de426a2 100644 --- a/xbmc/Util.h +++ b/xbmc/Util.h @@ -158,9 +158,9 @@ public: static void InitGamma(); static void ClearCache(); static void StatToStatI64(struct _stati64 *result, struct stat *stat); - static void Stat64ToStatI64(struct _stati64 *result, struct __stat64 *stat); - static void StatI64ToStat64(struct __stat64 *result, struct _stati64 *stat); - static void Stat64ToStat(struct stat *result, struct __stat64 *stat); + static void Stat64ToStatI64(struct _stati64 *result, struct stat64 *stat); + static void StatI64ToStat64(struct stat64 *result, struct _stati64 *stat); + static void Stat64ToStat(struct stat *result, struct stat64 *stat); static bool CreateDirectoryEx(const CStdString& strPath); #ifdef _WIN32 diff --git a/xbmc/ViewDatabase.cpp b/xbmc/ViewDatabase.cpp index 9631327ef8..4ba2ff80f5 100644 --- a/xbmc/ViewDatabase.cpp +++ b/xbmc/ViewDatabase.cpp @@ -23,6 +23,9 @@ #include "Util.h" #include "ViewState.h" #include "utils/log.h" +#ifdef _LINUX +#include "linux/ConvUtils.h" // GetLastError() +#endif #define VIEW_DATABASE_VERSION 3 diff --git a/xbmc/cdrip/EncoderWav.h b/xbmc/cdrip/EncoderWav.h index c478feee02..836f0dd654 100644 --- a/xbmc/cdrip/EncoderWav.h +++ b/xbmc/cdrip/EncoderWav.h @@ -27,18 +27,18 @@ typedef struct { - BYTE riff[4]; /* must be "RIFF" */ - DWORD len; /* #bytes + 44 - 8 */ - BYTE cWavFmt[8]; /* must be "WAVEfmt " */ - DWORD dwHdrLen; - WORD wFormat; - WORD wNumChannels; - DWORD dwSampleRate; - DWORD dwBytesPerSec; - WORD wBlockAlign; - WORD wBitsPerSample; - BYTE cData[4]; /* must be "data" */ - DWORD dwDataLen; /* #bytes */ + uint8_t riff[4]; /* must be "RIFF" */ + uint32_t len; /* #bytes + 44 - 8 */ + uint8_t cWavFmt[8]; /* must be "WAVEfmt " */ + uint32_t dwHdrLen; + uint16_t wFormat; + uint16_t wNumChannels; + uint32_t dwSampleRate; + uint32_t dwBytesPerSec; + uint16_t wBlockAlign; + uint16_t wBitsPerSample; + uint8_t cData[4]; /* must be "data" */ + uint32_t dwDataLen; /* #bytes */ } WAVHDR, *PWAVHDR, *LPWAVHDR; @@ -48,7 +48,7 @@ public: CEncoderWav(); virtual ~CEncoderWav() {} bool Init(const char* strFile, int iInChannels, int iInRate, int iInBits); - int Encode(int nNumBytesRead, BYTE* pbtStream); + int Encode(int nNumBytesRead, uint8_t* pbtStream); bool Close(); void AddTag(int key, const char* value); diff --git a/xbmc/cores/paplayer/AudioDecoder.cpp b/xbmc/cores/paplayer/AudioDecoder.cpp index 1caaac29af..980a0894d1 100644 --- a/xbmc/cores/paplayer/AudioDecoder.cpp +++ b/xbmc/cores/paplayer/AudioDecoder.cpp @@ -23,6 +23,7 @@ #include "CodecFactory.h" #include "GUISettings.h" #include "FileItem.h" +#include <math.h> #define INTERNAL_BUFFER_LENGTH sizeof(float)*2*44100 // float samples, 2 channels, 44100 samples per sec = 1 second diff --git a/xbmc/karaoke/karaokelyricstextkar.cpp b/xbmc/karaoke/karaokelyricstextkar.cpp index 2341bacfa5..5bb4eb2618 100644 --- a/xbmc/karaoke/karaokelyricstextkar.cpp +++ b/xbmc/karaoke/karaokelyricstextkar.cpp @@ -14,6 +14,7 @@ #include "FileSystem/File.h" #include "GUISettings.h" #include "utils/log.h" +#include <math.h> #include "karaokelyricstextkar.h" diff --git a/xbmc/lib/UnrarXLib/extract.cpp b/xbmc/lib/UnrarXLib/extract.cpp index a5b4f28684..ba1d1560a6 100644 --- a/xbmc/lib/UnrarXLib/extract.cpp +++ b/xbmc/lib/UnrarXLib/extract.cpp @@ -1,5 +1,9 @@ #include "rar.hpp" #include "Util.h" +#ifdef _LINUX +#include "XSyncUtils.h" +#include "XEventUtils.h" +#endif CmdExtract::CmdExtract() { diff --git a/xbmc/lib/UnrarXLib/filefn.cpp b/xbmc/lib/UnrarXLib/filefn.cpp index 9183a666b5..fffede864d 100644 --- a/xbmc/lib/UnrarXLib/filefn.cpp +++ b/xbmc/lib/UnrarXLib/filefn.cpp @@ -1,4 +1,7 @@ #include "rar.hpp" +#ifdef _LINUX +#include "XFileUtils.h" +#endif void SetDirTime(const char *Name,RarTime *ftm,RarTime *ftc,RarTime *fta) diff --git a/xbmc/lib/UnrarXLib/unpack.cpp b/xbmc/lib/UnrarXLib/unpack.cpp index 5d9212b6d8..1361128c44 100644 --- a/xbmc/lib/UnrarXLib/unpack.cpp +++ b/xbmc/lib/UnrarXLib/unpack.cpp @@ -8,6 +8,11 @@ #include "unpack20.cpp" #endif +#ifdef _LINUX +#include "XSyncUtils.h" +#include "XEventUtils.h" +#endif + Unpack::Unpack(ComprDataIO *DataIO) { UnpIO=DataIO; diff --git a/xbmc/lib/UnrarXLib/unpack15.cpp b/xbmc/lib/UnrarXLib/unpack15.cpp index 8970652de7..fa69b3eade 100644 --- a/xbmc/lib/UnrarXLib/unpack15.cpp +++ b/xbmc/lib/UnrarXLib/unpack15.cpp @@ -1,3 +1,7 @@ +#ifdef _LINUX +#include "XSyncUtils.h" +#endif + #define STARTL1 2 static unsigned int DecL1[]={0x8000,0xa000,0xc000,0xd000,0xe000,0xea00, 0xee00,0xf000,0xf200,0xf200,0xffff}; diff --git a/xbmc/lib/sqLite/dataset.cpp b/xbmc/lib/sqLite/dataset.cpp index 6e7de2cfa1..8060142a3e 100644 --- a/xbmc/lib/sqLite/dataset.cpp +++ b/xbmc/lib/sqLite/dataset.cpp @@ -28,6 +28,7 @@ #include "dataset.h" #include "utils/log.h" +#include <cstring> #ifndef __GNUC__ #pragma warning (disable:4800) diff --git a/xbmc/linux/ConvUtils.h b/xbmc/linux/ConvUtils.h index bc157a9455..3d1cacfd24 100644 --- a/xbmc/linux/ConvUtils.h +++ b/xbmc/linux/ConvUtils.h @@ -21,6 +21,7 @@ * http://www.gnu.org/copyleft/gpl.html * */ +#include "PlatformDefs.h" // UINT DWORD LPCSTR LPSTR LPBOOL ... int WideCharToMultiByte( UINT CodePage, |