summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2011-02-02 18:51:35 +0200
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2011-02-02 18:51:35 +0200
commita70c34bf0f34703fd330f8cb828e48b303c5296a (patch)
tree15a94e6095dd7f48a3a40e2c6d798d5f7b728b0e /configure.in
parent7083cb0bd99c352dfb37828bee1c9de1d1edb068 (diff)
downloadmariadb-git-a70c34bf0f34703fd330f8cb828e48b303c5296a.tar.gz
Fixes for Bug #55755 and Bug #52315 part 2
Bug #55755 : Date STD variable signness breaks server on FreeBSD and OpenBSD * Added a check to configure on the size of time_t * Created a macro to check for a valid time_t that is safe to use with datetime functions and store in TIMESTAMP columns. * Used the macro consistently instead of the ad-hoc checks introduced by 52315 * Fixed compliation warnings on platforms where the size of time_t is smaller than the size of a long (e.g. OpenBSD 4.8 64 amd64). Bug #52315: utc_date() crashes when system time > year 2037 * Added a correct check for the timestamp range instead of just variable size check to SET TIMESTAMP. * Added overflow checking before converting to time_t. * Using a correct localized error message in this case instead of the generic error. * Added a test suite. * fixed the checks so that they check for unsigned time_t as well. Used the checks consistently across the source code. * fixed the original test case to expect the new error code.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index fda56554879..523d36afaea 100644
--- a/configure.in
+++ b/configure.in
@@ -1956,6 +1956,15 @@ dnl
MYSQL_CHECK_TIME_T
+dnl
+dnl check size of time_t
+dnl
+
+AC_CHECK_SIZEOF(time_t, 8)
+if test "$ac_cv_sizeof_time_t" -eq 0
+then
+ AC_MSG_ERROR("MySQL needs a time_t type.")
+fi
# do we need #pragma interface/#pragma implementation ?
# yes if it's gcc 2.x, and not icc pretending to be gcc, and not cygwin