diff options
Diffstat (limited to 'mysys/my_init.c')
-rw-r--r-- | mysys/my_init.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/mysys/my_init.c b/mysys/my_init.c index dd06ae41dcb..da0e6caf96d 100644 --- a/mysys/my_init.c +++ b/mysys/my_init.c @@ -17,13 +17,8 @@ #include "mysys_priv.h" #include "my_static.h" #include "mysys_err.h" -#include "m_ctype.h" #include <m_string.h> #include <m_ctype.h> -#ifdef HAVE_GETRUSAGE -#include <sys/resource.h> -/* extern int getrusage(int, struct rusage *); */ -#endif #include <signal.h> #ifdef VMS #include <my_static.c> @@ -53,7 +48,7 @@ my_bool my_init_done=0; static ulong atoi_octal(const char *str) { long int tmp; - while (*str && isspace(*str)) + while (*str && my_isspace(&my_charset_latin1, *str)) str++; str2int(str, (*str == '0' ? 8 : 10), /* Octalt or decimalt */ @@ -141,7 +136,7 @@ void my_end(int infoflag) DBUG_PRINT("error",("%s",errbuff[0])); } } - free_charsets(); + my_once_free(); if (infoflag & MY_GIVE_INFO || info_file != stderr) { #ifdef HAVE_GETRUSAGE @@ -181,7 +176,6 @@ Voluntary context switches %ld, Involuntary context switches %ld\n", } #ifdef THREAD DBUG_POP(); /* Must be done before my_thread_end */ - my_once_free(); my_thread_end(); my_thread_global_end(); #if defined(SAFE_MUTEX) @@ -244,8 +238,13 @@ static void my_win_init(void) setlocale(LC_CTYPE, ""); /* To get right sortorder */ - /* Clear the OS system variable TZ and avoid the 100% CPU usage */ +#if defined(_MSC_VER) && (_MSC_VER < 1300) + /* + Clear the OS system variable TZ and avoid the 100% CPU usage + Only for old versions of Visual C++ + */ _putenv( "TZ=" ); +#endif _tzset(); /* apre la chiave HKEY_LOCAL_MACHINES\software\MySQL */ |