Skip to content

Commit 4bebcb8

Browse files
committed
Fixed condition check
1 parent 66411ee commit 4bebcb8

File tree

16 files changed

+23
-23
lines changed

16 files changed

+23
-23
lines changed

ext/bcmath/libbcmath/src/config.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if PHP_WIN32
1+
#ifdef PHP_WIN32
22
#include "../../../../main/config.w32.h"
33
#else
44
#include <php_config.h>

ext/gd/gdcache.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#include "php.h"
4040

4141
/* This just seems unessacary */
42-
#if PHP_WIN32
42+
#ifdef PHP_WIN32
4343
#define ENABLE_GD_TTF
4444
#else
4545
#include <php_config.h>

ext/mcrypt/mcrypt.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
#if HAVE_LIBMCRYPT
2828

29-
#if PHP_WIN32
29+
#ifdef PHP_WIN32
3030
# include "win32/winutil.h"
3131
#endif
3232

@@ -1376,7 +1376,7 @@ PHP_FUNCTION(mcrypt_create_iv)
13761376
iv = ecalloc(size + 1, 1);
13771377

13781378
if (source == RANDOM || source == URANDOM) {
1379-
#if PHP_WIN32
1379+
#ifdef PHP_WIN32
13801380
/* random/urandom equivalent on Windows */
13811381
BYTE *iv_b = (BYTE *) iv;
13821382
if (php_win32_get_random_bytes(iv_b, (size_t) size) == FAILURE){

ext/sockets/multicast.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ static int _php_source_op_to_ipv4_op(enum source_op sop)
627627

628628
#endif /* HAS_MCAST_EXT */
629629

630-
#if PHP_WIN32
630+
#ifdef PHP_WIN32
631631
int php_if_index_to_addr4(unsigned if_index, php_socket *php_sock, struct in_addr *out_addr)
632632
{
633633
MIB_IPADDRTABLE *addr_table;

ext/standard/crypt_freesec.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#ifndef _CRYPT_FREESEC_H
44
#define _CRYPT_FREESEC_H
55

6-
#if PHP_WIN32
6+
#ifdef PHP_WIN32
77
# ifndef inline
88
# define inline __inline
99
# endif

ext/standard/crypt_sha256.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ struct sha256_ctx {
6868
char buffer[128]; /* NB: always correctly aligned for uint32_t. */
6969
};
7070

71-
#if PHP_WIN32 || (!defined(WORDS_BIGENDIAN))
71+
#if defined(PHP_WIN32) || (!defined(WORDS_BIGENDIAN))
7272
# define SWAP(n) \
7373
(((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
7474
#else

ext/standard/crypt_sha512.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ struct sha512_ctx
6363
};
6464

6565

66-
#if PHP_WIN32 || (!defined(WORDS_BIGENDIAN))
66+
#if defined(PHP_WIN32) || (!defined(WORDS_BIGENDIAN))
6767
# define SWAP(n) \
6868
(((n) << 56) \
6969
| (((n) & 0xff00) << 40) \

ext/standard/dl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ PHPAPI int php_load_extension(char *filename, int type, int start_now)
131131
/* load dynamic symbol */
132132
handle = DL_LOAD(libpath);
133133
if (!handle) {
134-
#if PHP_WIN32
134+
#ifdef PHP_WIN32
135135
char *err = GET_DL_ERROR();
136136
if (err && (*err != '\0')) {
137137
php_error_docref(NULL, error_type, "Unable to load dynamic library '%s' - %s", libpath, err);

ext/standard/html.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
*/
4040

4141
#include "php.h"
42-
#if PHP_WIN32
42+
#ifdef PHP_WIN32
4343
#include "config.w32.h"
4444
#else
4545
#include <php_config.h>

ext/standard/password.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include "info.h"
3333
#include "php_random.h"
3434

35-
#if PHP_WIN32
35+
#ifdef PHP_WIN32
3636
#include "win32/winutil.h"
3737
#endif
3838

ext/standard/php_crypt_r.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
#include <string.h>
3939

40-
#if PHP_WIN32
40+
#ifdef PHP_WIN32
4141
# include <windows.h>
4242
# include <Wincrypt.h>
4343
#endif
@@ -123,7 +123,7 @@ to64(char *s, int32_t v, int n)
123123
}
124124
}
125125

126-
#if PHP_WIN32
126+
#ifdef PHP_WIN32
127127
char * php_md5_crypt_r(const char *pw, const char *salt, char *out) {
128128
HCRYPTPROV hCryptProv;
129129
HCRYPTHASH ctx, ctx1;

ext/standard/random.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "zend_exceptions.h"
2828
#include "php_random.h"
2929

30-
#if PHP_WIN32
30+
#ifdef PHP_WIN32
3131
# include "win32/winutil.h"
3232
#endif
3333
#ifdef __linux__
@@ -83,7 +83,7 @@ PHP_MSHUTDOWN_FUNCTION(random)
8383
/* {{{ */
8484
PHPAPI int php_random_bytes(void *bytes, size_t size, zend_bool should_throw)
8585
{
86-
#if PHP_WIN32
86+
#ifdef PHP_WIN32
8787
/* Defer to CryptGenRandom on Windows */
8888
if (php_win32_get_random_bytes(bytes, size) == FAILURE) {
8989
if (should_throw) {

main/fopen_wrappers.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ PHPAPI zend_string *php_resolve_path(const char *filename, int filename_length,
505505
(IS_SLASH(filename[1]) ||
506506
((filename[1] == '.') && IS_SLASH(filename[2])))) ||
507507
IS_ABSOLUTE_PATH(filename, filename_length) ||
508-
#if PHP_WIN32
508+
#ifdef PHP_WIN32
509509
/* This should count as an absolute local path as well, however
510510
IS_ABSOLUTE_PATH doesn't care about this path form till now. It
511511
might be a big thing to extend, thus just a local handling for

main/php_ini.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -804,11 +804,11 @@ PHPAPI void php_ini_activate_per_dir_config(char *path, size_t path_len)
804804
zval *tmp2;
805805
char *ptr;
806806

807-
#if PHP_WIN32
807+
#ifdef PHP_WIN32
808808
char path_bak[MAXPATHLEN];
809809
#endif
810810

811-
#if PHP_WIN32
811+
#ifdef PHP_WIN32
812812
/* MAX_PATH is \0-terminated, path_len == MAXPATHLEN would overrun path_bak */
813813
if (path_len >= MAXPATHLEN) {
814814
#else
@@ -817,7 +817,7 @@ PHPAPI void php_ini_activate_per_dir_config(char *path, size_t path_len)
817817
return;
818818
}
819819

820-
#if PHP_WIN32
820+
#ifdef PHP_WIN32
821821
memcpy(path_bak, path, path_len);
822822
path_bak[path_len] = 0;
823823
TRANSLATE_SLASHES_LOWER(path_bak);

main/streams/plain_wrapper.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1302,7 +1302,7 @@ static int php_plain_files_rmdir(php_stream_wrapper *wrapper, const char *url, i
13021302
return 0;
13031303
}
13041304

1305-
#if PHP_WIN32
1305+
#ifdef PHP_WIN32
13061306
if (!php_win32_check_trailing_space(url, (int)strlen(url))) {
13071307
php_error_docref1(NULL, url, E_WARNING, "%s", strerror(ENOENT));
13081308
return 0;
@@ -1329,11 +1329,11 @@ static int php_plain_files_metadata(php_stream_wrapper *wrapper, const char *url
13291329
#endif
13301330
mode_t mode;
13311331
int ret = 0;
1332-
#if PHP_WIN32
1332+
#ifdef PHP_WIN32
13331333
int url_len = (int)strlen(url);
13341334
#endif
13351335

1336-
#if PHP_WIN32
1336+
#ifdef PHP_WIN32
13371337
if (!php_win32_check_trailing_space(url, url_len)) {
13381338
php_error_docref1(NULL, url, E_WARNING, "%s", strerror(ENOENT));
13391339
return 0;

sapi/phpdbg/phpdbg_prompt.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1257,7 +1257,7 @@ PHPDBG_API const char *phpdbg_load_module_or_extension(char **path, char **name)
12571257
handle = DL_LOAD(*path);
12581258

12591259
if (!handle) {
1260-
#if PHP_WIN32
1260+
#ifdef PHP_WIN32
12611261
char *err = GET_DL_ERROR();
12621262
if (err && err[0]) {
12631263
phpdbg_error("dl", "type=\"unknown\"", "%s", err);

0 commit comments

Comments
 (0)