mirror of
https://github.com/php/php-src.git
synced 2024-11-23 09:54:15 +08:00
master renames phase 4
This commit is contained in:
parent
5410282258
commit
455741fce3
@ -39,9 +39,9 @@ typedef unsigned __int64 zend_ulong;
|
||||
typedef __int64 zend_off_t;
|
||||
# define ZEND_LONG_MAX _I64_MAX
|
||||
# define ZEND_LONG_MIN _I64_MIN
|
||||
# define ZEND_UINT_MAX _UI64_MAX
|
||||
# define ZEND_ULONG_MAX _UI64_MAX
|
||||
# define Z_I(i) i##i64
|
||||
# define Z_UI(i) i##Ui64
|
||||
# define Z_UL(i) i##Ui64
|
||||
# else
|
||||
# error Cant enable 64 bit integers on non 64 bit platform
|
||||
# endif
|
||||
@ -52,9 +52,9 @@ typedef uint64_t zend_ulong;
|
||||
typedef off_t zend_off_t;
|
||||
# define ZEND_LONG_MAX INT64_MAX
|
||||
# define ZEND_LONG_MIN INT64_MIN
|
||||
# define ZEND_UINT_MAX UINT64_MAX
|
||||
# define ZEND_ULONG_MAX UINT64_MAX
|
||||
# define Z_I(i) i##LL
|
||||
# define Z_UI(i) i##ULL
|
||||
# define Z_UL(i) i##ULL
|
||||
# else
|
||||
# error Cant enable 64 bit integers on non 64 bit platform
|
||||
# endif
|
||||
@ -66,9 +66,9 @@ typedef unsigned long zend_ulong;
|
||||
typedef long zend_off_t;
|
||||
# define ZEND_LONG_MAX LONG_MAX
|
||||
# define ZEND_LONG_MIN LONG_MIN
|
||||
# define ZEND_UINT_MAX ULONG_MAX
|
||||
# define ZEND_ULONG_MAX ULONG_MAX
|
||||
# define Z_I(i) i##L
|
||||
# define Z_UI(i) i##UL
|
||||
# define Z_UL(i) i##UL
|
||||
# define SIZEOF_ZEND_INT SIZEOF_LONG
|
||||
#endif
|
||||
|
@ -2461,7 +2461,7 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2) /* {{{ */
|
||||
|
||||
if ((ret1=is_numeric_string_ex(Z_STRVAL_P(s1), Z_STRLEN_P(s1), &lval1, &dval1, 0, &oflow1)) &&
|
||||
(ret2=is_numeric_string_ex(Z_STRVAL_P(s2), Z_STRLEN_P(s2), &lval2, &dval2, 0, &oflow2))) {
|
||||
#if ZEND_UINT_MAX == 0xFFFFFFFF
|
||||
#if ZEND_ULONG_MAX == 0xFFFFFFFF
|
||||
if (oflow1 != 0 && oflow1 == oflow2 && dval1 - dval2 == 0. &&
|
||||
((oflow1 == 1 && dval1 > 9007199254740991. /*0x1FFFFFFFFFFFFF*/)
|
||||
|| (oflow1 == -1 && dval1 < -9007199254740991.))) {
|
||||
|
@ -244,7 +244,7 @@ static zend_always_inline void zend_string_release(zend_string *s)
|
||||
|
||||
static inline zend_ulong zend_inline_hash_func(const char *str, size_t len)
|
||||
{
|
||||
register zend_ulong hash = Z_UI(5381);
|
||||
register zend_ulong hash = Z_UL(5381);
|
||||
|
||||
/* variant with the hash unrolled eight times */
|
||||
for (; len >= 8; len -= 8) {
|
||||
|
@ -22,7 +22,7 @@
|
||||
#ifndef ZEND_TYPES_H
|
||||
#define ZEND_TYPES_H
|
||||
|
||||
#include "zend_int.h"
|
||||
#include "zend_long.h"
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
# define ZEND_ENDIAN_LOHI(lo, hi) hi; lo;
|
||||
|
@ -593,8 +593,8 @@ static inline zend_ulong realpath_cache_key(const char *path, int path_len TSRML
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (h = Z_UI(2166136261); bucket_key < e;) {
|
||||
h *= Z_UI(16777619);
|
||||
for (h = Z_UL(2166136261); bucket_key < e;) {
|
||||
h *= Z_UL(16777619);
|
||||
h ^= *bucket_key++;
|
||||
}
|
||||
HeapFree(GetProcessHeap(), 0, (LPVOID)bucket_key_start);
|
||||
@ -607,8 +607,8 @@ static inline zend_ulong realpath_cache_key(const char *path, int path_len) /* {
|
||||
register zend_ulong h;
|
||||
const char *e = path + path_len;
|
||||
|
||||
for (h = Z_UI(2166136261); path < e;) {
|
||||
h *= Z_UI(16777619);
|
||||
for (h = Z_UL(2166136261); path < e;) {
|
||||
h *= Z_UL(16777619);
|
||||
h ^= *path++;
|
||||
}
|
||||
|
||||
|
@ -382,7 +382,7 @@ php_stream * php_stream_url_wrap_php(php_stream_wrapper *wrapper, const char *pa
|
||||
do {
|
||||
zend_stat_t st;
|
||||
memset(&st, 0, sizeof(st));
|
||||
if (php_fstat(fd, &st) == 0 && (st.st_mode & S_IFMT) == S_IFSOCK) {
|
||||
if (zend_fstat(fd, &st) == 0 && (st.st_mode & S_IFMT) == S_IFSOCK) {
|
||||
stream = php_stream_sock_open_from_socket(fd, NULL);
|
||||
if (stream) {
|
||||
stream->ops = &php_stream_socket_ops;
|
||||
|
@ -26,6 +26,8 @@
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include "zend.h"
|
||||
#include "zend_stream.h"
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
PHPAPI int php_file_le_stream(void);
|
||||
@ -103,16 +105,6 @@ typedef struct _php_stream_filter php_stream_filter;
|
||||
#include "streams/php_stream_context.h"
|
||||
#include "streams/php_stream_filter_api.h"
|
||||
|
||||
#ifdef _WIN64
|
||||
# define php_fstat _fstat64
|
||||
# define php_stat_fn _stat64
|
||||
typedef struct __stat64 zend_stat_t;
|
||||
#else
|
||||
# define php_fstat fstat
|
||||
# define php_stat_fn stat
|
||||
typedef struct stat zend_stat_t;
|
||||
#endif
|
||||
|
||||
typedef struct _php_stream_statbuf {
|
||||
zend_stat_t sb; /* regular info */
|
||||
/* extended info to go here some day: content-type etc. etc. */
|
||||
|
@ -149,7 +149,7 @@ static int do_fstat(php_stdio_stream_data *d, int force)
|
||||
int r;
|
||||
|
||||
PHP_STDIOP_GET_FD(fd, d);
|
||||
r = php_fstat(fd, &d->sb);
|
||||
r = zend_fstat(fd, &d->sb);
|
||||
d->cached_fstat = r == 0;
|
||||
|
||||
return r;
|
||||
|
@ -237,7 +237,7 @@ static int php_sockop_stat(php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC
|
||||
#if ZEND_WIN32
|
||||
return 0;
|
||||
#else
|
||||
return php_fstat(sock->socket, &ssb->sb);
|
||||
return zend_fstat(sock->socket, &ssb->sb);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1414,7 +1414,7 @@ static void php_cli_server_request_translate_vpath(php_cli_server_request *reque
|
||||
*p = '\0';
|
||||
q = p;
|
||||
while (q > buf) {
|
||||
if (!php_stat_fn(buf, &sb)) {
|
||||
if (!zend_stat(buf, &sb)) {
|
||||
if (sb.st_mode & S_IFDIR) {
|
||||
const char **file = index_files;
|
||||
if (q[-1] != DEFAULT_SLASH) {
|
||||
@ -1423,7 +1423,7 @@ static void php_cli_server_request_translate_vpath(php_cli_server_request *reque
|
||||
while (*file) {
|
||||
size_t l = strlen(*file);
|
||||
memmove(q, *file, l + 1);
|
||||
if (!php_stat_fn(buf, &sb) && (sb.st_mode & S_IFREG)) {
|
||||
if (!zend_stat(buf, &sb) && (sb.st_mode & S_IFREG)) {
|
||||
q += l;
|
||||
break;
|
||||
}
|
||||
@ -2489,7 +2489,7 @@ int do_cli_server(int argc, char **argv TSRMLS_DC) /* {{{ */
|
||||
if (document_root) {
|
||||
zend_stat_t sb;
|
||||
|
||||
if (php_stat_fn(document_root, &sb)) {
|
||||
if (zend_stat(document_root, &sb)) {
|
||||
fprintf(stderr, "Directory %s does not exist.\n", document_root);
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user