From: Derick Rethans Date: Mon, 15 May 2006 08:53:58 +0000 (+0000) Subject: - Fixed windows compile error. X-Git-Tag: BEFORE_NEW_OUTPUT_API~193 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=733c60eab62eb6b56b1a9e9fbf34fa9fdc3743c0;p=php - Fixed windows compile error. --- diff --git a/ext/date/lib/timelib_structs.h b/ext/date/lib/timelib_structs.h index 074c558f40..7abfcc4eec 100644 --- a/ext/date/lib/timelib_structs.h +++ b/ext/date/lib/timelib_structs.h @@ -74,6 +74,13 @@ typedef signed long long timelib_sll; #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; @@ -189,10 +196,10 @@ typedef struct _timelib_tzdb { #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)) diff --git a/ext/date/lib/unixtime2tm.c b/ext/date/lib/unixtime2tm.c index 4834b470d9..b5f96c7e15 100644 --- a/ext/date/lib/unixtime2tm.c +++ b/ext/date/lib/unixtime2tm.c @@ -32,12 +32,6 @@ #include #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 };