PHP :: Bug #50266 :: conflicting types for llabs
| Bug #50266 | conflicting types for llabs | ||||
|---|---|---|---|---|---|
| Submitted: | 2009-11-23 02:55 UTC | Modified: | 2010-02-22 15:36 UTC | ||
| From: | selsky at columbia dot edu | Assigned: | |||
| Status: | Closed | Package: | Date/time related | ||
| PHP Version: | 5.2SVN-2009-11-23 (snap) | OS: | Solaris 9 | ||
| Private report: | No | CVE-ID: | None | ||
[2009-11-23 02:55 UTC] selsky at columbia dot edu
Description:
------------
llabs() is defined in both /usr/include/stdlib.h and ext/date/php_date.c
#if defined(__GNUC__) && __GNUC__ < 3
static __inline __int64_t llabs( __int64_t i ) { return i >= 0 ? i : -i;
}
#endif
I'm using gcc 2 so this inline function is defined, but it's also
defined by the system. Perhaps it would be better to test for the
function in configure and set something in php_config.h?
Reproduce code:
---------------
$ uname -a
SunOS cumin 5.9 Generic_122300-45 sun4u sparc SUNW,UltraAX-i2 Solaris
$ gcc --version
2.95.3
$ ./configure
$ make
/bin/sh /tmp/php5.2-200911230130/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/date/lib -Iext/date/ -I/tmp/php5.2-200911230130/ext/date/ -DPHP_ATOM_INC -I/tmp/php5.2-200911230130/include -I/tmp/php5.2-200911230130/main -I/tmp/php5.2-200911230130 -I/tmp/php5.2-200911230130/ext/date/lib -I/opt/libxml2-2.6.32/include/libxml2 -I/tmp/php5.2-200911230130/TSRM -I/tmp/php5.2-200911230130/Zend -D_POSIX_PTHREAD_SEMANTICS -I/usr/include -g -O2 -c /tmp/php5.2-200911230130/ext/date/php_date.c -o ext/date/php_date.lo
/tmp/php5.2-200911230130/ext/date/php_date.c:38: parse error before `llabs'
/tmp/php5.2-200911230130/ext/date/php_date.c:38: parse error before `i'
/tmp/php5.2-200911230130/ext/date/php_date.c:38: conflicting types for `llabs'
/usr/include/stdlib.h:203: previous declaration of `llabs'
/tmp/php5.2-200911230130/ext/date/php_date.c: In function `llabs':
/tmp/php5.2-200911230130/ext/date/php_date.c:38: `i' undeclared (first use in this function)
/tmp/php5.2-200911230130/ext/date/php_date.c:38: (Each undeclared identifier is reported only once
/tmp/php5.2-200911230130/ext/date/php_date.c:38: for each function it appears in.)
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2010-02-22 15:36 UTC] selsky at columbia dot edu