]> granicus.if.org Git - php/commitdiff
- Fixed bug #50266 (conflicting types for llabs)
authorJani Taskinen <jani@php.net>
Sat, 28 Nov 2009 00:38:05 +0000 (00:38 +0000)
committerJani Taskinen <jani@php.net>
Sat, 28 Nov 2009 00:38:05 +0000 (00:38 +0000)
NEWS
ext/date/config0.m4
ext/date/php_date.c

diff --git a/NEWS b/NEWS
index cf7829b9db5d81cad8ee93b5a4044493858110f8..612587432c4ab875a809ab612e4ff04a88138fdb 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,7 @@ PHP                                                                        NEWS
 - Fixed bug #50282 (xmlrpc_encode_request() changes object into array in 
   calling function). (Felipe)
 - Fixed bug #50267 (get_browser(null) does not use HTTP_USER_AGENT). (Jani)
+- Fixed bug #50266 (conflicting types for llabs). (Jani)
 - Fixed bug #50255 (isset() and empty() silently casts array to object).
   (Felipe)
 - Fixed bug #50240 (pdo_mysql.default_socket in php.ini shouldn't used
index f403104a8afbeae26eb156531acc68c87a255c3b..3d03c8969921ecf1cfd504fa6bd4b734f20dfe71 100644 (file)
@@ -16,6 +16,8 @@ PHP_ADD_INCLUDE([$ext_srcdir/lib])
 
 PHP_INSTALL_HEADERS([ext/date], [php_date.h lib/timelib.h lib/timelib_structs.h lib/timelib_config.h])
 
+AC_CHECK_FUNCS([llabs])
+
 cat > $ext_builddir/lib/timelib_config.h <<EOF
 #ifdef PHP_WIN32
 # include "config.w32.h"
index 52df63314ea4dd65612e5b7683f60f8bbd5acff2..880b516d9de9d33023b57872683e6ed0d23f23ae 100644 (file)
 # include "win32/php_stdint.h"
 #endif
 
-#if defined(__GNUC__) && __GNUC__ < 3
+#ifndef HAVE_LLABS
+# if defined(__GNUC__) && __GNUC__ < 3
 static __inline __int64_t llabs( __int64_t i ) { return i >= 0 ? i : -i; }
-#endif
-
-#if defined(NETWARE) && defined(__MWERKS__)
+# elif defined(NETWARE) && defined(__MWERKS__)
 static __inline long long llabs( long long i ) { return i >= 0 ? i : -i; }
+# endif
 #endif
 
 /* {{{ arginfo */