derick Mon May 15 08:54:16 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/date/lib timelib_structs.h unixtime2tm.c Log: - MFH: Fixed windows compile error. http://cvs.php.net/viewcvs.cgi/php-src/ext/date/lib/timelib_structs.h?r1=1.13.2.6.2.1&r2=1.13.2.6.2.2&diff_format=u Index: php-src/ext/date/lib/timelib_structs.h diff -u php-src/ext/date/lib/timelib_structs.h:1.13.2.6.2.1 php-src/ext/date/lib/timelib_structs.h:1.13.2.6.2.2 --- php-src/ext/date/lib/timelib_structs.h:1.13.2.6.2.1 Sun May 14 17:36:04 2006 +++ php-src/ext/date/lib/timelib_structs.h Mon May 15 08:54:16 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: timelib_structs.h,v 1.13.2.6.2.1 2006/05/14 17:36:04 derick Exp $ */ +/* $Id: timelib_structs.h,v 1.13.2.6.2.2 2006/05/15 08:54:16 derick Exp $ */ #ifndef __TIMELIB_STRUCTS_H__ #define __TIMELIB_STRUCTS_H__ @@ -74,6 +74,13 @@ #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 @@ #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)) http://cvs.php.net/viewcvs.cgi/php-src/ext/date/lib/unixtime2tm.c?r1=1.12.2.4&r2=1.12.2.4.2.1&diff_format=u Index: php-src/ext/date/lib/unixtime2tm.c diff -u php-src/ext/date/lib/unixtime2tm.c:1.12.2.4 php-src/ext/date/lib/unixtime2tm.c:1.12.2.4.2.1 --- php-src/ext/date/lib/unixtime2tm.c:1.12.2.4 Wed Jan 4 21:31:34 2006 +++ php-src/ext/date/lib/unixtime2tm.c Mon May 15 08:54:16 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: unixtime2tm.c,v 1.12.2.4 2006/01/04 21:31:34 derick Exp $ */ +/* $Id: unixtime2tm.c,v 1.12.2.4.2.1 2006/05/15 08:54:16 derick Exp $ */ #include "timelib.h" @@ -32,12 +32,6 @@ #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 };
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php