Skip to content

Commit

Permalink
Merge branch 'PHP-7.4'
Browse files Browse the repository at this point in the history
* PHP-7.4:
  Remove HAVE_SIGNAL_H
  • Loading branch information
petk committed Apr 7, 2019
2 parents 309edb0 + 5f89157 commit e4a563b
Show file tree
Hide file tree
Showing 16 changed files with 11 additions and 52 deletions.
2 changes: 0 additions & 2 deletions TSRM/TSRM.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ typedef int ts_rsrc_id;
# define MUTEX_T pthread_mutex_t *
#endif

#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif

typedef void (*ts_allocate_ctor)(void *);
typedef void (*ts_allocate_dtor)(void *);
Expand Down
1 change: 0 additions & 1 deletion Zend/Zend.m4
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ malloc.h \
unistd.h \
sys/types.h \
sys/time.h \
signal.h \
unix.h \
cpuid.h \
dlfcn.h)
Expand Down
4 changes: 1 addition & 3 deletions Zend/zend_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@
#include "zend_operators.h"
#include "zend_multiply.h"
#include "zend_bitset.h"
#include <signal.h>

#ifdef HAVE_SIGNAL_H
# include <signal.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
Expand Down
3 changes: 0 additions & 3 deletions Zend/zend_signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@

#include "zend.h"
#include "zend_globals.h"

#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif

#ifdef HAVE_UNISTD_H
#include <unistd.h>
Expand Down
4 changes: 1 addition & 3 deletions Zend/zend_signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@

#ifdef ZEND_SIGNALS

# ifdef HAVE_SIGNAL_H
# include <signal.h>
# endif
#include <signal.h>

#ifndef NSIG
#define NSIG 65
Expand Down
3 changes: 1 addition & 2 deletions ext/standard/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@
#if HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#if HAVE_SIGNAL_H

#include <signal.h>
#endif

#if HAVE_SYS_TYPES_H
#include <sys/types.h>
Expand Down
2 changes: 0 additions & 2 deletions ext/standard/mail.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@
#endif

#if PHP_SIGCHILD
#if HAVE_SIGNAL_H
#include <signal.h>
#endif
#endif

#include "php_syslog.h"
#include "php_mail.h"
Expand Down
2 changes: 0 additions & 2 deletions ext/standard/proc_open.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@
#if HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#if HAVE_SIGNAL_H
#include <signal.h>
#endif

#if HAVE_SYS_STAT_H
#include <sys/stat.h>
Expand Down
4 changes: 2 additions & 2 deletions main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#if HAVE_SIGNAL_H

#include <signal.h>
#endif

#if HAVE_SETLOCALE
#include <locale.h>
#endif
Expand Down
6 changes: 1 addition & 5 deletions sapi/cgi/cgi_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@
# include <unistd.h>
#endif

#if HAVE_SIGNAL_H
# include <signal.h>
#endif
#include <signal.h>

#if HAVE_SETLOCALE
# include <locale.h>
Expand Down Expand Up @@ -1779,7 +1777,6 @@ int main(int argc, char *argv[])
char *decoded_query_string;
int skip_getopt = 0;

#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()
Expand All @@ -1788,7 +1785,6 @@ int main(int argc, char *argv[])
does that for us! [email protected]
20000419 */
#endif
#endif

#ifdef ZTS
php_tsrm_startup();
Expand Down
11 changes: 2 additions & 9 deletions sapi/cli/php_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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()
Expand All @@ -1242,8 +1237,6 @@ int main(int argc, char *argv[])
does that for us! [email protected]
20000419 */
#endif
#endif


#ifdef ZTS
php_tsrm_startup();
Expand Down
4 changes: 1 addition & 3 deletions sapi/cli/php_cli_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions sapi/embed/php_embed.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ EMBED_SAPI_API int php_embed_init(int argc, char **argv)
{
zend_llist global_vars;

#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()
Expand All @@ -168,7 +167,6 @@ EMBED_SAPI_API int php_embed_init(int argc, char **argv)
does that for us! [email protected]
20000419 */
#endif
#endif

#ifdef ZTS
php_tsrm_startup();
Expand Down
6 changes: 1 addition & 5 deletions sapi/fpm/fpm/fpm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@
# include <unistd.h>
#endif

#if HAVE_SIGNAL_H
# include <signal.h>
#endif
#include <signal.h>

#if HAVE_SETLOCALE
# include <locale.h>
Expand Down Expand Up @@ -1567,7 +1565,6 @@ int main(int argc, char *argv[])
zend_bool old_rc_debug;
#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()
Expand All @@ -1576,7 +1573,6 @@ int main(int argc, char *argv[])
does that for us! [email protected]
20000419 */
#endif
#endif

#ifdef ZTS
php_tsrm_startup();
Expand Down
7 changes: 0 additions & 7 deletions sapi/litespeed/lsapi_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,7 @@

#endif

#if HAVE_SIGNAL_H

#include <signal.h>

#endif

#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
Expand Down Expand Up @@ -1228,11 +1223,9 @@ int main( int argc, char * argv[] )
int slow_script_msec = 0;
char time_buf[40];

#ifdef HAVE_SIGNAL_H
#if defined(SIGPIPE) && defined(SIG_IGN)
signal(SIGPIPE, SIG_IGN);
#endif
#endif

#ifdef ZTS
php_tsrm_startup();
Expand Down
2 changes: 1 addition & 1 deletion sapi/phpdbg/phpdbg.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#include "zend_ini_scanner.h"
#include "zend_stream.h"
#include "zend_signal.h"
#if !defined(_WIN32) && !defined(ZEND_SIGNALS) && defined(HAVE_SIGNAL_H)
#if !defined(_WIN32) && !defined(ZEND_SIGNALS)
# include <signal.h>
#elif defined(PHP_WIN32)
# include "win32/signal.h"
Expand Down

0 comments on commit e4a563b

Please sign in to comment.