Fix clang warnings / move some plat code into poly.

This commit is contained in:
Ben Vanik
2014-07-10 22:51:27 -07:00
parent 7daa85179c
commit 9031d5f4a4
41 changed files with 347 additions and 218 deletions

25
src/poly/cxx_compat.h Normal file
View File

@@ -0,0 +1,25 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2014 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef POLY_POLY_CXX_COMPAT_H_
#define POLY_POLY_CXX_COMPAT_H_
// C++11 thread local storage.
// http://en.cppreference.com/w/cpp/language/storage_duration
#if XE_COMPILER_MSVC
// VC++2014 may have this.
#define thread_local __declspec(thread)
#elif XE_LIKE_OSX
// Clang supports it on OSX but the runtime doesn't.
#define thread_local __thread
#endif // XE_COMPILER_MSVC
namespace poly {} // namespace poly
#endif // POLY_POLY_CXX_COMPAT_H_