From 4ef13f544484fa813dbdd4e91b1bd4e097467414 Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Wed, 26 Oct 2016 18:03:30 +0100 Subject: [PATCH] Add UV::S_* constant equivalents for Windows --- uv.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/uv.c b/uv.c index 5824d1f..33dfdd9 100755 --- a/uv.c +++ b/uv.c @@ -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);