pollita Fri Jan 5 21:31:56 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/posix config.m4 Log: MFH: (r-1.16) ttyname_r() is broken on BSD http://cvs.php.net/viewvc.cgi/php-src/ext/posix/config.m4?r1=1.12.4.3&r2=1.12.4.4&diff_format=u Index: php-src/ext/posix/config.m4 diff -u php-src/ext/posix/config.m4:1.12.4.3 php-src/ext/posix/config.m4:1.12.4.4 --- php-src/ext/posix/config.m4:1.12.4.3 Thu Dec 7 01:41:18 2006 +++ php-src/ext/posix/config.m4 Fri Jan 5 21:31:56 2007 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.12.4.3 2006/12/07 01:41:18 iliaa Exp $ +dnl $Id: config.m4,v 1.12.4.4 2007/01/05 21:31:56 pollita Exp $ dnl PHP_ARG_ENABLE(posix,whether to enable POSIX-like functions, @@ -11,5 +11,22 @@ AC_CHECK_HEADERS(sys/mkdev.h) - AC_CHECK_FUNCS(seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo mknod getrlimit getlogin getgroups makedev initgroups getpwuid_r getgrgid_r ttyname_r) + AC_CHECK_FUNCS(seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo mknod getrlimit getlogin getgroups makedev initgroups getpwuid_r getgrgid_r) + + AC_MSG_CHECKING([for working ttyname_r() implementation]) + AC_TRY_RUN([ +#include <unistd.h> + +int main(int argc, char *argv[]) +{ + char buf[64]; + + return ttyname_r(0, buf, 64) ? 1 : 0; +} + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_TTYNAME_R, 1, [Whether you have a working ttyname_r]) + ],[ + AC_MSG_RESULT([no, posix_ttyname() will be thread-unsafe]) + ]) fi
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php