Skip to content

Commit 58f3b67

Browse files
authored
Replace WINDOWS with PHP_WIN32 in ext/standard/filestat.c (#14464)
The WINDOWS symbol is project defined symbol in most cases and can be replaced with PHP_WIN32 in this case at this point.
1 parent 271f911 commit 58f3b67

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

ext/standard/filestat.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ PHP_RSHUTDOWN_FUNCTION(filestat) /* {{{ */
105105
/* }}} */
106106

107107
static zend_result php_disk_total_space(char *path, double *space) /* {{{ */
108-
#if defined(WINDOWS) /* {{{ */
108+
#if defined(PHP_WIN32) /* {{{ */
109109
{
110110
ULARGE_INTEGER FreeBytesAvailableToCaller;
111111
ULARGE_INTEGER TotalNumberOfBytes;
@@ -128,7 +128,7 @@ static zend_result php_disk_total_space(char *path, double *space) /* {{{ */
128128
return SUCCESS;
129129
}
130130
/* }}} */
131-
#else /* {{{ if !defined(WINDOWS) */
131+
#else /* {{{ if !defined(PHP_WIN32) */
132132
{
133133
double bytestotal = 0;
134134
#if defined(HAVE_SYS_STATVFS_H) && defined(HAVE_STATVFS)
@@ -190,7 +190,7 @@ PHP_FUNCTION(disk_total_space)
190190
/* }}} */
191191

192192
static zend_result php_disk_free_space(char *path, double *space) /* {{{ */
193-
#if defined(WINDOWS) /* {{{ */
193+
#if defined(PHP_WIN32) /* {{{ */
194194
{
195195
ULARGE_INTEGER FreeBytesAvailableToCaller;
196196
ULARGE_INTEGER TotalNumberOfBytes;
@@ -211,7 +211,7 @@ static zend_result php_disk_free_space(char *path, double *space) /* {{{ */
211211

212212
return SUCCESS;
213213
}
214-
#else /* {{{ if !defined(WINDOWS) */
214+
#else /* {{{ if !defined(PHP_WIN32) */
215215
{
216216
double bytesfree = 0;
217217
#if defined(HAVE_SYS_STATVFS_H) && defined(HAVE_STATVFS)
@@ -309,7 +309,7 @@ static void php_do_chgrp(INTERNAL_FUNCTION_PARAMETERS, int do_lchgrp) /* {{{ */
309309
size_t filename_len;
310310
zend_string *group_str;
311311
zend_long group_long;
312-
#if !defined(WINDOWS)
312+
#if !defined(PHP_WIN32)
313313
gid_t gid;
314314
int ret;
315315
#endif
@@ -339,15 +339,15 @@ static void php_do_chgrp(INTERNAL_FUNCTION_PARAMETERS, int do_lchgrp) /* {{{ */
339339
RETURN_FALSE;
340340
}
341341
} else {
342-
#ifndef WINDOWS
342+
#ifndef PHP_WIN32
343343
/* On Windows, we expect regular chgrp to fail silently by default */
344344
php_error_docref(NULL, E_WARNING, "Cannot call chgrp() for a non-standard stream");
345345
#endif
346346
RETURN_FALSE;
347347
}
348348
}
349349

350-
#ifdef WINDOWS
350+
#ifdef PHP_WIN32
351351
/* We have no native chgrp on Windows, nothing left to do if stream doesn't have own implementation */
352352
RETURN_FALSE;
353353
#else
@@ -435,7 +435,7 @@ static void php_do_chown(INTERNAL_FUNCTION_PARAMETERS, int do_lchown) /* {{{ */
435435
size_t filename_len;
436436
zend_string *user_str;
437437
zend_long user_long;
438-
#if !defined(WINDOWS)
438+
#if !defined(PHP_WIN32)
439439
uid_t uid;
440440
int ret;
441441
#endif
@@ -465,15 +465,15 @@ static void php_do_chown(INTERNAL_FUNCTION_PARAMETERS, int do_lchown) /* {{{ */
465465
RETURN_FALSE;
466466
}
467467
} else {
468-
#ifndef WINDOWS
468+
#ifndef PHP_WIN32
469469
/* On Windows, we expect regular chown to fail silently by default */
470470
php_error_docref(NULL, E_WARNING, "Cannot call chown() for a non-standard stream");
471471
#endif
472472
RETURN_FALSE;
473473
}
474474
}
475475

476-
#ifdef WINDOWS
476+
#ifdef PHP_WIN32
477477
/* We have no native chown on Windows, nothing left to do if stream doesn't have own implementation */
478478
RETURN_FALSE;
479479
#else

0 commit comments

Comments
 (0)