1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Remove autoconf macros for time_t and alignment

Replaced by constant compile-time expressions. CPU_STRUCT_ALIGN is not
really correct, but is consistent with the old behavior.
This commit is contained in:
Ondrej Zajicek (work)
2017-05-11 01:29:39 +02:00
parent b81a73d1fb
commit b845ea097c
4 changed files with 10 additions and 100 deletions

View File

@@ -77,14 +77,12 @@ bird_clock_t tm_parse_datetime(char *); /* Convert date to bird_clock_t */
void
tm_format_datetime(char *x, struct timeformat *fmt_spec, bird_clock_t t);
#ifdef TIME_T_IS_64BIT
#define TIME_INFINITY 0x7fffffffffffffff
#else
#ifdef TIME_T_IS_SIGNED
#define TIME_INFINITY 0x7fffffff
#else
#define TIME_INFINITY 0xffffffff
#endif
#endif
#define TIME_T_IS_64BIT (sizeof(time_t) == 8)
#define TIME_T_IS_SIGNED ((time_t) -1 < 0)
#define TIME_INFINITY \
((time_t) (TIME_T_IS_SIGNED ? \
(TIME_T_IS_64BIT ? 0x7fffffffffffffff : 0x7fffffff): \
(TIME_T_IS_64BIT ? 0xffffffffffffffff : 0xffffffff)))
#endif