summaryrefslogtreecommitdiff
path: root/sapi/cli
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2019-04-07 15:57:21 +0200
committerPeter Kokot <peterkokot@gmail.com>2019-04-07 15:57:21 +0200
commite4a563b0c0f65ea26382f81ac24bf0a30baf257a (patch)
treea7dc326b7ac1b58ea8eff062cb0358595448b4e8 /sapi/cli
parent309edb070d7644550f96bce2d89b0ac145b3940e (diff)
parent5f8915786f9fc3ec1af1089c9848f65a8d1541f5 (diff)
downloadphp-git-e4a563b0c0f65ea26382f81ac24bf0a30baf257a.tar.gz
Merge branch 'PHP-7.4'
* PHP-7.4: Remove HAVE_SIGNAL_H
Diffstat (limited to 'sapi/cli')
-rw-r--r--sapi/cli/php_cli.c11
-rw-r--r--sapi/cli/php_cli_server.c4
2 files changed, 3 insertions, 12 deletions
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 1aa5d83dd9..425ca20109 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -46,9 +46,9 @@
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#if HAVE_SIGNAL_H
+
#include <signal.h>
-#endif
+
#if HAVE_SETLOCALE
#include <locale.h>
#endif
@@ -66,10 +66,6 @@
#include "win32/php_registry.h"
#endif
-#if HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-
#ifdef __riscos__
#include <unixlib/local.h>
#endif
@@ -1233,7 +1229,6 @@ int main(int argc, char *argv[])
}
#endif
-#ifdef HAVE_SIGNAL_H
#if defined(SIGPIPE) && defined(SIG_IGN)
signal(SIGPIPE, SIG_IGN); /* ignore SIGPIPE in standalone mode so
that sockets created via fsockopen()
@@ -1242,8 +1237,6 @@ int main(int argc, char *argv[])
does that for us! thies@thieso.net
20000419 */
#endif
-#endif
-
#ifdef ZTS
php_tsrm_startup();
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index deb61816a7..c814b73f26 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -43,9 +43,7 @@
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#if HAVE_SIGNAL_H
#include <signal.h>
-#endif
#if HAVE_SETLOCALE
#include <locale.h>
#endif
@@ -2601,7 +2599,7 @@ int do_cli_server(int argc, char **argv) /* {{{ */
PHP_VERSION, buf, server_bind_address, document_root);
}
-#if defined(HAVE_SIGNAL_H) && defined(SIGINT)
+#if defined(SIGINT)
signal(SIGINT, php_cli_server_sigint_handler);
zend_signal_init();
#endif