Peter Maydell e7b47c22e2 osdep.h: Make TIME_MAX handle different time_t types
In our various supported host OSes, the time_t type may be either 32
or 64 bit, and could in theory also be either signed or unsigned.
Notably, in OpenBSD time_t is a 64 bit type even if 'long' is 32
bits, so using LONG_MAX for TIME_MAX is incorrect.

Use an approach suggested by Paolo Bonzini which calculates
the maximum value of the type rather than hardcoding it;
to do this we use the TYPE_MAXIMUM macro from Gnulib.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1511452598-6077-1-git-send-email-peter.maydell@linaro.org
2017-11-24 13:23:36 +00:00
..
2017-09-22 14:11:25 +02:00
2017-07-24 12:42:55 +01:00
2017-10-16 20:57:13 +03:00
2017-09-06 14:38:03 +01:00
2017-09-05 22:34:40 +02:00
2016-02-23 12:43:05 +00:00
2017-03-07 16:07:46 +01:00
2017-01-24 23:26:52 +03:00
2017-01-24 17:54:47 +00:00
2017-06-16 07:55:00 +08:00
2017-06-13 14:56:59 +01:00
2017-10-17 10:25:42 +02:00
2017-01-24 23:26:52 +03:00