summaryrefslogtreecommitdiff
path: root/server-tools/instance-manager
diff options
context:
space:
mode:
authorunknown <reggie@fedora.(none)>2005-11-02 09:30:01 -0600
committerunknown <reggie@fedora.(none)>2005-11-02 09:30:01 -0600
commite9af959eef34eecefb7db59fe31afc250c6fabcb (patch)
treefdc5968fbf3580a8e51d18c674e1945a009d45e8 /server-tools/instance-manager
parent5ce36e8134f41aed1e6dbfe585eb8e3c0ef410e5 (diff)
downloadmariadb-git-e9af959eef34eecefb7db59fe31afc250c6fabcb.tar.gz
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
Diffstat (limited to 'server-tools/instance-manager')
-rw-r--r--server-tools/instance-manager/instance_options.cc2
-rw-r--r--server-tools/instance-manager/parse_output.cc4
-rw-r--r--server-tools/instance-manager/priv.cc5
-rw-r--r--server-tools/instance-manager/priv.h2
4 files changed, 7 insertions, 6 deletions
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 <unistd.h>
#endif
-
+#include "my_pthread.h"
/* the pid of the manager process (of the signal thread on the LinuxThreads) */
extern pid_t manager_pid;