mirror of
				https://git.zaroz.cloud/nintendo-back-up/yuzu/yuzu.git
				synced 2025-05-12 00:45:25 +00:00 
			
		
		
		
	Common: Move IO-specific compatibility macros to file_util.cpp
This commit is contained in:
		
							parent
							
								
									bf12f270b3
								
							
						
					
					
						commit
						f3c096951b
					
				| @ -117,14 +117,6 @@ inline u64 _rotr64(u64 x, unsigned int shift){ | |||||||
|         return old_locale; |         return old_locale; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| // 64 bit offsets for windows
 |  | ||||||
|     #define fseeko _fseeki64 |  | ||||||
|     #define ftello _ftelli64 |  | ||||||
|     #define atoll _atoi64 |  | ||||||
|     #define stat64 _stat64 |  | ||||||
|     #define fstat64 _fstat64 |  | ||||||
|     #define fileno _fileno |  | ||||||
| 
 |  | ||||||
|     extern "C" { |     extern "C" { | ||||||
|         __declspec(dllimport) void __stdcall DebugBreak(void); |         __declspec(dllimport) void __stdcall DebugBreak(void); | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -7,37 +7,45 @@ | |||||||
| #include "common/file_util.h" | #include "common/file_util.h" | ||||||
| 
 | 
 | ||||||
| #ifdef _WIN32 | #ifdef _WIN32 | ||||||
| #include <windows.h> |     #include <windows.h> | ||||||
| #include <shlobj.h>        // for SHGetFolderPath
 |     #include <shlobj.h> // for SHGetFolderPath
 | ||||||
| #include <shellapi.h> |     #include <shellapi.h> | ||||||
| #include <commdlg.h>    // for GetSaveFileName
 |     #include <commdlg.h> // for GetSaveFileName
 | ||||||
| #include <io.h> |     #include <io.h> | ||||||
| #include <direct.h>        // getcwd
 |     #include <direct.h> // getcwd
 | ||||||
| #include <tchar.h> |     #include <tchar.h> | ||||||
|  |      | ||||||
|  |     // 64 bit offsets for windows
 | ||||||
|  |     #define fseeko _fseeki64 | ||||||
|  |     #define ftello _ftelli64 | ||||||
|  |     #define atoll _atoi64 | ||||||
|  |     #define stat64 _stat64 | ||||||
|  |     #define fstat64 _fstat64 | ||||||
|  |     #define fileno _fileno | ||||||
| #else | #else | ||||||
| #include <sys/param.h> |     #include <sys/param.h> | ||||||
| #include <sys/types.h> |     #include <sys/types.h> | ||||||
| #include <dirent.h> |     #include <dirent.h> | ||||||
| #include <pwd.h> |     #include <pwd.h> | ||||||
| #include <unistd.h> |     #include <unistd.h> | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #if defined(__APPLE__) | #if defined(__APPLE__) | ||||||
| #include <CoreFoundation/CFString.h> |     #include <CoreFoundation/CFString.h> | ||||||
| #include <CoreFoundation/CFURL.h> |     #include <CoreFoundation/CFURL.h> | ||||||
| #include <CoreFoundation/CFBundle.h> |     #include <CoreFoundation/CFBundle.h> | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #include <algorithm> | #include <algorithm> | ||||||
| #include <sys/stat.h> | #include <sys/stat.h> | ||||||
| 
 | 
 | ||||||
| #ifndef S_ISDIR | #ifndef S_ISDIR | ||||||
| #define S_ISDIR(m)  (((m)&S_IFMT) == S_IFDIR) |     #define S_ISDIR(m)  (((m)&S_IFMT) == S_IFDIR) | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #ifdef BSD4_4 | #ifdef BSD4_4 | ||||||
| #define stat64 stat |     #define stat64 stat | ||||||
| #define fstat64 fstat |     #define fstat64 fstat | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| // This namespace has various generic functions related to files and paths.
 | // This namespace has various generic functions related to files and paths.
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Yuri Kunde Schlesner
						Yuri Kunde Schlesner