Skip to content

Commit 455741f

Browse files
committed
master renames phase 4
1 parent 5410282 commit 455741f

File tree

10 files changed

+21
-29
lines changed

10 files changed

+21
-29
lines changed

Zend/zend_int.h renamed to Zend/zend_long.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ typedef unsigned __int64 zend_ulong;
3939
typedef __int64 zend_off_t;
4040
# define ZEND_LONG_MAX _I64_MAX
4141
# define ZEND_LONG_MIN _I64_MIN
42-
# define ZEND_UINT_MAX _UI64_MAX
42+
# define ZEND_ULONG_MAX _UI64_MAX
4343
# define Z_I(i) i##i64
44-
# define Z_UI(i) i##Ui64
44+
# define Z_UL(i) i##Ui64
4545
# else
4646
# error Cant enable 64 bit integers on non 64 bit platform
4747
# endif
@@ -52,9 +52,9 @@ typedef uint64_t zend_ulong;
5252
typedef off_t zend_off_t;
5353
# define ZEND_LONG_MAX INT64_MAX
5454
# define ZEND_LONG_MIN INT64_MIN
55-
# define ZEND_UINT_MAX UINT64_MAX
55+
# define ZEND_ULONG_MAX UINT64_MAX
5656
# define Z_I(i) i##LL
57-
# define Z_UI(i) i##ULL
57+
# define Z_UL(i) i##ULL
5858
# else
5959
# error Cant enable 64 bit integers on non 64 bit platform
6060
# endif
@@ -66,9 +66,9 @@ typedef unsigned long zend_ulong;
6666
typedef long zend_off_t;
6767
# define ZEND_LONG_MAX LONG_MAX
6868
# define ZEND_LONG_MIN LONG_MIN
69-
# define ZEND_UINT_MAX ULONG_MAX
69+
# define ZEND_ULONG_MAX ULONG_MAX
7070
# define Z_I(i) i##L
71-
# define Z_UI(i) i##UL
71+
# define Z_UL(i) i##UL
7272
# define SIZEOF_ZEND_INT SIZEOF_LONG
7373
#endif
7474

Zend/zend_operators.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2461,7 +2461,7 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2) /* {{{ */
24612461

