diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-01-22 23:05:41 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-01-22 23:20:15 -0500 |
commit | c3e31c7ba1d29c9b967035a6d697820114e1c087 (patch) | |
tree | e84b6da84ee271efa515765a0e21b137945a0ff9 | |
parent | 5dbe9f539849a9404a92858e5b70b36408812fbd (diff) |
Replace autoconf int max test with simple define
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | m4/sd_check_max_int_size.m4 | 27 | ||||
-rw-r--r-- | src/core/manager.c | 2 |
3 files changed, 2 insertions, 28 deletions
diff --git a/configure.ac b/configure.ac index ee599a7858..d94af7b304 100644 --- a/configure.ac +++ b/configure.ac @@ -40,7 +40,6 @@ AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.]) AS_IF([test "x$host_cpu" = "xmips" || test "x$host_cpu" = "xmipsel" || test "x$host_cpu" = "xmips64" || test "x$host_cpu" = "xmips64el"], [AC_DEFINE(ARCH_MIPS, [], [Whether on mips arch])]) -SD_CHECK_MAX_INT_SIZE([time_t], [#include <time.h>]) LT_PREREQ(2.2) LT_INIT([disable-static]) diff --git a/m4/sd_check_max_int_size.m4 b/m4/sd_check_max_int_size.m4 deleted file mode 100644 index a4230b5ee8..0000000000 --- a/m4/sd_check_max_int_size.m4 +++ /dev/null @@ -1,27 +0,0 @@ -dnl Find what INT_MAX define to use for a type - -#serial 1 - -ifdef([AC_TR_SH],[], [ -define([AC_TR_SH], - [patsubst(translit([[$1]], [*+], [pp]), [[^a-zA-Z0-9_]], [_])]) -define([AC_TR_CPP], - [patsubst(translit([[$1]], - [*abcdefghijklmnopqrstuvwxyz], - [PABCDEFGHIJKLMNOPQRSTUVWXYZ]), - [[^A-Z0-9_]], [_])]) -]) - -AC_DEFUN([SD_CHECK_MAX_INT_SIZE], - [AC_CHECK_SIZEOF([long],,) - AC_CHECK_SIZEOF([long long],,) - AC_CHECK_SIZEOF([$1],,[$2]) - AS_CASE([$ac_cv_sizeof_[]AC_TR_SH($1)], - [$ac_cv_sizeof_long], [sd_type_max=LONG_MAX], - [$ac_cv_sizeof_long_long], [sd_type_max=LONG_LONG_MAX], - [AC_MSG_ERROR([Don't know how to map $1 to an integer])]) - AC_DEFINE_UNQUOTED(AC_TR_CPP($1_MAX), [$sd_type_max], - [what int to use to maximize $1]) - AC_MSG_CHECKING([what int to to use to maximize $1]) - AC_MSG_RESULT([$sd_type_max]) -]) diff --git a/src/core/manager.c b/src/core/manager.c index 9c829fdb3b..b538a9a3ae 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -81,6 +81,8 @@ /* Where clients shall send notification messages to */ #define NOTIFY_SOCKET "@/org/freedesktop/systemd1/notify" +#define TIME_T_MAX (time_t)((1UL << ((sizeof(time_t) << 3) - 1)) - 1) + static int manager_setup_notify(Manager *m) { union { struct sockaddr sa; |