diff options
author | df@pippilotta.erinye.com <> | 2007-04-11 13:32:40 +0200 |
---|---|---|
committer | df@pippilotta.erinye.com <> | 2007-04-11 13:32:40 +0200 |
commit | f98d1614c3a8b5ecc5ab0cd0af7c233e854263d5 (patch) | |
tree | eff5e635833f52f9160190cafd19310c0cc73b6f /config | |
parent | b51c346781a576dd78072f41c2795a663f744a8d (diff) | |
parent | 43a57774d9e9fb1a9fe362766334d98f80c9a906 (diff) | |
download | mariadb-git-f98d1614c3a8b5ecc5ab0cd0af7c233e854263d5.tar.gz |
Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work-25601
into pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work
Diffstat (limited to 'config')
-rw-r--r-- | config/ac-macros/misc.m4 | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/config/ac-macros/misc.m4 b/config/ac-macros/misc.m4 index d8199f5970e..09081fb3eac 100644 --- a/config/ac-macros/misc.m4 +++ b/config/ac-macros/misc.m4 @@ -790,3 +790,27 @@ esac AC_SUBST(AR) AC_SUBST(ARFLAGS) ]) + +dnl +dnl Macro to check time_t range: according to C standard +dnl array index must be greater than 0 => if time_t is signed, +dnl the code in the macros below won't compile. +dnl + +AC_DEFUN([MYSQL_CHECK_TIME_T],[ + AC_MSG_CHECKING(if time_t is unsigned) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[ +#include <time.h> + ]], + [[ + int array[(((time_t)-1) > 0) ? 1 : -1]; + ]] ) + ], [ + AC_DEFINE([TIME_T_UNSIGNED], 1, [Define to 1 if time_t is unsigned]) + AC_MSG_RESULT(yes) + ], + [AC_MSG_RESULT(no)] + ) +]) + |