24622462
if ((ret1=is_numeric_string_ex(Z_STRVAL_P(s1), Z_STRLEN_P(s1), &lval1, &dval1, 0, &oflow1)) &&
24632463
(ret2=is_numeric_string_ex(Z_STRVAL_P(s2), Z_STRLEN_P(s2), &lval2, &dval2, 0, &oflow2))) {
2464-
#if ZEND_UINT_MAX == 0xFFFFFFFF
2464+
#if ZEND_ULONG_MAX == 0xFFFFFFFF
24652465
if (oflow1 != 0 && oflow1 == oflow2 && dval1 - dval2 == 0. &&
24662466
((oflow1 == 1 && dval1 > 9007199254740991. /*0x1FFFFFFFFFFFFF*/)
24672467
|| (oflow1 == -1 && dval1 < -9007199254740991.))) {

Zend/zend_string.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ static zend_always_inline void zend_string_release(zend_string *s)
244244

245245
static inline zend_ulong zend_inline_hash_func(const char *str, size_t len)
246246
{
247-
register zend_ulong hash = Z_UI(5381);
247+
register zend_ulong hash = Z_UL(5381);
248248

249249
/* variant with the hash unrolled eight times */
250250
for (; len >= 8; len -= 8) {

Zend/zend_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#ifndef ZEND_TYPES_H
2323
#define ZEND_TYPES_H
2424

25-
#include "zend_int.h"
25+
#include "zend_long.h"
2626

2727
#ifdef WORDS_BIGENDIAN
2828
# define ZEND_ENDIAN_LOHI(lo, hi) hi; lo;

Zend/zend_virtual_cwd.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -593,8 +593,8 @@ static inline zend_ulong realpath_cache_key(const char *path, int path_len TSRML
593593
return 0;
594594
}
595595

596-
for (h = Z_UI(2166136261); bucket_key < e;) {
597-
h *= Z_UI(16777619);
596+
for (h = Z_UL(2166136261); bucket_key < e;) {
597+
h *= Z_UL(16777619);
598598
h ^= *bucket_key++;
599599
}
600600
HeapFree(GetProcessHeap(), 0, (LPVOID)bucket_key_start);
@@ -607,8 +607,8 @@ static inline zend_ulong realpath_cache_key(const char *path, int path_len) /* {
607607
register zend_ulong h;
608608
const char *e = path + path_len;
609609

610-
for (h = Z_UI(2166136261); path < e;) {
611-
h *= Z_UI(16777619);
610+
for (h = Z_UL(2166136261); path < e;) {
611+
h *= Z_UL(16777619);
612612
h ^= *path++;
613613
}
614614

ext/standard/php_fopen_wrapper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ php_stream * php_stream_url_wrap_php(php_stream_wrapper *wrapper, const char *pa
382382
do {
383383
zend_stat_t st;
384384
memset(&st, 0, sizeof(st));
385-
if (php_fstat(fd, &st) == 0 && (st.st_mode & S_IFMT) == S_IFSOCK) {
385+
if (zend_fstat(fd, &st) == 0 && (st.st_mode & S_IFMT) == S_IFSOCK) {
386386
stream = php_stream_sock_open_from_socket(fd, NULL);
387387
if (stream) {
388388
stream->ops = &php_stream_socket_ops;

main/php_streams.h

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
#endif
2727
#include <sys/types.h>
2828
#include <sys/stat.h>
29+
#include "zend.h"
30+
#include "zend_stream.h"
2931

3032
BEGIN_EXTERN_C()
3133
PHPAPI int php_file_le_stream(void);
@@ -103,16 +105,6 @@ typedef struct _php_stream_filter php_stream_filter;
103105
#include "streams/php_stream_context.h"
104106
#include "streams/php_stream_filter_api.h"
105107

106-
#ifdef _WIN64
107-
# define php_fstat _fstat64
108-
# define php_stat_fn _stat64
109-
typedef struct __stat64 zend_stat_t;
110-
#else
111-
# define php_fstat fstat
112-
# define php_stat_fn stat
113-
typedef struct stat zend_stat_t;
114-
#endif
115-
116108
typedef struct _php_stream_statbuf {
117109
zend_stat_t sb; /* regular info */
118110
/* extended info to go here some day: content-type etc. etc. */

main/streams/plain_wrapper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static int do_fstat(php_stdio_stream_data *d, int force)
149149
int r;
150150

151151
PHP_STDIOP_GET_FD(fd, d);
152-
r = php_fstat(fd, &d->sb);
152+
r = zend_fstat(fd, &d->sb);
153153
d->cached_fstat = r == 0;
154154

155155
return r;

main/streams/xp_socket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ static int php_sockop_stat(php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC
237237
#if ZEND_WIN32
238238
return 0;
239239
#else
240-
return php_fstat(sock->socket, &ssb->sb);
240+
return zend_fstat(sock->socket, &ssb->sb);
241241
#endif
242242
}
243243

sapi/cli/php_cli_server.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,7 +1414,7 @@ static void php_cli_server_request_translate_vpath(php_cli_server_request *reque
14141414
*p = '\0';
14151415
q = p;
14161416
while (q > buf) {
1417-
if (!php_stat_fn(buf, &sb)) {
1417+
if (!zend_stat(buf, &sb)) {
14181418
if (sb.st_mode & S_IFDIR) {
14191419
const char **file = index_files;
14201420
if (q[-1] != DEFAULT_SLASH) {
@@ -1423,7 +1423,7 @@ static void php_cli_server_request_translate_vpath(php_cli_server_request *reque
14231423
while (*file) {
14241424
size_t l = strlen(*file);
14251425
memmove(q, *file, l + 1);
1426-
if (!php_stat_fn(buf, &sb) && (sb.st_mode & S_IFREG)) {
1426+
if (!zend_stat(buf, &sb) && (sb.st_mode & S_IFREG)) {
14271427
q += l;
14281428
break;
14291429
}
@@ -2489,7 +2489,7 @@ int do_cli_server(int argc, char **argv TSRMLS_DC) /* {{{ */
24892489
if (document_root) {
24902490
zend_stat_t sb;
24912491

2492-
if (php_stat_fn(document_root, &sb)) {
2492+
if (zend_stat(document_root, &sb)) {
24932493
fprintf(stderr, "Directory %s does not exist.\n", document_root);
24942494
return 1;
24952495
}

0 commit comments

Comments
 (0)