Skip to content

Replace WINDOWS with PHP_WIN32 in ext/standard/filestat.c #14464

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions ext/standard/filestat.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ PHP_RSHUTDOWN_FUNCTION(filestat) /* {{{ */
/* }}} */

static zend_result php_disk_total_space(char *path, double *space) /* {{{ */
#if defined(WINDOWS) /* {{{ */
#if defined(PHP_WIN32) /* {{{ */
{
ULARGE_INTEGER FreeBytesAvailableToCaller;
ULARGE_INTEGER TotalNumberOfBytes;
Expand All @@ -128,7 +128,7 @@ static zend_result php_disk_total_space(char *path, double *space) /* {{{ */
return SUCCESS;
}
/* }}} */
#else /* {{{ if !defined(WINDOWS) */
#else /* {{{ if !defined(PHP_WIN32) */
{
double bytestotal = 0;
#if defined(HAVE_SYS_STATVFS_H) && defined(HAVE_STATVFS)
Expand Down Expand Up @@ -190,7 +190,7 @@ PHP_FUNCTION(disk_total_space)
/* }}} */

static zend_result php_disk_free_space(char *path, double *space) /* {{{ */
#if defined(WINDOWS) /* {{{ */
#if defined(PHP_WIN32) /* {{{ */
{
ULARGE_INTEGER FreeBytesAvailableToCaller;
ULARGE_INTEGER TotalNumberOfBytes;
Expand All @@ -211,7 +211,7 @@ static zend_result php_disk_free_space(char *path, double *space) /* {{{ */

return SUCCESS;
}
#else /* {{{ if !defined(WINDOWS) */
#else /* {{{ if !defined(PHP_WIN32) */
{
double bytesfree = 0;
#if defined(HAVE_SYS_STATVFS_H) && defined(HAVE_STATVFS)
Expand Down Expand Up @@ -309,7 +309,7 @@ static void php_do_chgrp(INTERNAL_FUNCTION_PARAMETERS, int do_lchgrp) /* {{{ */
size_t filename_len;
zend_string *group_str;
zend_long group_long;
#if !defined(WINDOWS)
#if !defined(PHP_WIN32)
gid_t gid;
int ret;
#endif
Expand Down Expand Up @@ -339,15 +339,15 @@ static void php_do_chgrp(INTERNAL_FUNCTION_PARAMETERS, int do_lchgrp) /* {{{ */
RETURN_FALSE;
}
} else {
#ifndef WINDOWS
#ifndef PHP_WIN32
/* On Windows, we expect regular chgrp to fail silently by default */
php_error_docref(NULL, E_WARNING, "Cannot call chgrp() for a non-standard stream");
#endif
RETURN_FALSE;
}
}

#ifdef WINDOWS
#ifdef PHP_WIN32
/* We have no native chgrp on Windows, nothing left to do if stream doesn't have own implementation */
RETURN_FALSE;
#else
Expand Down Expand Up @@ -435,7 +435,7 @@ static void php_do_chown(INTERNAL_FUNCTION_PARAMETERS, int do_lchown) /* {{{ */
size_t filename_len;
zend_string *user_str;
zend_long user_long;
#if !defined(WINDOWS)
#if !defined(PHP_WIN32)
uid_t uid;
int ret;
#endif
Expand Down Expand Up @@ -465,15 +465,15 @@ static void php_do_chown(INTERNAL_FUNCTION_PARAMETERS, int do_lchown) /* {{{ */
RETURN_FALSE;
}
} else {
#ifndef WINDOWS
#ifndef PHP_WIN32
/* On Windows, we expect regular chown to fail silently by default */
php_error_docref(NULL, E_WARNING, "Cannot call chown() for a non-standard stream");
#endif
RETURN_FALSE;
}
}

#ifdef WINDOWS
#ifdef PHP_WIN32
/* We have no native chown on Windows, nothing left to do if stream doesn't have own implementation */
RETURN_FALSE;
#else
Expand Down
Loading