diff options
author | unknown <df@pippilotta.erinye.com> | 2007-04-11 13:33:15 +0200 |
---|---|---|
committer | unknown <df@pippilotta.erinye.com> | 2007-04-11 13:33:15 +0200 |
commit | 44adef74ece37f4fbe26a63adc29371e61a10213 (patch) | |
tree | fdedc9d7d9f1e5450b4db8cb862d1bbd870e57e1 /config | |
parent | bbf07e14cd9c974e1c7ce375023bbb4bddd8031b (diff) | |
parent | d11212bd87a7129076d9c611b05ca7a1df7945c4 (diff) | |
download | mariadb-git-44adef74ece37f4fbe26a63adc29371e61a10213.tar.gz |
Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build-work-25601
into pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-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 fdce85aa136..6e9dfe8231c 100644 --- a/config/ac-macros/misc.m4 +++ b/config/ac-macros/misc.m4 @@ -663,3 +663,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)] + ) +]) + |