diff options
| author | Bob Weinand <bobwei9@hotmail.com> | 2016-11-20 19:20:48 +0100 |
|---|---|---|
| committer | Bob Weinand <bobwei9@hotmail.com> | 2016-11-20 19:20:48 +0100 |
| commit | e3feeba3aedd8e4347fefa315effd7d4f9fa0ca1 (patch) | |
| tree | 661b53e8b73570024ba792732e1f227ffbfa7946 /sapi/phpdbg | |
| parent | d512f2193001caaf146889233d3656df32f59163 (diff) | |
| parent | 110a6cc6c04b95ce9fcde8611e10c40ea07e3d7d (diff) | |
| download | php-git-e3feeba3aedd8e4347fefa315effd7d4f9fa0ca1.tar.gz | |
Merge branch 'PHP-7.1'
Diffstat (limited to 'sapi/phpdbg')
| -rw-r--r-- | sapi/phpdbg/phpdbg.c | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg.h | 2 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_io.c | 10 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg_sigsafe.c | 4 |
4 files changed, 8 insertions, 10 deletions
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index 33a806d57d..1016cc2d39 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -1958,7 +1958,7 @@ phpdbg_main: if (PHPDBG_G(ops)) { phpdbg_print_opcodes(print_opline_func); } else { - quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("No opcodes could be compiled | No file specified or compilation failed?\n")); + zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("No opcodes could be compiled | No file specified or compilation failed?\n")); } goto phpdbg_out; } diff --git a/sapi/phpdbg/phpdbg.h b/sapi/phpdbg/phpdbg.h index 84041b125c..cf591a8a4e 100644 --- a/sapi/phpdbg/phpdbg.h +++ b/sapi/phpdbg/phpdbg.h @@ -116,8 +116,6 @@ #define memcpy(...) memcpy_tmp(__VA_ARGS__) #endif -#define quiet_write(...) ZEND_IGNORE_VALUE(write(__VA_ARGS__)) - #if !defined(PHPDBG_WEBDATA_TRANSFER_H) && !defined(PHPDBG_WEBHELPER_H) #ifdef ZTS diff --git a/sapi/phpdbg/phpdbg_io.c b/sapi/phpdbg/phpdbg_io.c index b2f4ba7c0d..65a14d0ccb 100644 --- a/sapi/phpdbg/phpdbg_io.c +++ b/sapi/phpdbg/phpdbg_io.c @@ -149,7 +149,7 @@ recv_once: #endif if (got_now == -1) { - quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("Read operation timed out!\n")); + zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("Read operation timed out!\n")); return -1; } i -= got_now; @@ -203,7 +203,7 @@ static int phpdbg_output_pager(int sock, const char *ptr, int len) { if (memchr(p, '\n', endp - p)) { char buf[PHPDBG_MAX_CMD]; - write(sock, ZEND_STRL("\r---Type <return> to continue or q <return> to quit---")); + zend_quiet_write(sock, ZEND_STRL("\r---Type <return> to continue or q <return> to quit---")); phpdbg_consume_stdin_line(buf); if (*buf == 'q') { break; @@ -305,7 +305,7 @@ PHPDBG_API int phpdbg_create_listenable_socket(const char *addr, unsigned short wrote = snprintf(buf, 128, "Could not translate address '%s'", addr); buf[wrote] = '\0'; - quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf)); + zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf)); return sock; } else { @@ -315,7 +315,7 @@ PHPDBG_API int phpdbg_create_listenable_socket(const char *addr, unsigned short wrote = snprintf(buf, 256, "Host '%s' not found. %s", addr, estrdup(gai_strerror(rc))); buf[wrote] = '\0'; - quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf)); + zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf)); return sock; #ifndef PHP_WIN32 @@ -330,7 +330,7 @@ PHPDBG_API int phpdbg_create_listenable_socket(const char *addr, unsigned short wrote = sprintf(buf, "Unable to create socket"); buf[wrote] = '\0'; - quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf)); + zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, buf, strlen(buf)); return sock; } diff --git a/sapi/phpdbg/phpdbg_sigsafe.c b/sapi/phpdbg/phpdbg_sigsafe.c index 2f987b3a15..081d864c5c 100644 --- a/sapi/phpdbg/phpdbg_sigsafe.c +++ b/sapi/phpdbg/phpdbg_sigsafe.c @@ -13,13 +13,13 @@ static void* zend_mm_mem_alloc(zend_mm_storage *storage, size_t size, size_t ali return (void *) (((size_t) PHPDBG_G(sigsafe_mem).mem & ~(alignment - 1)) + alignment); } - quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("Tried to allocate more than " EXP_STR(PHPDBG_SIGSAFE_MEM_SIZE) " bytes from stack memory in signal handler ... bailing out of signal handler\n")); + zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("Tried to allocate more than " EXP_STR(PHPDBG_SIGSAFE_MEM_SIZE) " bytes from stack memory in signal handler ... bailing out of signal handler\n")); if (*EG(bailout)) { LONGJMP(*EG(bailout), FAILURE); } - quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("Bailed out without a bailout address in signal handler!\n")); + zend_quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("Bailed out without a bailout address in signal handler!\n")); return NULL; } |
