mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-7.1'
* PHP-7.1: Fixed condition check Fixed condition check another place Conflicts: ext/mcrypt/mcrypt.c
This commit is contained in:
commit
696bd37e67
17 changed files with 23 additions and 23 deletions
|
@ -1,4 +1,4 @@
|
||||||
#if PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
#include "../../../../main/config.w32.h"
|
#include "../../../../main/config.w32.h"
|
||||||
#else
|
#else
|
||||||
#include <php_config.h>
|
#include <php_config.h>
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
#include "php.h"
|
#include "php.h"
|
||||||
|
|
||||||
/* This just seems unessacary */
|
/* This just seems unessacary */
|
||||||
#if PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
#define ENABLE_GD_TTF
|
#define ENABLE_GD_TTF
|
||||||
#else
|
#else
|
||||||
#include <php_config.h>
|
#include <php_config.h>
|
||||||
|
|
|
@ -627,7 +627,7 @@ static int _php_source_op_to_ipv4_op(enum source_op sop)
|
||||||
|
|
||||||
#endif /* HAS_MCAST_EXT */
|
#endif /* HAS_MCAST_EXT */
|
||||||
|
|
||||||
#if PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
int php_if_index_to_addr4(unsigned if_index, php_socket *php_sock, struct in_addr *out_addr)
|
int php_if_index_to_addr4(unsigned if_index, php_socket *php_sock, struct in_addr *out_addr)
|
||||||
{
|
{
|
||||||
MIB_IPADDRTABLE *addr_table;
|
MIB_IPADDRTABLE *addr_table;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#ifndef _CRYPT_FREESEC_H
|
#ifndef _CRYPT_FREESEC_H
|
||||||
#define _CRYPT_FREESEC_H
|
#define _CRYPT_FREESEC_H
|
||||||
|
|
||||||
#if PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
# ifndef inline
|
# ifndef inline
|
||||||
# define inline __inline
|
# define inline __inline
|
||||||
# endif
|
# endif
|
||||||
|
|
|
@ -68,7 +68,7 @@ struct sha256_ctx {
|
||||||
char buffer[128]; /* NB: always correctly aligned for uint32_t. */
|
char buffer[128]; /* NB: always correctly aligned for uint32_t. */
|
||||||
};
|
};
|
||||||
|
|
||||||
#if PHP_WIN32 || (!defined(WORDS_BIGENDIAN))
|
#if defined(PHP_WIN32) || (!defined(WORDS_BIGENDIAN))
|
||||||
# define SWAP(n) \
|
# define SWAP(n) \
|
||||||
(((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
|
(((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -63,7 +63,7 @@ struct sha512_ctx
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#if PHP_WIN32 || (!defined(WORDS_BIGENDIAN))
|
#if defined(PHP_WIN32) || (!defined(WORDS_BIGENDIAN))
|
||||||
# define SWAP(n) \
|
# define SWAP(n) \
|
||||||
(((n) << 56) \
|
(((n) << 56) \
|
||||||
| (((n) & 0xff00) << 40) \
|
| (((n) & 0xff00) << 40) \
|
||||||
|
|
|
@ -122,7 +122,7 @@ PHPAPI int php_load_extension(char *filename, int type, int start_now)
|
||||||
/* load dynamic symbol */
|
/* load dynamic symbol */
|
||||||
handle = DL_LOAD(libpath);
|
handle = DL_LOAD(libpath);
|
||||||
if (!handle) {
|
if (!handle) {
|
||||||
#if PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
char *err = GET_DL_ERROR();
|
char *err = GET_DL_ERROR();
|
||||||
if (err && (*err != '\0')) {
|
if (err && (*err != '\0')) {
|
||||||
php_error_docref(NULL, error_type, "Unable to load dynamic library '%s' - %s", libpath, err);
|
php_error_docref(NULL, error_type, "Unable to load dynamic library '%s' - %s", libpath, err);
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "php.h"
|
#include "php.h"
|
||||||
#if PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
#include "config.w32.h"
|
#include "config.w32.h"
|
||||||
#else
|
#else
|
||||||
#include <php_config.h>
|
#include <php_config.h>
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#include "argon2.h"
|
#include "argon2.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
#include "win32/winutil.h"
|
#include "win32/winutil.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#if PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# include <Wincrypt.h>
|
# include <Wincrypt.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -123,7 +123,7 @@ to64(char *s, int32_t v, int n)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
char * php_md5_crypt_r(const char *pw, const char *salt, char *out) {
|
char * php_md5_crypt_r(const char *pw, const char *salt, char *out) {
|
||||||
HCRYPTPROV hCryptProv;
|
HCRYPTPROV hCryptProv;
|
||||||
HCRYPTHASH ctx, ctx1;
|
HCRYPTHASH ctx, ctx1;
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include "zend_exceptions.h"
|
#include "zend_exceptions.h"
|
||||||
#include "php_random.h"
|
#include "php_random.h"
|
||||||
|
|
||||||
#if PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
# include "win32/winutil.h"
|
# include "win32/winutil.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
|
@ -83,7 +83,7 @@ PHP_MSHUTDOWN_FUNCTION(random)
|
||||||
/* {{{ */
|
/* {{{ */
|
||||||
PHPAPI int php_random_bytes(void *bytes, size_t size, zend_bool should_throw)
|
PHPAPI int php_random_bytes(void *bytes, size_t size, zend_bool should_throw)
|
||||||
{
|
{
|
||||||
#if PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
/* Defer to CryptGenRandom on Windows */
|
/* Defer to CryptGenRandom on Windows */
|
||||||
if (php_win32_get_random_bytes(bytes, size) == FAILURE) {
|
if (php_win32_get_random_bytes(bytes, size) == FAILURE) {
|
||||||
if (should_throw) {
|
if (should_throw) {
|
||||||
|
|
|
@ -501,7 +501,7 @@ PHPAPI zend_string *php_resolve_path(const char *filename, int filename_length,
|
||||||
(IS_SLASH(filename[1]) ||
|
(IS_SLASH(filename[1]) ||
|
||||||
((filename[1] == '.') && IS_SLASH(filename[2])))) ||
|
((filename[1] == '.') && IS_SLASH(filename[2])))) ||
|
||||||
IS_ABSOLUTE_PATH(filename, filename_length) ||
|
IS_ABSOLUTE_PATH(filename, filename_length) ||
|
||||||
#if PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
/* This should count as an absolute local path as well, however
|
/* This should count as an absolute local path as well, however
|
||||||
IS_ABSOLUTE_PATH doesn't care about this path form till now. It
|
IS_ABSOLUTE_PATH doesn't care about this path form till now. It
|
||||||
might be a big thing to extend, thus just a local handling for
|
might be a big thing to extend, thus just a local handling for
|
||||||
|
|
|
@ -323,7 +323,7 @@ END_EXTERN_C()
|
||||||
#define STR_PRINT(str) ((str)?(str):"")
|
#define STR_PRINT(str) ((str)?(str):"")
|
||||||
|
|
||||||
#ifndef MAXPATHLEN
|
#ifndef MAXPATHLEN
|
||||||
# if PHP_WIN32
|
# ifdef PHP_WIN32
|
||||||
# include "win32/ioutil.h"
|
# include "win32/ioutil.h"
|
||||||
# define MAXPATHLEN PHP_WIN32_IOUTIL_MAXPATHLEN
|
# define MAXPATHLEN PHP_WIN32_IOUTIL_MAXPATHLEN
|
||||||
# elif PATH_MAX
|
# elif PATH_MAX
|
||||||
|
|
|
@ -804,11 +804,11 @@ PHPAPI void php_ini_activate_per_dir_config(char *path, size_t path_len)
|
||||||
zval *tmp2;
|
zval *tmp2;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
|
|
||||||
#if PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
char path_bak[MAXPATHLEN];
|
char path_bak[MAXPATHLEN];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
/* MAX_PATH is \0-terminated, path_len == MAXPATHLEN would overrun path_bak */
|
/* MAX_PATH is \0-terminated, path_len == MAXPATHLEN would overrun path_bak */
|
||||||
if (path_len >= MAXPATHLEN) {
|
if (path_len >= MAXPATHLEN) {
|
||||||
#else
|
#else
|
||||||
|
@ -817,7 +817,7 @@ PHPAPI void php_ini_activate_per_dir_config(char *path, size_t path_len)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
memcpy(path_bak, path, path_len);
|
memcpy(path_bak, path, path_len);
|
||||||
path_bak[path_len] = 0;
|
path_bak[path_len] = 0;
|
||||||
TRANSLATE_SLASHES_LOWER(path_bak);
|
TRANSLATE_SLASHES_LOWER(path_bak);
|
||||||
|
|
|
@ -1310,7 +1310,7 @@ static int php_plain_files_rmdir(php_stream_wrapper *wrapper, const char *url, i
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
if (!php_win32_check_trailing_space(url, (int)strlen(url))) {
|
if (!php_win32_check_trailing_space(url, (int)strlen(url))) {
|
||||||
php_error_docref1(NULL, url, E_WARNING, "%s", strerror(ENOENT));
|
php_error_docref1(NULL, url, E_WARNING, "%s", strerror(ENOENT));
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1337,11 +1337,11 @@ static int php_plain_files_metadata(php_stream_wrapper *wrapper, const char *url
|
||||||
#endif
|
#endif
|
||||||
mode_t mode;
|
mode_t mode;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
#if PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
int url_len = (int)strlen(url);
|
int url_len = (int)strlen(url);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
if (!php_win32_check_trailing_space(url, url_len)) {
|
if (!php_win32_check_trailing_space(url, url_len)) {
|
||||||
php_error_docref1(NULL, url, E_WARNING, "%s", strerror(ENOENT));
|
php_error_docref1(NULL, url, E_WARNING, "%s", strerror(ENOENT));
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
#include "zend_signal.h"
|
#include "zend_signal.h"
|
||||||
#if !defined(_WIN32) && !defined(ZEND_SIGNALS) && defined(HAVE_SIGNAL_H)
|
#if !defined(_WIN32) && !defined(ZEND_SIGNALS) && defined(HAVE_SIGNAL_H)
|
||||||
# include <signal.h>
|
# include <signal.h>
|
||||||
#elif PHP_WIN32
|
#elif defined(PHP_WIN32)
|
||||||
# include "win32/signal.h"
|
# include "win32/signal.h"
|
||||||
#endif
|
#endif
|
||||||
#include "SAPI.h"
|
#include "SAPI.h"
|
||||||
|
|
|
@ -1307,7 +1307,7 @@ PHPDBG_API const char *phpdbg_load_module_or_extension(char **path, char **name)
|
||||||
handle = DL_LOAD(*path);
|
handle = DL_LOAD(*path);
|
||||||
|
|
||||||
if (!handle) {
|
if (!handle) {
|
||||||
#if PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
char *err = GET_DL_ERROR();
|
char *err = GET_DL_ERROR();
|
||||||
if (err && err[0]) {
|
if (err && err[0]) {
|
||||||
phpdbg_error("dl", "type=\"unknown\"", "%s", err);
|
phpdbg_error("dl", "type=\"unknown\"", "%s", err);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue