Skip to content

Commit 696bd37

Browse files
committed
Merge branch 'PHP-7.1'
* PHP-7.1: Fixed condition check Fixed condition check another place Conflicts: ext/mcrypt/mcrypt.c
2 parents 4e9f0a8 + 9398f15 commit 696bd37

File tree

17 files changed

+23
-23
lines changed

17 files changed

+23
-23
lines changed

Diff for: 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>

Diff for: 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>

Diff for: 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;

Diff for: 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

Diff for: 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

Diff for: 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) \

Diff for: ext/standard/dl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ PHPAPI int php_load_extension(char *filename, int type, int start_now)
122122
/* load dynamic symbol */
123123
handle = DL_LOAD(libpath);
124124
if (!handle) {
125-
#if PHP_WIN32
125+
#ifdef PHP_WIN32
126126
char *err = GET_DL_ERROR();
127127
if (err && (*err != '\0')) {
128128
php_error_docref(NULL, error_type, "Unable to load dynamic library '%s' - %s", libpath, err);

Diff for: 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>

Diff for: ext/standard/password.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include "argon2.h"
3636
#endif
3737

38-
#if PHP_WIN32
38+
#ifdef PHP_WIN32
3939
#include "win32/winutil.h"
4040
#endif
4141

Diff for: 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;

Diff for: 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) {

Diff for: main/fopen_wrappers.c

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

Diff for: main/php.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ END_EXTERN_C()
323323
#define STR_PRINT(str) ((str)?(str):"")
324324

325325
#ifndef MAXPATHLEN
326-
# if PHP_WIN32
326+
# ifdef PHP_WIN32
327327
# include "win32/ioutil.h"
328328
# define MAXPATHLEN PHP_WIN32_IOUTIL_MAXPATHLEN
329329
# elif PATH_MAX

Diff 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);

Diff for: main/streams/plain_wrapper.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1310,7 +1310,7 @@ static int php_plain_files_rmdir(php_stream_wrapper *wrapper, const char *url, i
13101310
return 0;
13111311
}
13121312

1313-
#if PHP_WIN32
1313+
#ifdef PHP_WIN32
13141314
if (!php_win32_check_trailing_space(url, (int)strlen(url))) {
13151315
php_error_docref1(NULL, url, E_WARNING, "%s", strerror(ENOENT));
13161316
return 0;
@@ -1337,11 +1337,11 @@ static int php_plain_files_metadata(php_stream_wrapper *wrapper, const char *url
13371337
#endif
13381338
mode_t mode;
13391339
int ret = 0;
1340-
#if PHP_WIN32
1340+
#ifdef PHP_WIN32
13411341
int url_len = (int)strlen(url);
13421342
#endif
13431343

1344-
#if PHP_WIN32
1344+
#ifdef PHP_WIN32
13451345
if (!php_win32_check_trailing_space(url, url_len)) {
13461346
php_error_docref1(NULL, url, E_WARNING, "%s", strerror(ENOENT));
13471347
return 0;

Diff for: sapi/phpdbg/phpdbg.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
#include "zend_signal.h"
4949
#if !defined(_WIN32) && !defined(ZEND_SIGNALS) && defined(HAVE_SIGNAL_H)
5050
# include <signal.h>
51-
#elif PHP_WIN32
51+
#elif defined(PHP_WIN32)
5252
# include "win32/signal.h"
5353
#endif
5454
#include "SAPI.h"

Diff for: sapi/phpdbg/phpdbg_prompt.c

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

13091309
if (!handle) {
1310-
#if PHP_WIN32
1310+
#ifdef PHP_WIN32
13111311
char *err = GET_DL_ERROR();
13121312
if (err && err[0]) {
13131313
phpdbg_error("dl", "type=\"unknown\"", "%s", err);

0 commit comments

Comments
 (0)