[PHP-CVS] cvs: php-src(PHP_5_3) /ext/posix posix.c
felipe Mon Jun 23 16:41:00 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/posix posix.c Log: - Added arginfo http://cvs.php.net/viewvc.cgi/php-src/ext/posix/posix.c?r1=1.70.2.3.2.16.2.7r2=1.70.2.3.2.16.2.8diff_format=u Index: php-src/ext/posix/posix.c diff -u php-src/ext/posix/posix.c:1.70.2.3.2.16.2.7 php-src/ext/posix/posix.c:1.70.2.3.2.16.2.8 --- php-src/ext/posix/posix.c:1.70.2.3.2.16.2.7 Sun Jun 22 21:45:42 2008 +++ php-src/ext/posix/posix.c Mon Jun 23 16:41:00 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: posix.c,v 1.70.2.3.2.16.2.7 2008/06/22 21:45:42 felipe Exp $ */ +/* $Id: posix.c,v 1.70.2.3.2.16.2.8 2008/06/23 16:41:00 felipe Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -56,91 +56,283 @@ ZEND_DECLARE_MODULE_GLOBALS(posix) static PHP_MINFO_FUNCTION(posix); +/* {{{ arginfo */ +static +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() + +static +ZEND_BEGIN_ARG_INFO(arginfo_posix_getpid, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_posix_getppid, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_posix_getuid, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_setuid, 0, 0, 1) + ZEND_ARG_INFO(0, uid) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_posix_geteuid, 0) +ZEND_END_ARG_INFO() + +#ifdef HAVE_SETEUID +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_seteuid, 0, 0, 1) + ZEND_ARG_INFO(0, uid) +ZEND_END_ARG_INFO() +#endif + +static +ZEND_BEGIN_ARG_INFO(arginfo_posix_getgid, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_setgid, 0, 0, 1) + ZEND_ARG_INFO(0, gid) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_posix_getegid, 0) +ZEND_END_ARG_INFO() + +#ifdef HAVE_SETEGID +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_setegid, 0, 0, 1) + ZEND_ARG_INFO(0, gid) +ZEND_END_ARG_INFO() +#endif + +#ifdef HAVE_GETGROUPS +static +ZEND_BEGIN_ARG_INFO(arginfo_posix_getgroups, 0) +ZEND_END_ARG_INFO() +#endif + +#ifdef HAVE_GETLOGIN +static +ZEND_BEGIN_ARG_INFO(arginfo_posix_getlogin, 0) +ZEND_END_ARG_INFO() +#endif + +static +ZEND_BEGIN_ARG_INFO(arginfo_posix_getpgrp, 0) +ZEND_END_ARG_INFO() + +#ifdef HAVE_SETSID +static +ZEND_BEGIN_ARG_INFO(arginfo_posix_setsid, 0) +ZEND_END_ARG_INFO() +#endif + +static +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 +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_getpgid, 0, 0, 1) + ZEND_ARG_INFO(0, pid) +ZEND_END_ARG_INFO() +#endif + +#ifdef HAVE_GETSID +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_getsid, 0, 0, 1) + ZEND_ARG_INFO(0, pid) +ZEND_END_ARG_INFO() +#endif + +static +ZEND_BEGIN_ARG_INFO(arginfo_posix_uname, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_posix_times, 0) +ZEND_END_ARG_INFO() + +#ifdef HAVE_CTERMID +static +ZEND_BEGIN_ARG_INFO(arginfo_posix_ctermid, 0) +ZEND_END_ARG_INFO() +#endif + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_ttyname, 0, 0, 1) + ZEND_ARG_INFO(0, fd) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_isatty, 0, 0, 1) + ZEND_ARG_INFO(0, fd) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_posix_getcwd, 0) +ZEND_END_ARG_INFO() + +#ifdef HAVE_MKFIFO +static +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 +static +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 + +static +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() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_getgrnam, 0, 0, 1) + ZEND_ARG_INFO(0, name) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_getgrgid, 0, 0, 1) + ZEND_ARG_INFO(0, gid) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_getpwnam, 0, 0, 1) + ZEND_ARG_INFO(0, username) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_getpwuid, 0, 0, 1) + ZEND_ARG_INFO(0, uid) +ZEND_END_ARG_INFO() + +#ifdef HAVE_GETRLIMIT +static +ZEND_BEGIN_ARG_INFO(arginfo_posix_getrlimit, 0) +ZEND_END_ARG_INFO() +#endif + +static +ZEND_BEGIN_ARG_INFO(arginfo_posix_get_last_error, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_strerror, 0, 0, 1) + ZEND_ARG_INFO(0, errno) +ZEND_END_ARG_INFO() + +#ifdef HAVE_INITGROUPS +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_posix_initgroups, 0, 0, 2) + ZEND_ARG_INFO(0, name) + ZEND_ARG_INFO(0, base_group_id)
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/posix posix.c /ext/tokenizer tokenizer.c
felipe Mon Jun 23 17:28:06 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/tokenizer tokenizer.c /php-src/ext/posix posix.c Log: - Fixed folding http://cvs.php.net/viewvc.cgi/php-src/ext/tokenizer/tokenizer.c?r1=1.31.2.5.2.7.2.6r2=1.31.2.5.2.7.2.7diff_format=u Index: php-src/ext/tokenizer/tokenizer.c diff -u php-src/ext/tokenizer/tokenizer.c:1.31.2.5.2.7.2.6 php-src/ext/tokenizer/tokenizer.c:1.31.2.5.2.7.2.7 --- php-src/ext/tokenizer/tokenizer.c:1.31.2.5.2.7.2.6 Mon Jun 23 17:17:46 2008 +++ php-src/ext/tokenizer/tokenizer.c Mon Jun 23 17:28:06 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: tokenizer.c,v 1.31.2.5.2.7.2.6 2008/06/23 17:17:46 felipe Exp $ */ +/* $Id: tokenizer.c,v 1.31.2.5.2.7.2.7 2008/06/23 17:28:06 felipe Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -45,7 +45,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_token_name, 0, 0, 1) ZEND_ARG_INFO(0, token) ZEND_END_ARG_INFO() - +/* }}} */ /* {{{ tokenizer_functions[] * http://cvs.php.net/viewvc.cgi/php-src/ext/posix/posix.c?r1=1.70.2.3.2.16.2.8r2=1.70.2.3.2.16.2.9diff_format=u Index: php-src/ext/posix/posix.c diff -u php-src/ext/posix/posix.c:1.70.2.3.2.16.2.8 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.8 Mon Jun 23 16:41:00 2008 +++ php-src/ext/posix/posix.c Mon Jun 23 17:28:06 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: posix.c,v 1.70.2.3.2.16.2.8 2008/06/23 16:41:00 felipe Exp $ */ +/* $Id: posix.c,v 1.70.2.3.2.16.2.9 2008/06/23 17:28:06 felipe Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -247,6 +247,7 @@ ZEND_ARG_INFO(0, base_group_id) ZEND_END_ARG_INFO() #endif +/* }}} */ /* {{{ posix_functions[] */ @@ -344,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.8 $); + php_info_print_table_row(2, Revision, $Revision: 1.70.2.3.2.16.2.9 $); php_info_print_table_end(); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/posix posix.c
felipe Sun Jun 22 21:45:42 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/posix posix.c Log: - Fix build where __USE_GNU is used instead of _GNU_SOURCE to define utsname.domainname http://cvs.php.net/viewvc.cgi/php-src/ext/posix/posix.c?r1=1.70.2.3.2.16.2.6r2=1.70.2.3.2.16.2.7diff_format=u Index: php-src/ext/posix/posix.c diff -u php-src/ext/posix/posix.c:1.70.2.3.2.16.2.6 php-src/ext/posix/posix.c:1.70.2.3.2.16.2.7 --- php-src/ext/posix/posix.c:1.70.2.3.2.16.2.6 Mon May 5 21:26:46 2008 +++ php-src/ext/posix/posix.c Sun Jun 22 21:45:42 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: posix.c,v 1.70.2.3.2.16.2.6 2008/05/05 21:26:46 rasmus Exp $ */ +/* $Id: posix.c,v 1.70.2.3.2.16.2.7 2008/06/22 21:45:42 felipe Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -36,6 +36,11 @@ #endif #include sys/resource.h + +#if defined(_GNU_SOURCE) !defined(__USE_GNU) +# define __USE_GNU +#endif + #include sys/utsname.h #include sys/types.h #include sys/stat.h @@ -147,7 +152,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.6 $); + php_info_print_table_row(2, Revision, $Revision: 1.70.2.3.2.16.2.7 $); php_info_print_table_end(); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/posix posix.c
rasmus Mon May 5 21:26:47 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/posix posix.c Log: There is no domainname element in utsname on OSX http://cvs.php.net/viewvc.cgi/php-src/ext/posix/posix.c?r1=1.70.2.3.2.16.2.5r2=1.70.2.3.2.16.2.6diff_format=u Index: php-src/ext/posix/posix.c diff -u php-src/ext/posix/posix.c:1.70.2.3.2.16.2.5 php-src/ext/posix/posix.c:1.70.2.3.2.16.2.6 --- php-src/ext/posix/posix.c:1.70.2.3.2.16.2.5 Sun May 4 09:34:16 2008 +++ php-src/ext/posix/posix.c Mon May 5 21:26:46 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: posix.c,v 1.70.2.3.2.16.2.5 2008/05/04 09:34:16 tony2001 Exp $ */ +/* $Id: posix.c,v 1.70.2.3.2.16.2.6 2008/05/05 21:26:46 rasmus Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -147,7 +147,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.5 $); + php_info_print_table_row(2, Revision, $Revision: 1.70.2.3.2.16.2.6 $); php_info_print_table_end(); } /* }}} */ @@ -468,7 +468,8 @@ 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 _GNU_SOURCE + +#if defined(_GNU_SOURCE) !defined(DARWIN) 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
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/posix posix.c
tony2001Sun May 4 09:34:16 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/posix posix.c Log: MFH: fix folding http://cvs.php.net/viewvc.cgi/php-src/ext/posix/posix.c?r1=1.70.2.3.2.16.2.4r2=1.70.2.3.2.16.2.5diff_format=u Index: php-src/ext/posix/posix.c diff -u php-src/ext/posix/posix.c:1.70.2.3.2.16.2.4 php-src/ext/posix/posix.c:1.70.2.3.2.16.2.5 --- php-src/ext/posix/posix.c:1.70.2.3.2.16.2.4 Fri Apr 11 11:00:03 2008 +++ php-src/ext/posix/posix.c Sun May 4 09:34:16 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: posix.c,v 1.70.2.3.2.16.2.4 2008/04/11 11:00:03 tony2001 Exp $ */ +/* $Id: posix.c,v 1.70.2.3.2.16.2.5 2008/05/04 09:34:16 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -147,15 +147,16 @@ 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.4 $); + php_info_print_table_row(2, Revision, $Revision: 1.70.2.3.2.16.2.5 $); php_info_print_table_end(); } /* }}} */ -static PHP_GINIT_FUNCTION(posix) +static PHP_GINIT_FUNCTION(posix) /* {{{ */ { posix_globals-last_error = 0; } +/* }}} */ /* {{{ PHP_MINIT_FUNCTION(posix) */ @@ -528,7 +529,7 @@ /* }}} */ /* 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; @@ -547,6 +548,7 @@ } return 1; } +/* }}} */ /* {{{ proto string posix_ttyname(int fd) Determine terminal device name (POSIX.1, 4.7.2) */ @@ -744,7 +746,8 @@ /* 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; @@ -766,6 +769,7 @@ add_assoc_long(array_group, gid, g-gr_gid); return 1; } +/* }}} */ /* POSIX.1, 5.5.1 unlink() @@ -919,7 +923,8 @@ } /* }}} */ -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) @@ -934,6 +939,7 @@ 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) */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php