Final patch to remove the last of the OS2 support.

This commit is contained in:
brian@zim.(none) 2006-04-15 18:17:32 -07:00
parent 53dce52086
commit 5d1d27c016
31 changed files with 65 additions and 256 deletions

View File

@ -24,8 +24,6 @@
#include <errmsg.h> #include <errmsg.h>
#include <my_getopt.h> #include <my_getopt.h>
/* We have to define 'enum options' identical in all files to keep OS2 happy */
enum options_client enum options_client
{ {
OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET, OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET,

View File

@ -81,7 +81,7 @@ extern "C" {
#endif #endif
#undef bcmp // Fix problem with new readline #undef bcmp // Fix problem with new readline
#if defined( __WIN__) || defined(OS2) #if defined( __WIN__)
#include <conio.h> #include <conio.h>
#elif !defined(__NETWARE__) #elif !defined(__NETWARE__)
#include <readline/readline.h> #include <readline/readline.h>
@ -101,7 +101,7 @@ extern "C" {
#define cmp_database(cs,A,B) strcmp((A),(B)) #define cmp_database(cs,A,B) strcmp((A),(B))
#endif #endif
#if !defined( __WIN__) && !defined( OS2) && !defined(__NETWARE__) && (!defined(HAVE_mit_thread) || !defined(THREAD)) #if !defined( __WIN__) && !defined(__NETWARE__) && !defined(THREAD)
#define USE_POPEN #define USE_POPEN
#endif #endif
@ -969,7 +969,7 @@ static int get_options(int argc, char **argv)
static int read_and_execute(bool interactive) static int read_and_execute(bool interactive)
{ {
#if defined(OS2) || defined(__NETWARE__) #if defined(__NETWARE__)
char linebuffer[254]; char linebuffer[254];
String buffer; String buffer;
#endif #endif
@ -1006,7 +1006,7 @@ static int read_and_execute(bool interactive)
if (opt_outfile && glob_buffer.is_empty()) if (opt_outfile && glob_buffer.is_empty())
fflush(OUTFILE); fflush(OUTFILE);
#if defined( __WIN__) || defined(OS2) || defined(__NETWARE__) #if defined( __WIN__) || defined(__NETWARE__)
tee_fputs(prompt, stdout); tee_fputs(prompt, stdout);
#if defined(__NETWARE__) #if defined(__NETWARE__)
line=fgets(linebuffer, sizeof(linebuffer)-1, stdin); line=fgets(linebuffer, sizeof(linebuffer)-1, stdin);
@ -1017,7 +1017,7 @@ static int read_and_execute(bool interactive)
if (p != NULL) if (p != NULL)
*p = '\0'; *p = '\0';
} }
#elif defined(__WIN__) #else defined(__WIN__)
if (!tmpbuf.is_alloced()) if (!tmpbuf.is_alloced())
tmpbuf.alloc(65535); tmpbuf.alloc(65535);
tmpbuf.length(0); tmpbuf.length(0);
@ -1033,32 +1033,12 @@ static int read_and_execute(bool interactive)
*/ */
} while (tmpbuf.alloced_length() <= clen); } while (tmpbuf.alloced_length() <= clen);
line= buffer.c_ptr(); line= buffer.c_ptr();
#else /* OS2 */
buffer.length(0);
/* _cgets() expects the buffer size - 3 as the first byte */
linebuffer[0]= (char) sizeof(linebuffer) - 3;
do
{
line= _cgets(linebuffer);
buffer.append(line, (unsigned char)linebuffer[1]);
/*
If _cgets() gets an input line that is linebuffer[0] bytes
long, the next call to _cgets() will return immediately with
linebuffer[1] == 0, and it does the same thing for input that
is linebuffer[0]-1 bytes long. So it appears that even though
_cgets() replaces the newline (which is two bytes on Window) with
a nil, it still needs the space in the linebuffer for it. This is,
naturally, undocumented.
*/
} while ((unsigned char)linebuffer[0] <=
(unsigned char)linebuffer[1] + 1);
line= buffer.c_ptr();
#endif /* __NETWARE__ */ #endif /* __NETWARE__ */
#else #else
if (opt_outfile) if (opt_outfile)
fputs(prompt, OUTFILE); fputs(prompt, OUTFILE);
line= readline(prompt); line= readline(prompt);
#endif /* defined( __WIN__) || defined(OS2) || defined(__NETWARE__) */ #endif /* defined( __WIN__) || defined(__NETWARE__) */
/* /*
When Ctrl+d or Ctrl+z is pressed, the line may be NULL on some OS When Ctrl+d or Ctrl+z is pressed, the line may be NULL on some OS
@ -1110,7 +1090,7 @@ static int read_and_execute(bool interactive)
} }
} }
#if defined( __WIN__) || defined(OS2) || defined(__NETWARE__) #if defined( __WIN__) || defined(__NETWARE__)
buffer.free(); buffer.free();
#endif #endif
#if defined( __WIN__) #if defined( __WIN__)
@ -3429,9 +3409,6 @@ void tee_fprintf(FILE *file, const char *fmt, ...)
NETWARE_YIELD; NETWARE_YIELD;
va_start(args, fmt); va_start(args, fmt);
(void) vfprintf(file, fmt, args); (void) vfprintf(file, fmt, args);
#ifdef OS2
fflush( file);
#endif
va_end(args); va_end(args);
if (opt_outfile) if (opt_outfile)
@ -3447,9 +3424,6 @@ void tee_fputs(const char *s, FILE *file)
{ {
NETWARE_YIELD; NETWARE_YIELD;
fputs(s, file); fputs(s, file);
#ifdef OS2
fflush( file);
#endif
if (opt_outfile) if (opt_outfile)
fputs(s, OUTFILE); fputs(s, OUTFILE);
} }
@ -3460,9 +3434,6 @@ void tee_puts(const char *s, FILE *file)
NETWARE_YIELD; NETWARE_YIELD;
fputs(s, file); fputs(s, file);
fputs("\n", file); fputs("\n", file);
#ifdef OS2
fflush( file);
#endif
if (opt_outfile) if (opt_outfile)
{ {
fputs(s, OUTFILE); fputs(s, OUTFILE);
@ -3473,14 +3444,11 @@ void tee_puts(const char *s, FILE *file)
void tee_putc(int c, FILE *file) void tee_putc(int c, FILE *file)
{ {
putc(c, file); putc(c, file);
#ifdef OS2
fflush( file);
#endif
if (opt_outfile) if (opt_outfile)
putc(c, OUTFILE); putc(c, OUTFILE);
} }
#if defined( __WIN__) || defined( OS2) || defined(__NETWARE__) #if defined( __WIN__) || defined(__NETWARE__)
#include <time.h> #include <time.h>
#else #else
#include <sys/times.h> #include <sys/times.h>
@ -3492,7 +3460,7 @@ void tee_putc(int c, FILE *file)
static ulong start_timer(void) static ulong start_timer(void)
{ {
#if defined( __WIN__) || defined( OS2) || defined(__NETWARE__) #if defined( __WIN__) || defined(__NETWARE__)
return clock(); return clock();
#else #else
struct tms tms_tmp; struct tms tms_tmp;

View File

@ -2215,7 +2215,7 @@ static unsigned long Clock()
return ru.ru_utime.tv_sec*1000 + ru.ru_utime.tv_usec/1000; return ru.ru_utime.tv_sec*1000 + ru.ru_utime.tv_usec/1000;
} }
#elif defined(MSDOS) || defined(__WIN__) || defined(OS2) #elif defined(MSDOS) || defined(__WIN__)
static ulong Clock() static ulong Clock()
{ {

View File

@ -52,7 +52,7 @@
#endif #endif
/* This is needed for the definitions of bzero... on solaris */ /* This is needed for the definitions of bzero... on solaris */
#if defined(HAVE_STRINGS_H) && !defined(HAVE_mit_thread) #if defined(HAVE_STRINGS_H)
#include <strings.h> #include <strings.h>
#endif #endif
@ -95,7 +95,7 @@ extern "C" {
extern void *(*my_str_malloc)(size_t); extern void *(*my_str_malloc)(size_t);
extern void (*my_str_free)(void *); extern void (*my_str_free)(void *);
#if defined(HAVE_STPCPY) && !defined(HAVE_mit_thread) #if defined(HAVE_STPCPY)
#define strmov(A,B) stpcpy((A),(B)) #define strmov(A,B) stpcpy((A),(B))
#ifndef stpcpy #ifndef stpcpy
extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 */ extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 */
@ -243,7 +243,7 @@ longlong my_strtoll10(const char *nptr, char **endptr, int *error);
#ifdef HAVE_LONG_LONG #ifdef HAVE_LONG_LONG
extern char *longlong2str(longlong val,char *dst,int radix); extern char *longlong2str(longlong val,char *dst,int radix);
extern char *longlong10_to_str(longlong val,char *dst,int radix); extern char *longlong10_to_str(longlong val,char *dst,int radix);
#if (!defined(HAVE_STRTOULL) || defined(HAVE_mit_thread)) || defined(NO_STRTOLL_PROTO) #if (!defined(HAVE_STRTOULL) || defined(NO_STRTOLL_PROTO)
extern longlong strtoll(const char *str, char **ptr, int base); extern longlong strtoll(const char *str, char **ptr, int base);
extern ulonglong strtoull(const char *str, char **ptr, int base); extern ulonglong strtoull(const char *str, char **ptr, int base);
#endif #endif

View File

@ -206,7 +206,6 @@
/* The client defines this to avoid all thread code */ /* The client defines this to avoid all thread code */
#if defined(UNDEF_THREADS_HACK) #if defined(UNDEF_THREADS_HACK)
#undef THREAD #undef THREAD
#undef HAVE_mit_thread
#undef HAVE_LINUXTHREADS #undef HAVE_LINUXTHREADS
#undef HAVE_NPTL #undef HAVE_NPTL
#undef HAVE_UNIXWARE7_THREADS #undef HAVE_UNIXWARE7_THREADS

View File

@ -112,26 +112,3 @@ int _export FAR PASCAL libmain(HANDLE hModule,short cbHeapSize,
} }
#endif #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(&currentTime);
if (ts->tm_isdst > 0)
_timezone -= 3600;
}
}
#endif

