(trunk, libT) #4160 'foreign character support' -- merge mike.dld's 4160-03a-file.platch, which introduces tr_sys_file_*() portability wrappers

This commit is contained in:
Jordan Lee
2014-07-08 00:15:12 +00:00
parent 0323639e57
commit c1beabfea6
7 changed files with 1831 additions and 19 deletions

View File

@@ -70,6 +70,26 @@ extern "C" {
#endif
#ifndef __has_feature
#define __has_feature(x) 0
#endif
#ifndef __has_extension
#define __has_extension __has_feature
#endif
/**
* @def TR_STATIC_ASSERT
* @brief This helper allows to perform static checks at compile time
*/
#if defined (static_assert)
#define TR_STATIC_ASSERT static_assert
#elif __has_feature (c_static_assert) || __has_extension (c_static_assert)
#define TR_STATIC_ASSERT _Static_assert
#else
#define TR_STATIC_ASSERT(x, msg) { const char static_check[((x) ? 1 : -1)] UNUSED; }
#endif
/***
****
***/