diff options
| author | Shawn Hoffman <godisgovernment@gmail.com> | 2010-12-04 03:50:55 +0000 |
|---|---|---|
| committer | Shawn Hoffman <godisgovernment@gmail.com> | 2010-12-04 03:50:55 +0000 |
| commit | e70e6236248aebe8740a3369e613d07f351c9546 (patch) | |
| tree | fcbfedcf5f06064ab1fdc721f89ad5552924feb1 /Source/Core/Common | |
| parent | 97e3a3ea6fda441b2b342f795aa0afd9de2d8e14 (diff) | |
Second attempt at issue 3458. Fixes issue 3458.
Replaces all occurrences of ftell and fseek with ftello and fseeko, respectively. This matters on non-win32 where only these names are altered by the _FILE_OFFSET_BITS define. Win32 still just maps the funcs to ftelli64/fseeki64.
Also add some File::GetSize I had skipped in my last commit.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6515 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common')
| -rw-r--r-- | Source/Core/Common/Src/CommonFuncs.h | 4 | ||||
| -rw-r--r-- | Source/Core/Common/Src/NandPaths.cpp | 4 | ||||
| -rw-r--r-- | Source/Core/Common/Src/SysConf.cpp | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/Source/Core/Common/Src/CommonFuncs.h b/Source/Core/Common/Src/CommonFuncs.h index 48ee7e2549..6fa602a31d 100644 --- a/Source/Core/Common/Src/CommonFuncs.h +++ b/Source/Core/Common/Src/CommonFuncs.h @@ -90,8 +90,8 @@ inline u64 _rotr64(u64 x, unsigned int shift){ char* strndup (char const *s, size_t n); // 64 bit offsets for windows - #define fseek _fseeki64 - #define ftell _ftelli64 + #define fseeko _fseeki64 + #define ftello _ftelli64 #define atoll _atoi64 #define stat64 _stat64 #define fstat64 _fstat64 diff --git a/Source/Core/Common/Src/NandPaths.cpp b/Source/Core/Common/Src/NandPaths.cpp index 94772188b5..5234f9ae38 100644 --- a/Source/Core/Common/Src/NandPaths.cpp +++ b/Source/Core/Common/Src/NandPaths.cpp @@ -56,7 +56,7 @@ bool CheckTitleTMD(u64 _titleID) if(pTMDFile) { u64 TitleID = 0xDEADBEEFDEADBEEFULL; - fseek(pTMDFile, 0x18C, SEEK_SET); + fseeko(pTMDFile, 0x18C, SEEK_SET); fread(&TitleID, 8, 1, pTMDFile); fclose(pTMDFile); if (_titleID == Common::swap64(TitleID)) @@ -76,7 +76,7 @@ bool CheckTitleTIK(u64 _titleID) if(pTIKFile) { u64 TitleID = 0xDEADBEEFDEADBEEFULL; - fseek(pTIKFile, 0x1dC, SEEK_SET); + fseeko(pTIKFile, 0x1dC, SEEK_SET); fread(&TitleID, 8, 1, pTIKFile); fclose(pTIKFile); if (_titleID == Common::swap64(TitleID)) diff --git a/Source/Core/Common/Src/SysConf.cpp b/Source/Core/Common/Src/SysConf.cpp index dbac407dc7..8f3de9cd51 100644 --- a/Source/Core/Common/Src/SysConf.cpp +++ b/Source/Core/Common/Src/SysConf.cpp @@ -84,7 +84,7 @@ bool SysConf::LoadFromFileInternal(FILE *f) for (size_t i = 0; i < m_Entries.size() - 1; i++) { SSysConfEntry& curEntry = m_Entries.at(i); - if (fseek(f, curEntry.offset, SEEK_SET) != 0) return false; + if (fseeko(f, curEntry.offset, SEEK_SET) != 0) return false; u8 description = 0; if (fread(&description, sizeof(description), 1, f) != 1) return false; @@ -142,7 +142,7 @@ bool SysConf::SaveToFile(const char *filename) for (size_t i = 0; i < m_Entries.size() - 1; i++) { // Seek to after the name of this entry - if (fseek(f, m_Entries.at(i).offset + m_Entries.at(i).nameLength + 1, SEEK_SET) != 0) return false; + if (fseeko(f, m_Entries.at(i).offset + m_Entries.at(i).nameLength + 1, SEEK_SET) != 0) return false; // We may have to write array length value... if (m_Entries.at(i).type == Type_BigArray) { |
