Commit ac761983 authored by monty@mashka.mysql.fi's avatar monty@mashka.mysql.fi

Portability fixes for AIX43

parent f16ee298
...@@ -133,7 +133,7 @@ enum ha_extra_function { ...@@ -133,7 +133,7 @@ enum ha_extra_function {
HA_EXTRA_RETRIEVE_ALL_COLS, HA_EXTRA_RETRIEVE_ALL_COLS,
HA_EXTRA_PREPARE_FOR_DELETE, HA_EXTRA_PREPARE_FOR_DELETE,
HA_EXTRA_PREPARE_FOR_UPDATE, /* Remove read cache if problems */ HA_EXTRA_PREPARE_FOR_UPDATE, /* Remove read cache if problems */
HA_EXTRA_PRELOAD_BUFFER_SIZE, /* Set buffer size for preloading */ HA_EXTRA_PRELOAD_BUFFER_SIZE /* Set buffer size for preloading */
}; };
/* The following is parameter to ha_panic() */ /* The following is parameter to ha_panic() */
......
...@@ -688,7 +688,8 @@ typedef long long my_ptrdiff_t; ...@@ -688,7 +688,8 @@ typedef long long my_ptrdiff_t;
#endif #endif
#endif #endif
#if defined(__IBMC__) || defined(__IBMCPP__) #if defined(__IBMC__) || defined(__IBMCPP__)
#define STDCALL _System _Export /* This was _System _Export but caused a lot of warnings on _AIX43 */
#define STDCALL
#elif !defined( STDCALL) #elif !defined( STDCALL)
#define STDCALL #define STDCALL
#endif #endif
......
...@@ -160,7 +160,7 @@ extern char *my_strdup_with_length(const byte *from, uint length, ...@@ -160,7 +160,7 @@ extern char *my_strdup_with_length(const byte *from, uint length,
#endif #endif
#ifdef HAVE_ALLOCA #ifdef HAVE_ALLOCA
#if defined(_AIX) && !defined(__GNUC__) #if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43)
#pragma alloca #pragma alloca
#endif /* _AIX */ #endif /* _AIX */
#if defined(__GNUC__) && !defined(HAVE_ALLOCA_H) #if defined(__GNUC__) && !defined(HAVE_ALLOCA_H)
......
...@@ -552,27 +552,27 @@ typedef struct st_mysql_stmt ...@@ -552,27 +552,27 @@ typedef struct st_mysql_stmt
typedef struct st_mysql_methods typedef struct st_mysql_methods
{ {
my_bool (STDCALL *read_query_result)(MYSQL *mysql); my_bool (* STDCALL read_query_result)(MYSQL *mysql);
my_bool (STDCALL *advanced_command)(MYSQL *mysql, my_bool (* STDCALL advanced_command)(MYSQL *mysql,
enum enum_server_command command, enum enum_server_command command,
const char *header, const char *header,
unsigned long header_length, unsigned long header_length,
const char *arg, const char *arg,
unsigned long arg_length, unsigned long arg_length,
my_bool skip_check); my_bool skip_check);
MYSQL_DATA *(STDCALL *read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields, MYSQL_DATA *(* STDCALL read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
unsigned int fields); unsigned int fields);
MYSQL_RES * (STDCALL *use_result)(MYSQL *mysql); MYSQL_RES * (* STDCALL use_result)(MYSQL *mysql);
void (STDCALL *fetch_lengths)(unsigned long *to, void (* STDCALL fetch_lengths)(unsigned long *to,
MYSQL_ROW column, unsigned int field_count); MYSQL_ROW column, unsigned int field_count);
#if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY) #if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY)
MYSQL_FIELD * (STDCALL *list_fields)(MYSQL *mysql); MYSQL_FIELD * (* STDCALL list_fields)(MYSQL *mysql);
my_bool (STDCALL *read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt); my_bool (* STDCALL read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt);
int (STDCALL *stmt_execute)(MYSQL_STMT *stmt); int (* STDCALL stmt_execute)(MYSQL_STMT *stmt);
MYSQL_DATA *(STDCALL *read_binary_rows)(MYSQL_STMT *stmt); MYSQL_DATA *(* STDCALL read_binary_rows)(MYSQL_STMT *stmt);
int (STDCALL *unbuffered_fetch)(MYSQL *mysql, char **row); int (* STDCALL unbuffered_fetch)(MYSQL *mysql, char **row);
void (STDCALL *free_embedded_thd)(MYSQL *mysql); void (* STDCALL free_embedded_thd)(MYSQL *mysql);
const char *(STDCALL *read_statistic)(MYSQL *mysql); const char *(* STDCALL read_statistic)(MYSQL *mysql);
#endif #endif
} MYSQL_METHODS; } MYSQL_METHODS;
......
...@@ -1567,7 +1567,7 @@ fil_op_write_log( ...@@ -1567,7 +1567,7 @@ fil_op_write_log(
mlog_close(mtr, log_ptr); mlog_close(mtr, log_ptr);
mlog_catenate_string(mtr, name, ut_strlen(name) + 1); mlog_catenate_string(mtr, (byte*) name, ut_strlen(name) + 1);
if (type == MLOG_FILE_RENAME) { if (type == MLOG_FILE_RENAME) {
log_ptr = mlog_open(mtr, 30); log_ptr = mlog_open(mtr, 30);
...@@ -1576,7 +1576,7 @@ fil_op_write_log( ...@@ -1576,7 +1576,7 @@ fil_op_write_log(
mlog_close(mtr, log_ptr); mlog_close(mtr, log_ptr);
mlog_catenate_string(mtr, new_name, ut_strlen(new_name) + 1); mlog_catenate_string(mtr, (byte*) new_name, ut_strlen(new_name) + 1);
} }
} }
#endif #endif
...@@ -1630,7 +1630,7 @@ fil_op_log_parse_or_replay( ...@@ -1630,7 +1630,7 @@ fil_op_log_parse_or_replay(
return(NULL); return(NULL);
} }
name = ptr; name = (char*) ptr;
ptr += name_len; ptr += name_len;
...@@ -1649,7 +1649,7 @@ fil_op_log_parse_or_replay( ...@@ -1649,7 +1649,7 @@ fil_op_log_parse_or_replay(
return(NULL); return(NULL);
} }
new_name = ptr; new_name = (char*) ptr;
ptr += new_name_len; ptr += new_name_len;
} }
......
...@@ -2990,7 +2990,8 @@ int STDCALL cli_unbuffered_fetch(MYSQL *mysql, char **row) ...@@ -2990,7 +2990,8 @@ int STDCALL cli_unbuffered_fetch(MYSQL *mysql, char **row)
if (packet_error == net_safe_read(mysql)) if (packet_error == net_safe_read(mysql))
return 1; return 1;
*row= (mysql->net.read_pos[0] == 254) ? NULL : (mysql->net.read_pos+1); *row= ((mysql->net.read_pos[0] == 254) ? NULL :
(char*) (mysql->net.read_pos+1));
return 0; return 0;
} }
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <my_sys.h> #include <my_sys.h>
#include <m_string.h> #include <m_string.h>
#undef ULONGLONG_MAX
#define ULONGLONG_MAX (~(ulonglong) 0) #define ULONGLONG_MAX (~(ulonglong) 0)
#define MAX_NEGATIVE_NUMBER ((ulonglong) LL(0x8000000000000000)) #define MAX_NEGATIVE_NUMBER ((ulonglong) LL(0x8000000000000000))
#define INIT_CNT 9 #define INIT_CNT 9
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment