|
Packit |
306c40 |
## Copyright (c) 2009, 2011 Openismus GmbH <http://www.openismus.com/>
|
|
Packit |
306c40 |
##
|
|
Packit |
306c40 |
## This file is part of glibmm.
|
|
Packit |
306c40 |
##
|
|
Packit |
306c40 |
## glibmm is free software: you can redistribute it and/or modify it
|
|
Packit |
306c40 |
## under the terms of the GNU Lesser General Public License as published
|
|
Packit |
306c40 |
## by the Free Software Foundation, either version 2.1 of the License,
|
|
Packit |
306c40 |
## or (at your option) any later version.
|
|
Packit |
306c40 |
##
|
|
Packit |
306c40 |
## glibmm is distributed in the hope that it will be useful, but
|
|
Packit |
306c40 |
## WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
306c40 |
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
Packit |
306c40 |
## See the GNU Lesser General Public License for more details.
|
|
Packit |
306c40 |
##
|
|
Packit |
306c40 |
## You should have received a copy of the GNU Lesser General Public License
|
|
Packit |
306c40 |
## along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
Packit |
306c40 |
|
|
Packit |
306c40 |
#serial 20120912
|
|
Packit |
306c40 |
|
|
Packit |
306c40 |
## GLIBMM_C_STD_TIME_T_IS_NOT_INT32
|
|
Packit |
306c40 |
##
|
|
Packit |
306c40 |
## Test whether std::time_t and gint32 are typedefs of the same builting type.
|
|
Packit |
306c40 |
## If they aren't then they can be used for method overload. In that case
|
|
Packit |
306c40 |
## GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32 is defined to 1.
|
|
Packit |
306c40 |
##
|
|
Packit |
306c40 |
AC_DEFUN([GLIBMM_C_STD_TIME_T_IS_NOT_INT32],
|
|
Packit |
306c40 |
[
|
|
Packit |
306c40 |
AC_CACHE_CHECK(
|
|
Packit |
306c40 |
[whether std::time_t is not equivalent to gint32, meaning that it can be used for a method overload],
|
|
Packit |
306c40 |
[glibmm_cv_c_std_time_t_is_not_int32],
|
|
Packit |
306c40 |
[
|
|
Packit |
306c40 |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
|
Packit |
306c40 |
[[
|
|
Packit |
306c40 |
#include <ctime>
|
|
Packit |
306c40 |
]],[[
|
|
Packit |
306c40 |
typedef signed int gint32;
|
|
Packit |
306c40 |
class Test
|
|
Packit |
306c40 |
{
|
|
Packit |
306c40 |
void something(gint32 val)
|
|
Packit |
306c40 |
{}
|
|
Packit |
306c40 |
|
|
Packit |
306c40 |
void something(std::time_t val)
|
|
Packit |
306c40 |
{}
|
|
Packit |
306c40 |
};
|
|
Packit |
306c40 |
]])],
|
|
Packit |
306c40 |
[glibmm_cv_c_std_time_t_is_not_int32='yes'],
|
|
Packit |
306c40 |
[glibmm_cv_c_std_time_t_is_not_int32='no']
|
|
Packit |
306c40 |
)
|
|
Packit |
306c40 |
])
|
|
Packit |
306c40 |
|
|
Packit |
306c40 |
AS_VAR_IF([glibmm_cv_c_std_time_t_is_not_int32], ['yes'],
|
|
Packit |
306c40 |
[AC_DEFINE([GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32], [1],
|
|
Packit |
306c40 |
[Defined when std::time_t is not equivalent to gint32, meaning that it can be used for a method overload])])[]dnl
|
|
Packit |
306c40 |
])
|