summaryrefslogtreecommitdiff
path: root/ext/posix
diff options
context:
space:
mode:
authorMark A. Hershberger <mah@debian.(none)>2009-03-25 19:39:21 -0400
committerMark A. Hershberger <mah@debian.(none)>2009-03-25 19:39:21 -0400
commit6821b67124604da690c5e9276d5370d679c63ac8 (patch)
treebefb4ca2520eb577950cef6cb76d10b914cbf67a /ext/posix
parentcd0b49c72aee33b3e44a9c589fcd93b9e1c7a64f (diff)
downloadphp-6821b67124604da690c5e9276d5370d679c63ac8.tar.gz
Imported Upstream version 5.3.0RC1upstream/5.3.0_RC1upstream/5.3.0RC1
Diffstat (limited to 'ext/posix')
-rw-r--r--ext/posix/config.m42
-rw-r--r--ext/posix/php_posix.h2
-rw-r--r--ext/posix/posix.c251
-rw-r--r--ext/posix/tests/posix_get_last_error_error.phpt2
-rw-r--r--ext/posix/tests/posix_getcwd.phpt2
-rw-r--r--ext/posix/tests/posix_getgid_error.phpt2
-rw-r--r--ext/posix/tests/posix_getpgrp_error.phpt2
-rw-r--r--ext/posix/tests/posix_getpid_error.phpt2
-rw-r--r--ext/posix/tests/posix_getppid_error.phpt2
-rw-r--r--ext/posix/tests/posix_getuid_error.phpt2
-rw-r--r--ext/posix/tests/posix_strerror_error.phpt2
-rw-r--r--ext/posix/tests/posix_strerror_variation1.phpt2
-rw-r--r--ext/posix/tests/posix_times_error.phpt2
-rw-r--r--ext/posix/tests/posix_uname_error.phpt2
14 files changed, 221 insertions, 56 deletions
diff --git a/ext/posix/config.m4 b/ext/posix/config.m4
index deaa52af3..9f648536d 100644
--- a/ext/posix/config.m4
+++ b/ext/posix/config.m4
@@ -1,5 +1,5 @@
dnl
-dnl $Id: config.m4,v 1.12.4.7 2009/01/21 19:23:03 jani Exp $
+dnl $Id: config.m4,v 1.12.4.5.2.2 2009/01/21 19:22:39 jani Exp $
dnl
PHP_ARG_ENABLE(posix,whether to enable POSIX-like functions,
diff --git a/ext/posix/php_posix.h b/ext/posix/php_posix.h
index 431b83714..eff709190 100644
--- a/ext/posix/php_posix.h
+++ b/ext/posix/php_posix.h
@@ -17,7 +17,7 @@
*/
-/* $Id: php_posix.h,v 1.18.2.1.2.4 2008/12/31 11:17:42 sebastian Exp $ */
+/* $Id: php_posix.h,v 1.18.2.1.2.2.2.2 2008/12/31 11:15:42 sebastian Exp $ */
#ifndef PHP_POSIX_H
#define PHP_POSIX_H
diff --git a/ext/posix/posix.c b/ext/posix/posix.c
index feb2c4bf5..d613f98d2 100644
--- a/ext/posix/posix.c
+++ b/ext/posix/posix.c
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: posix.c,v 1.70.2.3.2.22 2009/01/04 15:08:34 tony2001 Exp $ */
+/* $Id: posix.c,v 1.70.2.3.2.16.2.14 2008/12/31 11:15:42 sebastian Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -56,91 +56,249 @@
ZEND_DECLARE_MODULE_GLOBALS(posix)
static PHP_MINFO_FUNCTION(posix);
+/* {{{ arginfo */
+ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_kill, 0, 0, 2)
+ ZEND_ARG_INFO(0, pid)
+ ZEND_ARG_INFO(0, sig)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_posix_getpid, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_posix_getppid, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_posix_getuid, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_setuid, 0, 0, 1)
+ ZEND_ARG_INFO(0, uid)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_posix_geteuid, 0)
+ZEND_END_ARG_INFO()
+
+#ifdef HAVE_SETEUID
+ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_seteuid, 0, 0, 1)
+ ZEND_ARG_INFO(0, uid)
+ZEND_END_ARG_INFO()
+#endif
+
+ZEND_BEGIN_ARG_INFO(arginfo_posix_getgid, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_setgid, 0, 0, 1)
+ ZEND_ARG_INFO(0, gid)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_posix_getegid, 0)
+ZEND_END_ARG_INFO()
+
+#ifdef HAVE_SETEGID
+ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_setegid, 0, 0, 1)
+ ZEND_ARG_INFO(0, gid)
+ZEND_END_ARG_INFO()
+#endif
+
+#ifdef HAVE_GETGROUPS
+ZEND_BEGIN_ARG_INFO(arginfo_posix_getgroups, 0)
+ZEND_END_ARG_INFO()
+#endif
+
+#ifdef HAVE_GETLOGIN
+ZEND_BEGIN_ARG_INFO(arginfo_posix_getlogin, 0)
+ZEND_END_ARG_INFO()
+#endif
+
+ZEND_BEGIN_ARG_INFO(arginfo_posix_getpgrp, 0)
+ZEND_END_ARG_INFO()
+
+#ifdef HAVE_SETSID
+ZEND_BEGIN_ARG_INFO(arginfo_posix_setsid, 0)
+ZEND_END_ARG_INFO()
+#endif
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_setpgid, 0, 0, 2)
+ ZEND_ARG_INFO(0, pid)
+ ZEND_ARG_INFO(0, pgid)
+ZEND_END_ARG_INFO()
+
+#ifdef HAVE_GETPGID
+ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_getpgid, 0, 0, 1)
+ ZEND_ARG_INFO(0, pid)
+ZEND_END_ARG_INFO()
+#endif
+
+#ifdef HAVE_GETSID
+ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_getsid, 0, 0, 1)
+ ZEND_ARG_INFO(0, pid)
+ZEND_END_ARG_INFO()
+#endif
+
+ZEND_BEGIN_ARG_INFO(arginfo_posix_uname, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_posix_times, 0)
+ZEND_END_ARG_INFO()
+
+#ifdef HAVE_CTERMID
+ZEND_BEGIN_ARG_INFO(arginfo_posix_ctermid, 0)
+ZEND_END_ARG_INFO()
+#endif
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_ttyname, 0, 0, 1)
+ ZEND_ARG_INFO(0, fd)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_isatty, 0, 0, 1)
+ ZEND_ARG_INFO(0, fd)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_posix_getcwd, 0)
+ZEND_END_ARG_INFO()
+
+#ifdef HAVE_MKFIFO
+ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_mkfifo, 0, 0, 2)
+ ZEND_ARG_INFO(0, pathname)
+ ZEND_ARG_INFO(0, mode)
+ZEND_END_ARG_INFO()
+#endif
+
+#ifdef HAVE_MKNOD
+ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_mknod, 0, 0, 2)
+ ZEND_ARG_INFO(0, pathname)
+ ZEND_ARG_INFO(0, mode)
+ ZEND_ARG_INFO(0, major)
+ ZEND_ARG_INFO(0, minor)
+ZEND_END_ARG_INFO()
+#endif
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_access, 0, 0, 1)
+ ZEND_ARG_INFO(0, file)
+ ZEND_ARG_INFO(0, mode)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_getgrnam, 0, 0, 1)
+ ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_getgrgid, 0, 0, 1)
+ ZEND_ARG_INFO(0, gid)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_getpwnam, 0, 0, 1)
+ ZEND_ARG_INFO(0, username)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_getpwuid, 0, 0, 1)
+ ZEND_ARG_INFO(0, uid)
+ZEND_END_ARG_INFO()
+
+#ifdef HAVE_GETRLIMIT
+ZEND_BEGIN_ARG_INFO(arginfo_posix_getrlimit, 0)
+ZEND_END_ARG_INFO()
+#endif
+
+ZEND_BEGIN_ARG_INFO(arginfo_posix_get_last_error, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_strerror, 0, 0, 1)
+ ZEND_ARG_INFO(0, errno)
+ZEND_END_ARG_INFO()
+
+#ifdef HAVE_INITGROUPS
+ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_initgroups, 0, 0, 2)
+ ZEND_ARG_INFO(0, name)
+ ZEND_ARG_INFO(0, base_group_id)
+ZEND_END_ARG_INFO()
+#endif
+/* }}} */
+
/* {{{ posix_functions[]
*/
-zend_function_entry posix_functions[] = {
+const zend_function_entry posix_functions[] = {
/* POSIX.1, 3.3 */
- PHP_FE(posix_kill, NULL)
+ PHP_FE(posix_kill, arginfo_posix_kill)
/* POSIX.1, 4.1 */
- PHP_FE(posix_getpid, NULL)
- PHP_FE(posix_getppid, NULL)
+ PHP_FE(posix_getpid, arginfo_posix_getpid)
+ PHP_FE(posix_getppid, arginfo_posix_getppid)
/* POSIX.1, 4.2 */
- PHP_FE(posix_getuid, NULL)
- PHP_FE(posix_setuid, NULL)
- PHP_FE(posix_geteuid, NULL)
+ PHP_FE(posix_getuid, arginfo_posix_getuid)
+ PHP_FE(posix_setuid, arginfo_posix_setuid)
+ PHP_FE(posix_geteuid, arginfo_posix_geteuid)
#ifdef HAVE_SETEUID
- PHP_FE(posix_seteuid, NULL)
+ PHP_FE(posix_seteuid, arginfo_posix_seteuid)
#endif
- PHP_FE(posix_getgid, NULL)
- PHP_FE(posix_setgid, NULL)
- PHP_FE(posix_getegid, NULL)
+ PHP_FE(posix_getgid, arginfo_posix_getgid)
+ PHP_FE(posix_setgid, arginfo_posix_setgid)
+ PHP_FE(posix_getegid, arginfo_posix_getegid)
#ifdef HAVE_SETEGID
- PHP_FE(posix_setegid, NULL)
+ PHP_FE(posix_setegid, arginfo_posix_setegid)
#endif
#ifdef HAVE_GETGROUPS
- PHP_FE(posix_getgroups, NULL)
+ PHP_FE(posix_getgroups, arginfo_posix_getgroups)
#endif
#ifdef HAVE_GETLOGIN
- PHP_FE(posix_getlogin, NULL)
+ PHP_FE(posix_getlogin, arginfo_posix_getlogin)
#endif
/* POSIX.1, 4.3 */
- PHP_FE(posix_getpgrp, NULL)
+ PHP_FE(posix_getpgrp, arginfo_posix_getpgrp)
#ifdef HAVE_SETSID
- PHP_FE(posix_setsid, NULL)
+ PHP_FE(posix_setsid, arginfo_posix_setsid)
#endif
- PHP_FE(posix_setpgid, NULL)
+ PHP_FE(posix_setpgid, arginfo_posix_setpgid)
/* Non-Posix functions which are common */
#ifdef HAVE_GETPGID
- PHP_FE(posix_getpgid, NULL)
+ PHP_FE(posix_getpgid, arginfo_posix_getpgid)
#endif /* HAVE_GETPGID */
#ifdef HAVE_GETSID
- PHP_FE(posix_getsid, NULL)
+ PHP_FE(posix_getsid, arginfo_posix_getsid)
#endif /* HAVE_GETSID */
/* POSIX.1, 4.4 */
- PHP_FE(posix_uname, NULL)
+ PHP_FE(posix_uname, arginfo_posix_uname)
/* POSIX.1, 4.5 */
- PHP_FE(posix_times, NULL)
+ PHP_FE(posix_times, arginfo_posix_times)
/* POSIX.1, 4.7 */
#ifdef HAVE_CTERMID
- PHP_FE(posix_ctermid, NULL)
+ PHP_FE(posix_ctermid, arginfo_posix_ctermid)
#endif
- PHP_FE(posix_ttyname, NULL)
- PHP_FE(posix_isatty, NULL)
+ PHP_FE(posix_ttyname, arginfo_posix_ttyname)
+ PHP_FE(posix_isatty, arginfo_posix_isatty)
/* POSIX.1, 5.2 */
- PHP_FE(posix_getcwd, NULL)
+ PHP_FE(posix_getcwd, arginfo_posix_getcwd)
/* POSIX.1, 5.4 */
#ifdef HAVE_MKFIFO
- PHP_FE(posix_mkfifo, NULL)
+ PHP_FE(posix_mkfifo, arginfo_posix_mkfifo)
#endif
#ifdef HAVE_MKNOD
- PHP_FE(posix_mknod, NULL)
+ PHP_FE(posix_mknod, arginfo_posix_mknod)
#endif
/* POSIX.1, 5.6 */
- PHP_FE(posix_access, NULL)
+ PHP_FE(posix_access, arginfo_posix_access)
/* POSIX.1, 9.2 */
- PHP_FE(posix_getgrnam, NULL)
- PHP_FE(posix_getgrgid, NULL)
- PHP_FE(posix_getpwnam, NULL)
- PHP_FE(posix_getpwuid, NULL)
+ PHP_FE(posix_getgrnam, arginfo_posix_getgrnam)
+ PHP_FE(posix_getgrgid, arginfo_posix_getgrgid)
+ PHP_FE(posix_getpwnam, arginfo_posix_getpwnam)
+ PHP_FE(posix_getpwuid, arginfo_posix_getpwuid)
#ifdef HAVE_GETRLIMIT
- PHP_FE(posix_getrlimit, NULL)
+ PHP_FE(posix_getrlimit, arginfo_posix_getrlimit)
#endif
- PHP_FE(posix_get_last_error, NULL)
+ PHP_FE(posix_get_last_error, arginfo_posix_get_last_error)
PHP_FALIAS(posix_errno, posix_get_last_error, NULL)
- PHP_FE(posix_strerror, NULL)
+ PHP_FE(posix_strerror, arginfo_posix_strerror)
#ifdef HAVE_INITGROUPS
- PHP_FE(posix_initgroups, NULL)
+ PHP_FE(posix_initgroups, arginfo_posix_initgroups)
#endif
{NULL, NULL, NULL}
@@ -152,15 +310,16 @@ zend_function_entry posix_functions[] = {
static PHP_MINFO_FUNCTION(posix)
{
php_info_print_table_start();
- php_info_print_table_row(2, "Revision", "$Revision: 1.70.2.3.2.22 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.70.2.3.2.16.2.14 $");
php_info_print_table_end();
}
/* }}} */
-static PHP_GINIT_FUNCTION(posix)
+static PHP_GINIT_FUNCTION(posix) /* {{{ */
{
posix_globals->last_error = 0;
}
+/* }}} */
/* {{{ PHP_MINIT_FUNCTION(posix)
*/
@@ -214,7 +373,7 @@ zend_module_entry posix_module_entry = {
ZEND_GET_MODULE(posix)
#endif
-#define PHP_POSIX_NO_ARGS if (ZEND_NUM_ARGS()) WRONG_PARAM_COUNT;
+#define PHP_POSIX_NO_ARGS if (zend_parse_parameters_none() == FAILURE) return;
#define PHP_POSIX_RETURN_LONG_FUNC(func_name) \
PHP_POSIX_NO_ARGS \
@@ -472,6 +631,7 @@ PHP_FUNCTION(posix_uname)
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) && defined(HAVE_UTSNAME_DOMAINNAME)
add_assoc_string(return_value, "domainname", u.domainname, 1);
#endif
@@ -533,7 +693,7 @@ PHP_FUNCTION(posix_ctermid)
/* }}} */
/* Checks if the provides resource is a stream and if it provides a file descriptor */
-static int php_posix_stream_get_fd(zval *zfp, int *fd TSRMLS_DC)
+static int php_posix_stream_get_fd(zval *zfp, int *fd TSRMLS_DC) /* {{{ */
{
php_stream *stream;
@@ -552,6 +712,7 @@ static int php_posix_stream_get_fd(zval *zfp, int *fd TSRMLS_DC)
}
return 1;
}
+/* }}} */
/* {{{ proto string posix_ttyname(int fd)
Determine terminal device name (POSIX.1, 4.7.2) */
@@ -749,7 +910,8 @@ PHP_FUNCTION(posix_mknod)
/* Takes a pointer to posix group and a pointer to an already initialized ZVAL
* array container and fills the array with the posix group member data. */
-int php_posix_group_to_array(struct group *g, zval *array_group) {
+int php_posix_group_to_array(struct group *g, zval *array_group) /* {{{ */
+{
zval *array_members;
int count;
@@ -771,6 +933,7 @@ int php_posix_group_to_array(struct group *g, zval *array_group) {
add_assoc_long(array_group, "gid", g->gr_gid);
return 1;
}
+/* }}} */
/*
POSIX.1, 5.5.1 unlink()
@@ -924,7 +1087,8 @@ PHP_FUNCTION(posix_getgrgid)
}
/* }}} */
-int php_posix_passwd_to_array(struct passwd *pw, zval *return_value) {
+int php_posix_passwd_to_array(struct passwd *pw, zval *return_value) /* {{{ */
+{
if (NULL == pw)
return 0;
if (NULL == return_value || Z_TYPE_P(return_value) != IS_ARRAY)
@@ -939,6 +1103,7 @@ int php_posix_passwd_to_array(struct passwd *pw, zval *return_value) {
add_assoc_string(return_value, "shell", pw->pw_shell, 1);
return 1;
}
+/* }}} */
/* {{{ proto array posix_getpwnam(string groupname)
User database access (POSIX.1, 9.2.2) */
diff --git a/ext/posix/tests/posix_get_last_error_error.phpt b/ext/posix/tests/posix_get_last_error_error.phpt
index 1089b440a..6cf2161d0 100644
--- a/ext/posix/tests/posix_get_last_error_error.phpt
+++ b/ext/posix/tests/posix_get_last_error_error.phpt
@@ -26,6 +26,6 @@ echo "Done";
-- Testing posix_get_last_error() function with one argument --
-Warning: Wrong parameter count for posix_get_last_error() in %s on line %d
+Warning: posix_get_last_error() expects exactly 0 parameters, 1 given in %s on line %d
NULL
Done
diff --git a/ext/posix/tests/posix_getcwd.phpt b/ext/posix/tests/posix_getcwd.phpt
index 478aeccaa..fc5a6d43e 100644
--- a/ext/posix/tests/posix_getcwd.phpt
+++ b/ext/posix/tests/posix_getcwd.phpt
@@ -15,5 +15,5 @@ var_dump(posix_getcwd(1));
--EXPECTF--
string(%d) "%s"
-Warning: Wrong parameter count for posix_getcwd() in %s on line %d
+Warning: posix_getcwd() expects exactly 0 parameters, 1 given in %s on line %d
NULL
diff --git a/ext/posix/tests/posix_getgid_error.phpt b/ext/posix/tests/posix_getgid_error.phpt
index 8c1a4ec1e..bcd7a2fbd 100644
--- a/ext/posix/tests/posix_getgid_error.phpt
+++ b/ext/posix/tests/posix_getgid_error.phpt
@@ -26,6 +26,6 @@ echo "Done";
-- Testing posix_getgid() function with one argument --
-Warning: Wrong parameter count for posix_getgid() in %s on line %d
+Warning: posix_getgid() expects exactly 0 parameters, 1 given in %s on line %d
NULL
Done
diff --git a/ext/posix/tests/posix_getpgrp_error.phpt b/ext/posix/tests/posix_getpgrp_error.phpt
index e3c071dd6..97f47ce8c 100644
--- a/ext/posix/tests/posix_getpgrp_error.phpt
+++ b/ext/posix/tests/posix_getpgrp_error.phpt
@@ -26,6 +26,6 @@ echo "Done";
-- Testing posix_getpgrp() function with one argument --
-Warning: Wrong parameter count for posix_getpgrp() in %s on line %d
+Warning: posix_getpgrp() expects exactly 0 parameters, 1 given in %s on line %d
NULL
Done
diff --git a/ext/posix/tests/posix_getpid_error.phpt b/ext/posix/tests/posix_getpid_error.phpt
index 460cc4254..721bf6699 100644
--- a/ext/posix/tests/posix_getpid_error.phpt
+++ b/ext/posix/tests/posix_getpid_error.phpt
@@ -26,6 +26,6 @@ echo "Done";
-- Testing posix_getpid() function with one argument --
-Warning: Wrong parameter count for posix_getpid() in %s on line %d
+Warning: posix_getpid() expects exactly 0 parameters, 1 given in %s on line %d
NULL
Done
diff --git a/ext/posix/tests/posix_getppid_error.phpt b/ext/posix/tests/posix_getppid_error.phpt
index 26426ac6a..366c1ed8d 100644
--- a/ext/posix/tests/posix_getppid_error.phpt
+++ b/ext/posix/tests/posix_getppid_error.phpt
@@ -26,6 +26,6 @@ echo "Done";
-- Testing posix_getppid() function with one argument --
-Warning: Wrong parameter count for posix_getppid() in %s on line %d
+Warning: posix_getppid() expects exactly 0 parameters, 1 given in %s on line %d
NULL
Done
diff --git a/ext/posix/tests/posix_getuid_error.phpt b/ext/posix/tests/posix_getuid_error.phpt
index 44c0b945b..e759e68bf 100644
--- a/ext/posix/tests/posix_getuid_error.phpt
+++ b/ext/posix/tests/posix_getuid_error.phpt
@@ -26,6 +26,6 @@ echo "Done";
-- Testing posix_getuid() function with one argument --
-Warning: Wrong parameter count for posix_getuid() in %s on line %d
+Warning: posix_getuid() expects exactly 0 parameters, 1 given in %s on line %d
NULL
Done
diff --git a/ext/posix/tests/posix_strerror_error.phpt b/ext/posix/tests/posix_strerror_error.phpt
index d9b615963..3803f465b 100644
--- a/ext/posix/tests/posix_strerror_error.phpt
+++ b/ext/posix/tests/posix_strerror_error.phpt
@@ -24,7 +24,7 @@ var_dump( posix_strerror($errno, $extra_arg) );
echo "\n-- Testing posix_strerror() function with invalid error number --\n";
$errno = -999;
-echo gettype(posix_strerror($errno))."\n";
+echo gettype( posix_strerror($errno) )."\n";
echo "Done";
?>
diff --git a/ext/posix/tests/posix_strerror_variation1.phpt b/ext/posix/tests/posix_strerror_variation1.phpt
index d49342b21..5d6e35453 100644
--- a/ext/posix/tests/posix_strerror_variation1.phpt
+++ b/ext/posix/tests/posix_strerror_variation1.phpt
@@ -69,7 +69,7 @@ $values = array(
foreach($values as $value) {
echo "\nArg value $value \n";
- echo gettype(posix_strerror($value))."\n";
+ echo gettype( posix_strerror($value) )."\n";
};
echo "Done";
diff --git a/ext/posix/tests/posix_times_error.phpt b/ext/posix/tests/posix_times_error.phpt
index 79b1f797c..2766bc948 100644
--- a/ext/posix/tests/posix_times_error.phpt
+++ b/ext/posix/tests/posix_times_error.phpt
@@ -26,6 +26,6 @@ echo "Done";
-- Testing posix_times() function with one argument --
-Warning: Wrong parameter count for posix_times() in %s on line %d
+Warning: posix_times() expects exactly 0 parameters, 1 given in %s on line %d
NULL
Done
diff --git a/ext/posix/tests/posix_uname_error.phpt b/ext/posix/tests/posix_uname_error.phpt
index df531734f..4c753feae 100644
--- a/ext/posix/tests/posix_uname_error.phpt
+++ b/ext/posix/tests/posix_uname_error.phpt
@@ -26,6 +26,6 @@ echo "Done";
-- Testing posix_uname() function with one argument --
-Warning: Wrong parameter count for posix_uname() in %s on line %d
+Warning: posix_uname() expects exactly 0 parameters, 1 given in %s on line %d
NULL
Done