Changeset 16225
- Timestamp:
- 11/18/2008 07:28:55 PM (7 weeks ago)
- Location:
- branches/win32dllloader/xbmc
- Files:
-
- 19 modified
-
FileSystem/FileCurl.cpp (modified) (1 diff)
-
Util.cpp (modified) (1 diff)
-
Util.h (modified) (1 diff)
-
cores/DllLoader/DllLoader.cpp (modified) (1 diff)
-
cores/DllLoader/DllLoader.h (modified) (1 diff)
-
cores/DllLoader/DllLoaderContainer.cpp (modified) (1 diff)
-
cores/DllLoader/LibraryLoader.cpp (modified) (1 diff)
-
cores/DllLoader/LibraryLoader.h (modified) (1 diff)
-
cores/DllLoader/Win32DllLoader.cpp (modified) (5 diffs)
-
cores/DllLoader/Win32DllLoader.h (modified) (2 diffs)
-
cores/DllLoader/dll.cpp (modified) (1 diff)
-
cores/DllLoader/exports/emu_kernel32.cpp (modified) (1 diff)
-
cores/DllLoader/exports/emu_kernel32.h (modified) (1 diff)
-
cores/DllLoader/exports/emu_msvcrt.cpp (modified) (3 diffs)
-
cores/DllLoader/exports/emu_msvcrt.h (modified) (1 diff)
-
lib/libPython/Python/PC/pyconfig.h (modified) (1 diff)
-
lib/libPython/XBPython.cpp (modified) (2 diffs)
-
lib/libPython/xbmcmodule/pyutil.cpp (modified) (2 diffs)
-
lib/libPython/xbmcmodule/pyutil.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/win32dllloader/xbmc/FileSystem/FileCurl.cpp
r16106 r16225 42 42 #define XMIN(a,b) ((a)<(b)?(a):(b)) 43 43 44 #if defined(__APPLE__)45 extern "C" int __stdcall dllselect(int ntfs, fd_set *readfds, fd_set *writefds, fd_set *errorfds, const timeval *timeout);46 44 #define dllselect select 47 #elif defined(WIN32)48 extern "C" int __stdcall dllselect(int ntfs, fd_set *readfds, fd_set *writefds, fd_set *errorfds, const timeval *timeout);49 #else50 #define dllselect select51 #endif52 45 53 46 // curl calls this routine to debug -
branches/win32dllloader/xbmc/Util.cpp
r16166 r16225 2210 2210 } 2211 2211 2212 #ifndef _LINUX2213 void CUtil::Stat64ToStat(struct _stat *result, struct __stat64 *stat)2214 #else2215 2212 void CUtil::Stat64ToStat(struct stat *result, struct __stat64 *stat) 2216 #endif2217 2213 { 2218 2214 result->st_dev = stat->st_dev; -
branches/win32dllloader/xbmc/Util.h
r15523 r16225 286 286 static void Stat64ToStatI64(struct _stati64 *result, struct __stat64 *stat); 287 287 static void StatI64ToStat64(struct __stat64 *result, struct _stati64 *stat); 288 #ifndef _LINUX289 static void Stat64ToStat(struct _stat *result, struct __stat64 *stat);290 #else291 288 static void Stat64ToStat(struct stat *result, struct __stat64 *stat); 292 #endif293 289 static bool CreateDirectoryEx(const CStdString& strPath); 294 290 static CStdString MakeLegalFileName(const CStdString &strFile); -
branches/win32dllloader/xbmc/cores/DllLoader/DllLoader.cpp
r16038 r16225 574 574 } 575 575 576 int DllLoader::Resolve Export(unsigned long ordinal, void **pAddr)576 int DllLoader::ResolveOrdinal(unsigned long ordinal, void **pAddr) 577 577 { 578 578 Export* pExport=GetExportByOrdinal(ordinal); -
branches/win32dllloader/xbmc/cores/DllLoader/DllLoader.h
r13101 r16225 66 66 67 67 virtual int ResolveExport(const char*, void** ptr); 68 virtual int Resolve Export(unsigned long ordinal, void** ptr);68 virtual int ResolveOrdinal(unsigned long ordinal, void** ptr); 69 69 virtual bool HasSymbols() { return m_bLoadSymbols && !m_bUnloadSymbols; } 70 70 virtual bool IsSystemDll() { return m_bSystemDll; } 71 71 virtual HMODULE GetHModule() { return (HMODULE)hModule; } 72 72 73 Export* GetExportByFunctionName(const char* sFunctionName); 74 Export* GetExportByOrdinal(unsigned long ordinal); 73 75 protected: 74 76 int Parse(); 75 77 int ResolveImports(); 76 77 Export* GetExportByOrdinal(unsigned long ordinal);78 Export* GetExportByFunctionName(const char* sFunctionName);79 78 80 79 void AddExport(unsigned long ordinal, void* function, void* track_function = NULL); -
branches/win32dllloader/xbmc/cores/DllLoader/DllLoaderContainer.cpp
r16143 r16225 278 278 else 279 279 #elif defined(_WIN32PC) 280 if (strlen(sName) >= 4 && !strnicmp(sName + (strlen(sName) - 18), "ProjectM_win32.vis", 18)) 281 { 280 if (1) 282 281 pLoader = new Win32DllLoader(sName); 283 }284 282 else 285 283 #endif -
branches/win32dllloader/xbmc/cores/DllLoader/LibraryLoader.cpp
r14120 r16225 83 83 return m_iRefCount; 84 84 } 85 86 int LibraryLoader::ResolveOrdinal(unsigned long ordinal, void** ptr) 87 { 88 CLog::Log(LOGWARNING, "%s - Unable to resolve %lu in dll %s", __FUNCTION__, ordinal, GetName()); 89 return 0; 90 } -
branches/win32dllloader/xbmc/cores/DllLoader/LibraryLoader.h
r14126 r16225 41 41 42 42 virtual int ResolveExport(const char* symbol, void** ptr) = 0; 43 virtual int ResolveOrdinal(unsigned long ordinal, void** ptr); 43 44 virtual bool IsSystemDll() = 0; 44 45 virtual HMODULE GetHModule() = 0; -
branches/win32dllloader/xbmc/cores/DllLoader/Win32DllLoader.cpp
r14120 r16225 22 22 #include "stdafx.h" 23 23 #include "Win32DllLoader.h" 24 #include "DllLoader.h" 25 #include "DllLoaderContainer.h" 24 26 #include "StdString.h" 25 27 #include "Util.h" 26 28 #include "utils/log.h" 27 29 30 #include "dll_tracker_library.h" 31 #include "dll_tracker_file.h" 32 #include "exports/emu_kernel32.h" 33 #include "exports/emu_msvcrt.h" 34 35 // our exports 36 Export win32_exports[] = 37 { 38 // kernel32 39 { "FindFirstFileA", -1, (void*)dllFindFirstFileA, NULL }, 40 { "GetFileAttributesA", -1, (void*)dllGetFileAttributesA, NULL }, 41 { "LoadLibraryA", -1, (void*)dllLoadLibraryA, (void*)track_LoadLibraryA }, 42 { "FreeLibrary", -1, (void*)dllFreeLibrary, (void*)track_FreeLibrary }, 43 { "GetProcAddress", -1, (void*)dllGetProcAddress, NULL }, 44 { "SetEvent", -1, (void*)SetEvent, NULL }, 45 { "GetModuleHandleA", -1, (void*)dllGetModuleHandleA, NULL }, 46 { "CreateFileA", -1, (void*)dllCreateFileA, NULL }, 47 { "LoadLibraryExA", -1, (void*)dllLoadLibraryExA, (void*)track_LoadLibraryExA }, 48 { "GetModuleFileNameA", -1, (void*)dllGetModuleFileNameA, NULL }, 49 // potential vfs stuff 50 // { "CreateDirectoryA", -1, (void*)dllCreateDirectoryA, NULL }, 51 // { "LockFile", -1, (void*)dllLockFile, NULL }, 52 // { "LockFileEx", -1, (void*)dllLockFileEx, NULL }, 53 // { "UnlockFile", -1, (void*)dllUnlockFile, NULL }, 54 // { "CreateFileW", -1, (void*)CreateFileW, NULL }, 55 // { "GetFullPathNameW", -1, (void*)GetFullPathNameW, NULL }, 56 // { "GetTempPathW", -1, (void*)GetTempPathW, NULL }, 57 // { "GetFileAttributesW", -1, (void*)GetFileAttributesW, NULL }, 58 // { "DeleteFileW", -1, (void*)DeleteFileW, NULL }, 59 // { "GetFileSize", -1, (void*)GetFileSize, NULL }, 60 61 // msvcrt 62 { "_close", -1, (void*)dll_close, (void*)track_close}, 63 { "_lseek", -1, (void*)dll_lseek, NULL }, 64 { "_read", -1, (void*)dll_read, NULL }, 65 { "_write", -1, (void*)dll_write, NULL }, 66 { "_lseeki64", -1, (void*)dll_lseeki64, NULL }, 67 { "_open", -1, (void*)dll_open, (void*)track_open }, 68 { "fflush", -1, (void*)dll_fflush, NULL }, 69 { "fprintf", -1, (void*)dll_fprintf, NULL }, 70 { "fwrite", -1, (void*)dll_fwrite, NULL }, 71 { "putchar", -1, (void*)dll_putchar, NULL }, 72 { "_fstat", -1, (void*)dll_fstat, NULL }, 73 { "_mkdir", -1, (void*)dll_mkdir, NULL }, 74 { "_stat", -1, (void*)dll_stat, NULL }, 75 { "_findclose", -1, (void*)dll_findclose, NULL }, 76 { "_findfirst", -1, (void*)dll_findfirst, NULL }, 77 { "_findnext", -1, (void*)dll_findnext, NULL }, 78 { "fclose", -1, (void*)dll_fclose, (void*)track_fclose}, 79 { "feof", -1, (void*)dll_feof, NULL }, 80 { "fgets", -1, (void*)dll_fgets, NULL }, 81 { "fopen", -1, (void*)dll_fopen, (void*)track_fopen}, 82 { "putc", -1, (void*)dll_putc, NULL }, 83 { "fputc", -1, (void*)dll_fputc, NULL }, 84 { "fputs", -1, (void*)dll_fputs, NULL }, 85 { "fread", -1, (void*)dll_fread, NULL }, 86 { "fseek", -1, (void*)dll_fseek, NULL }, 87 { "ftell", -1, (void*)dll_ftell, NULL }, 88 { "getc", -1, (void*)dll_getc, NULL }, 89 { "fgetc", -1, (void*)dll_getc, NULL }, 90 { "rewind", -1, (void*)dll_rewind, NULL }, 91 { "vfprintf", -1, (void*)dll_vfprintf, NULL }, 92 { "fgetpos", -1, (void*)dll_fgetpos, NULL }, 93 { "fsetpos", -1, (void*)dll_fsetpos, NULL }, 94 { "_stati64", -1, (void*)dll_stati64, NULL }, 95 { "_fstati64", -1, (void*)dll_fstati64, NULL }, 96 { "_telli64", -1, (void*)dll_telli64, NULL }, 97 { "_tell", -1, (void*)dll_tell, NULL }, 98 { "_fileno", -1, (void*)dll_fileno, NULL }, 99 { "ferror", -1, (void*)dll_ferror, NULL }, 100 { "freopen", -1, (void*)dll_freopen, (void*)track_freopen}, 101 { "fscanf", -1, (void*)fscanf, NULL }, 102 { "ungetc", -1, (void*)dll_ungetc, NULL }, 103 { "_fdopen", -1, (void*)dll_fdopen, NULL }, 104 { "clearerr", -1, (void*)dll_clearerr, NULL }, 105 // for debugging 106 { "printf", -1, (void*)dllprintf, NULL }, 107 { "vprintf", -1, (void*)dllvprintf, NULL }, 108 { "perror", -1, (void*)dllperror, NULL }, 109 { "puts", -1, (void*)dllputs, NULL }, 110 // workarounds for non-win32 signals 111 { "signal", -1, (void*)dll_signal, NULL }, 112 { NULL, -1, NULL, NULL } 113 }; 114 115 // stuff for python 116 extern "C" 117 { 118 char* xbp_getcwd(char *buf, int size); 119 int xbp_chdir(const char *dirname); 120 int xbp_access(const char *path, int mode); 121 int xbp_unlink(const char *filename); 122 int xbp_chmod(const char *filename, int pmode); 123 int xbp_rmdir(const char *dirname); 124 int xbp_utime(const char *filename, struct utimbuf *times); 125 int xbp_rename(const char *oldname, const char *newname); 126 int xbp_mkdir(const char *dirname); 127 int xbp_open(const char *filename, int oflag, int pmode); 128 }; 129 130 extern "C" void* _iob(); 131 132 Export win32_python_exports[] = 133 { 134 // these just correct for path separators and call the base 135 { "access", -1, (void*)xbp_access, NULL }, 136 { "unlink", -1, (void*)xbp_unlink, NULL }, 137 { "chmod", -1, (void*)xbp_chmod, NULL }, 138 { "rmdir", -1, (void*)xbp_rmdir, NULL }, 139 { "utime", -1, (void*)xbp_utime, NULL }, 140 { "rename", -1, (void*)xbp_rename, NULL }, 141 { "mkdir", -1, (void*)xbp_mkdir, NULL }, 142 { "open", -1, (void*)xbp_open, NULL }, 143 // { "opendir", -1, (void*)xbp_opendir, NULL }, _LINUX only 144 145 // special workaround just for python 146 { "_chdir", -1, (void*)xbp_chdir, NULL }, 147 { "_getcwd", -1, (void*)xbp_getcwd, NULL }, 148 { "_putenv", -1, (void*)dll_putenv, NULL }, 149 { "getenv", -1, (void*)dll_getenv, NULL }, 150 { "__p__environ", -1, (void*)dll___p__environ, NULL }, 151 152 // for stdin/stdout etc. 153 { "_iob", -1, (void*)_iob, NULL }, 154 { NULL, -1, NULL, NULL } 155 }; 156 28 157 Win32DllLoader::Win32DllLoader(const char *dll) : LibraryLoader(dll) 29 158 { 30 159 m_dllHandle = NULL; 160 DllLoaderContainer::RegisterDll(this); 31 161 } 32 162 … … 35 165 if (m_dllHandle) 36 166 Unload(); 167 DllLoaderContainer::UnRegisterDll(this); 37 168 } 38 169 … … 54 185 } 55 186 187 // handle functions that the dll imports 188 OverrideImports(strFileName); 189 56 190 return true; 57 191 } … … 60 194 { 61 195 CLog::Log(LOGDEBUG, "NativeDllLoader: Unloading: %s\n", GetName()); 196 197 // restore our imports 198 RestoreImports(); 62 199 63 200 if (m_dllHandle) … … 104 241 return false; 105 242 } 243 244 void Win32DllLoader::OverrideImports(const CStdString &dll) 245 { 246 BYTE* image_base = (BYTE*)GetModuleHandle(dll.c_str()); 247 248 if (!image_base) 249 { 250 CLog::Log(LOGERROR, "%s - unable to GetModuleHandle for dll %s", dll.c_str()); 251 return; 252 } 253 254 PIMAGE_DOS_HEADER dos_header = (PIMAGE_DOS_HEADER)image_base; 255 PIMAGE_NT_HEADERS nt_header = (PIMAGE_NT_HEADERS)(image_base + dos_header->e_lfanew); // e_lfanew = value at 0x3c 256 257 PIMAGE_IMPORT_DESCRIPTOR imp_desc = (PIMAGE_IMPORT_DESCRIPTOR)( 258 image_base + nt_header->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress); 259 260 if (!imp_desc) 261 { 262 CLog::Log(LOGERROR, "%s - unable to get import directory for dll %s", dll.c_str()); 263 return; 264 } 265 266 // loop over all imported dlls 267 for (int i = 0; imp_desc[i].Characteristics != 0; i++) 268 { 269 char *dllName = (char*)(image_base + imp_desc[i].Name); 270 271 PIMAGE_THUNK_DATA orig_first_thunk = (PIMAGE_THUNK_DATA)(image_base + imp_desc[i].OriginalFirstThunk); 272 PIMAGE_THUNK_DATA first_thunk = (PIMAGE_THUNK_DATA)(image_base + imp_desc[i].FirstThunk); 273 274 // and then loop over all imported functions 275 for (int j = 0; orig_first_thunk[j].u1.Function != 0; j++) 276 { 277 void *fixup = NULL; 278 if (orig_first_thunk[j].u1.Function & 0x80000000) 279 ResolveOrdinal(dllName, (orig_first_thunk[j].u1.Ordinal & 0x7fffffff), &fixup); 280 else 281 { // resolve by name 282 PIMAGE_IMPORT_BY_NAME orig_imports_by_name = (PIMAGE_IMPORT_BY_NAME)( 283 image_base + orig_first_thunk[j].u1.AddressOfData); 284 285 ResolveImport(dllName, (char*)orig_imports_by_name->Name, &fixup); 286 }/* 287 if (!fixup) 288 { // create a dummy function for tracking purposes 289 PIMAGE_IMPORT_BY_NAME orig_imports_by_name = (PIMAGE_IMPORT_BY_NAME)( 290 image_base + orig_first_thunk[j].u1.AddressOfData); 291 fixup = CreateDummyFunction(dllName, (char*)orig_imports_by_name->Name); 292 }*/ 293 if (fixup) 294 { 295 // save the old function 296 Import import; 297 import.table = &first_thunk[j].u1.Function; 298 import.function = first_thunk[j].u1.Function; 299 m_overriddenImports.push_back(import); 300 301 DWORD old_prot = 0; 302 303 // change to protection settings so we can write to memory area 304 VirtualProtect((PVOID)&first_thunk[j].u1.Function, 4, PAGE_EXECUTE_READWRITE, &old_prot); 305 306 // patch the address of function to point to our overridden version 307 first_thunk[j].u1.Function = (DWORD)fixup; 308 309 // reset to old settings 310 VirtualProtect((PVOID)&first_thunk[j].u1.Function, 4, old_prot, &old_prot); 311 } 312 } 313 } 314 } 315 316 void Win32DllLoader::RestoreImports() 317 { 318 for (unsigned int i = 0; i < m_overriddenImports.size(); i++) 319 { 320 Import &import = m_overriddenImports[i]; 321 322 // change to protection settings so we can write to memory area 323 DWORD old_prot = 0; 324 VirtualProtect(import.table, 4, PAGE_EXECUTE_READWRITE, &old_prot); 325 326 *(DWORD *)import.table = import.function; 327 328 // reset to old settings 329 VirtualProtect(import.table, 4, old_prot, &old_prot); 330 } 331 } 332 333 bool Win32DllLoader::ResolveImport(const char *dllName, const char *functionName, void **fixup) 334 { 335 char *dll = GetName(); 336 if (strstr(dll, "python24.dll") || strstr(dll, ".pyd")) 337 { // special case for python 338 Export *exp = win32_python_exports; 339 while (exp->name) 340 { 341 if (strcmp(exp->name, functionName) == 0) 342 { 343 *fixup = exp->function; 344 return true; 345 } 346 exp++; 347 } 348 } 349 Export *exp = win32_exports; 350 while (exp->name) 351 { 352 if (strcmp(exp->name, functionName) == 0) 353 { // TODO: Should we be tracking stuff? 354 if (0) 355 *fixup = exp->track_function; 356 else 357 *fixup = exp->function; 358 return true; 359 } 360 exp++; 361 } 362 return false; 363 } 364 365 bool Win32DllLoader::ResolveOrdinal(const char *dllName, unsigned long ordinal, void **fixup) 366 { 367 Export *exp = win32_exports; 368 while (exp->name) 369 { 370 if (exp->ordinal == ordinal) 371 { // TODO: Should we be tracking stuff? 372 if (0) 373 *fixup = exp->track_function; 374 else 375 *fixup = exp->function; 376 return true; 377 } 378 exp++; 379 } 380 return false; 381 } -
branches/win32dllloader/xbmc/cores/DllLoader/Win32DllLoader.h
r14120 r16225 28 28 { 29 29 public: 30 class Import 31 { 32 public: 33 void *table; 34 DWORD function; 35 }; 36 30 37 Win32DllLoader(const char *dll); 31 38 ~Win32DllLoader(); … … 40 47 41 48 private: 49 void OverrideImports(const CStdString &dll); 50 void RestoreImports(); 51 bool ResolveImport(const char *dllName, const char *functionName, void **fixup); 52 bool ResolveOrdinal(const char *dllName, unsigned long ordinal, void **fixup); 53 42 54 HMODULE m_dllHandle; 55 56 std::vector<Import> m_overriddenImports; 43 57 }; 44 58 -
branches/win32dllloader/xbmc/cores/DllLoader/dll.cpp
r13101 r16225 169 169 if( HIGH_WORD(function) == 0 && LOW_WORD(function) < 1000) 170 170 { 171 if( ((DllLoader*) dll)->ResolveExport(LOW_WORD(function), &address) )171 if( dll->ResolveOrdinal(LOW_WORD(function), &address) ) 172 172 { 173 173 CLog::Log(LOGDEBUG, "%s(%p(%s), %d) => %p", __FUNCTION__, hModule, dll->GetName(), LOW_WORD(function), address); -
branches/win32dllloader/xbmc/cores/DllLoader/exports/emu_kernel32.cpp
r16153 r16225 81 81 { 82 82 return FindClose(hFile); 83 } 84 85 #ifdef _WIN32 86 #define CORRECT_SEP_STR(str) \ 87 int iSize_##str = strlen(str); \ 88 for (int pos = 0; pos < iSize_##str; pos++) if (str[pos] == '/') str[pos] = '\\'; 89 #else 90 #define CORRECT_SEP_STR(str) 91 #endif 92 93 extern "C" HANDLE WINAPI dllFindFirstFileA(LPCTSTR lpFileName, LPWIN32_FIND_DATA lpFindFileData) 94 { 95 char* p = strdup(lpFileName); 96 CORRECT_SEP_STR(p); 97 98 // change default \\*.* into \\* which the xbox is using 99 char* e = strrchr(p, '.'); 100 if (e != NULL && strlen(e) > 1 && e[1] == '*') 101 { 102 e[0] = '\0'; 103 } 104 105 int test = sizeof(WIN32_FIND_DATA); 106 107 HANDLE res = FindFirstFile(_P(p).c_str(), lpFindFileData); 108 free(p); 109 return res; 83 110 } 84 111 -
branches/win32dllloader/xbmc/cores/DllLoader/exports/emu_kernel32.h
r13101 r16225 590 590 //When doing emulation or interception, the calling convention should 591 591 //match exactly the target dlls suppose to use. Monkeyhappy 592 extern "C" HANDLE WINAPI dllFindFirstFileA(LPCTSTR lpFileName, LPWIN32_FIND_DATA lpFindFileData); 592 593 extern "C" BOOL WINAPI dllFindClose(HANDLE hFile); 593 594 extern "C" UINT WINAPI dllGetAtomNameA( ATOM nAtom, LPTSTR lpBuffer, int nSize); -
branches/win32dllloader/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp
r15884 r16225 126 126 dll_putenv("PATH=.;Q:\\;Q:\\system\\python"); 127 127 //dll_putenv("PYTHONCASEOK=1"); 128 //dll_putenv("PYTHONDEBUG=1");129 //dll_putenv("PYTHONVERBOSE=2"); // "1" for normal verbose, "2" for more verbose ?128 dll_putenv("PYTHONDEBUG=1"); 129 dll_putenv("PYTHONVERBOSE=2"); // "1" for normal verbose, "2" for more verbose ? 130 130 dll_putenv("PYTHONOPTIMIZE=1"); 131 131 //dll_putenv("PYTHONDUMPREFS=1"); … … 1419 1419 1420 1420 //SLOW CODE SHOULD BE REVISED 1421 int dll_stat(const char *path, struct _stat *buffer)1421 int dll_stat(const char *path, struct stat *buffer) 1422 1422 { 1423 1423 #ifndef _LINUX … … 1526 1526 if (pFile != NULL) 1527 1527 { 1528 CLog::Log(LOGINFO, "Stating open file"); 1529 1530 __int64 size = pFile->GetLength(); 1531 #ifdef _WIN32PC 1532 if (size <= LONG_MAX) 1533 #else 1534 if (sizeof(size) <= sizeof(buffer->st_size) ) 1535 #endif 1536 buffer->st_size = (_off_t)size; 1537 else 1538 { 1539 buffer->st_size = 0; 1540 CLog::Log(LOGWARNING, "WARNING: File is larger than 32bit stat can handle, file size will be reported as 0 bytes"); 1541 } 1542 buffer->st_mode = _S_IFREG; 1543 1544 return 0; 1528 struct __stat64 tStat; 1529 if (pFile->Stat(&tStat) == 0) 1530 { 1531 CUtil::Stat64ToStat(buffer, &tStat); 1532 return 0; 1533 } 1545 1534 } 1546 1535 else if (!IS_STD_DESCRIPTOR(fd)) -
branches/win32dllloader/xbmc/cores/DllLoader/exports/emu_msvcrt.h
r14624 r16225 117 117 int dll_stati64(const char *path, struct _stati64 *buffer); 118 118 int dll_stat64(const char *path, struct __stat64 *buffer); 119 int dll_stat(const char *path, struct _stat *buffer);119 int dll_stat(const char *path, struct stat *buffer); 120 120 int dll_fstat(int fd, struct stat *buffer); 121 121 int dll_fstati64(int fd, struct _stati64 *buffer); -
branches/win32dllloader/xbmc/lib/libPython/Python/PC/pyconfig.h
r14120 r16225 205 205 /* For Windows the Python core is in a DLL by default. Test 206 206 Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ 207 #if !defined(MS_NO_COREDLL) && !defined(Py_NO_ENABLE_SHARED) && !defined(_XBOX) && !defined(_WIN32)207 #if !defined(MS_NO_COREDLL) && !defined(Py_NO_ENABLE_SHARED) && !defined(_XBOX)
