diff options
Diffstat (limited to 'libmysql')
-rw-r--r--[-rwxr-xr-x] | libmysql/CMakeLists.txt | 0 | ||||
-rw-r--r-- | libmysql/dll.c | 23 | ||||
-rw-r--r-- | libmysql/get_password.c | 8 | ||||
-rw-r--r-- | libmysql/libmysql.c | 12 | ||||
-rw-r--r-- | libmysql/manager.c | 4 |
5 files changed, 8 insertions, 39 deletions
diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt index d12b6ca6c10..d12b6ca6c10 100755..100644 --- a/libmysql/CMakeLists.txt +++ b/libmysql/CMakeLists.txt diff --git a/libmysql/dll.c b/libmysql/dll.c index b0e4b9cab3b..f5db0bb4669 100644 --- a/libmysql/dll.c +++ b/libmysql/dll.c @@ -112,26 +112,3 @@ int _export FAR PASCAL libmain(HANDLE hModule,short cbHeapSize, } #endif - -#ifdef OS2 - -/* - This function is called automatically by _DLL_InitTerm - Every dll runtime enviroment is not tz enabled, so tzset() - must be called to enable TZ handling - Also timezone is fixed. -*/ - -extern "C" unsigned long _System DllMain(unsigned long modhandle, - unsigned long flag) -{ - if (flag == 0) { - tzset(); /* Set tzname */ - time_t currentTime = time(NULL); - struct tm *ts = localtime(¤tTime); - if (ts->tm_isdst > 0) - _timezone -= 3600; - } -} - -#endif diff --git a/libmysql/get_password.c b/libmysql/get_password.c index e55e77320f0..4c251677a66 100644 --- a/libmysql/get_password.c +++ b/libmysql/get_password.c @@ -36,7 +36,7 @@ #include <pwd.h> #endif /* HAVE_PWD_H */ #else /* ! HAVE_GETPASS */ -#if !defined(__WIN__) && !defined(OS2) && !defined(__NETWARE__) +#if !defined(__WIN__) && !defined(__NETWARE__) #include <sys/ioctl.h> #ifdef HAVE_TERMIOS_H /* For tty-password */ #include <termios.h> @@ -65,7 +65,7 @@ #define getpass(A) getpassphrase(A) #endif -#if defined( __WIN__) || defined(OS2) || defined(__NETWARE__) +#if defined( __WIN__) || defined(__NETWARE__) /* were just going to fake it here and get input from the keyboard */ #ifdef __NETWARE__ @@ -75,7 +75,7 @@ #define _cputs(A) putstring(A) #endif -char *get_tty_password(char *opt_message) +char *get_tty_password(const char *opt_message) { char to[80]; char *pos=to,*end=to+sizeof(to)-1; @@ -159,7 +159,7 @@ static void get_password(char *to,uint length,int fd,bool echo) #endif /* ! HAVE_GETPASS */ -char *get_tty_password(char *opt_message) +char *get_tty_password(const char *opt_message) { #ifdef HAVE_GETPASS char *passbuff; diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 8786655d9c3..0d30d275237 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -179,10 +179,8 @@ void STDCALL mysql_server_end() if (!org_my_init_done) { my_end(MY_DONT_FREE_DBUG); -#ifndef THREAD /* Remove TRACING, if enabled by mysql_debug() */ DBUG_POP(); -#endif } else mysql_thread_end(); @@ -268,16 +266,12 @@ mysql_debug(const char *debug __attribute__((unused))) { #ifndef DBUG_OFF char *env; - if (_db_on_) - return; /* Already using debugging */ if (debug) { - DEBUGGER_ON; DBUG_PUSH(debug); } else if ((env = getenv("MYSQL_DEBUG"))) { - DEBUGGER_ON; DBUG_PUSH(env); #if !defined(_WINVER) && !defined(WINVER) puts("\n-------------------------------------------------------"); @@ -746,7 +740,7 @@ void read_user_name(char *name) strmake(name, str ? str : "UNKNOWN_USER", USERNAME_LENGTH); } -#elif !defined(MSDOS) && ! defined(VMS) && !defined(__WIN__) && !defined(OS2) +#elif !defined(MSDOS) && ! defined(VMS) && !defined(__WIN__) void read_user_name(char *name) { @@ -2796,11 +2790,11 @@ my_bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt, { switch (attr_type) { case STMT_ATTR_UPDATE_MAX_LENGTH: - *(unsigned long *) value= stmt->update_max_length; + *(my_bool*) value= stmt->update_max_length; break; case STMT_ATTR_CURSOR_TYPE: *(ulong*) value= stmt->flags; - break; + break; case STMT_ATTR_PREFETCH_ROWS: *(ulong*) value= stmt->prefetch_rows; break; diff --git a/libmysql/manager.c b/libmysql/manager.c index 631bfa26cb2..a88c63123b0 100644 --- a/libmysql/manager.c +++ b/libmysql/manager.c @@ -35,9 +35,7 @@ #include <signal.h> #include <errno.h> -#if defined(OS2) -# include <sys/un.h> -#elif defined(__NETWARE__) +#if defined(__NETWARE__) #include <netdb.h> #include <sys/select.h> #include <sys/utsname.h> |