util: avoid duplication of TIME_T_MAX

This commit is contained in:
Ronny Chevalier 2014-10-11 18:45:11 +02:00 committed by Lennart Poettering
parent 6dab5bb181
commit e4746b5738
3 changed files with 4 additions and 4 deletions

View file

@ -75,6 +75,7 @@
#include "dbus-job.h"
#include "dbus-manager.h"
#include "bus-kernel.h"
#include "time-util.h"
/* As soon as 5s passed since a unit was added to our GC queue, make sure to run a gc sweep */
#define GC_QUEUE_USEC_MAX (10*USEC_PER_SEC)
@ -84,8 +85,6 @@
#define JOBS_IN_PROGRESS_PERIOD_USEC (USEC_PER_SEC / 3)
#define JOBS_IN_PROGRESS_PERIOD_DIVISOR 3
#define TIME_T_MAX (time_t)((1UL << ((sizeof(time_t) << 3) - 1)) - 1)
static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t revents, void *userdata);
static int manager_dispatch_signal_fd(sd_event_source *source, int fd, uint32_t revents, void *userdata);
static int manager_dispatch_time_change_fd(sd_event_source *source, int fd, uint32_t revents, void *userdata);

View file

@ -65,6 +65,8 @@ typedef struct dual_timestamp {
#define FORMAT_TIMESTAMP_RELATIVE_MAX 256
#define FORMAT_TIMESPAN_MAX 64
#define TIME_T_MAX (time_t)((1UL << ((sizeof(time_t) << 3) - 1)) - 1)
#define DUAL_TIMESTAMP_NULL ((struct dual_timestamp) { 0, 0 })
usec_t now(clockid_t clock);

View file

@ -54,8 +54,7 @@
#include "mkdir.h"
#include "timesyncd-conf.h"
#include "timesyncd-manager.h"
#define TIME_T_MAX (time_t)((1UL << ((sizeof(time_t) << 3) - 1)) - 1)
#include "time-util.h"
#ifndef ADJ_SETOFFSET
#define ADJ_SETOFFSET 0x0100 /* add 'time' to current time */