diff options
author | unknown <monty@hundin.mysql.fi> | 2001-08-23 00:55:48 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-08-23 00:55:48 +0300 |
commit | d3b6dcb8bfca6da4d90125b25c6f866cd7badbb1 (patch) | |
tree | f6e213bc452d9b3c37cd161c3099c3e079f9c9d4 /sql/mini_client.cc | |
parent | ef2fff8ee7266ed485fe50441017e4a72980e2cf (diff) | |
download | mariadb-git-d3b6dcb8bfca6da4d90125b25c6f866cd7badbb1.tar.gz |
Portability fixes
Docs/manual.texi:
Small changes because of user request.
heap/heapdef.h:
Portability fix
include/global.h:
Portability fix
myisam/myisamlog.c:
Portability fix
sql/mini_client.cc:
Fix for windows
sql/sql_repl.cc:
Fix for windows
sql/violite.c:
Fix for windows
Diffstat (limited to 'sql/mini_client.cc')
-rw-r--r-- | sql/mini_client.cc | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/sql/mini_client.cc b/sql/mini_client.cc index 88a02e227a3..3a2305aa69c 100644 --- a/sql/mini_client.cc +++ b/sql/mini_client.cc @@ -23,10 +23,23 @@ */ #define DONT_USE_RAID -#if defined(__WIN__) || defined(WIN32) +#if defined(__WIN__) #include <winsock.h> #include <odbcinst.h> +/* Disable alarms */ +typedef my_bool ALARM; +#define thr_alarm_init(A) (*(A))=0 +#define thr_alarm_in_use(A) (*(A)) +#define thr_end_alarm(A) +#define thr_alarm(A,B,C) local_thr_alarm((A),(B),(C)) +inline int local_thr_alarm(my_bool *A,int B __attribute__((unused)),ALARM *C __attribute__((unused))) +{ + *A=1; + return 0; +} +#define thr_got_alarm(A) 0 #endif + #include <global.h> #include <my_sys.h> #include <mysys_err.h> @@ -62,7 +75,7 @@ extern "C" { // Because of SCO 3.2V4.2 #ifdef HAVE_SYS_UN_H # include <sys/un.h> #endif -#if defined(THREAD) && !defined(__WIN__) +#if defined(THREAD) #include <my_pthread.h> /* because of signal() */ #include <thr_alarm.h> #endif @@ -486,9 +499,7 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user, uint pkt_length; NET *net= &mysql->net; thr_alarm_t alarmed; -#if !defined(__WIN__) ALARM alarm_buff; -#endif #ifdef __WIN__ HANDLE hPipe=INVALID_HANDLE_VALUE; |