diff options
author | monty@hundin.mysql.fi <> | 2001-08-22 01:45:07 +0300 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2001-08-22 01:45:07 +0300 |
commit | 733f865f54e297bf512f10ec0631342303164b25 (patch) | |
tree | 32f2629127dea884d1930817179e72d2076be756 /client/mysqladmin.c | |
parent | 063a1a6557ad2c501f4da9a47e633fb191ee2e00 (diff) | |
download | mariadb-git-733f865f54e297bf512f10ec0631342303164b25.tar.gz |
Fixes for OS2.
Fix bug in isamlog
Add argument types to function declarations.
Diffstat (limited to 'client/mysqladmin.c')
-rw-r--r-- | client/mysqladmin.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/client/mysqladmin.c b/client/mysqladmin.c index 3570cefc4ae..e95d6492949 100644 --- a/client/mysqladmin.c +++ b/client/mysqladmin.c @@ -132,7 +132,7 @@ static struct option long_options[] = { {0, 0, 0, 0} }; -CHANGEABLE_VAR changeable_vars[] = { +static CHANGEABLE_VAR changeable_vars[] = { { "connect_timeout", (long*) &opt_connect_timeout, 0, 0, 3600*12, 0, 1}, { "shutdown_timeout", (long*) &opt_shutdown_timeout, SHUTDOWN_DEF_TIMEOUT, 0, 3600*12, 0, 1}, @@ -152,7 +152,8 @@ int main(int argc,char *argv[]) load_defaults("my",load_default_groups,&argc,&argv); set_all_changeable_vars( changeable_vars ); - while ((c=getopt_long(argc,argv,"h:i:p::u:#::P:sS:Ct:fq?vVw::WrEO:", + while ((c=getopt_long(argc,argv, + (char*) "h:i:p::u:#::P:sS:Ct:fq?vVw::WrEO:", long_options, &option_index)) != EOF) { switch(c) { @@ -1121,14 +1122,15 @@ static void wait_pidfile(char *pidfile) uint count=0; system_filename(buff,pidfile); - while ((fd = open(buff, O_RDONLY)) >= 0 && count++ < opt_shutdown_timeout) + while ((fd = my_open(buff, O_RDONLY, MYF(0))) >= 0 && + count++ < opt_shutdown_timeout) { - close(fd); + my_close(fd,MYF(0)); sleep(1); } if (fd >= 0) { - close(fd); + my_close(fd,MYF(0)); fprintf(stderr, "Warning; Aborted waiting on pid file: '%s' after %d seconds\n", buff, count-1); |