summaryrefslogtreecommitdiff
path: root/sql/tztime.cc
diff options
context:
space:
mode:
authorunknown <dlenev@brandersnatch.localdomain>2004-06-25 21:04:48 +0400
committerunknown <dlenev@brandersnatch.localdomain>2004-06-25 21:04:48 +0400
commit84f61e5a0b922a667e2fc29aec57fe87d7fd56fc (patch)
tree2d00631324d1a7b86d86b1c1b8ef12d30edf98ca /sql/tztime.cc
parentd1e4305187a2e2c613f7cd289ad2cd2df914ea18 (diff)
downloadmariadb-git-84f61e5a0b922a667e2fc29aec57fe87d7fd56fc.tar.gz
Removed mysql_tzinfo_to_sql dependancy on sql/mysql_priv.h for circumventing
problems with unresolved dependancies on some platforms. sql/mysql_priv.h: Moved my_time_t definitions to tztime.h to avoid mysql_tzinfo_to_sql dependancy on mysql_priv.h. sql/tztime.cc: Removed mysql_tzinfo_to_sql dependancy from mysql_priv.h sql/tztime.h: Moved my_time_t definitions to tztime.h to avoid mysql_tzinfo_to_sql dependancy on mysql_priv.h.
Diffstat (limited to 'sql/tztime.cc')
-rw-r--r--sql/tztime.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/tztime.cc b/sql/tztime.cc
index 0a5b8df664c..f6a9c99ac7f 100644
--- a/sql/tztime.cc
+++ b/sql/tztime.cc
@@ -24,7 +24,18 @@
#pragma implementation // gcc: Class implementation
#endif
+/*
+ We should not include mysql_priv.h in mysql_tzinfo_to_sql utility since
+ it creates unsolved link dependencies on some platforms.
+*/
+#if !defined(TZINFO2SQL) && !defined(TESTTIME)
#include "mysql_priv.h"
+#else
+#include <my_global.h>
+#include "tztime.h"
+#include <my_sys.h>
+#endif
+
#include "tzfile.h"
#include <m_string.h>
#include <my_dir.h>
@@ -486,6 +497,8 @@ prepare_tz_info(TIME_ZONE_INFO *sp, MEM_ROOT *storage)
}
+#if !defined(TZINFO2SQL)
+
static const uint mon_lengths[2][MONS_PER_YEAR]=
{
{ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
@@ -922,6 +935,7 @@ TIME_to_gmt_sec(const TIME *t, const TIME_ZONE_INFO *sp, bool *in_dst_time_gap)
/*
End of elsie derived code.
*/
+#endif /* !defined(TZINFO2SQL) */
#if !defined(TESTTIME) && !defined(TZINFO2SQL)