diff options
author | joerg <joerg@pkgsrc.org> | 2013-04-29 21:16:56 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2013-04-29 21:16:56 +0000 |
commit | b1f45d6ea55cf131668124a934e4ca5988841aea (patch) | |
tree | ceb6bc06fae776b9985b6442c517f4ba1031eecc /databases | |
parent | 77e498695adcd04e251199ba4e4257cc3e635407 (diff) | |
download | pkgsrc-b1f45d6ea55cf131668124a934e4ca5988841aea.tar.gz |
Don't define a macro called test. Expect GCC4-like compilers to provide
__func__.
Diffstat (limited to 'databases')
26 files changed, 696 insertions, 8 deletions
diff --git a/databases/mysql56-client/distinfo b/databases/mysql56-client/distinfo index 728a92cb530..706988cf3d5 100644 --- a/databases/mysql56-client/distinfo +++ b/databases/mysql56-client/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.2 2013/04/20 08:06:01 adam Exp $ +$NetBSD: distinfo,v 1.3 2013/04/29 21:16:56 joerg Exp $ SHA1 (mysql-5.6.11.tar.gz) = 31df6950a9dbf4fcc45f62f44f4dee96ec5b3193 RMD160 (mysql-5.6.11.tar.gz) = acd671ace63cab1ffc442dd7e3ffa10ff9fb4659 @@ -10,18 +10,40 @@ SHA1 (patch-client_sql_string.h) = f26aff4ce4cf6dfef44c85ef95120331ca8fef52 SHA1 (patch-cmake_libutils.cmake) = c3e5ab66d2bef43dc2308369e27550553e0f5356 SHA1 (patch-cmake_ssl.cmake) = a5a25b00010c6586e5a3e099975ddabe369d4247 SHA1 (patch-include_CMakeLists.txt) = 49d351a958e63c69ad8bfe5c50961fe3751e86c4 +SHA1 (patch-include_my__global.h) = d4574aea74221fe3626f3a0c0f5cee9a4d2f36dc SHA1 (patch-include_my_compare.h) = f45bac4b488332a668b0005751856279b67401f5 SHA1 (patch-include_my_net.h) = b08aa36921efd023f9ecaac4cd3fb8a16d200abd SHA1 (patch-include_my_pthread.h) = ff3bf1fddd04edd7804d810f79de64387464b5ca SHA1 (patch-include_myisam.h) = 475070d41b06c04c6ae692743fc1b0244afe0a88 +SHA1 (patch-libmysql_libmysql.c) = ad78143ca78b7c512e86677b3dd59e497357f289 SHA1 (patch-mysql-test_CMakeLists.txt) = b7dd562d55678b13ac487aa0ee59bf2551af1f9d +SHA1 (patch-mysys_mf__iocache.c) = 32a396bba5bdbf96104a9c74b695305d7367785a +SHA1 (patch-mysys_my__copy.c) = af2827cdd91d74be1bbce8aba890acf59fa2247e +SHA1 (patch-mysys_my__getwd.c) = ef3a942bf2649c03f936599ea795c6204142e991 SHA1 (patch-mysys_stacktrace.c) = 27ddd012c9ca299cfe2b9935b9f99fe603415e7e SHA1 (patch-scripts_CMakeLists.txt) = 3f4621b3256034c5a3114e98c108658794f06008 SHA1 (patch-scripts_mysqld_safe.sh) = 0784314227657aa0bc3f4a0b4e21c173a86fa94b +SHA1 (patch-sql-common_client.c) = f9ecb9bb381d44ca8b551a27150fc40da887a5e9 SHA1 (patch-sql_CMakeLists.txt) = 83c1e50de6b53a0af5ff010f248dd595745b3eb5 +SHA1 (patch-sql_log__event.cc) = ce88494dbadbcebe41499eea6acf2990f4e3c4dc SHA1 (patch-sql_log_event.h) = a413038ffa29103c75e1d243864615ccb3d9621e SHA1 (patch-sql_mysqld.cc) = 84e5e72e5f7c199bb15075549514df02a1ac61a1 -SHA1 (patch-sql_sql_string.h) = bbb52320709f06ab8fb9f680f6bbba45ea8a00f5 +SHA1 (patch-sql_net__serv.cc) = caec72290ef36ddbae82bdc09d11f7e2e69a20fc +SHA1 (patch-sql_password.c) = 347fee69188e4ab96e990fc431bad81a57ec0f4d +SHA1 (patch-sql_sql_string.h) = 1ce4d4db59310ea45e384f34e33c0d61935059bf +SHA1 (patch-storage_heap_hp__hash.c) = a3bd242d72e398fcc6fe6450cf05066c1ddae664 +SHA1 (patch-storage_myisam_ft__boolean__search.c) = dbace659ea15b5abe14008c1d798414cda708395 +SHA1 (patch-storage_myisam_mi__check.c) = 9a3101680f72329158947d04ccce07ef0db821aa +SHA1 (patch-storage_myisam_mi__create.c) = 3267429a40936f1e134f5d309b6c2391d00ce708 +SHA1 (patch-storage_myisam_mi__delete.c) = ba1cab21c4cc5b8a98d16742b77d66559cbef374 +SHA1 (patch-storage_myisam_mi__dynrec.c) = d4c5d630d016238171805c8d35798293d8595289 +SHA1 (patch-storage_myisam_mi__extra.c) = 941125d92943b1b9a3ceccb3cb8cd84a91a0e958 +SHA1 (patch-storage_myisam_mi__locking.c) = 63fa46e024f3e78deb052a5cbc0205262848865b +SHA1 (patch-storage_myisam_mi__open.c) = e099113c4192bd582970846499fe927aa2d5affc +SHA1 (patch-storage_myisam_mi__search.c) = e53023188d1d65c858d1b55b365e882182ae332a +SHA1 (patch-storage_myisam_mi__test1.c) = bab69dd7383e58c6291f54dd793b0a3dbef08b8a +SHA1 (patch-storage_myisam_myisamchk.c) = 27507ae61eb49dc971deb7f3665f48fa9660a7b9 SHA1 (patch-storage_ndb_include_util_Parser.hpp) = 037fc153619bf79ee95cb03a5ac4a71c14952c3a -SHA1 (patch-strings_decimal.c) = 4d2a3d8acb3b0af56180f3a1faa8735d692be5b9 -SHA1 (patch-vio_viossl.c) = 81f1386cd719d87c02ecf4fc47b1f7bb6e6ea389 +SHA1 (patch-strings_decimal.c) = 139d86a21d785873e83bd4c97f16fa8180194ebc +SHA1 (patch-vio_vio.c) = 01fe3274ad967b1035e2c354287fd2e57547ab53 +SHA1 (patch-vio_viosocket.c) = d3179887e8154f8b7560b083fff6d23bfef7bc39 diff --git a/databases/mysql56-client/patches/patch-include_my__global.h b/databases/mysql56-client/patches/patch-include_my__global.h new file mode 100644 index 00000000000..0aa160d07e9 --- /dev/null +++ b/databases/mysql56-client/patches/patch-include_my__global.h @@ -0,0 +1,23 @@ +$NetBSD: patch-include_my__global.h,v 1.1 2013/04/29 21:16:56 joerg Exp $ + +--- include/my_global.h.orig 2013-04-28 14:06:29.000000000 +0000 ++++ include/my_global.h +@@ -465,7 +465,7 @@ typedef unsigned short ushort; + #endif + + #define swap_variables(t, a, b) { t dummy; dummy= a; a= b; b= dummy; } +-#define test(a) ((a) ? 1 : 0) ++#define my_test(a) ((a) ? 1 : 0) + #define set_if_bigger(a,b) do { if ((a) < (b)) (a)=(b); } while(0) + #define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0) + #define test_all_bits(a,b) (((a) & (b)) == (b)) +@@ -1125,7 +1125,8 @@ typedef char my_bool; /* Small bool */ + + /* Provide __func__ macro definition for platforms that miss it. */ + #if __STDC_VERSION__ < 199901L +-# if __GNUC__ >= 2 ++# if __GNUC__ >= 4 ++# elif __GNUC__ >= 2 + # define __func__ __FUNCTION__ + # else + # define __func__ "<unknown>" diff --git a/databases/mysql56-client/patches/patch-libmysql_libmysql.c b/databases/mysql56-client/patches/patch-libmysql_libmysql.c new file mode 100644 index 00000000000..0ca3db64ea4 --- /dev/null +++ b/databases/mysql56-client/patches/patch-libmysql_libmysql.c @@ -0,0 +1,112 @@ +$NetBSD: patch-libmysql_libmysql.c,v 1.1 2013/04/29 21:16:56 joerg Exp $ + +--- libmysql/libmysql.c.orig 2013-04-28 13:52:54.000000000 +0000 ++++ libmysql/libmysql.c +@@ -2071,7 +2071,7 @@ static my_bool execute(MYSQL_STMT *stmt, + buff[4]= (char) stmt->flags; + int4store(buff+5, 1); /* iteration count */ + +- res= test(cli_advanced_command(mysql, COM_STMT_EXECUTE, buff, sizeof(buff), ++ res= my_test(cli_advanced_command(mysql, COM_STMT_EXECUTE, buff, sizeof(buff), + (uchar*) packet, length, 1, stmt) || + (*mysql->methods->read_query_result)(mysql)); + stmt->affected_rows= mysql->affected_rows; +@@ -2559,7 +2559,7 @@ int STDCALL mysql_stmt_execute(MYSQL_STM + reinit_result_set_metadata(stmt); + prepare_to_fetch_result(stmt); + } +- DBUG_RETURN(test(stmt->last_errno)); ++ DBUG_RETURN(my_test(stmt->last_errno)); + } + + +@@ -3179,7 +3179,7 @@ static void fetch_string_with_conversion + int err; + double data= my_strntod(&my_charset_latin1, value, length, &endptr, &err); + float fdata= (float) data; +- *param->error= (fdata != data) | test(err); ++ *param->error= (fdata != data) | my_test(err); + floatstore(buffer, fdata); + break; + } +@@ -3187,7 +3187,7 @@ static void fetch_string_with_conversion + { + int err; + double data= my_strntod(&my_charset_latin1, value, length, &endptr, &err); +- *param->error= test(err); ++ *param->error= my_test(err); + doublestore(buffer, data); + break; + } +@@ -3196,7 +3196,7 @@ static void fetch_string_with_conversion + MYSQL_TIME_STATUS status; + MYSQL_TIME *tm= (MYSQL_TIME *)buffer; + str_to_time(value, length, tm, &status); +- *param->error= test(status.warnings); ++ *param->error= my_test(status.warnings); + break; + } + case MYSQL_TYPE_DATE: +@@ -3206,7 +3206,7 @@ static void fetch_string_with_conversion + MYSQL_TIME_STATUS status; + MYSQL_TIME *tm= (MYSQL_TIME *)buffer; + (void) str_to_datetime(value, length, tm, TIME_FUZZY_DATE, &status); +- *param->error= test(status.warnings) && ++ *param->error= my_test(status.warnings) && + (param->buffer_type == MYSQL_TYPE_DATE && + tm->time_type != MYSQL_TIMESTAMP_DATE); + break; +@@ -3331,7 +3331,7 @@ static void fetch_long_with_conversion(M + int error; + value= number_to_datetime(value, (MYSQL_TIME *) buffer, TIME_FUZZY_DATE, + &error); +- *param->error= test(error); ++ *param->error= my_test(error); + break; + } + default: +@@ -3679,7 +3679,7 @@ static void fetch_result_with_conversion + static void fetch_result_tinyint(MYSQL_BIND *param, MYSQL_FIELD *field, + uchar **row) + { +- my_bool field_is_unsigned= test(field->flags & UNSIGNED_FLAG); ++ my_bool field_is_unsigned= my_test(field->flags & UNSIGNED_FLAG); + uchar data= **row; + *(uchar *)param->buffer= data; + *param->error= param->is_unsigned != field_is_unsigned && data > INT_MAX8; +@@ -3689,7 +3689,7 @@ static void fetch_result_tinyint(MYSQL_B + static void fetch_result_short(MYSQL_BIND *param, MYSQL_FIELD *field, + uchar **row) + { +- my_bool field_is_unsigned= test(field->flags & UNSIGNED_FLAG); ++ my_bool field_is_unsigned= my_test(field->flags & UNSIGNED_FLAG); + ushort data= (ushort) sint2korr(*row); + shortstore(param->buffer, data); + *param->error= param->is_unsigned != field_is_unsigned && data > INT_MAX16; +@@ -3700,7 +3700,7 @@ static void fetch_result_int32(MYSQL_BIN + MYSQL_FIELD *field __attribute__((unused)), + uchar **row) + { +- my_bool field_is_unsigned= test(field->flags & UNSIGNED_FLAG); ++ my_bool field_is_unsigned= my_test(field->flags & UNSIGNED_FLAG); + uint32 data= (uint32) sint4korr(*row); + longstore(param->buffer, data); + *param->error= param->is_unsigned != field_is_unsigned && data > INT_MAX32; +@@ -3711,7 +3711,7 @@ static void fetch_result_int64(MYSQL_BIN + MYSQL_FIELD *field __attribute__((unused)), + uchar **row) + { +- my_bool field_is_unsigned= test(field->flags & UNSIGNED_FLAG); ++ my_bool field_is_unsigned= my_test(field->flags & UNSIGNED_FLAG); + ulonglong data= (ulonglong) sint8korr(*row); + *param->error= param->is_unsigned != field_is_unsigned && data > LONGLONG_MAX; + longlongstore(param->buffer, data); +@@ -4705,7 +4705,7 @@ my_bool STDCALL mysql_stmt_close(MYSQL_S + my_free(stmt->extension); + my_free(stmt); + +- DBUG_RETURN(test(rc)); ++ DBUG_RETURN(my_test(rc)); + } + + /* diff --git a/databases/mysql56-client/patches/patch-mysys_mf__iocache.c b/databases/mysql56-client/patches/patch-mysys_mf__iocache.c new file mode 100644 index 00000000000..f85908f3912 --- /dev/null +++ b/databases/mysql56-client/patches/patch-mysys_mf__iocache.c @@ -0,0 +1,13 @@ +$NetBSD: patch-mysys_mf__iocache.c,v 1.1 2013/04/29 21:16:56 joerg Exp $ + +--- mysys/mf_iocache.c.orig 2013-04-28 13:55:46.000000000 +0000 ++++ mysys/mf_iocache.c +@@ -180,7 +180,7 @@ int init_io_cache(IO_CACHE *info, File f + DBUG_ASSERT(seek_offset == 0); + } + else +- info->seek_not_done= test(seek_offset != pos); ++ info->seek_not_done= my_test(seek_offset != pos); + } + + info->disk_writes= 0; diff --git a/databases/mysql56-client/patches/patch-mysys_my__copy.c b/databases/mysql56-client/patches/patch-mysys_my__copy.c new file mode 100644 index 00000000000..8aa73126cb7 --- /dev/null +++ b/databases/mysql56-client/patches/patch-mysys_my__copy.c @@ -0,0 +1,13 @@ +$NetBSD: patch-mysys_my__copy.c,v 1.1 2013/04/29 21:16:56 joerg Exp $ + +--- mysys/my_copy.c.orig 2013-04-28 13:55:27.000000000 +0000 ++++ mysys/my_copy.c +@@ -63,7 +63,7 @@ int my_copy(const char *from, const char + from_file=to_file= -1; + DBUG_ASSERT(!(MyFlags & (MY_FNABP | MY_NABP))); /* for my_read/my_write */ + if (MyFlags & MY_HOLD_ORIGINAL_MODES) /* Copy stat if possible */ +- new_file_stat= test(my_stat((char*) to, &new_stat_buff, MYF(0))); ++ new_file_stat= my_test(my_stat((char*) to, &new_stat_buff, MYF(0))); + + if ((from_file=my_open(from,O_RDONLY | O_SHARE,MyFlags)) >= 0) + { diff --git a/databases/mysql56-client/patches/patch-mysys_my__getwd.c b/databases/mysql56-client/patches/patch-mysys_my__getwd.c new file mode 100644 index 00000000000..5f73a4d5a8c --- /dev/null +++ b/databases/mysql56-client/patches/patch-mysys_my__getwd.c @@ -0,0 +1,20 @@ +$NetBSD: patch-mysys_my__getwd.c,v 1.1 2013/04/29 21:16:56 joerg Exp $ + +--- mysys/my_getwd.c.orig 2013-04-28 13:52:00.000000000 +0000 ++++ mysys/my_getwd.c +@@ -162,12 +162,12 @@ int test_if_hard_path(register const cha + + my_bool has_path(const char *name) + { +- return test(strchr(name, FN_LIBCHAR)) ++ return my_test(strchr(name, FN_LIBCHAR)) + #if FN_LIBCHAR != '/' +- || test(strchr(name,'/')) ++ || my_test(strchr(name,'/')) + #endif + #ifdef FN_DEVCHAR +- || test(strchr(name, FN_DEVCHAR)) ++ || my_test(strchr(name, FN_DEVCHAR)) + #endif + ; + } diff --git a/databases/mysql56-client/patches/patch-sql-common_client.c b/databases/mysql56-client/patches/patch-sql-common_client.c new file mode 100644 index 00000000000..85b31dc7457 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql-common_client.c @@ -0,0 +1,31 @@ +$NetBSD: patch-sql-common_client.c,v 1.1 2013/04/29 21:16:56 joerg Exp $ + +--- sql-common/client.c.orig 2013-04-28 13:57:28.000000000 +0000 ++++ sql-common/client.c +@@ -1289,7 +1289,7 @@ void mysql_read_default_options(struct s + options->secure_auth= TRUE; + break; + case OPT_report_data_truncation: +- options->report_data_truncation= opt_arg ? test(atoi(opt_arg)) : 1; ++ options->report_data_truncation= opt_arg ? my_test(atoi(opt_arg)) : 1; + break; + case OPT_plugin_dir: + { +@@ -4296,7 +4296,7 @@ mysql_options(MYSQL *mysql,enum mysql_op + mysql->options.protocol=MYSQL_PROTOCOL_PIPE; /* Force named pipe */ + break; + case MYSQL_OPT_LOCAL_INFILE: /* Allow LOAD DATA LOCAL ?*/ +- if (!arg || test(*(uint*) arg)) ++ if (!arg || my_test(*(uint*) arg)) + mysql->options.client_flag|= CLIENT_LOCAL_FILES; + else + mysql->options.client_flag&= ~CLIENT_LOCAL_FILES; +@@ -4342,7 +4342,7 @@ mysql_options(MYSQL *mysql,enum mysql_op + mysql->options.secure_auth= *(my_bool *) arg; + break; + case MYSQL_REPORT_DATA_TRUNCATION: +- mysql->options.report_data_truncation= test(*(my_bool *) arg); ++ mysql->options.report_data_truncation= my_test(*(my_bool *) arg); + break; + case MYSQL_OPT_RECONNECT: + mysql->reconnect= *(my_bool *) arg; diff --git a/databases/mysql56-client/patches/patch-sql_log__event.cc b/databases/mysql56-client/patches/patch-sql_log__event.cc new file mode 100644 index 00000000000..293bce75431 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_log__event.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_log__event.cc,v 1.1 2013/04/29 21:16:56 joerg Exp $ + +--- sql/log_event.cc.orig 2013-04-28 13:54:43.000000000 +0000 ++++ sql/log_event.cc +@@ -642,7 +642,7 @@ static void print_set_option(IO_CACHE* f + { + if (*need_comma) + my_b_printf(file,", "); +- my_b_printf(file,"%s=%d", name, test(flags & option)); ++ my_b_printf(file,"%s=%d", name, my_test(flags & option)); + *need_comma= 1; + } + } diff --git a/databases/mysql56-client/patches/patch-sql_net__serv.cc b/databases/mysql56-client/patches/patch-sql_net__serv.cc new file mode 100644 index 00000000000..e363b15e2a2 --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_net__serv.cc @@ -0,0 +1,40 @@ +$NetBSD: patch-sql_net__serv.cc,v 1.1 2013/04/29 21:16:56 joerg Exp $ + +--- sql/net_serv.cc.orig 2013-04-28 13:54:10.000000000 +0000 ++++ sql/net_serv.cc +@@ -316,7 +316,7 @@ my_bool my_net_write(NET *net, const uch + #ifndef DEBUG_DATA_PACKETS + DBUG_DUMP("packet_header", buff, NET_HEADER_SIZE); + #endif +- rc= test(net_write_buff(net,packet,len)); ++ rc= my_test(net_write_buff(net,packet,len)); + MYSQL_NET_WRITE_DONE(rc); + return rc; + } +@@ -390,7 +390,7 @@ net_write_command(NET *net,uchar command + } + int3store(buff,length); + buff[3]= (uchar) net->pkt_nr++; +- rc= test(net_write_buff(net, buff, header_size) || ++ rc= my_test(net_write_buff(net, buff, header_size) || + (head_len && net_write_buff(net, header, head_len)) || + net_write_buff(net, packet, len) || net_flush(net)); + MYSQL_NET_WRITE_DONE(rc); +@@ -525,7 +525,7 @@ net_write_raw_loop(NET *net, const uchar + #endif + } + +- return test(count); ++ return my_test(count); + } + + +@@ -700,7 +700,7 @@ static my_bool net_read_raw_loop(NET *ne + #endif + } + +- return test(count); ++ return my_test(count); + } + + diff --git a/databases/mysql56-client/patches/patch-sql_password.c b/databases/mysql56-client/patches/patch-sql_password.c new file mode 100644 index 00000000000..caf413ed65c --- /dev/null +++ b/databases/mysql56-client/patches/patch-sql_password.c @@ -0,0 +1,13 @@ +$NetBSD: patch-sql_password.c,v 1.1 2013/04/29 21:16:57 joerg Exp $ + +--- sql/password.c.orig 2013-04-28 13:53:48.000000000 +0000 ++++ sql/password.c +@@ -545,7 +545,7 @@ check_scramble_sha1(const uchar *scrambl + /* now buf supposedly contains hash_stage1: so we can get hash_stage2 */ + compute_sha1_hash(hash_stage2_reassured, (const char *) buf, SHA1_HASH_SIZE); + +- return test(memcmp(hash_stage2, hash_stage2_reassured, SHA1_HASH_SIZE)); ++ return my_test(memcmp(hash_stage2, hash_stage2_reassured, SHA1_HASH_SIZE)); + } + + my_bool diff --git a/databases/mysql56-client/patches/patch-sql_sql_string.h b/databases/mysql56-client/patches/patch-sql_sql_string.h index 8d3e9332eb8..9dbe18c1a95 100644 --- a/databases/mysql56-client/patches/patch-sql_sql_string.h +++ b/databases/mysql56-client/patches/patch-sql_sql_string.h @@ -1,8 +1,8 @@ -$NetBSD: patch-sql_sql_string.h,v 1.1 2013/02/13 21:00:08 adam Exp $ +$NetBSD: patch-sql_sql_string.h,v 1.2 2013/04/29 21:16:57 joerg Exp $ Portability: include <bstring.h> if exists. ---- sql/sql_string.h.orig 2013-02-12 11:46:16.000000000 +0000 +--- sql/sql_string.h.orig 2013-04-05 12:27:18.000000000 +0000 +++ sql/sql_string.h @@ -22,6 +22,9 @@ #include "my_sys.h" /* alloc_root, my_free, my_realloc */ diff --git a/databases/mysql56-client/patches/patch-storage_heap_hp__hash.c b/databases/mysql56-client/patches/patch-storage_heap_hp__hash.c new file mode 100644 index 00000000000..e2ff4237103 --- /dev/null +++ b/databases/mysql56-client/patches/patch-storage_heap_hp__hash.c @@ -0,0 +1,31 @@ +$NetBSD: patch-storage_heap_hp__hash.c,v 1.1 2013/04/29 21:16:57 joerg Exp $ + +--- storage/heap/hp_hash.c.orig 2013-04-28 13:58:16.000000000 +0000 ++++ storage/heap/hp_hash.c +@@ -596,7 +596,7 @@ int hp_key_cmp(HP_KEYDEF *keydef, const + { + if (seg->null_bit) + { +- int found_null=test(rec[seg->null_pos] & seg->null_bit); ++ int found_null=my_test(rec[seg->null_pos] & seg->null_bit); + if (found_null != (int) *key++) + return 1; + if (found_null) +@@ -684,7 +684,7 @@ void hp_make_key(HP_KEYDEF *keydef, ucha + uint char_length= seg->length; + uchar *pos= (uchar*) rec + seg->start; + if (seg->null_bit) +- *key++= test(rec[seg->null_pos] & seg->null_bit); ++ *key++= my_test(rec[seg->null_pos] & seg->null_bit); + if (cs->mbmaxlen > 1) + { + char_length= my_charpos(cs, pos, pos + seg->length, +@@ -717,7 +717,7 @@ uint hp_rb_make_key(HP_KEYDEF *keydef, u + uint char_length; + if (seg->null_bit) + { +- if (!(*key++= 1 - test(rec[seg->null_pos] & seg->null_bit))) ++ if (!(*key++= 1 - my_test(rec[seg->null_pos] & seg->null_bit))) + continue; + } + if (seg->flag & HA_SWAP_KEY) diff --git a/databases/mysql56-client/patches/patch-storage_myisam_ft__boolean__search.c b/databases/mysql56-client/patches/patch-storage_myisam_ft__boolean__search.c new file mode 100644 index 00000000000..56b81b4c30f --- /dev/null +++ b/databases/mysql56-client/patches/patch-storage_myisam_ft__boolean__search.c @@ -0,0 +1,13 @@ +$NetBSD: patch-storage_myisam_ft__boolean__search.c,v 1.1 2013/04/29 21:16:57 joerg Exp $ + +--- storage/myisam/ft_boolean_search.c.orig 2013-04-28 13:58:51.000000000 +0000 ++++ storage/myisam/ft_boolean_search.c +@@ -533,7 +533,7 @@ static void _ftb_init_index_search(FT_IN + { + if (ftbe->flags & FTB_FLAG_NO || /* 2 */ + ftbe->up->ythresh - ftbe->up->yweaks > +- (uint) test(ftbe->flags & FTB_FLAG_YES)) /* 1 */ ++ (uint) my_test(ftbe->flags & FTB_FLAG_YES)) /* 1 */ + { + FTB_EXPR *top_ftbe=ftbe->up; + ftbw->docid[0]=HA_OFFSET_ERROR; diff --git a/databases/mysql56-client/patches/patch-storage_myisam_mi__check.c b/databases/mysql56-client/patches/patch-storage_myisam_mi__check.c new file mode 100644 index 00000000000..c99ad2ef436 --- /dev/null +++ b/databases/mysql56-client/patches/patch-storage_myisam_mi__check.c @@ -0,0 +1,67 @@ +$NetBSD: patch-storage_myisam_mi__check.c,v 1.1 2013/04/29 21:16:57 joerg Exp $ + +--- storage/myisam/mi_check.c.orig 2013-04-28 14:00:51.000000000 +0000 ++++ storage/myisam/mi_check.c +@@ -1159,7 +1159,7 @@ int chk_data_link(MI_CHECK *param, MI_IN + if (param->testflag & (T_EXTEND | T_MEDIUM | T_VERBOSE)) + { + if (_mi_rec_check(info,record, info->rec_buff,block_info.rec_len, +- test(info->s->calc_checksum))) ++ my_test(info->s->calc_checksum))) + { + mi_check_print_error(param,"Found wrong packed record at %s", + llstr(start_recpos,llbuff)); +@@ -2386,7 +2386,7 @@ int mi_repair_by_sort(MI_CHECK *param, r + if (keyseg[i].flag & HA_SPACE_PACK) + sort_param.key_length+=get_pack_length(keyseg[i].length); + if (keyseg[i].flag & (HA_BLOB_PART | HA_VAR_LENGTH_PART)) +- sort_param.key_length+=2 + test(keyseg[i].length >= 127); ++ sort_param.key_length+=2 + my_test(keyseg[i].length >= 127); + if (keyseg[i].flag & HA_NULL_PART) + sort_param.key_length++; + } +@@ -2877,7 +2877,7 @@ int mi_repair_parallel(MI_CHECK *param, + if (keyseg->flag & HA_SPACE_PACK) + sort_param[i].key_length+=get_pack_length(keyseg->length); + if (keyseg->flag & (HA_BLOB_PART | HA_VAR_LENGTH_PART)) +- sort_param[i].key_length+=2 + test(keyseg->length >= 127); ++ sort_param[i].key_length+=2 + my_test(keyseg->length >= 127); + if (keyseg->flag & HA_NULL_PART) + sort_param[i].key_length++; + } +@@ -2894,7 +2894,7 @@ int mi_repair_parallel(MI_CHECK *param, + sort_info.total_keys=i; + sort_param[0].master= 1; + sort_param[0].fix_datafile= (my_bool)(! rep_quick); +- sort_param[0].calc_checksum= test(param->testflag & T_CALC_CHECKSUM); ++ sort_param[0].calc_checksum= my_test(param->testflag & T_CALC_CHECKSUM); + + if (!ftparser_alloc_param(info)) + goto err; +@@ -3564,7 +3564,7 @@ static int sort_get_next_record(MI_SORT_ + sort_param->find_length, + (param->testflag & T_QUICK) && + sort_param->calc_checksum && +- test(info->s->calc_checksum))) ++ my_test(info->s->calc_checksum))) + { + mi_check_print_info(param,"Found wrong packed record at %s", + llstr(sort_param->start_recpos,llbuff)); +@@ -3722,7 +3722,7 @@ int sort_write_record(MI_SORT_PARAM *sor + + do + { +- block_length=reclength+ 3 + test(reclength >= (65520-3)); ++ block_length=reclength+ 3 + my_test(reclength >= (65520-3)); + if (block_length < share->base.min_block_length) + block_length=share->base.min_block_length; + info->update|=HA_STATE_WRITE_AT_END; +@@ -4641,7 +4641,7 @@ static ha_checksum mi_byte_checksum(cons + const uchar *end=buf+length; + for (crc=0; buf != end; buf++) + crc=((crc << 1) + *((uchar*) buf)) + +- test(crc & (((ha_checksum) 1) << (8*sizeof(ha_checksum)-1))); ++ my_test(crc & (((ha_checksum) 1) << (8*sizeof(ha_checksum)-1))); + return crc; + } + diff --git a/databases/mysql56-client/patches/patch-storage_myisam_mi__create.c b/databases/mysql56-client/patches/patch-storage_myisam_mi__create.c new file mode 100644 index 00000000000..667a07012e8 --- /dev/null +++ b/databases/mysql56-client/patches/patch-storage_myisam_mi__create.c @@ -0,0 +1,31 @@ +$NetBSD: patch-storage_myisam_mi__create.c,v 1.1 2013/04/29 21:16:57 joerg Exp $ + +--- storage/myisam/mi_create.c.orig 2013-04-28 14:00:49.000000000 +0000 ++++ storage/myisam/mi_create.c +@@ -134,7 +134,7 @@ int mi_create(const char *name,uint keys + pack_reclength++; + min_pack_length++; + /* We must test for 257 as length includes pack-length */ +- if (test(rec->length >= 257)) ++ if (my_test(rec->length >= 257)) + { + long_varchar_count++; + pack_reclength+= 2; /* May be packed on 3 bytes */ +@@ -193,7 +193,7 @@ int mi_create(const char *name,uint keys + packed=(packed+7)/8; + if (pack_reclength != INT_MAX32) + pack_reclength+= reclength+packed + +- test(test_all_bits(options, HA_OPTION_CHECKSUM | HA_OPTION_PACK_RECORD)); ++ my_test(test_all_bits(options, HA_OPTION_CHECKSUM | HA_OPTION_PACK_RECORD)); + min_pack_length+=packed; + + if (!ci->data_file_length && ci->max_rows) +@@ -544,7 +544,7 @@ int mi_create(const char *name,uint keys + share.base.records=ci->max_rows; + share.base.reloc= ci->reloc_rows; + share.base.reclength=real_reclength; +- share.base.pack_reclength=reclength+ test(options & HA_OPTION_CHECKSUM); ++ share.base.pack_reclength=reclength+ my_test(options & HA_OPTION_CHECKSUM); + share.base.max_pack_length=pack_reclength; + share.base.min_pack_length=min_pack_length; + share.base.pack_bits=packed; diff --git a/databases/mysql56-client/patches/patch-storage_myisam_mi__delete.c b/databases/mysql56-client/patches/patch-storage_myisam_mi__delete.c new file mode 100644 index 00000000000..8bc96e93ad2 --- /dev/null +++ b/databases/mysql56-client/patches/patch-storage_myisam_mi__delete.c @@ -0,0 +1,13 @@ +$NetBSD: patch-storage_myisam_mi__delete.c,v 1.1 2013/04/29 21:16:57 joerg Exp $ + +--- storage/myisam/mi_delete.c.orig 2013-04-28 14:00:47.000000000 +0000 ++++ storage/myisam/mi_delete.c +@@ -352,7 +352,7 @@ static int d_search(register MI_INFO *in + DBUG_RETURN(-1); + } + /* Page will be update later if we return 1 */ +- DBUG_RETURN(test(length <= (info->quick_mode ? MI_MIN_KEYBLOCK_LENGTH : ++ DBUG_RETURN(my_test(length <= (info->quick_mode ? MI_MIN_KEYBLOCK_LENGTH : + (uint) keyinfo->underflow_block_length))); + } + save_flag=1; diff --git a/databases/mysql56-client/patches/patch-storage_myisam_mi__dynrec.c b/databases/mysql56-client/patches/patch-storage_myisam_mi__dynrec.c new file mode 100644 index 00000000000..0601d95e19e --- /dev/null +++ b/databases/mysql56-client/patches/patch-storage_myisam_mi__dynrec.c @@ -0,0 +1,49 @@ +$NetBSD: patch-storage_myisam_mi__dynrec.c,v 1.1 2013/04/29 21:16:57 joerg Exp $ + +--- storage/myisam/mi_dynrec.c.orig 2013-04-28 14:00:44.000000000 +0000 ++++ storage/myisam/mi_dynrec.c +@@ -414,7 +414,7 @@ static int _mi_find_writepos(MI_INFO *in + { + /* No deleted blocks; Allocate a new block */ + *filepos=info->state->data_file_length; +- if ((tmp=reclength+3 + test(reclength >= (65520-3))) < ++ if ((tmp=reclength+3 + my_test(reclength >= (65520-3))) < + info->s->base.min_block_length) + tmp= info->s->base.min_block_length; + else +@@ -862,7 +862,7 @@ static int update_dynamic_record(MI_INFO + if (length < reclength) + { + uint tmp=MY_ALIGN(reclength - length + 3 + +- test(reclength >= 65520L),MI_DYN_ALIGN_SIZE); ++ my_test(reclength >= 65520L),MI_DYN_ALIGN_SIZE); + /* Don't create a block bigger than MI_MAX_BLOCK_LENGTH */ + tmp= MY_MIN(length+tmp, MI_MAX_BLOCK_LENGTH)-length; + /* Check if we can extend this block */ +@@ -1023,7 +1023,7 @@ uint _mi_rec_pack(MI_INFO *info, registe + pos++; + } + new_length=(uint) (end-pos); +- if (new_length +1 + test(rec->length > 255 && new_length > 127) ++ if (new_length +1 + my_test(rec->length > 255 && new_length > 127) + < length) + { + if (rec->length > 255 && new_length > 127) +@@ -1143,7 +1143,7 @@ my_bool _mi_rec_check(MI_INFO *info,cons + pos++; + } + new_length=(uint) (end-pos); +- if (new_length +1 + test(rec->length > 255 && new_length > 127) ++ if (new_length +1 + my_test(rec->length > 255 && new_length > 127) + < length) + { + if (!(flag & bit)) +@@ -1195,7 +1195,7 @@ my_bool _mi_rec_check(MI_INFO *info,cons + else + to+= length; + } +- if (packed_length != (uint) (to - rec_buff) + test(info->s->calc_checksum) || ++ if (packed_length != (uint) (to - rec_buff) + my_test(info->s->calc_checksum) || + (bit != 1 && (flag & ~(bit - 1)))) + goto err; + if (with_checksum && ((uchar) info->checksum != (uchar) *to)) diff --git a/databases/mysql56-client/patches/patch-storage_myisam_mi__extra.c b/databases/mysql56-client/patches/patch-storage_myisam_mi__extra.c new file mode 100644 index 00000000000..cf154b70851 --- /dev/null +++ b/databases/mysql56-client/patches/patch-storage_myisam_mi__extra.c @@ -0,0 +1,22 @@ +$NetBSD: patch-storage_myisam_mi__extra.c,v 1.1 2013/04/29 21:16:57 joerg Exp $ + +--- storage/myisam/mi_extra.c.orig 2013-04-28 14:00:41.000000000 +0000 ++++ storage/myisam/mi_extra.c +@@ -55,7 +55,7 @@ int mi_extra(MI_INFO *info, enum ha_extr + { + reinit_io_cache(&info->rec_cache,READ_CACHE,0, + (pbool) (info->lock_type != F_UNLCK), +- (pbool) test(info->update & HA_STATE_ROW_CHANGED) ++ (pbool) my_test(info->update & HA_STATE_ROW_CHANGED) + ); + } + info->update= ((info->update & HA_STATE_CHANGED) | HA_STATE_NEXT_FOUND | +@@ -116,7 +116,7 @@ int mi_extra(MI_INFO *info, enum ha_extr + { + reinit_io_cache(&info->rec_cache,READ_CACHE,info->nextpos, + (pbool) (info->lock_type != F_UNLCK), +- (pbool) test(info->update & HA_STATE_ROW_CHANGED)); ++ (pbool) my_test(info->update & HA_STATE_ROW_CHANGED)); + info->update&= ~HA_STATE_ROW_CHANGED; + if (share->concurrent_insert) + info->rec_cache.end_of_file=info->state->data_file_length; diff --git a/databases/mysql56-client/patches/patch-storage_myisam_mi__locking.c b/databases/mysql56-client/patches/patch-storage_myisam_mi__locking.c new file mode 100644 index 00000000000..ac4796fbe7a --- /dev/null +++ b/databases/mysql56-client/patches/patch-storage_myisam_mi__locking.c @@ -0,0 +1,11 @@ +$NetBSD: patch-storage_myisam_mi__locking.c,v 1.1 2013/04/29 21:16:57 joerg Exp $ + +--- storage/myisam/mi_locking.c.orig 2013-04-28 14:00:39.000000000 +0000 ++++ storage/myisam/mi_locking.c +@@ -567,5 +567,5 @@ int _mi_decrement_open_count(MI_INFO *in + if (!lock_error) + lock_error=mi_lock_database(info,old_lock); + } +- return test(lock_error || write_error); ++ return my_test(lock_error || write_error); + } diff --git a/databases/mysql56-client/patches/patch-storage_myisam_mi__open.c b/databases/mysql56-client/patches/patch-storage_myisam_mi__open.c new file mode 100644 index 00000000000..c92ee1a8c90 --- /dev/null +++ b/databases/mysql56-client/patches/patch-storage_myisam_mi__open.c @@ -0,0 +1,13 @@ +$NetBSD: patch-storage_myisam_mi__open.c,v 1.1 2013/04/29 21:16:57 joerg Exp $ + +--- storage/myisam/mi_open.c.orig 2013-04-28 14:00:37.000000000 +0000 ++++ storage/myisam/mi_open.c +@@ -510,7 +510,7 @@ MI_INFO *mi_open(const char *name, int m + info.s=share; + if (_mi_read_pack_info(&info, + (pbool) +- test(!(share->options & ++ my_test(!(share->options & + (HA_OPTION_PACK_RECORD | + HA_OPTION_TEMP_COMPRESS_RECORD))))) + goto err; diff --git a/databases/mysql56-client/patches/patch-storage_myisam_mi__search.c b/databases/mysql56-client/patches/patch-storage_myisam_mi__search.c new file mode 100644 index 00000000000..7e2139bc1fa --- /dev/null +++ b/databases/mysql56-client/patches/patch-storage_myisam_mi__search.c @@ -0,0 +1,22 @@ +$NetBSD: patch-storage_myisam_mi__search.c,v 1.1 2013/04/29 21:16:57 joerg Exp $ + +--- storage/myisam/mi_search.c.orig 2013-04-28 13:59:30.000000000 +0000 ++++ storage/myisam/mi_search.c +@@ -82,7 +82,7 @@ int _mi_search(register MI_INFO *info, r + } + + if (!(buff=_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,info->buff, +- test(!(nextflag & SEARCH_SAVE_BUFF))))) ++ my_test(!(nextflag & SEARCH_SAVE_BUFF))))) + goto err; + DBUG_DUMP("page", buff, mi_getint(buff)); + +@@ -125,7 +125,7 @@ int _mi_search(register MI_INFO *info, r + { + uchar *old_buff=buff; + if (!(buff=_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,info->buff, +- test(!(nextflag & SEARCH_SAVE_BUFF))))) ++ my_test(!(nextflag & SEARCH_SAVE_BUFF))))) + goto err; + keypos=buff+(keypos-old_buff); + maxpos=buff+(maxpos-old_buff); diff --git a/databases/mysql56-client/patches/patch-storage_myisam_mi__test1.c b/databases/mysql56-client/patches/patch-storage_myisam_mi__test1.c new file mode 100644 index 00000000000..2c21a440ffb --- /dev/null +++ b/databases/mysql56-client/patches/patch-storage_myisam_mi__test1.c @@ -0,0 +1,30 @@ +$NetBSD: patch-storage_myisam_mi__test1.c,v 1.1 2013/04/29 21:16:57 joerg Exp $ + +--- storage/myisam/mi_test1.c.orig 2013-04-28 13:59:06.000000000 +0000 ++++ storage/myisam/mi_test1.c +@@ -265,14 +265,14 @@ static int run_test(const char *filename + if (verbose || (flags[j] >= 1 || + (error && my_errno != HA_ERR_KEY_NOT_FOUND))) + printf("key: '%.*s' mi_rkey: %3d errno: %3d\n", +- (int) key_length,key+test(null_fields),error,my_errno); ++ (int) key_length,key+my_test(null_fields),error,my_errno); + } + else + { + error=mi_delete(file,read_record); + if (verbose || error) + printf("key: '%.*s' mi_delete: %3d errno: %3d\n", +- (int) key_length, key+test(null_fields), error, my_errno); ++ (int) key_length, key+my_test(null_fields), error, my_errno); + if (! error) + { + deleted++; +@@ -293,7 +293,7 @@ static int run_test(const char *filename + (error && (flags[i] != 0 || my_errno != HA_ERR_KEY_NOT_FOUND))) + { + printf("key: '%.*s' mi_rkey: %3d errno: %3d record: %s\n", +- (int) key_length,key+test(null_fields),error,my_errno,record+1); ++ (int) key_length,key+my_test(null_fields),error,my_errno,record+1); + } + } + diff --git a/databases/mysql56-client/patches/patch-storage_myisam_myisamchk.c b/databases/mysql56-client/patches/patch-storage_myisam_myisamchk.c new file mode 100644 index 00000000000..5a32e85a611 --- /dev/null +++ b/databases/mysql56-client/patches/patch-storage_myisam_myisamchk.c @@ -0,0 +1,13 @@ +$NetBSD: patch-storage_myisam_myisamchk.c,v 1.1 2013/04/29 21:16:57 joerg Exp $ + +--- storage/myisam/myisamchk.c.orig 2013-04-28 14:00:35.000000000 +0000 ++++ storage/myisam/myisamchk.c +@@ -1118,7 +1118,7 @@ static int myisamchk(MI_CHECK *param, ch + if ((param->testflag & T_AUTO_INC) || + ((param->testflag & T_REP_ANY) && info->s->base.auto_key)) + update_auto_increment_key(param, info, +- (my_bool) !test(param->testflag & T_AUTO_INC)); ++ (my_bool) !my_test(param->testflag & T_AUTO_INC)); + + if (!(param->testflag & T_DESCRIPT)) + { diff --git a/databases/mysql56-client/patches/patch-strings_decimal.c b/databases/mysql56-client/patches/patch-strings_decimal.c index fd851fd08ad..6e4c6777e1e 100644 --- a/databases/mysql56-client/patches/patch-strings_decimal.c +++ b/databases/mysql56-client/patches/patch-strings_decimal.c @@ -1,8 +1,8 @@ -$NetBSD: patch-strings_decimal.c,v 1.1 2013/02/13 21:00:08 adam Exp $ +$NetBSD: patch-strings_decimal.c,v 1.2 2013/04/29 21:16:57 joerg Exp $ * Portability: include <bstring.h> if exists. ---- strings/decimal.c.orig 2010-02-04 11:40:24.000000000 +0000 +--- strings/decimal.c.orig 2013-04-05 12:27:17.000000000 +0000 +++ strings/decimal.c @@ -103,6 +103,9 @@ #include <my_sys.h> /* for my_alloca */ @@ -14,3 +14,21 @@ $NetBSD: patch-strings_decimal.c,v 1.1 2013/02/13 21:00:08 adam Exp $ /* Internally decimal numbers are stored base 10^9 (see DIG_BASE below) +@@ -353,7 +356,7 @@ int decimal2string(const decimal_t *from + if (!(intg_len= fixed_precision ? fixed_intg : intg)) + intg_len= 1; + frac_len= fixed_precision ? fixed_decimals : frac; +- len= from->sign + intg_len + test(frac) + frac_len; ++ len= from->sign + intg_len + my_test(frac) + frac_len; + if (fixed_precision) + { + if (frac > fixed_decimals) +@@ -387,7 +390,7 @@ int decimal2string(const decimal_t *from + else + frac-=j; + frac_len= frac; +- len= from->sign + intg_len + test(frac) + frac_len; ++ len= from->sign + intg_len + my_test(frac) + frac_len; + } + *to_len= len; + s[len]= 0; diff --git a/databases/mysql56-client/patches/patch-vio_vio.c b/databases/mysql56-client/patches/patch-vio_vio.c new file mode 100644 index 00000000000..59f79a5cf84 --- /dev/null +++ b/databases/mysql56-client/patches/patch-vio_vio.c @@ -0,0 +1,13 @@ +$NetBSD: patch-vio_vio.c,v 1.1 2013/04/29 21:16:57 joerg Exp $ + +--- vio/vio.c.orig 2013-04-28 14:09:38.000000000 +0000 ++++ vio/vio.c +@@ -202,7 +202,7 @@ my_bool vio_reset(Vio* vio, enum enum_vi + if (old_vio.write_timeout >= 0) + ret|= vio_timeout(vio, 1, old_vio.write_timeout); + +- DBUG_RETURN(test(ret)); ++ DBUG_RETURN(my_test(ret)); + } + + diff --git a/databases/mysql56-client/patches/patch-vio_viosocket.c b/databases/mysql56-client/patches/patch-vio_viosocket.c new file mode 100644 index 00000000000..dc720667fc6 --- /dev/null +++ b/databases/mysql56-client/patches/patch-vio_viosocket.c @@ -0,0 +1,42 @@ +$NetBSD: patch-vio_viosocket.c,v 1.1 2013/04/29 21:16:58 joerg Exp $ + +--- vio/viosocket.c.orig 2013-04-28 13:51:01.000000000 +0000 ++++ vio/viosocket.c +@@ -854,16 +854,16 @@ int vio_io_wait(Vio *vio, enum enum_vio_ + switch (event) + { + case VIO_IO_EVENT_READ: +- ret= test(FD_ISSET(fd, &readfds)); ++ ret= my_test(FD_ISSET(fd, &readfds)); + break; + case VIO_IO_EVENT_WRITE: + case VIO_IO_EVENT_CONNECT: +- ret= test(FD_ISSET(fd, &writefds)); ++ ret= my_test(FD_ISSET(fd, &writefds)); + break; + } + + /* Error conditions pending? */ +- ret|= test(FD_ISSET(fd, &exceptfds)); ++ ret|= my_test(FD_ISSET(fd, &exceptfds)); + + /* Not a timeout, ensure that a condition was met. */ + DBUG_ASSERT(ret); +@@ -946,7 +946,7 @@ vio_socket_connect(Vio *vio, struct sock + #else + errno= error; + #endif +- ret= test(error); ++ ret= my_test(error); + } + } + +@@ -957,7 +957,7 @@ vio_socket_connect(Vio *vio, struct sock + DBUG_RETURN(TRUE); + } + +- DBUG_RETURN(test(ret)); ++ DBUG_RETURN(my_test(ret)); + } + + |