Commit cc62983c authored by unknown's avatar unknown
Browse files

Final patch to remove the last of the OS2 support.


client/client_priv.h:
  OS2 removal
client/mysql.cc:
  OS2 removal
dbug/dbug.c:
  OS2 removal
include/m_string.h:
  OS2 removal
include/my_global.h:
  Cleanup for have_mit
libmysql/dll.c:
  OS2 removal
libmysql/get_password.c:
  OS2 removal
libmysql/libmysql.c:
  OS2 removal
libmysql/manager.c:
  OS2 removal
sql-common/client.c:
  OS2 removal
sql/event_executor.cc:
  OS2 removal
sql/hostname.cc:
  OS2 removal
sql/log.cc:
  OS2 removal
sql/log_event.h:
  OS2 removal
sql/my_lock.c:
  OS2 removal
sql/mysql_priv.h:
  OS2 removal
sql/mysqld.cc:
  OS2 removal
sql/net_serv.cc:
  OS2 removal
sql/repl_failsafe.cc:
  OS2 removal
sql/slave.cc:
  OS2 removal
sql/sql_base.cc:
  OS2 removal
sql/sql_insert.cc:
  OS2 removal
sql/sql_load.cc:
  OS2 removal
sql/sql_parse.cc:
  OS2 removal
sql/sql_table.cc:
  OS2 removal
storage/myisam/myisamchk.c:
  OS2 removal
storage/ndb/src/mgmclient/main.cpp:
  OS2 removal
storage/ndb/src/mgmsrv/main.cpp:
  OS2 removal
vio/vio.c:
  OS2 removal
vio/viosocket.c:
  OS2 removal
vio/viossl.c:
  OS2 removal
parent f42b90fc
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -24,8 +24,6 @@
#include <errmsg.h>
#include <my_getopt.h>

/* We have to define 'enum options' identical in all files to keep OS2 happy */

enum options_client
{
  OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET,
+9 −41
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ extern "C" {
#endif

#undef bcmp				// Fix problem with new readline
#if defined( __WIN__) || defined(OS2)
#if defined( __WIN__)
#include <conio.h>
#elif !defined(__NETWARE__)
#include <readline/readline.h>
@@ -101,7 +101,7 @@ extern "C" {
#define cmp_database(cs,A,B) strcmp((A),(B))
#endif

#if !defined( __WIN__) && !defined( OS2) && !defined(__NETWARE__) && (!defined(HAVE_mit_thread) || !defined(THREAD))
#if !defined( __WIN__) && !defined(__NETWARE__) && !defined(THREAD)
#define USE_POPEN
#endif

@@ -969,7 +969,7 @@ static int get_options(int argc, char **argv)

static int read_and_execute(bool interactive)
{
#if defined(OS2) || defined(__NETWARE__)
#if defined(__NETWARE__)
  char linebuffer[254];
  String buffer;
#endif
@@ -1006,7 +1006,7 @@ static int read_and_execute(bool interactive)
      if (opt_outfile && glob_buffer.is_empty())
	fflush(OUTFILE);

#if defined( __WIN__) || defined(OS2) || defined(__NETWARE__)
#if defined( __WIN__) || defined(__NETWARE__)
      tee_fputs(prompt, stdout);
#if defined(__NETWARE__)
      line=fgets(linebuffer, sizeof(linebuffer)-1, stdin);
@@ -1017,7 +1017,7 @@ static int read_and_execute(bool interactive)
        if (p != NULL)
          *p = '\0';
      }
#elif defined(__WIN__)
#else defined(__WIN__)
      if (!tmpbuf.is_alloced())
        tmpbuf.alloc(65535);
      tmpbuf.length(0);
@@ -1033,32 +1033,12 @@ static int read_and_execute(bool interactive)
        */
      } while (tmpbuf.alloced_length() <= clen);
      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__ */
#else
      if (opt_outfile)
	fputs(prompt, OUTFILE);
      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
@@ -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();
#endif
#if defined( __WIN__)
@@ -3429,9 +3409,6 @@ void tee_fprintf(FILE *file, const char *fmt, ...)
  NETWARE_YIELD;
  va_start(args, fmt);
  (void) vfprintf(file, fmt, args);
#ifdef OS2
  fflush( file);
#endif
  va_end(args);

  if (opt_outfile)
@@ -3447,9 +3424,6 @@ void tee_fputs(const char *s, FILE *file)
{
  NETWARE_YIELD;
  fputs(s, file);
#ifdef OS2
  fflush( file);
#endif
  if (opt_outfile)
    fputs(s, OUTFILE);
}
@@ -3460,9 +3434,6 @@ void tee_puts(const char *s, FILE *file)
  NETWARE_YIELD;
  fputs(s, file);
  fputs("\n", file);
#ifdef OS2
  fflush( file);
#endif
  if (opt_outfile)
  {
    fputs(s, OUTFILE);
@@ -3473,14 +3444,11 @@ void tee_puts(const char *s, FILE *file)
void tee_putc(int c, FILE *file)
{
  putc(c, file);
#ifdef OS2
  fflush( file);
#endif
  if (opt_outfile)
    putc(c, OUTFILE);
}

#if defined( __WIN__) || defined( OS2) || defined(__NETWARE__)
#if defined( __WIN__) || defined(__NETWARE__)
#include <time.h>
#else
#include <sys/times.h>
@@ -3492,7 +3460,7 @@ void tee_putc(int c, FILE *file)

static ulong start_timer(void)
{
#if defined( __WIN__) || defined( OS2) || defined(__NETWARE__)
#if defined( __WIN__) || defined(__NETWARE__)
 return clock();
#else
  struct tms tms_tmp;
+1 −1
Original line number Diff line number Diff line
@@ -2215,7 +2215,7 @@ static unsigned long Clock()
    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()
{
+3 −3
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@
#endif

/*  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>
#endif

@@ -95,7 +95,7 @@ extern "C" {
extern void *(*my_str_malloc)(size_t);
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))
#ifndef stpcpy
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
extern char *longlong2str(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 ulonglong strtoull(const char *str, char **ptr, int base);
#endif
+0 −1
Original line number Diff line number Diff line
@@ -206,7 +206,6 @@
/* The client defines this to avoid all thread code */
#if defined(UNDEF_THREADS_HACK)
#undef THREAD
#undef HAVE_mit_thread
#undef HAVE_LINUXTHREADS
#undef HAVE_NPTL
#undef HAVE_UNIXWARE7_THREADS
Loading