summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <brian@zim.(none)>2006-04-15 18:17:32 -0700
committerunknown <brian@zim.(none)>2006-04-15 18:17:32 -0700
commitcc62983ca2be9fe0559d3f5a326bb7284c08c4cb (patch)
tree4deb7a54227f30d8a5d4b647405eb100c0f8ab28 /client
parentf42b90fcb8d4625336fabc13e899b7510bebec80 (diff)
downloadmariadb-git-cc62983ca2be9fe0559d3f5a326bb7284c08c4cb.tar.gz
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
Diffstat (limited to 'client')
-rw-r--r--client/client_priv.h2
-rw-r--r--client/mysql.cc50
2 files changed, 9 insertions, 43 deletions
diff --git a/client/client_priv.h b/client/client_priv.h
index a80701ba6c9..625fbf24fa6 100644
--- a/client/client_priv.h
+++ b/client/client_priv.h
@@ -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,
diff --git a/client/mysql.cc b/client/mysql.cc
index e45ad9ac006..af349d9c5be 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -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;