Commit Graph

101 Commits

Author SHA1 Message Date
Nekotekina 839e088ae5 Fix long path support on Windows for UNC path
Such as network locations.
2019-10-27 18:53:40 +03:00
RipleyTom 9f9ac4b696 Auto-updater 2019-10-22 01:51:50 +02:00
Nekotekina 7ca76ae5a8 Workaround fs::create_path for drive roots
Should fix the regression from #6763
2019-10-15 18:57:16 +03:00
Nekotekina 6b1df1ce31 fs: add long path support on Windows
Extend path limit with \\?\ prefix.
2019-10-14 19:42:13 +03:00
Nekotekina aa659f3c36 Fix minor warning 2019-10-06 20:40:53 +03:00
Rajko Stojadinovic 297e3c5996 Make windows_file::stat return the same mtime as fs::stat 2019-10-05 14:25:34 +03:00
Nekotekina 8f47f9517a Fix fs::create_path
Don't try to create already existing parents
2019-09-24 16:18:28 +03:00
Nekotekina aa8a7b3e8a Make errors in Emu::Init verbose and don't crash
Allow TTY.log to be disabled if file access failed
Add fs::error::isdir
2019-09-24 05:01:00 +03:00
Kaiwen Xu 68071ddf83 Convert EROFS error 2019-09-05 23:05:30 +03:00
isJuhn 08c12f4c00 File.cpp: add rounding_alignment argument to get_dir_size to allow GetSizeKB functions to report size more accurately 2019-09-03 03:19:49 +03:00
Eladash 95f22b76c6 Fixup after #6329 2019-08-13 04:56:00 +03:00
Eladash d48d424b19 Return immediatly from fs::remove_all on failure to remove entries
This way error code will be reflected properly
2019-08-12 14:37:23 +03:00
msuih d57124d075 Explicitly cast size_t to integer types 2019-07-01 04:33:23 +03:00
Nekotekina b2e08100ff Fix sad bug 2019-06-04 19:13:30 +03:00
Nekotekina 447029a700 Implement fs::file::write_gather (Vectored I/O) 2019-06-03 23:18:39 +03:00
Nekotekina d52df9352c fs::rename, use renameat2 on Linux 2019-04-13 22:56:11 +03:00
Nekotekina 0736fc8b28 Add fs::file::set_delete 2019-04-10 13:58:12 +03:00
Nekotekina a54d9c527f Simplify fs::file::get_handle
Via fs::file_base::get_native_handle method
2019-04-10 13:58:12 +03:00
Nekotekina a419e98acb Move PPU and shader cache
New hash-based location (already used for SPU)
Bump PPU cache version, improve naming and decrease size

Remove fs::get_data_dir
Disable boot.elf cache
2019-01-14 01:24:05 +03:00
Nekotekina bd9131ae1c Implement fs::get_cache_dir
Win32: equal to config dir for now
Linux: respect XDG_CACHE_HOME if specified
OSX: possibly incomplete
2019-01-13 14:45:36 +03:00
Nekotekina 20efed66e9 Implement RPCS3_CONFIG_DIR env variable (Win32)
Overrides config location, should end with / or \
2019-01-13 14:45:36 +03:00
Jan Beich 33f7a39f5d fs: implement copy_file() fallback
sendfile(2) on DragonFly and FreeBSD can only write into sockets.
2018-12-29 18:07:45 +03:00
vit9696 5a40c1802b Support macOS bundling for binary distribution 2018-12-16 18:17:21 +03:00
Nekotekina 1fdd013e4b fs: normalize atime (ensure atime >= mtime) 2018-11-17 14:40:11 +03:00
Nekotekina c719ae360d fs: disable ctime (return mtime instead) 2018-11-17 14:40:11 +03:00
Nekotekina e8b5555630 Rewrite vfs::get and vfs::mount
Preprocess . and .. correctly
Don't use recursive locking
Also use std::string_view
Fix format system for std::string and std::string_view
Fix fmt::merge for std::string_view
2018-09-15 17:09:56 +03:00
Nekotekina ca5158a03e Cleanup semaphore<> (sema.h) and mutex.h (shared_mutex)
Remove semaphore_lock and writer_lock classes, replace with std::lock_guard
Change semaphore<> interface to Lockable (+ exotic try_unlock method)
2018-09-03 23:00:36 +03:00
Nekotekina 8abe6489ed Mega-cleanup for atomic_t<> and named bit-sets bs_t<>
Remove "atomic operator" classes
Remove test, test_and_set, test_and_reset, test_and_complement global functions
Simplify atomic_t<> with constexpr if, remove some garbage
Redesign bs_t<> to use class, mark its methods constexpr
Implement atomic_bs_t<> for optimizations
Remove unused __bitwise_ops concept (should be in other header anyway)
Bitsets can now be tested via safe bool conversion
2018-09-03 21:40:36 +03:00
Nekotekina 441541a42f Implement fs::make_gather 2018-08-14 12:46:22 +03:00
Nekotekina eae78a8711 Improve fs::create_path
Don't fail if already exists
2018-05-09 22:19:55 +03:00
Nekotekina f66d5adf5f Prevent accessing incomplete RPCS3.log.gz
Use permissions to make it inaccessible
On Windows, autodelete the file

