Portability fix extern "C" static -> extern "C"
This commit is contained in:
parent
890b39bb68
commit
aa4e165808
@ -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)),
|
||||
char *argument)
|
||||
{
|
||||
|
@ -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)),
|
||||
char *argument __attribute__((unused)))
|
||||
{
|
||||
|
@ -444,20 +444,20 @@ pthread_cond_t eventShutdown;
|
||||
#endif
|
||||
|
||||
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 get_options(int argc,char **argv);
|
||||
static char *get_relative_path(const char *path);
|
||||
static void fix_paths(void);
|
||||
extern "C" static pthread_handler_decl(handle_connections_sockets,arg);
|
||||
extern "C" static pthread_handler_decl(kill_server_thread,arg);
|
||||
extern "C" pthread_handler_decl(handle_connections_sockets,arg);
|
||||
extern "C" pthread_handler_decl(kill_server_thread,arg);
|
||||
static int bootstrap(FILE *file);
|
||||
static void close_server_sock();
|
||||
static bool read_init_file(char *file_name);
|
||||
#ifdef __NT__
|
||||
extern "C" static pthread_handler_decl(handle_connections_namedpipes,arg);
|
||||
extern "C" pthread_handler_decl(handle_connections_namedpipes,arg);
|
||||
#endif
|
||||
extern "C" extern pthread_handler_decl(handle_slave,arg);
|
||||
extern "C" pthread_handler_decl(handle_slave,arg);
|
||||
#ifdef SET_RLIMIT_NOFILE
|
||||
static uint set_maximum_open_files(uint max_file_limit);
|
||||
#endif
|
||||
@ -771,7 +771,7 @@ static void __cdecl kill_server(int sig_ptr)
|
||||
|
||||
|
||||
#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;
|
||||
my_thread_init(); // Initialize new thread
|
||||
@ -786,7 +786,7 @@ extern "C" static pthread_handler_decl(kill_server_thread,arg __attribute__((unu
|
||||
#define sigset signal
|
||||
#endif
|
||||
|
||||
extern "C" static sig_handler print_signal_warning(int sig)
|
||||
extern "C" sig_handler print_signal_warning(int sig)
|
||||
{
|
||||
if (!DBUG_IN_USE)
|
||||
{
|
||||
@ -1162,7 +1162,7 @@ void close_connection(NET *net,uint errcode,bool lock)
|
||||
/* Called when a thread is aborted */
|
||||
/* 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;
|
||||
DBUG_ENTER("end_thread_signal");
|
||||
@ -1253,7 +1253,7 @@ void flush_thread_cache()
|
||||
*/
|
||||
|
||||
#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;
|
||||
DBUG_ENTER("abort_thread");
|
||||
@ -1327,7 +1327,7 @@ static void start_signal_handler(void)
|
||||
#define UNSAFE_DEFAULT_LINUX_THREADS 200
|
||||
#endif
|
||||
|
||||
extern "C" static sig_handler handle_segfault(int sig)
|
||||
extern "C" sig_handler handle_segfault(int sig)
|
||||
{
|
||||
THD *thd=current_thd;
|
||||
/*
|
||||
@ -1512,7 +1512,7 @@ static void start_signal_handler(void)
|
||||
/* This threads handles all signals and alarms */
|
||||
|
||||
/* ARGSUSED */
|
||||
extern "C" static void *signal_hand(void *arg __attribute__((unused)))
|
||||
extern "C" void *signal_hand(void *arg __attribute__((unused)))
|
||||
{
|
||||
sigset_t set;
|
||||
int sig;
|
||||
@ -1640,8 +1640,8 @@ extern "C" static void *signal_hand(void *arg __attribute__((unused)))
|
||||
|
||||
|
||||
/* ARGSUSED */
|
||||
extern "C" static int my_message_sql(uint error, const char *str,
|
||||
myf MyFlags __attribute__((unused)))
|
||||
extern "C" int my_message_sql(uint error, const char *str,
|
||||
myf MyFlags __attribute__((unused)))
|
||||
{
|
||||
NET *net;
|
||||
DBUG_ENTER("my_message_sql");
|
||||
@ -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)),
|
||||
char *argument)
|
||||
{
|
||||
|
@ -188,7 +188,7 @@ err2:
|
||||
return 1;
|
||||
}
|
||||
|
||||
extern "C" static uint32
|
||||
extern "C" uint32
|
||||
*slave_list_key(SLAVE_INFO* si, uint* len,
|
||||
my_bool not_used __attribute__((unused)))
|
||||
{
|
||||
@ -196,7 +196,7 @@ extern "C" static uint32
|
||||
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));
|
||||
}
|
||||
|
@ -39,8 +39,8 @@ static key_map get_key_map_from_key_list(TABLE *table,
|
||||
List<String> *index_list);
|
||||
|
||||
|
||||
extern "C" static byte *cache_key(const byte *record,uint *length,
|
||||
my_bool not_used __attribute__((unused)))
|
||||
extern "C" byte *table_cache_key(const byte *record,uint *length,
|
||||
my_bool not_used __attribute__((unused)))
|
||||
{
|
||||
TABLE *entry=(TABLE*) record;
|
||||
*length=entry->key_length;
|
||||
@ -49,7 +49,7 @@ extern "C" static byte *cache_key(const byte *record,uint *length,
|
||||
|
||||
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));
|
||||
mysql_rm_tmp_tables();
|
||||
}
|
||||
|
@ -59,14 +59,14 @@ template class List_iterator<Alter_column>;
|
||||
** User variables
|
||||
****************************************************************************/
|
||||
|
||||
extern "C" static byte *get_var_key(user_var_entry *entry, uint *length,
|
||||
my_bool not_used __attribute__((unused)))
|
||||
extern "C" byte *get_var_key(user_var_entry *entry, uint *length,
|
||||
my_bool not_used __attribute__((unused)))
|
||||
{
|
||||
*length=(uint) entry->name.length;
|
||||
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));
|
||||
if (entry->value && entry->value != pos)
|
||||
@ -148,7 +148,7 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0),
|
||||
user_connect=(USER_CONN *)0;
|
||||
hash_init(&user_vars, USER_VARS_HASH_SIZE, 0, 0,
|
||||
(hash_get_key) get_var_key,
|
||||
(hash_free_key) free_var,0);
|
||||
(hash_free_key) free_user_var,0);
|
||||
#ifdef USING_TRANSACTIONS
|
||||
bzero((char*) &transaction,sizeof(transaction));
|
||||
if (opt_using_transactions)
|
||||
|
@ -205,7 +205,7 @@ cleanup:
|
||||
|
||||
#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);
|
||||
}
|
||||
|
@ -915,7 +915,7 @@ void kill_delayed_threads(void)
|
||||
* 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;
|
||||
THD *thd= &di->thd;
|
||||
|
@ -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.
|
||||
*/
|
||||
|
||||
extern "C" static byte *get_key_conn(user_conn *buff, uint *length,
|
||||
my_bool not_used __attribute__((unused)))
|
||||
extern "C" byte *get_key_conn(user_conn *buff, uint *length,
|
||||
my_bool not_used __attribute__((unused)))
|
||||
{
|
||||
*length=buff->len;
|
||||
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));
|
||||
}
|
||||
|
@ -98,8 +98,8 @@ static void init_syms(udf_func *tmp)
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" static byte* get_hash_key(const byte *buff,uint *length,
|
||||
my_bool not_used __attribute__((unused)))
|
||||
extern "C" byte* get_hash_key(const byte *buff,uint *length,
|
||||
my_bool not_used __attribute__((unused)))
|
||||
{
|
||||
udf_func *udf=(udf_func*) buff;
|
||||
*length=(uint) udf->name_length;
|
||||
|
Loading…
x
Reference in New Issue
Block a user