]> granicus.if.org Git - php/commitdiff
master renames phase 4
authorAnatol Belski <ab@php.net>
Mon, 25 Aug 2014 18:57:25 +0000 (20:57 +0200)
committerAnatol Belski <ab@php.net>
Mon, 25 Aug 2014 18:57:25 +0000 (20:57 +0200)
Zend/zend_long.h [moved from Zend/zend_int.h with 95% similarity]
Zend/zend_operators.c
Zend/zend_string.h
Zend/zend_types.h
Zend/zend_virtual_cwd.c
ext/standard/php_fopen_wrapper.c
main/php_streams.h
main/streams/plain_wrapper.c
main/streams/xp_socket.c
sapi/cli/php_cli_server.c

similarity index 95%
rename from Zend/zend_int.h
rename to Zend/zend_long.h
index f33b3ff8ecc67296e2a482818e3d1f5840d41863..34441c6e454cc7a1b0069854db9a7722a17f5fe8 100644 (file)
@@ -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
 
index 6f826010b79921b8bc4afd66b749c6563aeccd62..8aa3808431a9db768978f80c94f5a7838f1ef2b4 100644 (file)
@@ -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.))) {
index 0d13575dbffd47c1c58bcfa589fa8789f9c43512..6f276253e286c0d8ceb2c5bdd77d95d4fa68b3cf 100644 (file)
@@ -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) {
index bb47f828424bf9f92383cf22be11e029e2c6a6ba..a76704beed3ca2204c77b7a6a612b821d34379b9 100644 (file)
@@ -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;
index a31f40b128efc58afe53c9e0baaa3eb1859a5c2e..665829d685c96242f308a677d478c33381cee6c7 100644 (file)
@@ -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++;
        }
 
index 7b52494688df0f99c9d3927f5e2ff86c896be680..3859e5b9a4a79dae8cb4712451fef927c0461465 100644 (file)
@@ -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;
index 1daa0d9d674a9b17fb4ba676ecb5322e5a0e3333..ad9ea92c1c984498d29ca95a1ec1f8af314115ce 100644 (file)
@@ -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. */
index 23c017eaa1ab334ae14d90da0336d2f8a46aa6d7..36b56645c274914da9ea9b998b73d3aaed776309 100644 (file)
@@ -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;
index fc13cdf2e4c53cef69d322ceabfe259edf75447c..12111511d6ad88c2d9276505b1e21232f4eebd5b 100644 (file)
@@ -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
 }
 
index 6f7f34e7bafed61a043b5a88a6d89ac9f4b92b86..88a1010db1b5c8484d7659950d4628f373f17d93 100644 (file)
@@ -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;
                }