Add UV::S_* constant equivalents for Windows

This commit is contained in:
Chris Wright 2016-10-26 18:03:30 +01:00
parent 36ecc7d92a
commit 4ef13f5444

13
uv.c
View File

@ -125,6 +125,19 @@ static int php_uv_class_init(TSRMLS_D)
#endif
#else
zend_declare_class_constant_long(uv_class_entry, "S_IRWXU", sizeof("S_IRWXU")-1, _S_IWRITE | _S_IREAD TSRMLS_CC);
zend_declare_class_constant_long(uv_class_entry, "S_IRUSR", sizeof("S_IRUSR")-1, _S_IREAD TSRMLS_CC);
zend_declare_class_constant_long(uv_class_entry, "S_IWUSR", sizeof("S_IWUSR")-1, _S_IWRITE TSRMLS_CC);
zend_declare_class_constant_long(uv_class_entry, "S_IXUSR", sizeof("S_IXUSR")-1, 0 TSRMLS_CC);
zend_declare_class_constant_long(uv_class_entry, "S_IRWXG", sizeof("S_IRWXG")-1, _S_IWRITE | _S_IREAD TSRMLS_CC);
zend_declare_class_constant_long(uv_class_entry, "S_IRGRP", sizeof("S_IRGRP")-1, _S_IREAD TSRMLS_CC);
zend_declare_class_constant_long(uv_class_entry, "S_IWGRP", sizeof("S_IWGRP")-1, _S_IWRITE TSRMLS_CC);
zend_declare_class_constant_long(uv_class_entry, "S_IXGRP", sizeof("S_IXGRP")-1, 0 TSRMLS_CC);
zend_declare_class_constant_long(uv_class_entry, "S_IRWXO", sizeof("S_IRWXO")-1, _S_IWRITE | _S_IREAD TSRMLS_CC);
zend_declare_class_constant_long(uv_class_entry, "S_IROTH", sizeof("S_IROTH")-1, _S_IREAD TSRMLS_CC);
zend_declare_class_constant_long(uv_class_entry, "S_IWOTH", sizeof("S_IWOTH")-1, _S_IWRITE TSRMLS_CC);
zend_declare_class_constant_long(uv_class_entry, "S_IXOTH", sizeof("S_IXOTH")-1, 0 TSRMLS_CC);
/* Windows Signal Constants */
zend_declare_class_constant_long(uv_class_entry, "SIGBREAK", sizeof("SIGBREAK")-1, (long) SIGBREAK TSRMLS_CC);
zend_declare_class_constant_long(uv_class_entry, "SIGINT", sizeof("SIGINT")-1, (long) SIGINT TSRMLS_CC);