lbarnaud                Sat Sep 20 22:12:44 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/posix  config.m4 posix.c 
  Log:
  MFH: 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.12.4.5&r2=1.12.4.5.2.1&diff_format=u
Index: php-src/ext/posix/config.m4
diff -u php-src/ext/posix/config.m4:1.12.4.5 
php-src/ext/posix/config.m4:1.12.4.5.2.1
--- php-src/ext/posix/config.m4:1.12.4.5        Thu Mar  1 11:23:54 2007
+++ php-src/ext/posix/config.m4 Sat Sep 20 22:12:43 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.12.4.5 2007/03/01 11:23:54 tony2001 Exp $
+dnl $Id: config.m4,v 1.12.4.5.2.1 2008/09/20 22:12:43 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.70.2.3.2.16.2.9&r2=1.70.2.3.2.16.2.10&diff_format=u
Index: php-src/ext/posix/posix.c
diff -u php-src/ext/posix/posix.c:1.70.2.3.2.16.2.9 
php-src/ext/posix/posix.c:1.70.2.3.2.16.2.10
--- php-src/ext/posix/posix.c:1.70.2.3.2.16.2.9 Mon Jun 23 17:28:06 2008
+++ php-src/ext/posix/posix.c   Sat Sep 20 22:12:43 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: posix.c,v 1.70.2.3.2.16.2.9 2008/06/23 17:28:06 felipe Exp $ */
+/* $Id: posix.c,v 1.70.2.3.2.16.2.10 2008/09/20 22:12:43 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.70.2.3.2.16.2.9 
$");
+       php_info_print_table_row(2, "Revision", "$Revision: 1.70.2.3.2.16.2.10 
$");
        php_info_print_table_end();
 }
 /* }}} */
@@ -667,7 +667,7 @@
        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

Reply via email to