View File

@ -36,7 +36,7 @@
#include <pwd.h> #include <pwd.h>
#endif /* HAVE_PWD_H */ #endif /* HAVE_PWD_H */
#else /* ! HAVE_GETPASS */ #else /* ! HAVE_GETPASS */
#if !defined(__WIN__) && !defined(OS2) && !defined(__NETWARE__) #if !defined(__WIN__) && !defined(__NETWARE__)
#include <sys/ioctl.h> #include <sys/ioctl.h>
#ifdef HAVE_TERMIOS_H /* For tty-password */ #ifdef HAVE_TERMIOS_H /* For tty-password */
#include <termios.h> #include <termios.h>
@ -65,7 +65,7 @@
#define getpass(A) getpassphrase(A) #define getpass(A) getpassphrase(A)
#endif #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 */ /* were just going to fake it here and get input from the keyboard */
#ifdef __NETWARE__ #ifdef __NETWARE__

View File

@ -739,7 +739,7 @@ void read_user_name(char *name)
strmake(name, str ? str : "UNKNOWN_USER", USERNAME_LENGTH); 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) void read_user_name(char *name)
{ {

View File

@ -35,9 +35,7 @@
#include <signal.h> #include <signal.h>
#include <errno.h> #include <errno.h>
#if defined(OS2) #if defined(__NETWARE__)
# include <sys/un.h>
#elif defined(__NETWARE__)
#include <netdb.h> #include <netdb.h>
#include <sys/select.h> #include <sys/select.h>
#include <sys/utsname.h> #include <sys/utsname.h>

View File

@ -71,11 +71,6 @@ my_bool net_flush(NET *net);
#include <my_pthread.h> /* because of signal() */ #include <my_pthread.h> /* because of signal() */
#endif /* defined(THREAD) && !defined(__WIN__) */ #endif /* defined(THREAD) && !defined(__WIN__) */
#if defined(OS2) && defined(MYSQL_SERVER)
#undef ER
#define ER CER
#endif /* defined( OS2) && defined(MYSQL_SERVER) */
#include <sys/stat.h> #include <sys/stat.h>
#include <signal.h> #include <signal.h>
#include <time.h> #include <time.h>
@ -126,7 +121,7 @@ const char *def_shared_memory_base_name= default_shared_memory_base_name;
static void mysql_close_free_options(MYSQL *mysql); static void mysql_close_free_options(MYSQL *mysql);
static void mysql_close_free(MYSQL *mysql); static void mysql_close_free(MYSQL *mysql);
#if !(defined(__WIN__) || defined(OS2) || defined(__NETWARE__)) #if !(defined(__WIN__) || defined(__NETWARE__))
static int wait_for_data(my_socket fd, uint timeout); static int wait_for_data(my_socket fd, uint timeout);
#endif #endif
@ -143,7 +138,7 @@ static int wait_for_data(my_socket fd, uint timeout);
int my_connect(my_socket fd, const struct sockaddr *name, uint namelen, int my_connect(my_socket fd, const struct sockaddr *name, uint namelen,
uint timeout) uint timeout)
{ {
#if defined(__WIN__) || defined(OS2) || defined(__NETWARE__) #if defined(__WIN__) || defined(__NETWARE__)
return connect(fd, (struct sockaddr*) name, namelen); return connect(fd, (struct sockaddr*) name, namelen);
#else #else
int flags, res, s_err; int flags, res, s_err;
@ -183,7 +178,7 @@ int my_connect(my_socket fd, const struct sockaddr *name, uint namelen,
If not, we will use select() If not, we will use select()
*/ */
#if !(defined(__WIN__) || defined(OS2) || defined(__NETWARE__)) #if !(defined(__WIN__) || defined(__NETWARE__))
static int wait_for_data(my_socket fd, uint timeout) static int wait_for_data(my_socket fd, uint timeout)
{ {
@ -274,7 +269,7 @@ static int wait_for_data(my_socket fd, uint timeout)
return (0); /* ok */ return (0); /* ok */
#endif /* HAVE_POLL */ #endif /* HAVE_POLL */
} }
#endif /* defined(__WIN__) || defined(OS2) || defined(__NETWARE__) */ #endif /* defined(__WIN__) || defined(__NETWARE__) */
/* /*

View File

@ -291,7 +291,7 @@ init_event_thread(THD* thd)
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
#if !defined(__WIN__) && !defined(OS2) && !defined(__NETWARE__) #if !defined(__WIN__) && !defined(__NETWARE__)
sigset_t set; sigset_t set;
VOID(sigemptyset(&set)); // Get mask in use VOID(sigemptyset(&set)); // Get mask in use
VOID(pthread_sigmask(SIG_UNBLOCK,&set,&thd->block_signals)); VOID(pthread_sigmask(SIG_UNBLOCK,&set,&thd->block_signals));

View File

@ -26,7 +26,7 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { // Because of SCO 3.2V4.2 extern "C" { // Because of SCO 3.2V4.2
#endif #endif
#if !defined( __WIN__) && !defined(OS2) #if !defined( __WIN__)
#ifdef HAVE_SYS_UN_H #ifdef HAVE_SYS_UN_H
#include <sys/un.h> #include <sys/un.h>
#endif #endif

View File

@ -18,10 +18,6 @@
/* logging of commands */ /* logging of commands */
/* TODO: Abort logging when we get an error in reading or writing log files */ /* TODO: Abort logging when we get an error in reading or writing log files */
#ifdef __EMX__
#include <io.h>
#endif
#include "mysql_priv.h" #include "mysql_priv.h"
#include "sql_repl.h" #include "sql_repl.h"
#include "rpl_filter.h" #include "rpl_filter.h"

View File

@ -18,10 +18,6 @@
#ifndef _log_event_h #ifndef _log_event_h
#define _log_event_h #define _log_event_h
#ifdef __EMX__
#undef write // remove pthread.h macro definition, conflict with write() class member
#endif
#if defined(USE_PRAGMA_INTERFACE) && !defined(MYSQL_CLIENT) #if defined(USE_PRAGMA_INTERFACE) && !defined(MYSQL_CLIENT)
#pragma interface /* gcc class implementation */ #pragma interface /* gcc class implementation */
#endif #endif

View File

@ -14,7 +14,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#if defined(__EMX__) || defined(__NETWARE__) #if defined(__NETWARE__)
#include "../mysys/my_lock.c" #include "../mysys/my_lock.c"
#else #else

View File

@ -36,10 +36,6 @@
#include "sql_bitmap.h" #include "sql_bitmap.h"
#include "sql_array.h" #include "sql_array.h"
#ifdef __EMX__
#undef write /* remove pthread.h macro definition for EMX */
#endif
/* TODO convert all these three maps to Bitmap classes */ /* TODO convert all these three maps to Bitmap classes */
typedef ulonglong table_map; /* Used for table bits in join */ typedef ulonglong table_map; /* Used for table bits in join */
#if MAX_INDEXES <= 64 #if MAX_INDEXES <= 64
@ -206,7 +202,7 @@ extern CHARSET_INFO *national_charset_info, *table_alias_charset;
#define IF_NETWARE(A,B) (B) #define IF_NETWARE(A,B) (B)
#endif #endif
#if defined(__WIN__) || defined(OS2) #if defined(__WIN__)
#define IF_WIN(A,B) (A) #define IF_WIN(A,B) (A)
#undef FLUSH_TIME #undef FLUSH_TIME
#define FLUSH_TIME 1800 /* Flush every half hour */ #define FLUSH_TIME 1800 /* Flush every half hour */

View File

@ -95,9 +95,7 @@ extern "C" { // Because of SCO 3.2V4.2
#endif #endif
#include <my_net.h> #include <my_net.h>
#if defined(OS2) #if !defined(__WIN__)
# include <sys/un.h>
#elif !defined(__WIN__)
# ifndef __NETWARE__ # ifndef __NETWARE__
#include <sys/resource.h> #include <sys/resource.h>
# endif /* __NETWARE__ */ # endif /* __NETWARE__ */
@ -648,10 +646,6 @@ static SECURITY_DESCRIPTOR sdPipeDescriptor;
static HANDLE hPipe = INVALID_HANDLE_VALUE; static HANDLE hPipe = INVALID_HANDLE_VALUE;
#endif #endif
#ifdef OS2
pthread_cond_t eventShutdown;
#endif
#ifndef EMBEDDED_LIBRARY #ifndef EMBEDDED_LIBRARY
bool mysqld_embedded=0; bool mysqld_embedded=0;
#else #else
@ -751,7 +745,7 @@ static void close_connections(void)
(void) pthread_mutex_unlock(&LOCK_manager); (void) pthread_mutex_unlock(&LOCK_manager);
/* kill connection thread */ /* kill connection thread */
#if !defined(__WIN__) && !defined(__EMX__) && !defined(OS2) && !defined(__NETWARE__) #if !defined(__WIN__) && !defined(__NETWARE__)
DBUG_PRINT("quit",("waiting for select thread: 0x%lx",select_thread)); DBUG_PRINT("quit",("waiting for select thread: 0x%lx",select_thread));
(void) pthread_mutex_lock(&LOCK_thread_count); (void) pthread_mutex_lock(&LOCK_thread_count);
@ -980,8 +974,6 @@ void kill_mysql(void)
*/ */
} }
#endif #endif
#elif defined(OS2)
pthread_cond_signal(&eventShutdown); // post semaphore
#elif defined(HAVE_PTHREAD_KILL) #elif defined(HAVE_PTHREAD_KILL)
if (pthread_kill(signal_thread, MYSQL_KILL_SIGNAL)) if (pthread_kill(signal_thread, MYSQL_KILL_SIGNAL))
{ {
@ -1007,7 +999,7 @@ void kill_mysql(void)
/* Force server down. kill all connections and threads and exit */ /* Force server down. kill all connections and threads and exit */
#if defined(OS2) || defined(__NETWARE__) #if defined(__NETWARE__)
extern "C" void kill_server(int sig_ptr) extern "C" void kill_server(int sig_ptr)
#define RETURN_FROM_KILL_SERVER DBUG_VOID_RETURN #define RETURN_FROM_KILL_SERVER DBUG_VOID_RETURN
#elif !defined(__WIN__) #elif !defined(__WIN__)
@ -1044,7 +1036,7 @@ static void __cdecl kill_server(int sig_ptr)
} }
#endif #endif
#if defined(__NETWARE__) || (defined(USE_ONE_SIGNAL_HAND) && !defined(__WIN__) && !defined(OS2)) #if defined(__NETWARE__) || (defined(USE_ONE_SIGNAL_HAND) && !defined(__WIN__))
my_thread_init(); // If this is a new thread my_thread_init(); // If this is a new thread
#endif #endif
close_connections(); close_connections();
@ -1082,7 +1074,7 @@ extern "C" sig_handler print_signal_warning(int sig)
#ifdef DONT_REMEMBER_SIGNAL #ifdef DONT_REMEMBER_SIGNAL
my_sigset(sig,print_signal_warning); /* int. thread system calls */ my_sigset(sig,print_signal_warning); /* int. thread system calls */
#endif #endif
#if !defined(__WIN__) && !defined(OS2) && !defined(__NETWARE__) #if !defined(__WIN__) && !defined(__NETWARE__)
if (sig == SIGALRM) if (sig == SIGALRM)
alarm(2); /* reschedule alarm */ alarm(2); /* reschedule alarm */
#endif #endif
@ -1336,7 +1328,7 @@ static void set_ports()
static struct passwd *check_user(const char *user) static struct passwd *check_user(const char *user)
{ {
#if !defined(__WIN__) && !defined(OS2) && !defined(__NETWARE__) #if !defined(__WIN__) && !defined(__NETWARE__)
struct passwd *user_info; struct passwd *user_info;
uid_t user_id= geteuid(); uid_t user_id= geteuid();
@ -1390,7 +1382,7 @@ err:
static void set_user(const char *user, struct passwd *user_info) static void set_user(const char *user, struct passwd *user_info)
{ {
#if !defined(__WIN__) && !defined(OS2) && !defined(__NETWARE__) #if !defined(__WIN__) && !defined(__NETWARE__)
DBUG_ASSERT(user_info != 0); DBUG_ASSERT(user_info != 0);
#ifdef HAVE_INITGROUPS #ifdef HAVE_INITGROUPS
/* /*
@ -1419,7 +1411,7 @@ static void set_user(const char *user, struct passwd *user_info)
static void set_effective_user(struct passwd *user_info) static void set_effective_user(struct passwd *user_info)
{ {
#if !defined(__WIN__) && !defined(OS2) && !defined(__NETWARE__) #if !defined(__WIN__) && !defined(__NETWARE__)
DBUG_ASSERT(user_info != 0); DBUG_ASSERT(user_info != 0);
if (setregid((gid_t)-1, user_info->pw_gid) == -1) if (setregid((gid_t)-1, user_info->pw_gid) == -1)
{ {
@ -1439,7 +1431,7 @@ static void set_effective_user(struct passwd *user_info)
static void set_root(const char *path) static void set_root(const char *path)
{ {
#if !defined(__WIN__) && !defined(__EMX__) && !defined(OS2) && !defined(__NETWARE__) #if !defined(__WIN__) && !defined(__NETWARE__)
if (chroot(path) == -1) if (chroot(path) == -1)
{ {
sql_perror("chroot"); sql_perror("chroot");
@ -1786,7 +1778,7 @@ extern "C" sig_handler abort_thread(int sig __attribute__((unused)))
the signal thread is ready before continuing the signal thread is ready before continuing
******************************************************************************/ ******************************************************************************/
#if defined(__WIN__) || defined(OS2) #if defined(__WIN__)
static void init_signals(void) static void init_signals(void)
{ {
int signals[] = {SIGINT,SIGILL,SIGFPE,SIGSEGV,SIGTERM,SIGABRT } ; int signals[] = {SIGINT,SIGILL,SIGFPE,SIGSEGV,SIGTERM,SIGABRT } ;
@ -2046,44 +2038,7 @@ static void check_data_home(const char *path)
{ {
} }
#elif defined(__EMX__) #else /* if ! __WIN__ */
static void sig_reload(int signo)
{
// Flush everything
bool not_used;
reload_acl_and_cache((THD*) 0,REFRESH_LOG, (TABLE_LIST*) 0, &not_used);
signal(signo, SIG_ACK);
}
static void sig_kill(int signo)
{
if (!kill_in_progress)
{
abort_loop=1; // mark abort for threads
kill_server((void*) signo);
}
signal(signo, SIG_ACK);
}
static void init_signals(void)
{
signal(SIGQUIT, sig_kill);
signal(SIGKILL, sig_kill);
signal(SIGTERM, sig_kill);
signal(SIGINT, sig_kill);
signal(SIGHUP, sig_reload); // Flush everything
signal(SIGALRM, SIG_IGN);
signal(SIGBREAK,SIG_IGN);
signal_thread = pthread_self();
}
static void start_signal_handler(void)
{}
static void check_data_home(const char *path)
{}
#else /* if ! __WIN__ && ! __EMX__ */
#ifdef HAVE_LINUXTHREADS #ifdef HAVE_LINUXTHREADS
#define UNSAFE_DEFAULT_LINUX_THREADS 200 #define UNSAFE_DEFAULT_LINUX_THREADS 200
@ -2556,33 +2511,6 @@ int STDCALL handle_kill(ulong ctrl_type)
} }
#endif #endif
#ifdef OS2
pthread_handler_t handle_shutdown(void *arg)
{
my_thread_init();
// wait semaphore
pthread_cond_wait(&eventShutdown, NULL);
// close semaphore and kill server
pthread_cond_destroy(&eventShutdown);
/*
Exit main loop on main thread, so kill will be done from
main thread (this is thread 2)
*/
abort_loop = 1;
// unblock select()
so_cancel(ip_sock);
so_cancel(unix_sock);
return 0;
}
#endif
static const char *load_default_groups[]= { static const char *load_default_groups[]= {
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
"mysql_cluster", "mysql_cluster",
@ -2650,14 +2578,6 @@ static int init_common_variables(const char *conf_file_name, int argc,
return 1; return 1;
mysql_init_variables(); mysql_init_variables();
#ifdef OS2
{
// fix timezone for daylight saving
struct tm *ts = localtime(&start_time);
if (ts->tm_isdst > 0)
_timezone -= 3600;
}
#endif
#ifdef HAVE_TZNAME #ifdef HAVE_TZNAME
{ {
struct tm tm_tmp; struct tm tm_tmp;
@ -3360,12 +3280,6 @@ static void create_shutdown_thread()
// On "Stop Service" we have to do regular shutdown // On "Stop Service" we have to do regular shutdown
Service.SetShutdownEvent(hEventShutdown); Service.SetShutdownEvent(hEventShutdown);
#endif #endif
#ifdef OS2
pthread_cond_init(&eventShutdown, NULL);
pthread_t hThread;
if (pthread_create(&hThread,&connection_attrib,handle_shutdown,0))
sql_print_warning("Can't create thread to handle shutdown requests");
#endif
#endif // EMBEDDED_LIBRARY #endif // EMBEDDED_LIBRARY
} }
@ -4292,10 +4206,6 @@ pthread_handler_t handle_connections_sockets(void *arg __attribute__((unused)))
create_new_thread(thd); create_new_thread(thd);
} }
#ifdef OS2
// kill server must be invoked from thread 1!
kill_server(MYSQL_KILL_SIGNAL);
#endif
decrement_handler_count(); decrement_handler_count();
DBUG_RETURN(0); DBUG_RETURN(0);
} }
@ -5666,7 +5576,7 @@ log and this option does nothing anymore.",
0, 0, 0, 0, 0}, 0, 0, 0, 0, 0},
{"tmpdir", 't', {"tmpdir", 't',
"Path for temporary files. Several paths may be specified, separated by a " "Path for temporary files. Several paths may be specified, separated by a "
#if defined(__WIN__) || defined(OS2) || defined(__NETWARE__) #if defined(__WIN__) || defined(__NETWARE__)
"semicolon (;)" "semicolon (;)"
#else #else
"colon (:)" "colon (:)"

View File

@ -135,7 +135,7 @@ my_bool my_net_init(NET *net, Vio* vio)
if (vio != 0) /* If real connection */ if (vio != 0) /* If real connection */
{ {
net->fd = vio_fd(vio); /* For perl DBI/DBD */ net->fd = vio_fd(vio); /* For perl DBI/DBD */
#if defined(MYSQL_SERVER) && !defined(__WIN__) && !defined(__EMX__) && !defined(OS2) #if defined(MYSQL_SERVER) && !defined(__WIN__)
if (!(test_flags & TEST_BLOCKING)) if (!(test_flags & TEST_BLOCKING))
{ {
my_bool old_mode; my_bool old_mode;
@ -604,7 +604,7 @@ net_real_write(NET *net,const char *packet,ulong len)
if ((long) (length=vio_write(net->vio,pos,(uint32) (end-pos))) <= 0) if ((long) (length=vio_write(net->vio,pos,(uint32) (end-pos))) <= 0)
{ {
my_bool interrupted = vio_should_retry(net->vio); my_bool interrupted = vio_should_retry(net->vio);
#if (!defined(__WIN__) && !defined(__EMX__) && !defined(OS2)) #if !defined(__WIN__)
if ((interrupted || length==0) && !thr_alarm_in_use(&alarmed)) if ((interrupted || length==0) && !thr_alarm_in_use(&alarmed))
{ {
if (!thr_alarm(&alarmed,(uint) net->write_timeout,&alarm_buff)) if (!thr_alarm(&alarmed,(uint) net->write_timeout,&alarm_buff))
@ -631,7 +631,7 @@ net_real_write(NET *net,const char *packet,ulong len)
} }
} }
else else
#endif /* (!defined(__WIN__) && !defined(__EMX__)) */ #endif /* !defined(__WIN__) */
if (thr_alarm_in_use(&alarmed) && !thr_got_alarm(&alarmed) && if (thr_alarm_in_use(&alarmed) && !thr_got_alarm(&alarmed) &&
interrupted) interrupted)
{ {
@ -803,7 +803,7 @@ my_real_read(NET *net, ulong *complen)
DBUG_PRINT("info",("vio_read returned %d, errno: %d", DBUG_PRINT("info",("vio_read returned %d, errno: %d",
length, vio_errno(net->vio))); length, vio_errno(net->vio)));
#if (!defined(__WIN__) && !defined(__EMX__) && !defined(OS2)) || defined(MYSQL_SERVER) #if !defined(__WIN__) || defined(MYSQL_SERVER)
/* /*
We got an error that there was no data on the socket. We now set up We got an error that there was no data on the socket. We now set up
an alarm to not 'read forever', change the socket to non blocking an alarm to not 'read forever', change the socket to non blocking
@ -839,7 +839,7 @@ my_real_read(NET *net, ulong *complen)
continue; continue;
} }
} }
#endif /* (!defined(__WIN__) && !defined(__EMX__)) || defined(MYSQL_SERVER) */ #endif /* (!defined(__WIN__) || defined(MYSQL_SERVER) */
if (thr_alarm_in_use(&alarmed) && !thr_got_alarm(&alarmed) && if (thr_alarm_in_use(&alarmed) && !thr_got_alarm(&alarmed) &&
interrupted) interrupted)
{ /* Probably in MIT threads */ { /* Probably in MIT threads */

View File

@ -83,7 +83,7 @@ static int init_failsafe_rpl_thread(THD* thd)
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
#if !defined(__WIN__) && !defined(OS2) && !defined(__NETWARE__) #if !defined(__WIN__) && !defined(__NETWARE__)
sigset_t set; sigset_t set;
VOID(sigemptyset(&set)); // Get mask in use VOID(sigemptyset(&set)); // Get mask in use
VOID(pthread_sigmask(SIG_UNBLOCK,&set,&thd->block_signals)); VOID(pthread_sigmask(SIG_UNBLOCK,&set,&thd->block_signals));

View File

@ -2601,7 +2601,7 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
#if !defined(__WIN__) && !defined(OS2) && !defined(__NETWARE__) #if !defined(__WIN__) && !defined(__NETWARE__)
sigset_t set; sigset_t set;
VOID(sigemptyset(&set)); // Get mask in use VOID(sigemptyset(&set)); // Get mask in use
VOID(pthread_sigmask(SIG_UNBLOCK,&set,&thd->block_signals)); VOID(pthread_sigmask(SIG_UNBLOCK,&set,&thd->block_signals));

View File

@ -3000,13 +3000,13 @@ TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type)
if (table) if (table)
{ {
#if defined( __WIN__) || defined(OS2) #if defined( __WIN__)
/* Win32 can't drop a file that is open */ /* Win32 can't drop a file that is open */
if (lock_type == TL_WRITE_ALLOW_READ) if (lock_type == TL_WRITE_ALLOW_READ)
{ {
lock_type= TL_WRITE; lock_type= TL_WRITE;
} }
#endif /* __WIN__ || OS2 */ #endif /* __WIN__ */
table_list->lock_type= lock_type; table_list->lock_type= lock_type;
table_list->table= table; table_list->table= table;
table->grant= table_list->grant; table->grant= table_list->grant;

View File

@ -1713,7 +1713,7 @@ pthread_handler_t handle_delayed_insert(void *arg)
since it does not find one in the list. since it does not find one in the list.
*/ */
pthread_mutex_lock(&di->mutex); pthread_mutex_lock(&di->mutex);
#if !defined( __WIN__) && !defined(OS2) /* Win32 calls this in pthread_create */ #if !defined( __WIN__) /* Win32 calls this in pthread_create */
if (my_thread_init()) if (my_thread_init())
{ {
strmov(thd->net.last_error,ER(thd->net.last_errno=ER_OUT_OF_RESOURCES)); strmov(thd->net.last_error,ER(thd->net.last_errno=ER_OUT_OF_RESOURCES));
@ -1729,7 +1729,7 @@ pthread_handler_t handle_delayed_insert(void *arg)
strmov(thd->net.last_error,ER(thd->net.last_errno=ER_OUT_OF_RESOURCES)); strmov(thd->net.last_error,ER(thd->net.last_errno=ER_OUT_OF_RESOURCES));
goto err; goto err;
} }
#if !defined(__WIN__) && !defined(OS2) && !defined(__NETWARE__) #if !defined(__WIN__) && !defined(__NETWARE__)
sigset_t set; sigset_t set;
VOID(sigemptyset(&set)); // Get mask in use VOID(sigemptyset(&set)); // Get mask in use
VOID(pthread_sigmask(SIG_UNBLOCK,&set,&thd->block_signals)); VOID(pthread_sigmask(SIG_UNBLOCK,&set,&thd->block_signals));

View File

@ -294,7 +294,7 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
{ {
(void) fn_format(name, ex->file_name, mysql_real_data_home, "", (void) fn_format(name, ex->file_name, mysql_real_data_home, "",
MY_RELATIVE_PATH | MY_UNPACK_FILENAME); MY_RELATIVE_PATH | MY_UNPACK_FILENAME);
#if !defined(__WIN__) && !defined(OS2) && ! defined(__NETWARE__) #if !defined(__WIN__) && ! defined(__NETWARE__)
MY_STAT stat_info; MY_STAT stat_info;
if (!my_stat(name,&stat_info,MYF(MY_WME))) if (!my_stat(name,&stat_info,MYF(MY_WME)))
DBUG_RETURN(TRUE); DBUG_RETURN(TRUE);
@ -302,9 +302,7 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
// if we are not in slave thread, the file must be: // if we are not in slave thread, the file must be:
if (!thd->slave_thread && if (!thd->slave_thread &&
!((stat_info.st_mode & S_IROTH) == S_IROTH && // readable by others !((stat_info.st_mode & S_IROTH) == S_IROTH && // readable by others
#ifndef __EMX__
(stat_info.st_mode & S_IFLNK) != S_IFLNK && // and not a symlink (stat_info.st_mode & S_IFLNK) != S_IFLNK && // and not a symlink
#endif
((stat_info.st_mode & S_IFREG) == S_IFREG || ((stat_info.st_mode & S_IFREG) == S_IFREG ||
(stat_info.st_mode & S_IFIFO) == S_IFIFO))) (stat_info.st_mode & S_IFIFO) == S_IFIFO)))
{ {

View File

@ -118,10 +118,6 @@ static void test_signal(int sig_ptr)
#if !defined( DBUG_OFF) #if !defined( DBUG_OFF)
MessageBox(NULL,"Test signal","DBUG",MB_OK); MessageBox(NULL,"Test signal","DBUG",MB_OK);
#endif #endif
#if defined(OS2)
fprintf(stderr, "Test signal %d\n", sig_ptr);
fflush(stderr);
#endif
} }
static void init_signals(void) static void init_signals(void)
{ {
@ -1092,7 +1088,7 @@ pthread_handler_t handle_one_connection(void *arg)
pthread_detach_this_thread(); pthread_detach_this_thread();
#if !defined( __WIN__) && !defined(OS2) // Win32 calls this in pthread_create #if !defined( __WIN__) // Win32 calls this in pthread_create
/* The following calls needs to be done before we call DBUG_ macros */ /* The following calls needs to be done before we call DBUG_ macros */
if (!(test_flags & TEST_NO_THREADS) & my_thread_init()) if (!(test_flags & TEST_NO_THREADS) & my_thread_init())
{ {
@ -1116,7 +1112,7 @@ pthread_handler_t handle_one_connection(void *arg)
#if defined(__WIN__) #if defined(__WIN__)
init_signals(); init_signals();
#elif !defined(OS2) && !defined(__NETWARE__) #elif !defined(__NETWARE__)
sigset_t set; sigset_t set;
VOID(sigemptyset(&set)); // Get mask in use VOID(sigemptyset(&set)); // Get mask in use
VOID(pthread_sigmask(SIG_UNBLOCK,&set,&thd->block_signals)); VOID(pthread_sigmask(SIG_UNBLOCK,&set,&thd->block_signals));
@ -1240,7 +1236,7 @@ pthread_handler_t handle_bootstrap(void *arg)
#ifndef EMBEDDED_LIBRARY #ifndef EMBEDDED_LIBRARY
pthread_detach_this_thread(); pthread_detach_this_thread();
thd->thread_stack= (char*) &thd; thd->thread_stack= (char*) &thd;
#if !defined(__WIN__) && !defined(OS2) && !defined(__NETWARE__) #if !defined(__WIN__) && !defined(__NETWARE__)
sigset_t set; sigset_t set;
VOID(sigemptyset(&set)); // Get mask in use VOID(sigemptyset(&set)); // Get mask in use
VOID(pthread_sigmask(SIG_UNBLOCK,&set,&thd->block_signals)); VOID(pthread_sigmask(SIG_UNBLOCK,&set,&thd->block_signals));
@ -1969,9 +1965,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
#ifdef __WIN__ #ifdef __WIN__
sleep(1); // must wait after eof() sleep(1); // must wait after eof()
#endif #endif
#ifndef OS2
send_eof(thd); // This is for 'quit request' send_eof(thd); // This is for 'quit request'
#endif
close_connection(thd, 0, 1); close_connection(thd, 0, 1);
close_thread_tables(thd); // Free before kill close_thread_tables(thd); // Free before kill
kill_mysql(); kill_mysql();

View File

@ -3625,11 +3625,7 @@ err:
bool mysql_analyze_table(THD* thd, TABLE_LIST* tables, HA_CHECK_OPT* check_opt) bool mysql_analyze_table(THD* thd, TABLE_LIST* tables, HA_CHECK_OPT* check_opt)
{ {
#ifdef OS2
thr_lock_type lock_type = TL_WRITE;
#else
thr_lock_type lock_type = TL_READ_NO_INSERT; thr_lock_type lock_type = TL_READ_NO_INSERT;
#endif
DBUG_ENTER("mysql_analyze_table"); DBUG_ENTER("mysql_analyze_table");
DBUG_RETURN(mysql_admin_table(thd, tables, check_opt, DBUG_RETURN(mysql_admin_table(thd, tables, check_opt,
@ -3640,11 +3636,7 @@ bool mysql_analyze_table(THD* thd, TABLE_LIST* tables, HA_CHECK_OPT* check_opt)
bool mysql_check_table(THD* thd, TABLE_LIST* tables,HA_CHECK_OPT* check_opt) bool mysql_check_table(THD* thd, TABLE_LIST* tables,HA_CHECK_OPT* check_opt)
{ {
#ifdef OS2
thr_lock_type lock_type = TL_WRITE;
#else
thr_lock_type lock_type = TL_READ_NO_INSERT; thr_lock_type lock_type = TL_READ_NO_INSERT;
#endif
DBUG_ENTER("mysql_check_table"); DBUG_ENTER("mysql_check_table");
DBUG_RETURN(mysql_admin_table(thd, tables, check_opt, DBUG_RETURN(mysql_admin_table(thd, tables, check_opt,
@ -4998,7 +4990,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
} }
} }
#if (!defined( __WIN__) && !defined( __EMX__) && !defined( OS2)) #if !defined( __WIN__)
if (table->file->has_transactions()) if (table->file->has_transactions())
#endif #endif
{ {
@ -5011,7 +5003,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
table=0; // Marker that table is closed table=0; // Marker that table is closed
no_table_reopen= TRUE; no_table_reopen= TRUE;
} }
#if (!defined( __WIN__) && !defined( __EMX__) && !defined( OS2)) #if !defined( __WIN__)
else else
table->file->extra(HA_EXTRA_FORCE_REOPEN); // Don't use this file anymore table->file->extra(HA_EXTRA_FORCE_REOPEN); // Don't use this file anymore
#endif #endif

View File

@ -88,10 +88,6 @@ int main(int argc, char **argv)
MY_INIT(argv[0]); MY_INIT(argv[0]);
my_progname_short= my_progname+dirname_length(my_progname); my_progname_short= my_progname+dirname_length(my_progname);
#ifdef __EMX__
_wildcard (&argc, &argv);
#endif
myisamchk_init(&check_param); myisamchk_init(&check_param);
check_param.opt_lock_memory=1; /* Lock memory if possible */ check_param.opt_lock_memory=1; /* Lock memory if possible */
check_param.using_global_keycache = 0; check_param.using_global_keycache = 0;

View File

@ -19,7 +19,7 @@
// copied from mysql.cc to get readline // copied from mysql.cc to get readline
extern "C" { extern "C" {
#if defined( __WIN__) || defined(OS2) #if defined( __WIN__)
#include <conio.h> #include <conio.h>
#elif !defined(__NETWARE__) #elif !defined(__NETWARE__)
#include <readline/readline.h> #include <readline/readline.h>

View File

@ -50,7 +50,7 @@ const char progname[] = "mgmtsrvr";
// copied from mysql.cc to get readline // copied from mysql.cc to get readline
extern "C" { extern "C" {
#if defined( __WIN__) || defined(OS2) #if defined( __WIN__)
#include <conio.h> #include <conio.h>
#elif !defined(__NETWARE__) #elif !defined(__NETWARE__)
#include <readline/readline.h> #include <readline/readline.h>

View File

@ -147,7 +147,7 @@ Vio *vio_new(my_socket sd, enum enum_vio_type type, uint flags)
sprintf(vio->desc, sprintf(vio->desc,
(vio->type == VIO_TYPE_SOCKET ? "socket (%d)" : "TCP/IP (%d)"), (vio->type == VIO_TYPE_SOCKET ? "socket (%d)" : "TCP/IP (%d)"),
vio->sd); vio->sd);
#if !defined(__WIN__) && !defined(__EMX__) && !defined(OS2) #if !defined(__WIN__)
#if !defined(NO_FCNTL_NONBLOCK) #if !defined(NO_FCNTL_NONBLOCK)
/* /*
We call fcntl() to set the flags and then immediately read them back We call fcntl() to set the flags and then immediately read them back
@ -166,7 +166,7 @@ Vio *vio_new(my_socket sd, enum enum_vio_type type, uint flags)
(void) ioctl(sd,FIOSNBIO,0); (void) ioctl(sd,FIOSNBIO,0);
vio->fcntl_mode &= ~O_NONBLOCK; vio->fcntl_mode &= ~O_NONBLOCK;
#endif #endif
#else /* !defined(__WIN__) && !defined(__EMX__) */ #else /* !defined(__WIN__) */
{ {
/* set to blocking mode by default */ /* set to blocking mode by default */
ulong arg=0, r; ulong arg=0, r;

View File

@ -128,7 +128,7 @@ int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode,
DBUG_PRINT("enter", ("set_blocking_mode: %d old_mode: %d", DBUG_PRINT("enter", ("set_blocking_mode: %d old_mode: %d",
(int) set_blocking_mode, (int) *old_mode)); (int) set_blocking_mode, (int) *old_mode));
#if !defined(__WIN__) && !defined(__EMX__) #if !defined(__WIN__)
#if !defined(NO_FCNTL_NONBLOCK) #if !defined(NO_FCNTL_NONBLOCK)
if (vio->sd >= 0) if (vio->sd >= 0)
{ {
@ -150,10 +150,8 @@ int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode,
#else #else
r= set_blocking_mode ? 0 : 1; r= set_blocking_mode ? 0 : 1;
#endif /* !defined(NO_FCNTL_NONBLOCK) */ #endif /* !defined(NO_FCNTL_NONBLOCK) */
#else /* !defined(__WIN__) && !defined(__EMX__) */ #else /* !defined(__WIN__) */
#ifndef __EMX__
if (vio->type != VIO_TYPE_NAMEDPIPE && vio->type != VIO_TYPE_SHARED_MEMORY) if (vio->type != VIO_TYPE_NAMEDPIPE && vio->type != VIO_TYPE_SHARED_MEMORY)
#endif
{ {
ulong arg; ulong arg;
int old_fcntl=vio->fcntl_mode; int old_fcntl=vio->fcntl_mode;
@ -170,11 +168,9 @@ int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode,
if (old_fcntl != vio->fcntl_mode) if (old_fcntl != vio->fcntl_mode)
r = ioctlsocket(vio->sd,FIONBIO,(void*) &arg); r = ioctlsocket(vio->sd,FIONBIO,(void*) &arg);
} }
#ifndef __EMX__
else else
r= test(!(vio->fcntl_mode & O_NONBLOCK)) != set_blocking_mode; r= test(!(vio->fcntl_mode & O_NONBLOCK)) != set_blocking_mode;
#endif /* __EMX__ */ #endif /* !defined(__WIN__) */
#endif /* !defined(__WIN__) && !defined(__EMX__) */
DBUG_PRINT("exit", ("%d", r)); DBUG_PRINT("exit", ("%d", r));
DBUG_RETURN(r); DBUG_RETURN(r);
} }
@ -195,12 +191,12 @@ int vio_fastsend(Vio * vio __attribute__((unused)))
int r=0; int r=0;
DBUG_ENTER("vio_fastsend"); DBUG_ENTER("vio_fastsend");
#if defined(IPTOS_THROUGHPUT) && !defined(__EMX__) #if defined(IPTOS_THROUGHPUT)
{ {
int tos = IPTOS_THROUGHPUT; int tos = IPTOS_THROUGHPUT;
r= setsockopt(vio->sd, IPPROTO_IP, IP_TOS, (void *) &tos, sizeof(tos)); r= setsockopt(vio->sd, IPPROTO_IP, IP_TOS, (void *) &tos, sizeof(tos));
} }
#endif /* IPTOS_THROUGHPUT && !__EMX__ */ #endif /* IPTOS_THROUGHPUT */
if (!r) if (!r)
{ {
#ifdef __WIN__ #ifdef __WIN__

View File

@ -112,12 +112,12 @@ int vio_ssl_fastsend(Vio * vio __attribute__((unused)))
int r=0; int r=0;
DBUG_ENTER("vio_ssl_fastsend"); DBUG_ENTER("vio_ssl_fastsend");
#if defined(IPTOS_THROUGHPUT) && !defined(__EMX__) #if defined(IPTOS_THROUGHPUT)
{ {
int tos= IPTOS_THROUGHPUT; int tos= IPTOS_THROUGHPUT;
r= setsockopt(vio->sd, IPPROTO_IP, IP_TOS, (void *) &tos, sizeof(tos)); r= setsockopt(vio->sd, IPPROTO_IP, IP_TOS, (void *) &tos, sizeof(tos));
} }
#endif /* IPTOS_THROUGHPUT && !__EMX__ */ #endif /* IPTOS_THROUGHPUT */
if (!r) if (!r)
{ {
#ifdef __WIN__ #ifdef __WIN__