diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2021-10-28 23:39:29 +0200 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2021-11-28 11:43:35 +0100 |
commit | e85089afcaacf94087fb071b0f88f0e44b6e5b5e (patch) | |
tree | d8bad39344218f4b983c65b38efa1cf24f80bfa7 | |
parent | d2bbeeef6f52f2f16b2361e6097c484be2435e38 (diff) | |
download | mariadb-git-e85089afcaacf94087fb071b0f88f0e44b6e5b5e.tar.gz |
Windows : fix clang-cl build.
Disable lock elision, due to buggy intrin.h (_xbegin is misspelled)
Fix warnings.
-rw-r--r-- | client/mysqlslap.c | 2 | ||||
-rw-r--r-- | sql/sql_yacc.yy | 2 | ||||
-rw-r--r-- | storage/innobase/include/transactional_lock_guard.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/client/mysqlslap.c b/client/mysqlslap.c index 555f0624c7e..58131077321 100644 --- a/client/mysqlslap.c +++ b/client/mysqlslap.c @@ -94,7 +94,7 @@ TODO: #ifdef _WIN32 #define srandom srand -#define random rand +#define random() (long)rand() #endif diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 27d8dd94af1..a6c626aef92 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -76,7 +76,7 @@ /* warning C4102: 'yyexhaustedlab': unreferenced label */ #pragma warning (disable : 4065 4102) #endif -#ifdef __GNUC__ +#if defined (__GNUC__) || defined (__clang__) #pragma GCC diagnostic ignored "-Wunused-label" /* yyexhaustedlab: */ #endif diff --git a/storage/innobase/include/transactional_lock_guard.h b/storage/innobase/include/transactional_lock_guard.h index 7ece27638fc..3167055630c 100644 --- a/storage/innobase/include/transactional_lock_guard.h +++ b/storage/innobase/include/transactional_lock_guard.h @@ -20,7 +20,7 @@ this program; if not, write to the Free Software Foundation, Inc., #if defined __powerpc64__ && defined __clang__ && defined __linux__ #elif defined __powerpc64__&&defined __GNUC__&&defined __linux__&&__GNUC__ > 4 -#elif defined _MSC_VER && (defined _M_IX86 || defined _M_X64) +#elif defined _MSC_VER && (defined _M_IX86 || defined _M_X64) && !defined(__clang__) #elif defined __GNUC__ && (defined __i386__ || defined __x86_64__) # if __GNUC__ >= 8 # elif defined __clang_major__ && __clang_major__ > 6 |