Skip to content

Commit 9d70df2

Browse files
committed
Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: C89 fixes use portable struct stat fixed macro va args expansion for vs
2 parents 24f0d2e + 6730037 commit 9d70df2

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

sapi/phpdbg/phpdbg.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,14 @@
7171
#endif
7272

7373
#undef zend_hash_str_add
74+
#ifdef PHP_WIN32
75+
#define zend_hash_str_add(...) \
76+
_zend_hash_str_add(__VA_ARGS__ ZEND_FILE_LINE_CC)
77+
#else
7478
#define zend_hash_str_add_tmp(ht, key, len, pData) \
7579
_zend_hash_str_add(ht, key, len, pData ZEND_FILE_LINE_CC)
7680
#define zend_hash_str_add(...) zend_hash_str_add_tmp(__VA_ARGS__)
81+
#endif
7782

7883
#ifdef HAVE_LIBREADLINE
7984
# include <readline/readline.h>

sapi/phpdbg/phpdbg_info.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,9 @@ PHPDBG_INFO(classes) /* {{{ */
386386
phpdbg_print_class_name(ce);
387387

388388
if (ce->parent) {
389+
zend_class_entry *pce;
389390
phpdbg_xml("<parents %r>");
390-
zend_class_entry *pce = ce->parent;
391+
pce = ce->parent;
391392
do {
392393
phpdbg_out("|-------- ");
393394
phpdbg_print_class_name(pce);

sapi/phpdbg/phpdbg_prompt.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ void phpdbg_string_init(char *buffer) {
306306

307307
void phpdbg_try_file_init(char *init_file, size_t init_file_len, zend_bool free_init) /* {{{ */
308308
{
309-
struct stat sb;
309+
zend_stat_t sb;
310310

311311
if (init_file && VCWD_STAT(init_file, &sb) != -1) {
312312
FILE *fp = fopen(init_file, "r");
@@ -374,7 +374,7 @@ void phpdbg_init(char *init_file, size_t init_file_len, zend_bool use_default) /
374374

375375
PHPDBG_COMMAND(exec) /* {{{ */
376376
{
377-
struct stat sb;
377+
zend_stat_t sb;
378378

379379
if (VCWD_STAT(param->str, &sb) != FAILURE) {
380380
if (sb.st_mode & (S_IFREG|S_IFLNK)) {
@@ -698,10 +698,11 @@ PHPDBG_COMMAND(ev) /* {{{ */
698698
zend_execute_data *original_execute_data = EG(current_execute_data);
699699
zend_class_entry *original_scope = EG(scope);
700700
zend_vm_stack original_stack = EG(vm_stack);
701-
original_stack->top = EG(vm_stack_top);
702701

703702
PHPDBG_OUTPUT_BACKUP();
704703

704+
original_stack->top = EG(vm_stack_top);
705+
705706
if (PHPDBG_G(flags) & PHPDBG_IN_SIGNAL_HANDLER) {
706707
phpdbg_try_access {
707708
phpdbg_parse_variable(param->str, param->len, &EG(symbol_table).ht, 0, phpdbg_output_ev_variable, 0);
@@ -1072,7 +1073,7 @@ PHPDBG_COMMAND(dl) /* {{{ */
10721073

10731074
PHPDBG_COMMAND(source) /* {{{ */
10741075
{
1075-
struct stat sb;
1076+
zend_stat_t sb;
10761077

10771078
if (VCWD_STAT(param->str, &sb) != -1) {
10781079
phpdbg_try_file_init(param->str, param->len, 0);

0 commit comments

Comments
 (0)