pajoye Sun, 06 Sep 2009 22:01:18 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=288116
Log: - fix #40013, php_uname() doesnt return nodename (MFH) Bug: http://bugs.php.net/40013 (Open) php_uname() doesnt return nodename Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/info.c Modified: php/php-src/branches/PHP_5_3/ext/standard/info.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/standard/info.c 2009-09-06 21:48:55 UTC (rev 288115) +++ php/php-src/branches/PHP_5_3/ext/standard/info.c 2009-09-06 22:01:18 UTC (rev 288116) @@ -527,9 +527,33 @@ if (uname((struct utsname *)&buf) == -1) { php_uname = PHP_UNAME; } else { +#ifdef NETWARE if (mode == 's') { php_uname = buf.sysname; } else if (mode == 'r') { + snprintf(tmp_uname, sizeof(tmp_uname), "%d.%d.%d", + buf.netware_major, buf.netware_minor, buf.netware_revision); + php_uname = tmp_uname; + } else if (mode == 'n') { + php_uname = buf.servername; + } else if (mode == 'v') { + snprintf(tmp_uname, sizeof(tmp_uname), "libc-%d.%d.%d #%d", + buf.libmajor, buf.libminor, buf.librevision, buf.libthreshold); + php_uname = tmp_uname; + } else if (mode == 'm') { + php_uname = buf.machine; + } else { /* assume mode == 'a' */ + snprintf(tmp_uname, sizeof(tmp_uname), "%s %s %d.%d.%d libc-%d.%d.%d #%d %s", + buf.sysname, buf.servername, + buf.netware_major, buf.netware_minor, buf.netware_revision, + buf.libmajor, buf.libminor, buf.librevision, buf.libthreshold, + buf.machine); + php_uname = tmp_uname; + } +#else + if (mode == 's') { + php_uname = buf.sysname; + } else if (mode == 'r') { php_uname = buf.release; } else if (mode == 'n') { php_uname = buf.nodename; @@ -543,6 +567,7 @@ buf.machine); php_uname = tmp_uname; } +#endif /* NETWARE */ } #else php_uname = PHP_UNAME;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php