Implement fs::unread for this purpose
Rename fs::unshare to fs::lock
Fix fs::lock correctness
2018-03-17 00:39:45 +03:00
Zeke Sonxx c21fa2d8bc Make fs::dir::open skip forward on failed metadata instead of crashing 2018-02-04 00:21:40 +04:00
Nekotekina 2ac773385f Clamp utime range (Wnd) 2017-11-26 09:02:37 +03:00
Nekotekina e77d5cf970 Revert ERROR_INVALID_PARAMETERS
I don't want to ignore serious problems in light of easy workarounds.
2017-11-23 18:38:05 +03:00
Nekotekina 6a5ce475b8 Implement fs::unshare (linux) 2017-11-23 18:38:05 +03:00
Unknown 380f90b097 Handle Win32 error 87 ERROR_INVALID_PARAMETER with fs::error::inval 2017-11-20 17:55:41 +03:00
Ani 9b8eb089b1 Handle device not ready in fs::error. Solves #3592 2017-10-29 16:52:12 +03:00
Nekotekina 837c5dddee Add <typeinfo> 2017-09-19 15:07:07 +03:00
Nekotekina 669d953529 Implement fs::error::notempty 2017-09-14 00:23:23 +03:00
Nekotekina e00aedd1a0 fs: minor fix 2017-09-14 00:23:23 +03:00
Nekotekina b415b0e737 fs: atomic truncation 2017-09-04 02:15:29 +03:00
Nekotekina 010b75251f fs::rename fixed
Added overwriting policy
sys_fs_rename improved
2017-08-30 17:14:30 +03:00
Nekotekina a771fcb397 Fill log with \n 2017-08-29 17:12:13 +03:00
Nekotekina 2570911283 Register Win32 error 32 2017-08-27 16:09:34 +03:00
Nekotekina 025a09ed87 Optimize RPCS3.log and limit it to 64 MiB
Use memory-mapped file for writing
2017-08-23 23:11:18 +03:00
Nekotekina d0e171784c Implemented fs::file::get_handle 2017-08-22 21:18:26 +03:00
Jan Beich 392d91b604 Improve portability for BSDs (#2813)
* sys_net: don't use fds_bits from a system header on FreeBSD

rpcs3/Emu/Cell/Modules/sys_net.cpp:137:14: error: no member named '__fds_bits' in
      'sys_net::fd_set'; did you mean 'fds_bits'?
                                if (src->fds_bits[i] & (1 << bit))
                                         ^~~~~~~~
                                         fds_bits
/usr/include/sys/select.h:75:18: note: expanded from macro 'fds_bits'
#define fds_bits        __fds_bits
                        ^
rpcs3/Emu/Cell/Modules/sys_net.h:114:13: note: 'fds_bits' declared here
                be_t<u32> fds_bits[32];
                          ^

* GUI: fallback to xdg-open on other Unices

rpcs3/Gui/GameViewer.cpp:289:26: error: use of undeclared identifier 'command'
        wxExecute(fmt::FromUTF8(command));
                                ^

* File: FreeBSD never supported copyfile(3) but sendfile(2) works fine

Utilities/File.cpp:114:10: fatal error: 'copyfile.h' file not found
#include <copyfile.h>
         ^~~~~~~~~~~~

* Thread: add signal handling for BSDs

Utilities/Thread.cpp:761:23: error: use of undeclared identifier 'REG_RAX'
static const decltype(REG_RAX) reg_table[] =
                      ^
Utilities/Thread.cpp:763:2: error: use of undeclared identifier 'REG_RAX'
        REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
        ^
Utilities/Thread.cpp:763:11: error: use of undeclared identifier 'REG_RCX'
        REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
                 ^
Utilities/Thread.cpp:763:20: error: use of undeclared identifier 'REG_RDX'
        REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
                          ^
Utilities/Thread.cpp:763:29: error: use of undeclared identifier 'REG_RBX'
        REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
                                   ^
Utilities/Thread.cpp:763:38: error: use of undeclared identifier 'REG_RSP'
        REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
                                            ^
Utilities/Thread.cpp:763:47: error: use of undeclared identifier 'REG_RBP'
        REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
                                                     ^
Utilities/Thread.cpp:763:56: error: use of undeclared identifier 'REG_RSI'
        REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
                                                              ^
Utilities/Thread.cpp:763:65: error: use of undeclared identifier 'REG_RDI'
        REG_RAX, REG_RCX, REG_RDX, REG_RBX, REG_RSP, REG_RBP, REG_RSI, REG_RDI,
                                                                       ^
Utilities/Thread.cpp:764:2: error: use of undeclared identifier 'REG_R8'
        REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
        ^
Utilities/Thread.cpp:764:10: error: use of undeclared identifier 'REG_R9'
        REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
                ^
Utilities/Thread.cpp:764:18: error: use of undeclared identifier 'REG_R10'
        REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
                        ^
Utilities/Thread.cpp:764:27: error: use of undeclared identifier 'REG_R11'
        REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
                                 ^
Utilities/Thread.cpp:764:36: error: use of undeclared identifier 'REG_R12'
        REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
                                          ^
Utilities/Thread.cpp:764:45: error: use of undeclared identifier 'REG_R13'
        REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
                                                   ^
Utilities/Thread.cpp:764:54: error: use of undeclared identifier 'REG_R14'
        REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
                                                            ^
Utilities/Thread.cpp:764:63: error: use of undeclared identifier 'REG_R15'
        REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
                                                                     ^
Utilities/Thread.cpp:764:72: error: use of undeclared identifier 'REG_RIP'
        REG_R8, REG_R9, REG_R10, REG_R11, REG_R12, REG_R13, REG_R14, REG_R15, REG_RIP
                                                                              ^
Utilities/Thread.cpp:792:26: error: no member named 'gregs' in '__mcontext'
                const u64 reg_value = *X64REG(context, reg - X64R_RAX);
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:804:21: error: no member named 'gregs' in '__mcontext'
                out_value = (u8)(*X64REG(context, reg - X64R_AL));
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:809:21: error: no member named 'gregs' in '__mcontext'
                out_value = (u8)(*X64REG(context, reg - X64R_AH) >> 8);
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:815:31: error: no member named 'gregs' in '__mcontext'
                const s8 imm_value = *(s8*)(RIP(context) + i_size - 1);
                                            ^~~~~~~~~~~~
Utilities/Thread.cpp:784:18: note: expanded from macro 'RIP'
#define RIP(c) (*X64REG((c), 16))
                 ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:827:33: error: no member named 'gregs' in '__mcontext'
                const s16 imm_value = *(s16*)(RIP(context) + i_size - 2);
                                              ^~~~~~~~~~~~
Utilities/Thread.cpp:784:18: note: expanded from macro 'RIP'
#define RIP(c) (*X64REG((c), 16))
                 ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:836:33: error: no member named 'gregs' in '__mcontext'
                const s32 imm_value = *(s32*)(RIP(context) + i_size - 4);
                                              ^~~~~~~~~~~~
Utilities/Thread.cpp:784:18: note: expanded from macro 'RIP'
#define RIP(c) (*X64REG((c), 16))
                 ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:846:20: error: no member named 'gregs' in '__mcontext'
                out_value = (u32)RCX(context);
                                 ^~~~~~~~~~~~
Utilities/Thread.cpp:779:18: note: expanded from macro 'RCX'
#define RCX(c) (*X64REG((c), 1))
                 ^~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:851:19: error: no member named 'gregs' in '__mcontext'
                const u32 _cf = EFLAGS(context) & 0x1;
                                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:851:19: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:852:19: error: no member named 'gregs' in '__mcontext'
                const u32 _zf = EFLAGS(context) & 0x40;
                                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:852:19: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:853:19: error: no member named 'gregs' in '__mcontext'
                const u32 _sf = EFLAGS(context) & 0x80;
                                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:853:19: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:854:19: error: no member named 'gregs' in '__mcontext'
                const u32 _of = EFLAGS(context) & 0x800;
                                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:854:19: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:855:19: error: no member named 'gregs' in '__mcontext'
                const u32 _pf = EFLAGS(context) & 0x4;
                                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:855:19: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:885:12: error: no member named 'gregs' in '__mcontext'
                case 1: *X64REG(context, reg - X64R_RAX) = value & 0xff | *X64REG(context, re...
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:885:62: error: no member named 'gregs' in '__mcontext'
  ...*X64REG(context, reg - X64R_RAX) = value & 0xff | *X64REG(context, reg - X64R_RAX) & 0xffffff...
                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:886:12: error: no member named 'gregs' in '__mcontext'
                case 2: *X64REG(context, reg - X64R_RAX) = value & 0xffff | *X64REG(context, ...
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:886:64: error: no member named 'gregs' in '__mcontext'
  ...reg - X64R_RAX) = value & 0xffff | *X64REG(context, reg - X64R_RAX) & 0xffff0000; return true;
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:887:12: error: no member named 'gregs' in '__mcontext'
                case 4: *X64REG(context, reg - X64R_RAX) = value & 0xffffffff; return true;
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:888:12: error: no member named 'gregs' in '__mcontext'
                case 8: *X64REG(context, reg - X64R_RAX) = value; return true;
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:913:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) |= 0x1; // set CF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:913:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:917:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) &= ~0x1; // clear CF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:917:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:922:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) |= 0x40; // set ZF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:922:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:926:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) &= ~0x40; // clear ZF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:926:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:931:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) |= 0x80; // set SF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:931:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:935:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) &= ~0x80; // clear SF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:935:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:940:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) |= 0x800; // set OF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:940:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:944:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) &= ~0x800; // clear OF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:944:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:953:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) |= 0x4; // set PF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:953:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:957:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) &= ~0x4; // clear PF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:957:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:962:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) |= 0x10; // set AF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:962:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:966:3: error: no member named 'gregs' in '__mcontext'
                EFLAGS(context) &= ~0x10; // clear AF
                ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:966:3: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:976:7: error: no member named 'gregs' in '__mcontext'
                if (EFLAGS(context) & 0x400 /* direction flag */)
                    ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:769:49: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                         ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:976:7: error: use of undeclared identifier 'REG_EFL'
Utilities/Thread.cpp:769:55: note: expanded from macro 'EFLAGS'
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
                                                      ^
Utilities/Thread.cpp:1020:25: error: no member named 'gregs' in '__mcontext'
        auto code = (const u8*)RIP(context);
                               ^~~~~~~~~~~~
Utilities/Thread.cpp:784:18: note: expanded from macro 'RIP'
#define RIP(c) (*X64REG((c), 16))
                 ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:1146:3: error: no member named 'gregs' in '__mcontext'
                RIP(context) += i_size;
                ^~~~~~~~~~~~
Utilities/Thread.cpp:784:18: note: expanded from macro 'RIP'
#define RIP(c) (*X64REG((c), 16))
                 ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:1368:47: error: no member named 'gregs' in '__mcontext'
        const bool is_writing = context->uc_mcontext.gregs[REG_ERR] & 0x2;
                                ~~~~~~~~~~~~~~~~~~~~ ^
Utilities/Thread.cpp:1368:53: error: use of undeclared identifier 'REG_ERR'
        const bool is_writing = context->uc_mcontext.gregs[REG_ERR] & 0x2;
                                                           ^
Utilities/Thread.cpp:1393:89: error: no member named 'gregs' in '__mcontext'
  ...%s location %p at %p.", cause, info->si_addr, RIP(context)));
                                                   ^~~~~~~~~~~~
Utilities/Thread.cpp:784:18: note: expanded from macro 'RIP'
#define RIP(c) (*X64REG((c), 16))
                 ^~~~~~~~~~~~~~~
Utilities/Thread.cpp:767:55: note: expanded from macro 'X64REG'
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
                               ~~~~~~~~~~~~~~~~~~~~~~ ^

* Thread: add explict casts for incomplete pthread_t on some platforms

Utilities/Thread.cpp:1467:17: error: no viable overloaded '='
        ctrl->m_thread = thread;
        ~~~~~~~~~~~~~~ ^ ~~~~~~
Utilities/Atomic.h:776:12: note: candidate function not viable: cannot convert argument of
      incomplete type 'pthread_t' (aka 'pthread *') to 'const atomic_t<unsigned long>' for 1st
      argument
        atomic_t& operator =(const atomic_t&) = delete;
                  ^
Utilities/Atomic.h:902:7: note: candidate function not viable: cannot convert argument of
      incomplete type 'pthread_t' (aka 'pthread *') to 'const type' (aka 'const unsigned long') for
      1st argument
        type operator =(const type& rhs)
             ^
Utilities/Thread.cpp:1656:3: error: no matching function for call to 'pthread_detach'
                pthread_detach(m_thread.raw());
                ^~~~~~~~~~~~~~
/usr/include/pthread.h:218:6: note: candidate function not viable: no known conversion from 'type'
      (aka 'unsigned long') to 'pthread_t' (aka 'pthread *') for 1st argument
int             pthread_detach(pthread_t);
                ^

* build: dlopen() maybe in libc

/usr/bin/ld: cannot find -ldl
c++: error: linker command failed with exit code 1 (use -v to see invocation)

* build: iconv() maybe available on some BSDs in libc

/usr/bin/ld: cannot find -liconv
c++: error: linker command failed with exit code 1 (use -v to see invocation)

* build: hidapi-hidraw is only built on Linux

/usr/bin/ld: cannot find -lhidapi-hidraw
c++: error: linker command failed with exit code 1 (use -v to see invocation)

* Thread: use getrusage() on more POSIX-like systems

* Qt: don't return NULL handle on other platforms

rpcs3/rpcs3qt/gs_frame.cpp:120:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^

* build: properly disable Vulkan on other platforms

In file included from rpcs3/rpcs3_app.cpp:40:
In file included from rpcs3/Emu/RSX/VK/VKGSRender.h:3:
rpcs3/Emu/RSX/VK/VKHelpers.h:1209:42: error: unknown type name 'device_queues'
                        std::vector<VkBool32> supportsPresent(device_queues);
                                                              ^
rpcs3/Emu/RSX/VK/VKHelpers.h:1211:4: error: expected member name or ';' after declaration specifiers
                        for (u32 index = 0; index < device_queues; index++)
                        ^
rpcs3/Emu/RSX/VK/VKHelpers.h:1221:4: error: expected member name or ';' after declaration specifiers
                        for (u32 i = 0; i < device_queues; i++)
                        ^
rpcs3/Emu/RSX/VK/VKHelpers.h:1256:4: error: expected member name or ';' after declaration specifiers
                        if (graphicsQueueNodeIndex != presentQueueNodeIndex)
                        ^
rpcs3/Emu/RSX/VK/VKHelpers.h:1261:4: error: expected member name or ';' after declaration specifiers
                        CHECK_RESULT(vkGetPhysicalDeviceSurfaceFormatsKHR(dev, surface, &formatCount, nullptr));
                        ^
[...]
/usr/bin/ld: cannot find -lvulkan
c++: error: linker command failed with exit code 1 (use -v to see invocation)

* build: make install/strip work by moving commands

* Qt: create surface for GL context if it wasn't ready

  #0  strlen (str=0x0) at /usr/src/lib/libc/string/strlen.c:100
  #1  0x000000000090f02e in std::__1::char_traits<char>::length (__s=0x0)
      at /usr/include/c++/v1/__string:215
  #2  std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string (__s=0x0, this=<optimized out>) at /usr/include/c++/v1/string:1547
  #3  gl::capabilities::initialize (this=0x2ba32a0 <gl::g_driver_caps>)
      at rpcs3/Emu/RSX/GL/GLHelpers.h:133
  #4  0x000000000090d3dd in gl::get_driver_caps () at rpcs3/Emu/RSX/GL/GLHelpers.cpp:56
  #5  0x00000000008fa511 in GLGSRender::on_init_thread (this=0x838d30018)
      at rpcs3/Emu/RSX/GL/GLGSRender.cpp:484
  #6  0x0000000000938f9e in rsx:🧵:on_task (this=0x838d30018)
      at rpcs3/Emu/RSX/RSXThread.cpp:334
  #7  0x0000000000abc329 in task_stack::task_type<named_thread::start_thread(std::__1::shared_ptr<void> const&)::$_10>::invoke() ()
  #8  0x0000000000abc114 in thread_ctrl::start(std::__1::shared_ptr<thread_ctrl> const&, task_stack)::$_7::__invoke(void*) ()
  #9  0x0000000801e60c35 in thread_start (curthread=0x843650a00)
      at /usr/src/lib/libthr/thread/thr_create.c:289
  #10 0x0000000000000000 in ?? ()

* build: don't abort without git metadata

-- Found Git: /usr/local/bin/git (found version "2.13.1")
fatal: Not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
CMake Warning at git-version.cmake:12 (message):
  git rev-list failed, unable to include version.

* build: non-parallel needs git-version.h earlier

rpcs3/rpcs3_version.cpp:3:10: fatal error: 'git-version.h' file not found
 #include "git-version.h"
          ^~~~~~~~~~~~~~~
1 error generated.
2017-06-22 21:03:41 +03:00
Nekotekina 45908b9dd8 fs::statfs fixed 2017-05-15 14:37:05 +03:00
Nekotekina f42b830ce9 fs::statfs implemented 2017-04-26 02:27:35 +03:00
Nekotekina 256dfc5729 sys_fs_fsync implemented
sys_fs_fdatasync implemented as equal function
2017-04-26 02:27:34 +03:00