Commit aa4e1658 authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi

Portability fix extern "C" static -> extern "C"

parent 890b39bb
...@@ -176,7 +176,7 @@ static void dump_remote_file(NET* net, const char* fname) ...@@ -176,7 +176,7 @@ static void dump_remote_file(NET* net, const char* fname)
} }
extern "C" static my_bool extern "C" my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)), get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument) char *argument)
{ {
......
...@@ -360,7 +360,7 @@ static void usage(int version) ...@@ -360,7 +360,7 @@ static void usage(int version)
} }
extern "C" static my_bool extern "C" my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)), get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument __attribute__((unused))) char *argument __attribute__((unused)))
{ {
......
...@@ -444,20 +444,20 @@ pthread_cond_t eventShutdown; ...@@ -444,20 +444,20 @@ pthread_cond_t eventShutdown;
#endif #endif
static void start_signal_handler(void); static void start_signal_handler(void);
extern "C" static pthread_handler_decl(signal_hand, arg); extern "C" pthread_handler_decl(signal_hand, arg);
static void set_options(void); static void set_options(void);
static void get_options(int argc,char **argv); static void get_options(int argc,char **argv);
static char *get_relative_path(const char *path); static char *get_relative_path(const char *path);
static void fix_paths(void); static void fix_paths(void);
extern "C" static pthread_handler_decl(handle_connections_sockets,arg); extern "C" pthread_handler_decl(handle_connections_sockets,arg);
extern "C" static pthread_handler_decl(kill_server_thread,arg); extern "C" pthread_handler_decl(kill_server_thread,arg);
static int bootstrap(FILE *file); static int bootstrap(FILE *file);
static void close_server_sock(); static void close_server_sock();
static bool read_init_file(char *file_name); static bool read_init_file(char *file_name);
#ifdef __NT__ #ifdef __NT__
extern "C" static pthread_handler_decl(handle_connections_namedpipes,arg); extern "C" pthread_handler_decl(handle_connections_namedpipes,arg);
#endif #endif
extern "C" extern pthread_handler_decl(handle_slave,arg); extern "C" pthread_handler_decl(handle_slave,arg);
#ifdef SET_RLIMIT_NOFILE #ifdef SET_RLIMIT_NOFILE
static uint set_maximum_open_files(uint max_file_limit); static uint set_maximum_open_files(uint max_file_limit);
#endif #endif
...@@ -771,7 +771,7 @@ static void __cdecl kill_server(int sig_ptr) ...@@ -771,7 +771,7 @@ static void __cdecl kill_server(int sig_ptr)
#ifdef USE_ONE_SIGNAL_HAND #ifdef USE_ONE_SIGNAL_HAND
extern "C" static pthread_handler_decl(kill_server_thread,arg __attribute__((unused))) extern "C" pthread_handler_decl(kill_server_thread,arg __attribute__((unused)))
{ {
SHUTDOWN_THD; SHUTDOWN_THD;
my_thread_init(); // Initialize new thread my_thread_init(); // Initialize new thread
...@@ -786,7 +786,7 @@ extern "C" static pthread_handler_decl(kill_server_thread,arg __attribute__((unu ...@@ -786,7 +786,7 @@ extern "C" static pthread_handler_decl(kill_server_thread,arg __attribute__((unu
#define sigset signal #define sigset signal
#endif #endif
extern "C" static sig_handler print_signal_warning(int sig) extern "C" sig_handler print_signal_warning(int sig)
{ {
if (!DBUG_IN_USE) if (!DBUG_IN_USE)
{ {
...@@ -1162,7 +1162,7 @@ void close_connection(NET *net,uint errcode,bool lock) ...@@ -1162,7 +1162,7 @@ void close_connection(NET *net,uint errcode,bool lock)
/* Called when a thread is aborted */ /* Called when a thread is aborted */
/* ARGSUSED */ /* ARGSUSED */
extern "C" static sig_handler end_thread_signal(int sig __attribute__((unused))) extern "C" sig_handler end_thread_signal(int sig __attribute__((unused)))
{ {
THD *thd=current_thd; THD *thd=current_thd;
DBUG_ENTER("end_thread_signal"); DBUG_ENTER("end_thread_signal");
...@@ -1253,7 +1253,7 @@ void flush_thread_cache() ...@@ -1253,7 +1253,7 @@ void flush_thread_cache()
*/ */
#ifdef THREAD_SPECIFIC_SIGPIPE #ifdef THREAD_SPECIFIC_SIGPIPE
extern "C" static sig_handler abort_thread(int sig __attribute__((unused))) extern "C" sig_handler abort_thread(int sig __attribute__((unused)))
{ {
THD *thd=current_thd; THD *thd=current_thd;
DBUG_ENTER("abort_thread"); DBUG_ENTER("abort_thread");
...@@ -1327,7 +1327,7 @@ static void start_signal_handler(void) ...@@ -1327,7 +1327,7 @@ static void start_signal_handler(void)
#define UNSAFE_DEFAULT_LINUX_THREADS 200 #define UNSAFE_DEFAULT_LINUX_THREADS 200
#endif #endif
extern "C" static sig_handler handle_segfault(int sig) extern "C" sig_handler handle_segfault(int sig)
{ {
THD *thd=current_thd; THD *thd=current_thd;
/* /*
...@@ -1512,7 +1512,7 @@ static void start_signal_handler(void) ...@@ -1512,7 +1512,7 @@ static void start_signal_handler(void)
/* This threads handles all signals and alarms */ /* This threads handles all signals and alarms */
/* ARGSUSED */ /* ARGSUSED */
extern "C" static void *signal_hand(void *arg __attribute__((unused))) extern "C" void *signal_hand(void *arg __attribute__((unused)))
{ {
sigset_t set; sigset_t set;
int sig; int sig;
...@@ -1640,8 +1640,8 @@ extern "C" static void *signal_hand(void *arg __attribute__((unused))) ...@@ -1640,8 +1640,8 @@ extern "C" static void *signal_hand(void *arg __attribute__((unused)))
/* ARGSUSED */ /* ARGSUSED */
extern "C" static int my_message_sql(uint error, const char *str, extern "C" int my_message_sql(uint error, const char *str,
myf MyFlags __attribute__((unused))) myf MyFlags __attribute__((unused)))
{ {
NET *net; NET *net;
DBUG_ENTER("my_message_sql"); DBUG_ENTER("my_message_sql");
...@@ -3919,7 +3919,7 @@ static void set_options(void) ...@@ -3919,7 +3919,7 @@ static void set_options(void)
} }
extern "C" static my_bool extern "C" my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)), get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument) char *argument)
{ {
......
...@@ -188,7 +188,7 @@ int register_slave(THD* thd, uchar* packet, uint packet_length) ...@@ -188,7 +188,7 @@ int register_slave(THD* thd, uchar* packet, uint packet_length)
return 1; return 1;
} }
extern "C" static uint32 extern "C" uint32
*slave_list_key(SLAVE_INFO* si, uint* len, *slave_list_key(SLAVE_INFO* si, uint* len,
my_bool not_used __attribute__((unused))) my_bool not_used __attribute__((unused)))
{ {
...@@ -196,7 +196,7 @@ extern "C" static uint32 ...@@ -196,7 +196,7 @@ extern "C" static uint32
return &si->server_id; return &si->server_id;
} }
extern "C" static void slave_info_free(void *s) extern "C" void slave_info_free(void *s)
{ {
my_free((gptr) s, MYF(MY_WME)); my_free((gptr) s, MYF(MY_WME));
} }
......
...@@ -39,8 +39,8 @@ static key_map get_key_map_from_key_list(TABLE *table, ...@@ -39,8 +39,8 @@ static key_map get_key_map_from_key_list(TABLE *table,
List<String> *index_list); List<String> *index_list);
extern "C" static byte *cache_key(const byte *record,uint *length, extern "C" byte *table_cache_key(const byte *record,uint *length,
my_bool not_used __attribute__((unused))) my_bool not_used __attribute__((unused)))
{ {
TABLE *entry=(TABLE*) record; TABLE *entry=(TABLE*) record;
*length=entry->key_length; *length=entry->key_length;
...@@ -49,7 +49,7 @@ extern "C" static byte *cache_key(const byte *record,uint *length, ...@@ -49,7 +49,7 @@ extern "C" static byte *cache_key(const byte *record,uint *length,
void table_cache_init(void) void table_cache_init(void)
{ {
VOID(hash_init(&open_cache,table_cache_size+16,0,0,cache_key, VOID(hash_init(&open_cache,table_cache_size+16,0,0,table_cache_key,
(hash_free_key) free_cache_entry,0)); (hash_free_key) free_cache_entry,0));
mysql_rm_tmp_tables(); mysql_rm_tmp_tables();
} }
......
...@@ -59,14 +59,14 @@ template class List_iterator<Alter_column>; ...@@ -59,14 +59,14 @@ template class List_iterator<Alter_column>;
** User variables ** User variables
****************************************************************************/ ****************************************************************************/
extern "C" static byte *get_var_key(user_var_entry *entry, uint *length, extern "C" byte *get_var_key(user_var_entry *entry, uint *length,
my_bool not_used __attribute__((unused))) my_bool not_used __attribute__((unused)))
{ {
*length=(uint) entry->name.length; *length=(uint) entry->name.length;
return (byte*) entry->name.str; return (byte*) entry->name.str;
} }
extern "C" static void free_var(user_var_entry *entry) extern "C" void free_user_var(user_var_entry *entry)
{ {
char *pos= (char*) entry+ALIGN_SIZE(sizeof(*entry)); char *pos= (char*) entry+ALIGN_SIZE(sizeof(*entry));
if (entry->value && entry->value != pos) if (entry->value && entry->value != pos)
...@@ -148,7 +148,7 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0), ...@@ -148,7 +148,7 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0),
user_connect=(USER_CONN *)0; user_connect=(USER_CONN *)0;
hash_init(&user_vars, USER_VARS_HASH_SIZE, 0, 0, hash_init(&user_vars, USER_VARS_HASH_SIZE, 0, 0,
(hash_get_key) get_var_key, (hash_get_key) get_var_key,
(hash_free_key) free_var,0); (hash_free_key) free_user_var,0);
#ifdef USING_TRANSACTIONS #ifdef USING_TRANSACTIONS
bzero((char*) &transaction,sizeof(transaction)); bzero((char*) &transaction,sizeof(transaction));
if (opt_using_transactions) if (opt_using_transactions)
......
...@@ -205,7 +205,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, ...@@ -205,7 +205,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order,
#define MEM_STRIP_BUF_SIZE current_thd->variables.sortbuff_size #define MEM_STRIP_BUF_SIZE current_thd->variables.sortbuff_size
extern "C" static int refposcmp2(void* arg, const void *a,const void *b) extern "C" int refposcmp2(void* arg, const void *a,const void *b)
{ {
return memcmp(a,b, *(int*) arg); return memcmp(a,b, *(int*) arg);
} }
......
...@@ -915,7 +915,7 @@ void kill_delayed_threads(void) ...@@ -915,7 +915,7 @@ void kill_delayed_threads(void)
* Create a new delayed insert thread * Create a new delayed insert thread
*/ */
extern "C" static pthread_handler_decl(handle_delayed_insert,arg) extern "C" pthread_handler_decl(handle_delayed_insert,arg)
{ {
delayed_insert *di=(delayed_insert*) arg; delayed_insert *di=(delayed_insert*) arg;
THD *thd= &di->thd; THD *thd= &di->thd;
......
...@@ -259,14 +259,14 @@ static bool check_user(THD *thd,enum_server_command command, const char *user, ...@@ -259,14 +259,14 @@ static bool check_user(THD *thd,enum_server_command command, const char *user,
started with corresponding variable that is greater then 0. started with corresponding variable that is greater then 0.
*/ */
extern "C" static byte *get_key_conn(user_conn *buff, uint *length, extern "C" byte *get_key_conn(user_conn *buff, uint *length,
my_bool not_used __attribute__((unused))) my_bool not_used __attribute__((unused)))
{ {
*length=buff->len; *length=buff->len;
return (byte*) buff->user; return (byte*) buff->user;
} }
extern "C" static void free_user(struct user_conn *uc) extern "C" void free_user(struct user_conn *uc)
{ {
my_free((char*) uc,MYF(0)); my_free((char*) uc,MYF(0));
} }
......
...@@ -98,8 +98,8 @@ static void init_syms(udf_func *tmp) ...@@ -98,8 +98,8 @@ static void init_syms(udf_func *tmp)
} }
} }
extern "C" static byte* get_hash_key(const byte *buff,uint *length, extern "C" byte* get_hash_key(const byte *buff,uint *length,
my_bool not_used __attribute__((unused))) my_bool not_used __attribute__((unused)))
{ {
udf_func *udf=(udf_func*) buff; udf_func *udf=(udf_func*) buff;
*length=(uint) udf->name_length; *length=(uint) udf->name_length;
......
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