diff options
Diffstat (limited to 'ext/dio/dio.c')
| -rw-r--r-- | ext/dio/dio.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ext/dio/dio.c b/ext/dio/dio.c index 5c5282626c..851fc40e91 100644 --- a/ext/dio/dio.c +++ b/ext/dio/dio.c @@ -146,8 +146,8 @@ PHP_FUNCTION(dio_open) php_fd_t *f; char *file_name; int file_name_length; - int flags; - mode_t mode = 0; + long flags; + long mode = 0; int fd; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|l", &file_name, &file_name_length, &flags, &mode) == FAILURE) { @@ -177,7 +177,7 @@ PHP_FUNCTION(dio_read) zval *r_fd; php_fd_t *f; char *data; - int bytes = 1024; + long bytes = 1024; ssize_t res; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &r_fd, &bytes) == FAILURE) { @@ -206,8 +206,8 @@ PHP_FUNCTION(dio_write) zval *r_fd; php_fd_t *f; char *data; - size_t data_len; - size_t trunc_len = 0; + int data_len; + long trunc_len = 0; ssize_t res; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|l", &r_fd, &data, &data_len, &trunc_len) == FAILURE) { @@ -230,7 +230,7 @@ PHP_FUNCTION(dio_truncate) { zval *r_fd; php_fd_t *f; - off_t offset; + long offset; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &r_fd, &offset) == FAILURE) { return; @@ -289,8 +289,8 @@ PHP_FUNCTION(dio_seek) { zval *r_fd; php_fd_t *f; - off_t offset; - int whence = SEEK_SET; + long offset; + long whence = SEEK_SET; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|l", &r_fd, &offset, &whence) == FAILURE) { return; @@ -308,7 +308,7 @@ PHP_FUNCTION(dio_fcntl) zval *r_fd; zval *arg = NULL; php_fd_t *f; - int cmd; + long cmd; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|z", &r_fd, &cmd, &arg) == FAILURE) { return; |
