diff --git a/src/alloy/backend/ivm/ivm_assembler.cc b/src/alloy/backend/ivm/ivm_assembler.cc index ff665b8f3..bfd7600a7 100644 --- a/src/alloy/backend/ivm/ivm_assembler.cc +++ b/src/alloy/backend/ivm/ivm_assembler.cc @@ -109,7 +109,7 @@ int IVMAssembler::Assemble( // Fixup label references. LabelRef* label_ref = ctx.label_ref_head; while (label_ref) { - label_ref->instr->src1_reg = (uint32_t)label_ref->label->tag & ~0x80000000; + label_ref->instr->src1_reg = (uint32_t)(intptr_t)label_ref->label->tag & ~0x80000000; label_ref = label_ref->next; } diff --git a/src/alloy/backend/ivm/tracing.h b/src/alloy/backend/ivm/tracing.h index a1fcdf20d..526aa912e 100644 --- a/src/alloy/backend/ivm/tracing.h +++ b/src/alloy/backend/ivm/tracing.h @@ -32,17 +32,17 @@ public: ALLOY_BACKEND_IVM_ASSEMBLER_DEINIT = ALLOY_BACKEND_IVM_ASSEMBLER | (2), }; - typedef struct { + typedef struct Init_s { static const uint32_t event_type = ALLOY_BACKEND_IVM_INIT; } Init; - typedef struct { + typedef struct Deinit_s { static const uint32_t event_type = ALLOY_BACKEND_IVM_DEINIT; } Deinit; - typedef struct { + typedef struct AssemblerInit_s { static const uint32_t event_type = ALLOY_BACKEND_IVM_ASSEMBLER_INIT; } AssemblerInit; - typedef struct { + typedef struct AssemblerDeinit_s { static const uint32_t event_type = ALLOY_BACKEND_IVM_ASSEMBLER_DEINIT; } AssemblerDeinit; }; diff --git a/src/alloy/backend/x64/lowering/tracers.h b/src/alloy/backend/x64/lowering/tracers.h index 9afd58448..e0536c7c5 100644 --- a/src/alloy/backend/x64/lowering/tracers.h +++ b/src/alloy/backend/x64/lowering/tracers.h @@ -11,6 +11,7 @@ #define ALLOY_BACKEND_X64_X64_LOWERING_TRACERS_H_ #include +#include namespace alloy { diff --git a/src/alloy/backend/x64/tracing.h b/src/alloy/backend/x64/tracing.h index 36d814d67..e6689b830 100644 --- a/src/alloy/backend/x64/tracing.h +++ b/src/alloy/backend/x64/tracing.h @@ -32,17 +32,17 @@ public: ALLOY_BACKEND_X64_ASSEMBLER_DEINIT = ALLOY_BACKEND_X64_ASSEMBLER | (2), }; - typedef struct { + typedef struct Init_s { static const uint32_t event_type = ALLOY_BACKEND_X64_INIT; } Init; - typedef struct { + typedef struct Deinit_s { static const uint32_t event_type = ALLOY_BACKEND_X64_DEINIT; } Deinit; - typedef struct { + typedef struct AssemblerInit_s { static const uint32_t event_type = ALLOY_BACKEND_X64_ASSEMBLER_INIT; } AssemblerInit; - typedef struct { + typedef struct AssemblerDeinit_s { static const uint32_t event_type = ALLOY_BACKEND_X64_ASSEMBLER_DEINIT; } AssemblerDeinit; }; diff --git a/src/alloy/compiler/tracing.h b/src/alloy/compiler/tracing.h index 04da6d9ee..85d99992a 100644 --- a/src/alloy/compiler/tracing.h +++ b/src/alloy/compiler/tracing.h @@ -27,10 +27,10 @@ public: ALLOY_COMPILER_DEINIT = ALLOY_COMPILER | (2), }; - typedef struct { + typedef struct Init_s { static const uint32_t event_type = ALLOY_COMPILER_INIT; } Init; - typedef struct { + typedef struct Deinit_s { static const uint32_t event_type = ALLOY_COMPILER_DEINIT; } Deinit; }; diff --git a/src/alloy/delegate.h b/src/alloy/delegate.h index e6ad2fcd1..176ff4b6b 100644 --- a/src/alloy/delegate.h +++ b/src/alloy/delegate.h @@ -11,6 +11,7 @@ #define ALLOY_DELEGATE_H_ #include +#include #include #include diff --git a/src/alloy/frontend/tracing.h b/src/alloy/frontend/tracing.h index 61aadb949..ad9e8dae7 100644 --- a/src/alloy/frontend/tracing.h +++ b/src/alloy/frontend/tracing.h @@ -27,10 +27,10 @@ public: ALLOY_FRONTEND_DEINIT = ALLOY_FRONTEND | (2), }; - typedef struct { + typedef struct Init_s { static const uint32_t event_type = ALLOY_FRONTEND_INIT; } Init; - typedef struct { + typedef struct Deinit_s { static const uint32_t event_type = ALLOY_FRONTEND_DEINIT; } Deinit; }; diff --git a/src/alloy/runtime/entry_table.h b/src/alloy/runtime/entry_table.h index e9f1ca9f2..acbabc26e 100644 --- a/src/alloy/runtime/entry_table.h +++ b/src/alloy/runtime/entry_table.h @@ -47,7 +47,7 @@ public: private: // TODO(benvanik): replace with a better data structure. Mutex* lock_; - typedef std::tr1::unordered_map EntryMap; + typedef std::unordered_map EntryMap; EntryMap map_; }; diff --git a/src/alloy/runtime/module.h b/src/alloy/runtime/module.h index 005e325a1..c05e009ca 100644 --- a/src/alloy/runtime/module.h +++ b/src/alloy/runtime/module.h @@ -62,7 +62,7 @@ protected: private: // TODO(benvanik): replace with a better data structure. Mutex* lock_; - typedef std::tr1::unordered_map SymbolMap; + typedef std::unordered_map SymbolMap; SymbolMap map_; typedef std::vector SymbolList; SymbolList list_; diff --git a/src/alloy/runtime/tracing.h b/src/alloy/runtime/tracing.h index 005562d07..262662b90 100644 --- a/src/alloy/runtime/tracing.h +++ b/src/alloy/runtime/tracing.h @@ -40,46 +40,46 @@ public: ALLOY_RUNTIME_MEMORY_HEAP_FREE = ALLOY_RUNTIME_MEMORY | (4), }; - typedef struct { + typedef struct Init_s { static const uint32_t event_type = ALLOY_RUNTIME_INIT; } Init; - typedef struct { + typedef struct Deinit_s { static const uint32_t event_type = ALLOY_RUNTIME_DEINIT; } Deinit; - typedef struct { + typedef struct ThreadInit_s { static const uint32_t event_type = ALLOY_RUNTIME_THREAD_INIT; } ThreadInit; - typedef struct { + typedef struct ThreadDeinit_s { static const uint32_t event_type = ALLOY_RUNTIME_THREAD_DEINIT; } ThreadDeinit; - typedef struct { + typedef struct MemoryInit_s { static const uint32_t event_type = ALLOY_RUNTIME_MEMORY_INIT; // map of memory, etc? } MemoryInit; - typedef struct { + typedef struct MemoryDeinit_s { static const uint32_t event_type = ALLOY_RUNTIME_MEMORY_DEINIT; } MemoryDeinit; - typedef struct { + typedef struct MemoryHeapInit_s { static const uint32_t event_type = ALLOY_RUNTIME_MEMORY_HEAP_INIT; uint32_t heap_id; uint64_t low_address; uint64_t high_address; uint32_t is_physical; } MemoryHeapInit; - typedef struct { + typedef struct MemoryHeapDeinit_s { static const uint32_t event_type = ALLOY_RUNTIME_MEMORY_HEAP_DEINIT; uint32_t heap_id; } MemoryHeapDeinit; - typedef struct { + typedef struct MemoryHeapAlloc_s { static const uint32_t event_type = ALLOY_RUNTIME_MEMORY_HEAP_ALLOC; uint32_t heap_id; uint32_t flags; uint64_t address; size_t size; } MemoryHeapAlloc; - typedef struct { + typedef struct MemoryHeapFree_s { static const uint32_t event_type = ALLOY_RUNTIME_MEMORY_HEAP_FREE; uint32_t heap_id; uint64_t address; diff --git a/src/alloy/tracing/event_type.h b/src/alloy/tracing/event_type.h index e51353708..33e2614fb 100644 --- a/src/alloy/tracing/event_type.h +++ b/src/alloy/tracing/event_type.h @@ -33,10 +33,10 @@ public: USER = (1 << 31), }; - typedef struct { + typedef struct TraceInit_s { static const uint32_t event_type = ALLOY_TRACE_INIT; } TraceInit; - typedef struct { + typedef struct TraceEOF_s { static const uint32_t event_type = ALLOY_TRACE_EOF; } TraceEOF; }; diff --git a/src/alloy/tracing/tracing.h b/src/alloy/tracing/tracing.h index b4eb2c865..ced2081de 100644 --- a/src/alloy/tracing/tracing.h +++ b/src/alloy/tracing/tracing.h @@ -30,7 +30,7 @@ Tracer* GetThreadTracer(); void WriteEvent(uint32_t event_type, size_t size = 0, const void* data = 0); -template void WriteEvent(T& ev) { +template void WriteEvent(const T& ev) { if (sizeof(T) > 1) { alloy::tracing::WriteEvent(T::event_type, sizeof(T), &ev); } else { diff --git a/src/xenia/kernel/fs/filesystem.cc b/src/xenia/kernel/fs/filesystem.cc index 6efa53de6..e83d409c8 100644 --- a/src/xenia/kernel/fs/filesystem.cc +++ b/src/xenia/kernel/fs/filesystem.cc @@ -70,7 +70,7 @@ int FileSystem::CreateSymbolicLink(const char* path, const char* target) { } int FileSystem::DeleteSymbolicLink(const char* path) { - std::tr1::unordered_map::iterator it = + std::unordered_map::iterator it = symlinks_.find(std::string(path)); if (it != symlinks_.end()) { symlinks_.erase(it); @@ -93,7 +93,7 @@ Entry* FileSystem::ResolvePath(const char* path) { // drive path -> device mappings with nothing nested. char full_path[XE_MAX_PATH]; XEIGNORE(xestrcpya(full_path, XECOUNT(full_path), path)); - for (std::tr1::unordered_map::iterator it = + for (std::unordered_map::iterator it = symlinks_.begin(); it != symlinks_.end(); ++it) { if (xestrcasestra(path, it->first.c_str()) == path) { // Found symlink, fixup. diff --git a/src/xenia/kernel/fs/filesystem.h b/src/xenia/kernel/fs/filesystem.h index acc6dbda6..94b9d787f 100644 --- a/src/xenia/kernel/fs/filesystem.h +++ b/src/xenia/kernel/fs/filesystem.h @@ -43,7 +43,7 @@ public: private: std::vector devices_; - std::tr1::unordered_map symlinks_; + std::unordered_map symlinks_; }; diff --git a/src/xenia/platform_includes.h b/src/xenia/platform_includes.h index e9d513316..6aaf86811 100644 --- a/src/xenia/platform_includes.h +++ b/src/xenia/platform_includes.h @@ -56,13 +56,8 @@ #include #include -#if XE_COMPILER_MSVC #include #include -#else -#include -#include -#endif // MSVC #endif // XENIA_PLATFORM_INCLUDES_H_ diff --git a/src/xenia/types.h b/src/xenia/types.h index 928c71766..42d6aa658 100644 --- a/src/xenia/types.h +++ b/src/xenia/types.h @@ -16,7 +16,7 @@ namespace xe { // TODO(benvanik): support other compilers/etc using std::auto_ptr; -using std::tr1::shared_ptr; +using std::shared_ptr; } // namespace xe diff --git a/xenia.gyp b/xenia.gyp index aea3ec75f..e59823058 100644 --- a/xenia.gyp +++ b/xenia.gyp @@ -96,7 +96,7 @@ 'SYMROOT': '<(DEPTH)/build/xenia/', 'ALWAYS_SEARCH_USER_PATHS': 'NO', 'ARCHS': ['x86_64'], - #'CLANG_CXX_LANGUAGE_STANDARD': 'c++0x', + 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11', 'COMBINE_HIDPI_IMAGES': 'YES', 'GCC_C_LANGUAGE_STANDARD': 'gnu99', 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', @@ -190,6 +190,22 @@ 'gflags', 'llvm', ], + + 'conditions': [ + ['OS == "mac"', { + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-fno-operator-names', + ], + }, + }], + ['OS == "linux"', { + 'cflags': [ + '-fno-operator-names', + ], + }], + ], + 'export_dependent_settings': [ 'beaengine', 'gflags',