diff --git a/storage/connect/tabxml.cpp b/storage/connect/tabxml.cpp index 9c47829d5bc..57d204a4286 100644 --- a/storage/connect/tabxml.cpp +++ b/storage/connect/tabxml.cpp @@ -60,7 +60,7 @@ extern "C" char version[]; #endif // !__WIN__ #define TYPE_UNKNOWN 12 /* Must be greater than other types */ -#define XSTR(M) sizeof(M) - strlen(M) - 1 /* To avoid overflow*/ +#define XLEN(M) sizeof(M) - strlen(M) - 1 /* To avoid overflow*/ /***********************************************************************/ /* Class and structure used by XMLColumns. */ @@ -226,30 +226,30 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info) more: if (vp->atp) { strncpy(colname, vp->atp->GetName(g), sizeof(colname)); - strncat(xcol->Name, colname, XSTR(xcol->Name)); + strncat(xcol->Name, colname, XLEN(xcol->Name)); switch (vp->atp->GetText(g, buf, sizeof(buf))) { case RC_INFO: PushWarning(g, txmp); case RC_OK: - strncat(fmt, "@", XSTR(fmt)); + strncat(fmt, "@", XLEN(fmt)); break; default: goto err; } // enswitch rc if (j) - strncat(fmt, colname, XSTR(fmt)); + strncat(fmt, colname, XLEN(fmt)); } else { if (tdp->Usedom && node->GetType() != 1) continue; strncpy(colname, node->GetName(g), sizeof(colname)); - strncat(xcol->Name, colname, XSTR(xcol->Name)); + strncat(xcol->Name, colname, XLEN(xcol->Name)); if (j) - strncat(fmt, colname, XSTR(fmt)); + strncat(fmt, colname, XLEN(fmt)); if (j < lvl && ok) { vp = lvlp[j+1]; @@ -267,9 +267,9 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info) if (!vp->atp) node = vp->nl->GetItem(g, vp->k++, node); - strncat(fmt, colname, XSTR(fmt)); - strncat(fmt, "/", XSTR(fmt)); - strncat(xcol->Name, "_", XSTR(xcol->Name)); + strncat(fmt, colname, XLEN(fmt)); + strncat(fmt, "/", XLEN(fmt)); + strncat(xcol->Name, "_", XLEN(xcol->Name)); j++; vp->n = (int)strlen(xcol->Name); vp->m = (int)strlen(fmt); diff --git a/storage/connect/value.cpp b/storage/connect/value.cpp index 99777fb9135..60471c9b0d8 100644 --- a/storage/connect/value.cpp +++ b/storage/connect/value.cpp @@ -2440,7 +2440,6 @@ void DTVAL::SetTimeShift(void) } // end of SetTimeShift -//#if defined(connect_EXPORTS) // Added by Alexander Barkov static void TIME_to_localtime(struct tm *tm, const MYSQL_TIME *ltime) { @@ -2462,9 +2461,6 @@ static struct tm *gmtime_mysql(const time_t *timep, struct tm *tm) TIME_to_localtime(tm, <ime); return tm; } // end of gmtime_mysql -//#else -//#define gmtime_mysql(T,B) gmtime((const time_t *)T) -//#endif /***********************************************************************/ /* GetGmTime: returns a pointer to a static tm structure obtained */ @@ -2493,7 +2489,6 @@ struct tm *DTVAL::GetGmTime(struct tm *tm_buffer) return datm; } // end of GetGmTime -//#if defined(connect_EXPORTS) // Added by Alexander Barkov static time_t mktime_mysql(struct tm *ptm) { @@ -2504,9 +2499,6 @@ static time_t mktime_mysql(struct tm *ptm) time_t t= TIME_to_timestamp(current_thd, <ime, &error_code); return error_code ? (time_t) -1 : t; } -//#else -//#define mktime_mysql mktime -//#endif /***********************************************************************/ /* MakeTime: calculates a date value from a tm structures using the */