summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
Diffstat (limited to 'sql-common')
-rw-r--r--sql-common/client.c13
-rw-r--r--sql-common/my_time.c4
2 files changed, 6 insertions, 11 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index fc483e7b4c7..6722597531d 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -71,11 +71,6 @@ my_bool net_flush(NET *net);
#include <my_pthread.h> /* because of signal() */
#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 <signal.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(MYSQL *mysql);
-#if !(defined(__WIN__) || defined(OS2) || defined(__NETWARE__))
+#if !(defined(__WIN__) || defined(__NETWARE__))
static int wait_for_data(my_socket fd, uint timeout);
#endif
@@ -145,7 +140,7 @@ CHARSET_INFO *default_client_charset_info = &my_charset_latin1;
int my_connect(my_socket fd, const struct sockaddr *name, uint namelen,
uint timeout)
{
-#if defined(__WIN__) || defined(OS2) || defined(__NETWARE__)
+#if defined(__WIN__) || defined(__NETWARE__)
return connect(fd, (struct sockaddr*) name, namelen);
#else
int flags, res, s_err;
@@ -185,7 +180,7 @@ int my_connect(my_socket fd, const struct sockaddr *name, uint namelen,
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)
{
@@ -276,7 +271,7 @@ static int wait_for_data(my_socket fd, uint timeout)
return (0); /* ok */
#endif /* HAVE_POLL */
}
-#endif /* defined(__WIN__) || defined(OS2) || defined(__NETWARE__) */
+#endif /* defined(__WIN__) || defined(__NETWARE__) */
/*
diff --git a/sql-common/my_time.c b/sql-common/my_time.c
index 18bed99412d..868b1b2172d 100644
--- a/sql-common/my_time.c
+++ b/sql-common/my_time.c
@@ -431,7 +431,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
goto err;
}
- if (check_date(l_time, not_zero_date, flags, was_cut))
+ if ((my_bool)check_date(l_time, not_zero_date, flags, was_cut))
goto err;
l_time->time_type= (number_of_fields <= 3 ?
@@ -693,7 +693,7 @@ long calc_daynr(uint year,uint month,uint day)
if (year == 0 && month == 0 && day == 0)
DBUG_RETURN(0); /* Skip errors */
- if (year < 200)
+ if (year < YY_MAGIC_BELOW)
{
if ((year=year+1900) < 1900+YY_PART_YEAR)
year+=100;