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

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

parent 890b39bb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)
{
+1 −1
Original line number Diff line number Diff line
@@ -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)))
{
+14 −14
Original line number Diff line number Diff line
@@ -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,7 +1640,7 @@ extern "C" static void *signal_hand(void *arg __attribute__((unused)))


/* 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)))
{
  NET *net;
@@ -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)
{
+2 −2
Original line number Diff line number Diff line
@@ -188,7 +188,7 @@ int register_slave(THD* thd, uchar* packet, uint packet_length)
  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));
}
+3 −3
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ 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,
extern "C" byte *table_cache_key(const byte *record,uint *length,
				 my_bool not_used __attribute__((unused)))
{
  TABLE *entry=(TABLE*) record;
@@ -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();
}
Loading