rrichards Fri Jul 13 12:48:47 2007 UTC
Modified files:
/php-src/ext/date/lib timelib.c
Log:
use macro - llabs not always available on win32
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/timelib.c?r1=1.14&r2=1.15&diff_format=u
Index: php-src/ext/date/lib/timelib.c
diff -u php-src/ext/date/lib/timelib.c:1.14 php-src/ext/date/lib/timelib.c:1.15
--- php-src/ext/date/lib/timelib.c:1.14 Thu Jul 12 18:56:41 2007
+++ php-src/ext/date/lib/timelib.c Fri Jul 13 12:48:47 2007
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: timelib.c,v 1.14 2007/07/12 18:56:41 derick Exp $ */
+/* $Id: timelib.c,v 1.15 2007/07/13 12:48:47 rrichards Exp $ */
#include "timelib.h"
#include <ctype.h>
@@ -28,6 +28,12 @@
m = NULL; \
} \
+#if defined(_MSC_VER)
+ #define TIMELIB_LLABS(y) y < 0 ? (y * -1) : y
+#else
+ #define TIMELIB_LLABS(y) llabs(y)
+#endif
+
timelib_time* timelib_time_ctor()
{
timelib_time *t;
@@ -168,7 +174,7 @@
printf("TYPE: %d ", d->zone_type);
}
printf("TS: %lld | %s%04lld-%02lld-%02lld %02lld:%02lld:%02lld",
- d->sse, d->y < 0 ? "-" : "", llabs(d->y), d->m, d->d, d->h,
d->i, d->s);
+ d->sse, d->y < 0 ? "-" : "", TIMELIB_LLABS(d->y), d->m, d->d,
d->h, d->i, d->s);
if (d->f > +0.0) {
printf(" %.5f", d->f);
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php