lbarnaud Sat Sep 20 22:12:31 2008 UTC
Modified files:
/php-src/ext/posix config.m4 posix.c
Log:
Fixed #46059 (Compile failure under IRIX 6.5.30 building posix.c)
http://cvs.php.net/viewvc.cgi/php-src/ext/posix/config.m4?r1=1.17&r2=1.18&diff_format=u
Index: php-src/ext/posix/config.m4
diff -u php-src/ext/posix/config.m4:1.17 php-src/ext/posix/config.m4:1.18
--- php-src/ext/posix/config.m4:1.17 Thu Mar 1 11:23:07 2007
+++ php-src/ext/posix/config.m4 Sat Sep 20 22:12:31 2008
@@ -1,5 +1,5 @@
dnl
-dnl $Id: config.m4,v 1.17 2007/03/01 11:23:07 tony2001 Exp $
+dnl $Id: config.m4,v 1.18 2008/09/20 22:12:31 lbarnaud Exp $
dnl
PHP_ARG_ENABLE(posix,whether to enable POSIX-like functions,
@@ -31,4 +31,20 @@
], [
AC_MSG_RESULT([no, cannot detect working ttyname_r() when cross compiling.
posix_ttyname() will be thread-unsafe])
])
+
+ AC_CACHE_CHECK([for utsname.domainname], ac_cv_have_utsname_domainname, [
+ AC_TRY_COMPILE([
+ #define _GNU_SOURCE
+ #include <sys/utsname.h>
+ ],[
+ return sizeof(((struct utsname *)0)->domainname);
+ ],[
+ ac_cv_have_utsname_domainname=yes
+ ],[
+ ac_cv_have_utsname_domainname=no
+ ])
+ ])
+ if test ac_cv_have_utsname_domainname=yes; then
+ AC_DEFINE(HAVE_UTSNAME_DOMAINNAME, 1, [Wether struct utsname has
domainname])
+ fi
fi
http://cvs.php.net/viewvc.cgi/php-src/ext/posix/posix.c?r1=1.102&r2=1.103&diff_format=u
Index: php-src/ext/posix/posix.c
diff -u php-src/ext/posix/posix.c:1.102 php-src/ext/posix/posix.c:1.103
--- php-src/ext/posix/posix.c:1.102 Mon Jun 23 17:54:14 2008
+++ php-src/ext/posix/posix.c Sat Sep 20 22:12:31 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: posix.c,v 1.102 2008/06/23 17:54:14 felipe Exp $ */
+/* $Id: posix.c,v 1.103 2008/09/20 22:12:31 lbarnaud Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -345,7 +345,7 @@
static PHP_MINFO_FUNCTION(posix)
{
php_info_print_table_start();
- php_info_print_table_row(2, "Revision", "$Revision: 1.102 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.103 $");
php_info_print_table_end();
}
/* }}} */
@@ -666,7 +666,7 @@
add_assoc_string(return_value, "release", u.release, 1);
add_assoc_string(return_value, "version", u.version, 1);
add_assoc_string(return_value, "machine", u.machine, 1);
-#if defined(_GNU_SOURCE) && !defined(DARWIN)
+#if defined(_GNU_SOURCE) && !defined(DARWIN) &&
defined(HAVE_UTSNAME_DOMAINNAME)
add_assoc_string(return_value, "domainname", u.domainname, 1);
#endif
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php