This informs the user of the tool why dates after 2038 cannot
be expressed on systems with a 32-bit time_t.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
#define MAX_ENTRIES 128
#define MAX_POLICIES 8
+#define PRINT_TIME_T_ERROR \
+ if (sizeof(time_t) < 8) \
+ fprintf(stderr, "This system expresses time with a 32-bit time_t; that prevents dates after 2038 to be expressed by GnuTLS.\n")
+
enum option_types { OPTION_NUMERIC, OPTION_STRING, OPTION_BOOLEAN, OPTION_MULTI_LINE };
struct cfg_options {
struct timespec r;
if (date==NULL || parse_datetime(&r, date, NULL) == 0) {
+ PRINT_TIME_T_ERROR;
fprintf(stderr, "Cannot parse date: %s\n", date);
exit(1);
}
return secs;
overflow:
+ PRINT_TIME_T_ERROR;
fprintf(stderr, "Overflow while parsing days\n");
exit(1);
}