summaryrefslogtreecommitdiff
path: root/ext/date/lib/unixtime2tm.c
diff options
context:
space:
mode:
authorEdin Kadribasic <edink@php.net>2005-06-15 00:11:29 +0000
committerEdin Kadribasic <edink@php.net>2005-06-15 00:11:29 +0000
commit289997715ac763ead51648421f563fbcc22ebbb2 (patch)
tree8b3a1a7df058322679cfa0b89cc7631174f1e49c /ext/date/lib/unixtime2tm.c
parent2d9230979735591d8833bddd739337d67ff0ddc2 (diff)
downloadphp-git-289997715ac763ead51648421f563fbcc22ebbb2.tar.gz
Make it compile on windows
Diffstat (limited to 'ext/date/lib/unixtime2tm.c')
-rw-r--r--ext/date/lib/unixtime2tm.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/date/lib/unixtime2tm.c b/ext/date/lib/unixtime2tm.c
index 8c282cfa56..a198b405a9 100644
--- a/ext/date/lib/unixtime2tm.c
+++ b/ext/date/lib/unixtime2tm.c
@@ -22,6 +22,12 @@
#include <stdio.h>
#include <string.h>
+#if defined(_MSC_VER)
+#define PHP_LL_CONST(n) n ## i64
+#else
+#define PHP_LL_CONST(n) n ## ll
+#endif
+
#include "datetime.h"
static int month_tab_leap[12] = { -1, 30, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 };
@@ -61,7 +67,7 @@ void timelib_unixtime2gmt(timelib_time* tm, timelib_sll ts)
/* Guess why this might be for, it has to do with a pope ;-). It's also
* only valid for Great Brittain and it's colonies. It needs fixing for
* other locales. *sigh*, why is this crap so complex! */
- if (ts <= -6857352000ll) {
+ if (ts <= PHP_LL_CONST(-6857352000)) {
tmp_days -= 11;
}
@@ -160,7 +166,7 @@ void timelib_set_timezone(timelib_time *t, timelib_tzinfo *tz)
/* Converts the time stored in the struct to localtime if localtime = true,
* otherwise it converts it to gmttime. This is only done when necessary
* ofcourse. */
-int timelib_apply_localtime(timelib_time *t, uint localtime)
+int timelib_apply_localtime(timelib_time *t, unsigned int localtime)
{
if (localtime) {
/* Converting from GMT time to local time */