diff options
author | Sergei Krivonos <sergeikrivonos@gmail.com> | 2021-10-06 11:31:08 +0300 |
---|---|---|
committer | Sergei Krivonos <sergeikrivonos@gmail.com> | 2021-10-08 17:05:52 +0300 |
commit | 164e84c9efb5a7f9fa90989e482ed9e1f49a39dc (patch) | |
tree | f68f6924279b1e35c0b5962103756d61c59d969d | |
parent | c4a58ca06a82e7fe94603f1d6cbcf1099b48c28d (diff) | |
download | mariadb-git-10.2-MDEV-19129.tar.gz |
Xcode compatibility update10.2-MDEV-19129
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | configure.cmake | 2 | ||||
-rw-r--r-- | include/my_context.h | 3 | ||||
-rw-r--r-- | include/my_global.h | 2 | ||||
m--------- | libmariadb | 0 | ||||
-rw-r--r-- | mysys/my_context.c | 7 | ||||
-rw-r--r-- | storage/connect/bsonudf.cpp | 9 | ||||
-rw-r--r-- | storage/innobase/row/row0upd.cc | 12 | ||||
-rw-r--r-- | storage/maria/lockman.c | 16 |
9 files changed, 39 insertions, 14 deletions
diff --git a/.gitignore b/.gitignore index dc8f6940fdf..c1a80c15aa6 100644 --- a/.gitignore +++ b/.gitignore @@ -338,6 +338,7 @@ x86/ build/ bld/ [Bb]in/ +/cmake-build-debug/ [Oo]bj/ # Roslyn cache directories @@ -518,4 +519,5 @@ compile_commands.json # Visual Studio Code workspace .vscode/ +/.idea/ .cache/clangd diff --git a/configure.cmake b/configure.cmake index 942d5780ed9..877c7f19afd 100644 --- a/configure.cmake +++ b/configure.cmake @@ -477,7 +477,7 @@ IF(HAVE_FINITE_IN_MATH_H) ELSE() CHECK_SYMBOL_EXISTS(finite "ieeefp.h" HAVE_FINITE) ENDIF() -CHECK_SYMBOL_EXISTS(log2 math.h HAVE_LOG2) +CHECK_SYMBOL_EXISTS(log2 "tgmath.h;math.h" HAVE_LOG2) CHECK_SYMBOL_EXISTS(rint math.h HAVE_RINT) # diff --git a/include/my_context.h b/include/my_context.h index ea0e3496887..45d2a7d7ffa 100644 --- a/include/my_context.h +++ b/include/my_context.h @@ -52,6 +52,9 @@ struct my_context { #ifdef MY_CONTEXT_USE_UCONTEXT +#if defined(__APPLE__) && !defined(_XOPEN_SOURCE) +#define _XOPEN_SOURCE +#endif #include <ucontext.h> struct my_context { diff --git a/include/my_global.h b/include/my_global.h index dba63e75097..1253dd2f5ae 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -806,6 +806,8 @@ inline unsigned long long my_double2ulonglong(double d) #ifdef __cplusplus #include <cmath> +#else +#include <tgmath.h> #endif /* Define missing math constants. */ diff --git a/libmariadb b/libmariadb -Subproject b99172386a740ef0c8136e9a6cd7d9ad9a77b31 +Subproject 834d781cc6da715fdf53d1b21cde0d2c8e41345 diff --git a/mysys/my_context.c b/mysys/my_context.c index cf10738bdbd..f3aef23e07a 100644 --- a/mysys/my_context.c +++ b/mysys/my_context.c @@ -29,6 +29,10 @@ #endif #ifdef MY_CONTEXT_USE_UCONTEXT +#ifdef __APPLE__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif /* The makecontext() only allows to pass integers into the created context :-( We want to pass pointers, so we do it this kinda hackish way. @@ -154,6 +158,9 @@ my_context_destroy(struct my_context *c) DBUG_FREE_CODE_STATE(&c->dbug_state); } +#ifdef __APPLE__ +#pragma GCC diagnostic pop +#endif #endif /* MY_CONTEXT_USE_UCONTEXT */ diff --git a/storage/connect/bsonudf.cpp b/storage/connect/bsonudf.cpp index 783be52602a..55ccd597b8d 100644 --- a/storage/connect/bsonudf.cpp +++ b/storage/connect/bsonudf.cpp @@ -12,6 +12,7 @@ #include <mysql.h> #include <sql_error.h> #include <stdio.h> +#include <cassert> #include "bsonudf.h" @@ -621,7 +622,7 @@ PVAL BJNX::GetCalcValue(PGLOBAL g, PBVAL bap, int n) { // For calculated arrays, a local Value must be used int lng = 0; - short type, prec = 0; + short type = 0, prec = 0; bool b = n < Nod - 1; PVAL valp; PBVAL vlp, vp; @@ -690,7 +691,7 @@ PVAL BJNX::GetCalcValue(PGLOBAL g, PBVAL bap, int n) break; default: - break; + DBUG_ASSERT(!"Implement new op type support."); } // endswitch Op return valp = AllocateValue(g, type, lng, prec); @@ -4978,7 +4979,7 @@ char *bbin_array_add(UDF_INIT *initid, UDF_ARGS *args, char *result, uint n = 2; int* x = GetIntArgPtr(g, args, n); BJNX bnx(g, NULL, TYPE_STRING); - PBVAL jarp, top, jvp = NULL; + PBVAL jarp = nullptr, top = nullptr, jvp = nullptr; PBVAL jsp = bnx.MakeValue(args, 0, true, &top); if (bnx.CheckPath(g, args, jsp, jvp, 2)) @@ -5611,7 +5612,7 @@ char *bbin_object_values(UDF_INIT *initid, UDF_ARGS *args, char *result, if (!bsp) { if (!CheckMemory(g, initid, args, 1, true, true)) { BJNX bnx(g); - PBVAL top, jarp; + PBVAL top, jarp = nullptr; PBVAL jvp = bnx.MakeValue(args, 0, true, &top); if (jvp->Type == TYPE_JOB) { diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc index 1f3e34d493a..a58c3993e90 100644 --- a/storage/innobase/row/row0upd.cc +++ b/storage/innobase/row/row0upd.cc @@ -2470,13 +2470,13 @@ row_upd_sec_index_entry( case DB_LOCK_WAIT_TIMEOUT: WSREP_DEBUG("Foreign key check fail: " "%s on table %s index %s query %s", - ut_strerr(err), index->name, index->table->name, + ut_strerr(err), index->name(), index->table->name.m_name, wsrep_thd_query(trx->mysql_thd)); break; default: WSREP_ERROR("Foreign key check fail: " "%s on table %s index %s query %s", - ut_strerr(err), index->name, index->table->name, + ut_strerr(err), index->name(), index->table->name.m_name, wsrep_thd_query(trx->mysql_thd)); break; } @@ -2806,14 +2806,14 @@ check_fk: case DB_LOCK_WAIT_TIMEOUT: WSREP_DEBUG("Foreign key check fail: " "%s on table %s index %s query %s", - ut_strerr(err), index->name, index->table->name, + ut_strerr(err), index->name(), index->table->name.m_name, wsrep_thd_query(trx->mysql_thd)); goto err_exit; default: WSREP_ERROR("Foreign key check fail: " "%s on table %s index %s query %s", - ut_strerr(err), index->name, index->table->name, + ut_strerr(err), index->name(), index->table->name.m_name, wsrep_thd_query(trx->mysql_thd)); goto err_exit; @@ -3037,13 +3037,13 @@ row_upd_del_mark_clust_rec( case DB_LOCK_WAIT_TIMEOUT: WSREP_DEBUG("Foreign key check fail: " "%d on table %s index %s query %s", - err, index->name, index->table->name, + err, index->name(), index->table->name.m_name, wsrep_thd_query(trx->mysql_thd)); break; default: WSREP_ERROR("Foreign key check fail: " "%d on table %s index %s query %s", - err, index->name, index->table->name, + err, index->name(), index->table->name.m_name, wsrep_thd_query(trx->mysql_thd)); break; } diff --git a/storage/maria/lockman.c b/storage/maria/lockman.c index a23558e46dd..72c1e744a2e 100644 --- a/storage/maria/lockman.c +++ b/storage/maria/lockman.c @@ -189,6 +189,11 @@ static enum lockman_lock_type lock_combining_matrix[10][10]= but it cannot happen in row locks, only in table locks (S,X), or lock escalations (LS,LX) */ +#ifdef I +#define __I__WAS_DEFINED__FE21E172_945E_44E2_A26C_9371B6EC4210 +#pragma push_macro("I") +#undef I +#endif #define I GOT_THE_LOCK_NEED_TO_LOCK_A_SUBRESOURCE #define L GOT_THE_LOCK_NEED_TO_INSTANT_LOCK_A_SUBRESOURCE #define A GOT_THE_LOCK @@ -206,10 +211,15 @@ static enum lockman_getlock_result getlock_result[10][10]= { 0, x, 0, A, L, 0, x, x, 0, 0}, /* SLX */ { 0, 0, 0, L, I, 0, x, 0, 0, 0} /* LSIX */ }; -#undef I -#undef L -#undef A #undef x +#undef A +#undef L +#ifdef __I__WAS_DEFINED__FE21E172_945E_44E2_A26C_9371B6EC4210 +#pragma pop_macro("I") +#undef __I__WAS_DEFINED__FE21E172_945E_44E2_A26C_9371B6EC4210 +#else +#undef I +#endif typedef struct lockman_lock { uint64 resource; |