Merge sapi/phpdbg into PHP-5.6

This commit is contained in:
Bob Weinand 2014-07-06 01:17:50 +02:00
commit 17658fa7b8
2 changed files with 13 additions and 11 deletions

View file

@ -28,7 +28,7 @@ install-phpdbg: $(BUILD_BINARY)
@$(INSTALL) -m 0755 $(BUILD_BINARY) $(INSTALL_ROOT)$(bindir)/$(program_prefix)phpdbg$(program_suffix)$(EXEEXT)
@echo "Installing phpdbg man page: $(INSTALL_ROOT)$(mandir)/man1/"
@$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man1
@$(INSTALL_DATA) sapi/phpdbg/phpdbg.1 $(INSTALL_ROOT)$(mandir)/man1/$(program_prefix)phpdbg$(program_suffix).1
@$(INSTALL_DATA) $(srcdir)/phpdbg.1 $(INSTALL_ROOT)$(mandir)/man1/$(program_prefix)phpdbg$(program_suffix).1
clean-phpdbg:
@echo "Cleaning phpdbg object files ..."

View file

@ -856,7 +856,8 @@ int phpdbg_open_sockets(char *address, int port[2], int (*listen)[2], int (*sock
return SUCCESS;
} /* }}} */
void phpdbg_signal_handler(int sig, siginfo_t *info, void *context) {
void phpdbg_signal_handler(int sig, siginfo_t *info, void *context) /* {{{ */
{
int is_handled = FAILURE;
TSRMLS_FETCH();
@ -874,10 +875,11 @@ void phpdbg_signal_handler(int sig, siginfo_t *info, void *context) {
break;
}
}
} /* }}} */
#endif
static inline zend_mm_heap *phpdbg_mm_get_heap() {
static inline zend_mm_heap *phpdbg_mm_get_heap() /* {{{ */
{
zend_mm_heap *mm_heap;
TSRMLS_FETCH();
@ -886,22 +888,22 @@ static inline zend_mm_heap *phpdbg_mm_get_heap() {
zend_mm_set_heap(mm_heap TSRMLS_CC);
return mm_heap;
}
} /* }}} */
void *phpdbg_malloc_wrapper(size_t size)
void *phpdbg_malloc_wrapper(size_t size) /* {{{ */
{
return zend_mm_alloc(phpdbg_mm_get_heap(), size);
}
} /* }}} */
void phpdbg_free_wrapper(void *p)
void phpdbg_free_wrapper(void *p) /* {{{ */
{
zend_mm_free(phpdbg_mm_get_heap(), p);
}
} /* }}} */
void *phpdbg_realloc_wrapper(void *ptr, size_t size)
void *phpdbg_realloc_wrapper(void *ptr, size_t size) /* {{{ */
{
return zend_mm_realloc(phpdbg_mm_get_heap(), ptr, size);
}
} /* }}} */
int main(int argc, char **argv) /* {{{ */
{