diff options
| author | Wez Furlong <wez@php.net> | 2005-08-13 02:23:29 +0000 |
|---|---|---|
| committer | Wez Furlong <wez@php.net> | 2005-08-13 02:23:29 +0000 |
| commit | c2909b377bcbc55b57a5b1d225ef60fceaaaaeec (patch) | |
| tree | ac1343ecad23f1cf2c5d1a9858df44b0eb9ece51 /ext/com_dotnet | |
| parent | 7c14b0169a1c3a2e033d207dbe80bc92621b2f49 (diff) | |
| download | php-git-c2909b377bcbc55b57a5b1d225ef60fceaaaaeec.tar.gz | |
vs.net 2005 introduces 64-bit time_t.
I can't say that I think this is a great idea, but it does highlight a couple
of dodgy areas where we assume that ints and longs are the same thing as
time_t's. Let's try to ensure that we declare structure fields and function
parameters with the correct type when we're talkingabout time_t's, to avoid
possibly nasty problems with passing the wrong sized thing around.
Diffstat (limited to 'ext/com_dotnet')
| -rw-r--r-- | ext/com_dotnet/com_variant.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/com_dotnet/com_variant.c b/ext/com_dotnet/com_variant.c index 8372a6d931..6030ae915a 100644 --- a/ext/com_dotnet/com_variant.c +++ b/ext/com_dotnet/com_variant.c @@ -789,6 +789,7 @@ PHP_FUNCTION(variant_date_to_timestamp) PHP_FUNCTION(variant_date_from_timestamp) { long timestamp; + time_t ttstamp; SYSTEMTIME systime; struct tm *tmv; VARIANT res; @@ -800,7 +801,8 @@ PHP_FUNCTION(variant_date_from_timestamp) VariantInit(&res); tzset(); - tmv = localtime(×tamp); + ttstamp = timestamp; + tmv = localtime(&ttstamp); memset(&systime, 0, sizeof(systime)); systime.wDay = tmv->tm_mday; |
