summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <cmiller@zippy.cornsilk.net>2008-04-03 11:32:00 -0400
committerunknown <cmiller@zippy.cornsilk.net>2008-04-03 11:32:00 -0400
commit90112d1175b1043850f50cfae2088dc143e4c62e (patch)
treec831693e16e1a99024c7a4ae4fe1d84087150eca
parentf20fe94b55727fbc69b1cb86af5dc96f216bdd87 (diff)
downloadmariadb-git-90112d1175b1043850f50cfae2088dc143e4c62e.tar.gz
Bug#26294: library name conflict between MySQL 4.x, 5.0 and Qt 3.3
When linking with some external programs, "multiple definition of `init_time'" Rename init_time() to my_init_time() to avoid collision with other libraries (particularly libmng). client/mysqlbinlog.cc: Rename init_time() to my_init_time(). include/my_time.h: Rename init_time() to my_init_time(). sql-common/my_time.c: Rename init_time() to my_init_time(). sql/init.cc: Rename init_time() to my_init_time(). sql/tztime.cc: Rename init_time() to my_init_time().
-rw-r--r--client/mysqlbinlog.cc2
-rw-r--r--include/my_time.h2
-rw-r--r--sql-common/my_time.c6
-rw-r--r--sql/init.cc2
-rw-r--r--sql/tztime.cc4
5 files changed, 8 insertions, 8 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index b4086b59c01..f0a4c8d2abf 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -1474,7 +1474,7 @@ int main(int argc, char** argv)
DBUG_ENTER("main");
DBUG_PROCESS(argv[0]);
- init_time(); // for time functions
+ my_init_time(); // for time functions
parse_args(&argc, (char***)&argv);
defaults_argv=argv;
diff --git a/include/my_time.h b/include/my_time.h
index 99eb5c36c6b..014327d6fd8 100644
--- a/include/my_time.h
+++ b/include/my_time.h
@@ -94,7 +94,7 @@ long calc_daynr(uint year,uint month,uint day);
uint calc_days_in_year(uint year);
uint year_2000_handling(uint year);
-void init_time(void);
+void my_init_time(void);
/*
diff --git a/sql-common/my_time.c b/sql-common/my_time.c
index ecc5aaf8af2..1781251fca1 100644
--- a/sql-common/my_time.c
+++ b/sql-common/my_time.c
@@ -704,9 +704,9 @@ int check_time_range(struct st_mysql_time *my_time, int *warning)
Prepare offset of system time zone from UTC for my_system_gmt_sec() func.
SYNOPSIS
- init_time()
+ my_init_time()
*/
-void init_time(void)
+void my_init_time(void)
{
time_t seconds;
struct tm *l_time,tm_tmp;
@@ -795,7 +795,7 @@ long calc_daynr(uint year,uint month,uint day)
NOTES
The idea is to cache the time zone offset from UTC (including daylight
saving time) for the next call to make things faster. But currently we
- just calculate this offset during startup (by calling init_time()
+ just calculate this offset during startup (by calling my_init_time()
function) and use it all the time.
Time value provided should be legal time value (e.g. '2003-01-01 25:00:00'
is not allowed).
diff --git a/sql/init.cc b/sql/init.cc
index b3b68926683..2dd2031cdaa 100644
--- a/sql/init.cc
+++ b/sql/init.cc
@@ -30,7 +30,7 @@ void unireg_init(ulong options)
wild_many='%'; wild_one='_'; wild_prefix='\\'; /* Change to sql syntax */
current_pid=(ulong) getpid(); /* Save for later ref */
- init_time(); /* Init time-functions (read zone) */
+ my_init_time(); /* Init time-functions (read zone) */
#ifndef EMBEDDED_LIBRARY
my_abort_hook=unireg_abort; /* Abort with close of databases */
#endif
diff --git a/sql/tztime.cc b/sql/tztime.cc
index bedbf921cae..2b951c4b061 100644
--- a/sql/tztime.cc
+++ b/sql/tztime.cc
@@ -1035,7 +1035,7 @@ public:
return lowest possible my_time_t in case of ambiguity or if we
provide time corresponding to the time-gap.
- You should call init_time() function before using this function.
+ You should call my_init_time() function before using this function.
RETURN VALUE
Corresponding my_time_t value or 0 in case of error
@@ -2757,7 +2757,7 @@ main(int argc, char **argv)
}
printf("gmt_sec_to_TIME = localtime for time_t in [1000000000,1100000000) range\n");
- init_time();
+ my_init_time();
/*
Be careful here! my_system_gmt_sec doesn't fully handle unnormalized