diff --git a/emummc/source/utils/types.h b/emummc/source/utils/types.h index ce4db820c..42bb1fad9 100644 --- a/emummc/source/utils/types.h +++ b/emummc/source/utils/types.h @@ -18,6 +18,7 @@ #define _TYPES_H_ #include +#include #define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1)) #define MAX(a, b) ((a) > (b) ? (a) : (b)) @@ -58,12 +59,6 @@ typedef u32 Result; ///< Function error code result type. #define INVALID_HANDLE ((Handle) 0) #define CUR_PROCESS_HANDLE ((Handle) 0xFFFF8001) -#ifndef __cplusplus -typedef int bool; -#define true 1 -#define false 0 -#endif /* __cplusplus */ - #define BOOT_CFG_AUTOBOOT_EN (1 << 0) #define BOOT_CFG_FROM_LAUNCH (1 << 1) #define BOOT_CFG_SEPT_RUN (1 << 7) diff --git a/exosphere/program/program.ld b/exosphere/program/program.ld index f0ec57a71..2cbd831ef 100644 --- a/exosphere/program/program.ld +++ b/exosphere/program/program.ld @@ -106,6 +106,7 @@ SECTIONS .debug_code : { KEEP (*(.text._ZN3ams3log6PrintfEPKcz .text._ZN3ams3log7VPrintfEPKcSt9__va_list .text._ZN3ams3log4DumpEPKvm)) KEEP (*(.text._ZN3ams4util10TVSNPrintfEPcmPKcSt9__va_list .text._ZN3ams4util12_GLOBAL__N_114TVSNPrintfImplEPcmPKcSt9__va_list .text._ZZN3ams4util12_GLOBAL__N_114TVSNPrintfImplEPcmPKcSt9__va_listENKUlbmE3_clEbm)) + KEEP (*(.text._ZN3ams4util12_GLOBAL__N_1L14TVSNPrintfImplEPcmPKcSt9__va_list .text._ZZN3ams4util12_GLOBAL__N_1L14TVSNPrintfImplEPcmPKcSt9__va_listENKUlbmE_clEbm)) KEEP(secmon_exception_handler.o(.text*)) secmon_exception_handler.o(.rodata*) secmon_exception_handler.o(.data*) diff --git a/libraries/libstratosphere/include/stratosphere/ncm/ncm_content_meta_extended_data.hpp b/libraries/libstratosphere/include/stratosphere/ncm/ncm_content_meta_extended_data.hpp index dc693875a..f8888e49f 100644 --- a/libraries/libstratosphere/include/stratosphere/ncm/ncm_content_meta_extended_data.hpp +++ b/libraries/libstratosphere/include/stratosphere/ncm/ncm_content_meta_extended_data.hpp @@ -282,7 +282,7 @@ namespace ams::ncm { } const FragmentSet *GetFragmentSet(s32 delta_index, s32 fragment_set_index) const { - return reinterpret_cast(this->GetFragmentSetIndex(delta_index, fragment_set_index)); + return reinterpret_cast(this->GetFragmentSetAddress(delta_index, fragment_set_index)); } const FragmentIndicator *GetFragmentIndicator(s32 delta_index, s32 fragment_set_index, s32 index) const { diff --git a/libraries/libstratosphere/source/fs/fs_scoped_setter.hpp b/libraries/libstratosphere/source/fs/fs_scoped_setter.hpp index fc867aeb6..d488fdc93 100644 --- a/libraries/libstratosphere/source/fs/fs_scoped_setter.hpp +++ b/libraries/libstratosphere/source/fs/fs_scoped_setter.hpp @@ -33,14 +33,14 @@ namespace ams::fs { } ALWAYS_INLINE ScopedSetter(ScopedSetter &&rhs) { - m_ptr = rhs.ptr; - m_value = rhs.value; + m_ptr = rhs.m_ptr; + m_value = rhs.m_value; rhs.Reset(); } ALWAYS_INLINE ScopedSetter &operator=(ScopedSetter &&rhs) { - m_ptr = rhs.ptr; - m_value = rhs.value; + m_ptr = rhs.m_ptr; + m_value = rhs.m_value; rhs.Reset(); return *this; } diff --git a/libraries/libstratosphere/source/sf/hipc/sf_hipc_server_manager.cpp b/libraries/libstratosphere/source/sf/hipc/sf_hipc_server_manager.cpp index b4d959b24..a67ae4800 100644 --- a/libraries/libstratosphere/source/sf/hipc/sf_hipc_server_manager.cpp +++ b/libraries/libstratosphere/source/sf/hipc/sf_hipc_server_manager.cpp @@ -21,7 +21,7 @@ namespace ams::sf::hipc { #if AMS_SF_MITM_SUPPORTED Result ServerManagerBase::InstallMitmServerImpl(os::NativeHandle *out_port_handle, sm::ServiceName service_name, ServerManagerBase::MitmQueryFunction query_func) { /* Install the Mitm. */ - os::NativeHandle query_handle; + os::NativeHandle query_handle = os::InvalidNativeHandle; R_TRY(sm::mitm::InstallMitm(out_port_handle, std::addressof(query_handle), service_name)); /* Register the query handle. */ diff --git a/libraries/libvapours/include/vapours/types.hpp b/libraries/libvapours/include/vapours/types.hpp index e7b75a8f0..d22f944ab 100644 --- a/libraries/libvapours/include/vapours/types.hpp +++ b/libraries/libvapours/include/vapours/types.hpp @@ -16,7 +16,6 @@ #pragma once #include #include -#include /* NOTE: This file serves as a substitute for libnx . */ diff --git a/libraries/libvapours/source/crypto/crypto_memory_compare.arch.arm.cpp b/libraries/libvapours/source/crypto/crypto_memory_compare.arch.arm.cpp index 671e49a84..1a2d54846 100644 --- a/libraries/libvapours/source/crypto/crypto_memory_compare.arch.arm.cpp +++ b/libraries/libvapours/source/crypto/crypto_memory_compare.arch.arm.cpp @@ -48,7 +48,7 @@ namespace ams::crypto { " moveq %[result], #1\n" " movne %[result], #0\n" : [result]"=r"(result), [lhs]"+r"(lhs), [rhs]"+r"(rhs), [xor_acc]"=&r"(xor_acc), [index]"=&r"(index), [ltmp]"=&r"(ltmp), [rtmp]"=&r"(rtmp) - : [size]"r"(size) + : "m"(*(const u8 (*)[size])lhs), "m"(*(const u8 (*)[size])rhs), [size]"r"(size) : "cc" ); diff --git a/libraries/libvapours/source/crypto/crypto_memory_compare.arch.arm64.cpp b/libraries/libvapours/source/crypto/crypto_memory_compare.arch.arm64.cpp index 2532415d4..7fdd814d1 100644 --- a/libraries/libvapours/source/crypto/crypto_memory_compare.arch.arm64.cpp +++ b/libraries/libvapours/source/crypto/crypto_memory_compare.arch.arm64.cpp @@ -47,7 +47,7 @@ namespace ams::crypto { " cmp %w[xor_acc], #0\n" " cset %w[result], eq\n" : [result]"=r"(result), [lhs]"+r"(lhs), [rhs]"+r"(rhs), [xor_acc]"=&r"(xor_acc), [index]"=&r"(index), [ltmp]"=&r"(ltmp), [rtmp]"=&r"(rtmp) - : "m"(*(const u8 (*)[size])lhs), "m"(*(const u8 (*)[size])lhs), [size]"r"(size) + : "m"(*(const u8 (*)[size])lhs), "m"(*(const u8 (*)[size])rhs), [size]"r"(size) : "cc" ); diff --git a/libraries/libvapours/source/crypto/impl/crypto_sha256_impl.arch.arm64.cpp b/libraries/libvapours/source/crypto/impl/crypto_sha256_impl.arch.arm64.cpp index a332d7658..74ff84b47 100644 --- a/libraries/libvapours/source/crypto/impl/crypto_sha256_impl.arch.arm64.cpp +++ b/libraries/libvapours/source/crypto/impl/crypto_sha256_impl.arch.arm64.cpp @@ -281,7 +281,7 @@ namespace ams::crypto::impl { [cur_hash0]"+w"(cur_hash0), [cur_hash1]"+w"(cur_hash1), [prev_hash0]"+w"(prev_hash0), [prev_hash1]"+w"(prev_hash1), [tmp_hash]"=w"(tmp_hash), [data]"+r"(data) - : [round_constants]"r"(RoundConstants) + : "m"(*(const u8 (*)[block_count*BlockSize])data), [round_constants]"r"(RoundConstants) : ); } while (--block_count != 0);