diff options
author | unknown <monty@hundin.mysql.fi> | 2002-08-28 17:00:58 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-08-28 17:00:58 +0300 |
commit | 242a3755b3dc96dc8a886e9d22b0d60a046b6f47 (patch) | |
tree | 46c7f1bee6132602a63c4b88d2a131d6ab149d77 | |
parent | 6c13a5724c59ab4ca5fac479f82124e22de1a00d (diff) | |
download | mariadb-git-242a3755b3dc96dc8a886e9d22b0d60a046b6f47.tar.gz |
Portability fixes for windows
include/config-win.h:
Portability fix for windows
include/my_global.h:
General portability fix
sql/mysqld.cc:
Portability fix for windows
sql/set_var.cc:
Portability fix for windows
sql/sql_yacc.yy:
Portability fix for windows
-rw-r--r-- | include/config-win.h | 1 | ||||
-rw-r--r-- | include/my_global.h | 2 | ||||
-rw-r--r-- | sql/mysqld.cc | 2 | ||||
-rw-r--r-- | sql/set_var.cc | 3 | ||||
-rw-r--r-- | sql/sql_yacc.yy | 2 |
5 files changed, 6 insertions, 4 deletions
diff --git a/include/config-win.h b/include/config-win.h index c0d0dad894e..f51713623ef 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -259,6 +259,7 @@ inline double ulonglong2double(ulonglong value) #define HAVE_ISNAN #define HAVE_FINITE #define HAVE_ISAM /* We want to have support for ISAM in 4.0 */ +#define SPRINTF_RETURNS_INT #ifdef NOT_USED #define HAVE_SNPRINTF /* Gave link error */ diff --git a/include/my_global.h b/include/my_global.h index e65e803c335..8524328a47b 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -1016,7 +1016,7 @@ typedef union { #ifdef SPRINTF_RETURNS_PTR #define my_sprintf(buff,args) ((int)(sprintf args - buff)) #else -#define my_sprintf(buff,args) sprintf args,strlen(buff) +#define my_sprintf(buff,args) ((ulong) sprintf args, (ulong) strlen(buff)) #endif #endif diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 4ecded767d1..28367670b8e 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3339,7 +3339,7 @@ struct my_option my_long_options[] = #ifdef USE_SYMDIR {"use-symbolic-links", 's', "Enable symbolic link support", (gptr*) &my_use_symdir, (gptr*) &my_use_symdir, 0, GET_BOOL, NO_ARG, - USE_PURIFY(0,1), 0, 0, 0, 0, 0}, + IF_PURIFY(0,1), 0, 0, 0, 0, 0}, #endif {"user", 'u', "Run mysqld daemon as user", (gptr*) &mysqld_user, (gptr*) &mysqld_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, diff --git a/sql/set_var.cc b/sql/set_var.cc index 3c71d1d32e3..375d9db0644 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1208,7 +1208,8 @@ void set_var_free() sys_var *find_sys_var(const char *str, uint length) { - sys_var *var= (sys_var*) hash_search(&system_variable_hash, str, + sys_var *var= (sys_var*) hash_search(&system_variable_hash, + (byte*) str, length ? length : strlen(str)); if (!var) diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 0b8b6337998..5f98bcdefd5 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -3287,7 +3287,7 @@ option_value: LEX *lex=Lex; lex->var_list.push_back(new set_var(lex->option_type, find_sys_var("tx_isolation"), - new Item_int((int) $4))); + new Item_int((int32) $4))); } | CHAR_SYM SET opt_equal set_expr_or_default { |