com php-src: Enable build without atoll (e.g old AIX flavours): ext/date/php_date.c
| From: | Lior Kaplan | Date: | Thu, 17 Jul 2014 19:58:36 +0000 |
| Subject: | com php-src: Enable build without atoll (e.g old AIX flavours): ext/date/php_date.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-79493@lists.php.net to get a copy of this message | ||
Commit: 2dff153b23c7c874e8c98e1f3bda2e00cde0bd71
Author: Lior Kaplan <kaplanlior@gmail.com> Thu, 17 Jul 2014 22:58:36 +0300
Parents: f0a1e410a3c23e6ac8c4d10a0218a3c40190b64a
Branches: PHP-5.4
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2dff153b23c7c874e8c98e1f3bda2e00cde0bd71
Log:
Enable build without atoll (e.g old AIX flavours)
Changed paths:
M ext/date/php_date.c
Diff:
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 595b0b0..4259bf0 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -50,7 +50,11 @@ static inline long long php_date_llabs( long long i ) { return i >= 0 ? i :
-i;
int st = snprintf(s, len, "%lld", i); \
s[st] = '\0'; \
} while (0);
+#ifdef HAVE_ATOLL
# define DATE_A64I(i, s) i = atoll(s)
+#else
+# define DATE_A64I(i, s) i = strtoll(s, NULL, 10)
+#endif
#endif
/* {{{ arginfo */