]> granicus.if.org Git - php/commitdiff
fix Win32 & Netware build
authorAntony Dovgal <tony2001@php.net>
Thu, 28 Oct 2004 05:05:57 +0000 (05:05 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 28 Oct 2004 05:05:57 +0000 (05:05 +0000)
ext/standard/file.c

index 58a9a3158ab23c5816c5834879f4699b381b9b26..f3e18afe4d18dc23fa64e2b6d55031a3bbbf2a29 100644 (file)
@@ -1917,6 +1917,7 @@ PHP_FUNCTION(rename)
                        struct stat sb;
                        if (php_copy_file(old_name, new_name TSRMLS_CC) == SUCCESS) {
                                if (VCWD_STAT(old_name, &sb) == 0) {
+#if !defined(TSRM_WIN32) && !defined(NETWARE)
                                        if (VCWD_CHMOD(new_name, sb.st_mode)) {
                                                if (errno == EPERM) {
                                                        php_error_docref2(NULL TSRMLS_CC, old_name, new_name, E_WARNING, "%s", strerror(errno));
@@ -1935,6 +1936,7 @@ PHP_FUNCTION(rename)
                                                php_error_docref2(NULL TSRMLS_CC, old_name, new_name, E_WARNING, "%s", strerror(errno));
                                                RETURN_FALSE;
                                        }
+#endif
                                        VCWD_UNLINK(old_name);
                                        RETURN_TRUE;
                                }