From:             arekm at maven dot pl
Operating system: Linux
PHP version:      5.3.0
PHP Bug Type:     *Compile Issues
Bug description:  ttyname_r() configure test unreliable

Description:
------------
ttyname_r() check done in configure is wrong because it relies on doing
build on a terminal. Building on non terminal causes failure.

Reproduce code:
---------------
This is test taken from configure:

[ar...@t400 ~/test/3]$ more a.c
#include <unistd.h>
int main(int argc, char *argv[])
{
        char buf[64];

        return ttyname_r(0, buf, 64) ? 1 : 0;
}

[ar...@t400 ~/test/3]$ gcc a.c
[ar...@t400 ~/test/3]$ ./a.out
[ar...@t400 ~/test/3]$ echo $?
0

success - we are on a terminal

[ar...@t400 ~/test/3]$ ./a.out < /dev/null
zsh: exit 1     ./a.out < /dev/null
[ar...@t400 ~/test/3]$ echo $?
1
[ar...@t400 ~/test/3]$

failure - we are not on terminal


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

Reply via email to