cvs: php4 /ext/standard file.c
| From: | jim winstead | Date: | Mon, 06 May 2002 17:31:23 +0000 |
| Subject: | cvs: php4 /ext/standard file.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-11723@lists.php.net to get a copy of this message | ||
jimw Mon May 6 13:31:23 2002 EDT
Modified files:
/php4/ext/standard file.c
Log:
fix problem with mkdir() on freebsd
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.227 php4/ext/standard/file.c:1.228
--- php4/ext/standard/file.c:1.227 Sat May 4 13:12:26 2002
+++ php4/ext/standard/file.c Mon May 6 13:31:22 2002
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: file.c,v 1.227 2002/05/04 17:12:26 sas Exp $ */
+/* $Id: file.c,v 1.228 2002/05/06 17:31:22 jimw Exp $ */
/* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
@@ -1496,7 +1496,7 @@
PHP_FUNCTION(mkdir)
{
int dir_len, ret;
- mode_t mode = 0777;
+ long mode = 0777;
char *dir;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &dir, &dir_len,
&mode) == FAILURE) {
@@ -1511,7 +1511,7 @@
RETURN_FALSE;
}
- ret = VCWD_MKDIR(dir, mode);
+ ret = VCWD_MKDIR(dir, (mode_t)mode);
if (ret < 0) {
php_error(E_WARNING, "mkdir() failed (%s)", strerror(errno));
RETURN_FALSE;