|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-03-13 21:48 UTC] mfischer@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 21:00:01 2025 UTC |
there is a problem in the file ext/posix/posix.c in function posix_uname, if i read the documentation about this function i can get some informations of the utsname struct. Well under linux you can use a machine domain name, (not yet implemented in FreeBSD). well the 'domainname' are not implemented on php but it's writed on the docs : /* {{{ proto array posix_uname(void) Get system name (POSIX.1, 4.4.1) */ PHP_FUNCTION(posix_uname) { struct utsname u; uname(&u); if (array_init(return_value) == FAILURE) { RETURN_FALSE; } add_assoc_string(return_value, "sysname", u.sysname, 1); add_assoc_string(return_value, "nodename", u.nodename, 1); 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); } /* }}} */ i'v fix it : /* {{{ proto array posix_uname(void) Get system name (POSIX.1, 4.4.1) */ PHP_FUNCTION(posix_uname) { struct utsname u; uname(&u); if (array_init(return_value) == FAILURE) { RETURN_FALSE; } add_assoc_string(return_value, "sysname", u.sysname, 1); add_assoc_string(return_value, "nodename", u.nodename, 1); 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); #ifdef __USE_GNU add_assoc_string(return_value, "domainname", u.domainname, 1); #endif } /* }}} */ if you don't want to correct it, please delete the wrong information in the documentations. Regards, Vergoz Michael SYSDOOR