From:             selsky at columbia dot edu
Operating system: Solaris 9
PHP version:      5.2SVN-2009-11-23 (snap)
PHP Bug Type:     Compile Failure
Bug description:  conflicting types for llabs

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.)


-- 
Edit bug report at http://bugs.php.net/?id=50266&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=50266&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=50266&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=50266&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=50266&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=50266&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=50266&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=50266&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=50266&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=50266&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=50266&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=50266&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=50266&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=50266&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=50266&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=50266&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=50266&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=50266&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=50266&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=50266&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=50266&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=50266&r=mysqlcfg

Reply via email to