pajoye                                   Thu, 11 Feb 2010 22:37:50 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=294906

Log:
- fix php_date_llabs declaration

Changed paths:
    U   php/php-src/branches/PHP_5_2/ext/date/php_date.c
    U   php/php-src/branches/PHP_5_3/ext/date/php_date.c
    U   php/php-src/branches/PHP_5_3_2/ext/date/php_date.c
    U   php/php-src/trunk/ext/date/php_date.c

Modified: php/php-src/branches/PHP_5_2/ext/date/php_date.c
===================================================================
--- php/php-src/branches/PHP_5_2/ext/date/php_date.c    2010-02-11 22:29:23 UTC 
(rev 294905)
+++ php/php-src/branches/PHP_5_2/ext/date/php_date.c    2010-02-11 22:37:50 UTC 
(rev 294906)
@@ -31,11 +31,13 @@
 #include <time.h>

 #ifdef PHP_WIN32
-# include "win32/php_stdint.h"
+static __inline __int64 php_date_llabs( __int64 i ) { return i >= 0? i: -i; }
+#elif defined(__GNUC__) && __GNUC__ < 3
+static __inline __int64_t php_date_llabs( __int64_t i ) { return i >= 0 ? i : 
-i; }
+#else
+static __inline long long php_date_llabs( long long i ) { return i >= 0 ? i : 
-i; }
 #endif

-static __inline long long php_date_llabs( long long i ) { return i >= 0 ? i : 
-i; }
-
 /* {{{ arginfo */
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_date, 0, 0, 1)

Modified: php/php-src/branches/PHP_5_3/ext/date/php_date.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/date/php_date.c    2010-02-11 22:29:23 UTC 
(rev 294905)
+++ php/php-src/branches/PHP_5_3/ext/date/php_date.c    2010-02-11 22:37:50 UTC 
(rev 294906)
@@ -32,11 +32,13 @@
 #include <time.h>

 #ifdef PHP_WIN32
-# include "win32/php_stdint.h"
+static __inline __int64 php_date_llabs( __int64 i ) { return i >= 0? i: -i; }
+#elif defined(__GNUC__) && __GNUC__ < 3
+static __inline __int64_t php_date_llabs( __int64_t i ) { return i >= 0 ? i : 
-i; }
+#else
+static __inline long long php_date_llabs( long long i ) { return i >= 0 ? i : 
-i; }
 #endif

-static __inline long long php_date_llabs( long long i ) { return i >= 0 ? i : 
-i; }
-
 /* {{{ arginfo */
 ZEND_BEGIN_ARG_INFO_EX(arginfo_date, 0, 0, 1)
        ZEND_ARG_INFO(0, format)

Modified: php/php-src/branches/PHP_5_3_2/ext/date/php_date.c
===================================================================
--- php/php-src/branches/PHP_5_3_2/ext/date/php_date.c  2010-02-11 22:29:23 UTC 
(rev 294905)
+++ php/php-src/branches/PHP_5_3_2/ext/date/php_date.c  2010-02-11 22:37:50 UTC 
(rev 294906)
@@ -32,11 +32,13 @@
 #include <time.h>

 #ifdef PHP_WIN32
-# include "win32/php_stdint.h"
+static __inline __int64 php_date_llabs( __int64 i ) { return i >= 0? i: -i; }
+#elif defined(__GNUC__) && __GNUC__ < 3
+static __inline __int64_t php_date_llabs( __int64_t i ) { return i >= 0 ? i : 
-i; }
+#else
+static __inline long long php_date_llabs( long long i ) { return i >= 0 ? i : 
-i; }
 #endif

-static __inline long long php_date_llabs( long long i ) { return i >= 0 ? i : 
-i; }
-
 /* {{{ arginfo */
 ZEND_BEGIN_ARG_INFO_EX(arginfo_date, 0, 0, 1)
        ZEND_ARG_INFO(0, format)

Modified: php/php-src/trunk/ext/date/php_date.c
===================================================================
--- php/php-src/trunk/ext/date/php_date.c       2010-02-11 22:29:23 UTC (rev 
294905)
+++ php/php-src/trunk/ext/date/php_date.c       2010-02-11 22:37:50 UTC (rev 
294906)
@@ -33,11 +33,13 @@
 #include <unicode/udat.h>

 #ifdef PHP_WIN32
-# include "win32/php_stdint.h"
+static __inline __int64 php_date_llabs( __int64 i ) { return i >= 0? i: -i; }
+#elif defined(__GNUC__) && __GNUC__ < 3
+static __inline __int64_t php_date_llabs( __int64_t i ) { return i >= 0 ? i : 
-i; }
+#else
+static __inline long long php_date_llabs( long long i ) { return i >= 0 ? i : 
-i; }
 #endif

-static __inline long long php_date_llabs( long long i ) { return i >= 0 ? i : 
-i; }
-
 /* {{{ arginfo */
 ZEND_BEGIN_ARG_INFO_EX(arginfo_date, 0, 0, 1)
        ZEND_ARG_INFO(0, format)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to