summaryrefslogtreecommitdiff
path: root/scripts/c_std.m4
blob: f4a8b56f8e24a940011954f4b8a5db4f5c951dfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
cv_c_std_time_t_is_not_int32
## GLIBMM_CXX_HAS_NAMESPACE_STD()
##
## Test whether libstdc++ declares namespace std.  For safety,
## also check whether several randomly selected STL symbols
## are available in namespace std.
##
## On success, #define GLIBMM_HAVE_NAMESPACE_STD to 1.
##
AC_DEFUN([GLIBMM_C_STD_TIME_T_IS_NOT_INT32],
[
  AC_CACHE_CHECK(
    [whether time_t is not equivalent to gint32, meaning that it can be used for a method overload],
    [gtkmm_cv_c_std_time_t_is_not_int32],
  [
    AC_TRY_COMPILE(
    [
      #include <time.h>
    ],[
      typedef signed int gint32;
      class Test
      {
        void something(gint32 val)
        {}

        void something(time_t val)
        {}
      };
    ],
      [gtkmm_cv_c_std_time_t_is_not_int32="yes"],
      [gtkmm_cv_c_std_time_t_is_not_int32="no"]
    )
  ])

  if test "x${gtkmm_cv_c_std_time_t_is_not_int32}" = "xyes"; then
  {
    AC_DEFINE([GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32],[1], [Defined when time_t is not equivalent to gint32, meaning that it can be used for a method overload])
  }
  fi
])