#define uint32_t unsigned __int32
#endif
+#if defined(_MSC_VER)
+#define TIMELIB_LL_CONST(n) n ## i64
+#else
+#define TIMELIB_LL_CONST(n) n ## ll
+#endif
+
+
typedef struct ttinfo
{
int32_t offset;
#define TIMELIB_ZONETYPE_ABBR 2
#define TIMELIB_ZONETYPE_ID 3
-#define SECS_PER_ERA 12622780800LL
-#define SECS_PER_DAY 86400
-#define DAYS_PER_YEAR 365
-#define DAYS_PER_LYEAR 366
+#define SECS_PER_ERA TIMELIB_LL_CONST(12622780800)
+#define SECS_PER_DAY 86400
+#define DAYS_PER_YEAR 365
+#define DAYS_PER_LYEAR 366
#define timelib_is_leap(y) ((y) % 4 == 0 && ((y) % 100 != 0 || (y) % 400 == 0))
#include <strings.h>
#endif
-#if defined(_MSC_VER)
-#define TIMELIB_LL_CONST(n) n ## i64
-#else
-#define TIMELIB_LL_CONST(n) n ## ll
-#endif
-
static int month_tab_leap[12] = { -1, 30, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 };
static int month_tab[12] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 };