* The body of this function is taken directly from the GNU C Library;
* see src/strftime.c.
*/
-static long int tm_diff(struct tm const *a, struct tm const *b)
+static int tm_diff(struct tm const *a, struct tm const *b)
{
/**
* Compute intervening leap days correctly even if year is negative.
int a400 = SHR (a100, 2);
int b400 = SHR (b100, 2);
int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400);
- int ayear = a->tm_year;
- int years = ayear - b->tm_year;
+ int years = a->tm_year - b->tm_year;
int days = (365 * years + intervening_leap_days
+ (a->tm_yday - b->tm_yday));
return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour))