diff options
author | Anatol Belski <ab@php.net> | 2014-08-25 20:57:25 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-08-25 20:57:25 +0200 |
commit | 455741fce3c4f4392deb97775cba7a39f6490271 (patch) | |
tree | 6c6502ab5b26ae10df7773dfae0e714fa931ee97 | |
parent | 54102822583912de26bb6c7cc2d0c609952a4775 (diff) | |
download | php-git-455741fce3c4f4392deb97775cba7a39f6490271.tar.gz |
master renames phase 4
-rw-r--r-- | Zend/zend_long.h (renamed from Zend/zend_int.h) | 12 | ||||
-rw-r--r-- | Zend/zend_operators.c | 2 | ||||
-rw-r--r-- | Zend/zend_string.h | 2 | ||||
-rw-r--r-- | Zend/zend_types.h | 2 | ||||
-rw-r--r-- | Zend/zend_virtual_cwd.c | 8 | ||||
-rw-r--r-- | ext/standard/php_fopen_wrapper.c | 2 | ||||
-rw-r--r-- | main/php_streams.h | 12 | ||||
-rw-r--r-- | main/streams/plain_wrapper.c | 2 | ||||
-rw-r--r-- | main/streams/xp_socket.c | 2 | ||||
-rw-r--r-- | sapi/cli/php_cli_server.c | 6 |
10 files changed, 21 insertions, 29 deletions
diff --git a/Zend/zend_int.h b/Zend/zend_long.h index f33b3ff8ec..34441c6e45 100644 --- a/Zend/zend_int.h +++ b/Zend/zend_long.h @@ -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 diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 6f826010b7..8aa3808431 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -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.))) { diff --git a/Zend/zend_string.h b/Zend/zend_string.h index 0d13575dbf..6f276253e2 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -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) { diff --git a/Zend/zend_types.h b/Zend/zend_types.h index bb47f82842..a76704beed 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -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; diff --git a/Zend/zend_virtual_cwd.c b/Zend/zend_virtual_cwd.c index a31f40b128..665829d685 100644 --- a/Zend/zend_virtual_cwd.c +++ b/Zend/zend_virtual_cwd.c @@ -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++; } diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c index 7b52494688..3859e5b9a4 100644 --- a/ext/standard/php_fopen_wrapper.c +++ b/ext/standard/php_fopen_wrapper.c @@ -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; diff --git a/main/php_streams.h b/main/php_streams.h index 1daa0d9d67..ad9ea92c1c 100644 --- a/main/php_streams.h +++ b/main/php_streams.h @@ -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. */ diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 23c017eaa1..36b56645c2 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -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; diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c index fc13cdf2e4..12111511d6 100644 --- a/main/streams/xp_socket.c +++ b/main/streams/xp_socket.c @@ -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 } diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index 6f7f34e7ba..88a1010db1 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -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; } |