Commit 55f0e6bf authored by Michael Widenius's avatar Michael Widenius

Fixes for netware by Guenter Knauf

parent ffab2a90
...@@ -57,6 +57,7 @@ extern "C" { ...@@ -57,6 +57,7 @@ extern "C" {
#undef HAVE_RWLOCK_INIT #undef HAVE_RWLOCK_INIT
#undef HAVE_SCHED_H #undef HAVE_SCHED_H
#undef HAVE_SYS_MMAN_H #undef HAVE_SYS_MMAN_H
#undef HAVE_SYS_UN_H
#undef HAVE_SYNCH_H #undef HAVE_SYNCH_H
#undef HAVE_MMAP #undef HAVE_MMAP
#undef HAVE_RINT #undef HAVE_RINT
......
...@@ -108,6 +108,7 @@ init_db.sql: $(top_srcdir)/scripts/mysql_system_tables.sql \ ...@@ -108,6 +108,7 @@ init_db.sql: $(top_srcdir)/scripts/mysql_system_tables.sql \
@echo "CREATE DATABASE test;" >> $@; @echo "CREATE DATABASE test;" >> $@;
@echo "use mysql;" >> $@; @echo "use mysql;" >> $@;
@cat $(top_srcdir)/scripts/mysql_system_tables.sql >> $@; @cat $(top_srcdir)/scripts/mysql_system_tables.sql >> $@;
@cat $(top_srcdir)/scripts/mysql_system_tables_data.sql | grep -v '@current_hostname' >> $@;
# Build test_db.sql from init_db.sql plus # Build test_db.sql from init_db.sql plus
# some test data # some test data
......
...@@ -24,8 +24,10 @@ ...@@ -24,8 +24,10 @@
#include <proc.h> #include <proc.h>
#include <ctype.h> #include <ctype.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/wait.h>
#include <fcntl.h> #include <fcntl.h>
#include <assert.h> #include <assert.h>
#include <nks/vm.h>
#include "my_manage.h" #include "my_manage.h"
...@@ -356,17 +358,17 @@ pid_t get_server_pid(char *pid_file) ...@@ -356,17 +358,17 @@ pid_t get_server_pid(char *pid_file)
// terminate string // terminate string
if ((p = strchr(buf, '\n')) != NULL) if ((p = strchr(buf, '\n')) != NULL)
{ {
*p = NULL; *p = 0;
// check for a '\r' // check for a '\r'
if ((p = strchr(buf, '\r')) != NULL) if ((p = strchr(buf, '\r')) != NULL)
{ {
*p = NULL; *p = 0;
} }
} }
else else
{ {
buf[err] = NULL; buf[err] = 0;
} }
id = strtol(buf, NULL, 0); id = strtol(buf, NULL, 0);
...@@ -471,7 +473,7 @@ void get_basedir(char *argv0, char *basedir) ...@@ -471,7 +473,7 @@ void get_basedir(char *argv0, char *basedir)
if ((p = strindex(temp, "/bin/")) != NULL) if ((p = strindex(temp, "/bin/")) != NULL)
{ {
*p = NULL; *p = 0;
strcpy(basedir, temp); strcpy(basedir, temp);
} }
} }
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
global variables global variables
******************************************************************************/ ******************************************************************************/
char autoclose; int autoclose;
char basedir[PATH_MAX]; char basedir[PATH_MAX];
char datadir[PATH_MAX]; char datadir[PATH_MAX];
char err_log[PATH_MAX]; char err_log[PATH_MAX];
...@@ -99,7 +99,7 @@ void start_defaults(int argc, char *argv[]) ...@@ -99,7 +99,7 @@ void start_defaults(int argc, char *argv[])
} }
// default option // default option
default_option[0] = NULL; default_option[0] = 0;
for (i=0; (argc > 1) && default_options[i]; i++) for (i=0; (argc > 1) && default_options[i]; i++)
{ {
if(!strnicmp(argv[1], default_options[i], strlen(default_options[i]))) if(!strnicmp(argv[1], default_options[i], strlen(default_options[i])))
...@@ -110,11 +110,11 @@ void start_defaults(int argc, char *argv[]) ...@@ -110,11 +110,11 @@ void start_defaults(int argc, char *argv[])
} }
// set after basedir is established // set after basedir is established
datadir[0] = NULL; datadir[0] = 0;
err_log[0] = NULL; err_log[0] = 0;
out_log[0] = NULL; out_log[0] = 0;
mysqld[0] = NULL; mysqld[0] = 0;
sql_file[0] = NULL; sql_file[0] = 0;
} }
/****************************************************************************** /******************************************************************************
......
This diff is collapsed.
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