Merge pull request #29 from csaoh/fix_constants

Added missing constants
This commit is contained in:
Shuhei Tanuma 2013-01-31 13:57:36 -08:00
commit 767eb7f430
2 changed files with 8 additions and 0 deletions

View File

@ -39,6 +39,12 @@ if (!defined("UV::S_IRWXU")) {
if (!defined("UV::S_IRUSR")) {
echo "FAILED UV::S_IRUSR" . PHP_EOL;
}
if (!defined("UV::S_IWUSR")) {
echo "FAILED UV::S_IWUSR" . PHP_EOL;
}
if (!defined("UV::S_IXUSR")) {
echo "FAILED UV::S_IXUSR" . PHP_EOL;
}
if (!defined("UV::S_IRWXG")) {
echo "FAILED UV::S_IRWXG" . PHP_EOL;
}

2
uv.c
View File

@ -52,6 +52,8 @@ static int php_uv_class_init(TSRMLS_D)
zend_declare_class_constant_long(uv_class_entry, "S_IRWXU", sizeof("S_IRWXU")-1, S_IRWXU TSRMLS_CC);
zend_declare_class_constant_long(uv_class_entry, "S_IRUSR", sizeof("S_IRUSR")-1, S_IRUSR TSRMLS_CC);
zend_declare_class_constant_long(uv_class_entry, "S_IWUSR", sizeof("S_IWUSR")-1, S_IWUSR TSRMLS_CC);
zend_declare_class_constant_long(uv_class_entry, "S_IXUSR", sizeof("S_IXUSR")-1, S_IXUSR TSRMLS_CC);
zend_declare_class_constant_long(uv_class_entry, "S_IRWXG", sizeof("S_IRWXG")-1, S_IRWXG TSRMLS_CC);
zend_declare_class_constant_long(uv_class_entry, "S_IRGRP", sizeof("S_IRGRP")-1, S_IRWXG TSRMLS_CC);
zend_declare_class_constant_long(uv_class_entry, "S_IWGRP", sizeof("S_IWGRP")-1, S_IWGRP TSRMLS_CC);