From e9af959eef34eecefb7db59fe31afc250c6fabcb Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 Nov 2005 09:30:01 -0600 Subject: make the IM compile on Windows server-tools/instance-manager/instance_options.cc: fix for coding guidelines server-tools/instance-manager/parse_output.cc: fix for coding guidelines server-tools/instance-manager/priv.cc: don't call pthread_attr_setstacksize on Windows server-tools/instance-manager/priv.h: include my_pthread so the thread functions will compile on Windows --- server-tools/instance-manager/instance_options.cc | 2 +- server-tools/instance-manager/parse_output.cc | 4 ++-- server-tools/instance-manager/priv.cc | 5 +++-- server-tools/instance-manager/priv.h | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) (limited to 'server-tools/instance-manager') diff --git a/server-tools/instance-manager/instance_options.cc b/server-tools/instance-manager/instance_options.cc index b060a1328ea..83f13b34aa2 100644 --- a/server-tools/instance-manager/instance_options.cc +++ b/server-tools/instance-manager/instance_options.cc @@ -334,7 +334,7 @@ int Instance_options::complete_initialization(const char *default_path, uint instance_type) { const char *tmp; - char* end; + char *end; if (!mysqld_path && !(mysqld_path= strdup_root(&alloc, default_path))) goto err; diff --git a/server-tools/instance-manager/parse_output.cc b/server-tools/instance-manager/parse_output.cc index d4a015495ea..ebc45c1f7d4 100644 --- a/server-tools/instance-manager/parse_output.cc +++ b/server-tools/instance-manager/parse_output.cc @@ -26,13 +26,13 @@ void trim_space(const char **text, uint *word_len) { - const char* start= *text; + const char *start= *text; while (*start != 0 && *start == ' ') start++; *text= start; int len= strlen(start); - const char* end= start + len - 1; + const char *end= start + len - 1; while (end > start && my_isspace(&my_charset_latin1, *end)) end--; *word_len= (end - start)+1; diff --git a/server-tools/instance-manager/priv.cc b/server-tools/instance-manager/priv.cc index cf073d9d7dc..a5040aa2e83 100644 --- a/server-tools/instance-manager/priv.cc +++ b/server-tools/instance-manager/priv.cc @@ -73,8 +73,9 @@ unsigned long open_files_limit; int set_stacksize_n_create_thread(pthread_t *thread, pthread_attr_t *attr, void *(*start_routine)(void *), void *arg) { - int rc; + int rc= 0; +#ifndef __WIN__ /* Set stack size to be safe on the platforms with too small default thread stack. @@ -82,7 +83,7 @@ int set_stacksize_n_create_thread(pthread_t *thread, pthread_attr_t *attr, rc= pthread_attr_setstacksize(attr, (size_t) (PTHREAD_STACK_MIN + IM_THREAD_STACK_SIZE)); - +#endif if (!rc) rc= pthread_create(thread, attr, start_routine, arg); return rc; diff --git a/server-tools/instance-manager/priv.h b/server-tools/instance-manager/priv.h index db6fa2ec143..4739bca68eb 100644 --- a/server-tools/instance-manager/priv.h +++ b/server-tools/instance-manager/priv.h @@ -22,7 +22,7 @@ #else #include #endif - +#include "my_pthread.h" /* the pid of the manager process (of the signal thread on the LinuxThreads) */ extern pid_t manager_pid; -- cgit v1.2.1