Skip to content

Commit 819df03

Browse files
committed
Merge branch 'PHP-8.0' into PHP-8.1
2 parents 2bd58db + e2a5428 commit 819df03

23 files changed

+71
-139
lines changed

sapi/fpm/fpm/events/devpoll.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include <errno.h>
3030

3131
static int fpm_event_devpoll_init(int max);
32-
static int fpm_event_devpoll_clean();
32+
static int fpm_event_devpoll_clean(void);
3333
static int fpm_event_devpoll_wait(struct fpm_event_queue_s *queue, unsigned long int timeout);
3434
static int fpm_event_devpoll_add(struct fpm_event_s *ev);
3535
static int fpm_event_devpoll_remove(struct fpm_event_s *ev);
@@ -51,15 +51,14 @@ static int npollfds = 0;
5151

5252
#endif /* HAVE_DEVPOLL */
5353

54-
struct fpm_event_module_s *fpm_event_devpoll_module(void) /* {{{ */
54+
struct fpm_event_module_s *fpm_event_devpoll_module(void)
5555
{
5656
#ifdef HAVE_DEVPOLL
5757
return &devpoll_module;
5858
#else
5959
return NULL;
6060
#endif /* HAVE_DEVPOLL */
6161
}
62-
/* }}} */
6362

6463
#ifdef HAVE_DEVPOLL
6564

@@ -113,7 +112,7 @@ static int fpm_event_devpoll_init(int max) /* {{{ */
113112
/*
114113
* Clean the module
115114
*/
116-
static int fpm_event_devpoll_clean() /* {{{ */
115+
static int fpm_event_devpoll_clean(void)
117116
{
118117
/* close /dev/poll if open */
119118
if (dpfd > -1) {
@@ -136,7 +135,6 @@ static int fpm_event_devpoll_clean() /* {{{ */
136135
npollfds = 0;
137136
return 0;
138137
}
139-
/* }}} */
140138

141139
/*
142140
* wait for events or timeout

sapi/fpm/fpm/events/epoll.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,14 @@ static int epollfd = -1;
4646

4747
#endif /* HAVE_EPOLL */
4848

49-
struct fpm_event_module_s *fpm_event_epoll_module(void) /* {{{ */
49+
struct fpm_event_module_s *fpm_event_epoll_module(void)
5050
{
5151
#ifdef HAVE_EPOLL
5252
return &epoll_module;
5353
#else
5454
return NULL;
5555
#endif /* HAVE_EPOLL */
5656
}
57-
/* }}} */
5857

5958
#ifdef HAVE_EPOLL
6059

@@ -92,7 +91,7 @@ static int fpm_event_epoll_init(int max) /* {{{ */
9291
/*
9392
* Clean the module
9493
*/
95-
static int fpm_event_epoll_clean() /* {{{ */
94+
static int fpm_event_epoll_clean(void)
9695
{
9796
/* free epollfds */
9897
if (epollfds) {
@@ -108,7 +107,6 @@ static int fpm_event_epoll_clean() /* {{{ */
108107

109108
return 0;
110109
}
111-
/* }}} */
112110

113111
/*
114112
* wait for events or timeout

sapi/fpm/fpm/events/poll.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,21 @@ static int next_free_slot = 0;
5050
/*
5151
* return the module configuration
5252
*/
53-
struct fpm_event_module_s *fpm_event_poll_module(void) /* {{{ */
53+
struct fpm_event_module_s *fpm_event_poll_module(void)
5454
{
5555
#ifdef HAVE_POLL
5656
return &poll_module;
5757
#else
5858
return NULL;
5959
#endif /* HAVE_POLL */
6060
}
61-
/* }}} */
6261

6362
#ifdef HAVE_POLL
6463

6564
/*
6665
* Init the module
6766
*/
68-
static int fpm_event_poll_init(int max) /* {{{ */
67+
static int fpm_event_poll_init(int max)
6968
{
7069
int i;
7170

@@ -99,12 +98,11 @@ static int fpm_event_poll_init(int max) /* {{{ */
9998
npollfds = max;
10099
return 0;
101100
}
102-
/* }}} */
103101

104102
/*
105103
* Clean the module
106104
*/
107-
static int fpm_event_poll_clean() /* {{{ */
105+
static int fpm_event_poll_clean(void)
108106
{
109107
/* free pollfds */
110108
if (pollfds) {
@@ -121,7 +119,6 @@ static int fpm_event_poll_clean() /* {{{ */
121119
npollfds = 0;
122120
return 0;
123121
}
124-
/* }}} */
125122

126123
/*
127124
* wait for events or timeout

sapi/fpm/fpm/events/port.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <errno.h>
2727

2828
static int fpm_event_port_init(int max);
29-
static int fpm_event_port_clean();
29+
static int fpm_event_port_clean(void);
3030
static int fpm_event_port_wait(struct fpm_event_queue_s *queue, unsigned long int timeout);
3131
static int fpm_event_port_add(struct fpm_event_s *ev);
3232
static int fpm_event_port_remove(struct fpm_event_s *ev);
@@ -90,7 +90,7 @@ static int fpm_event_port_init(int max) /* {{{ */
9090
/*
9191
* Clean the module
9292
*/
93-
static int fpm_event_port_clean() /* {{{ */
93+
static int fpm_event_port_clean(void)
9494
{
9595
if (pfd > -1) {
9696
close(pfd);
@@ -105,7 +105,6 @@ static int fpm_event_port_clean() /* {{{ */
105105
nevents = 0;
106106
return 0;
107107
}
108-
/* }}} */
109108

110109
/*
111110
* wait for events or timeout

sapi/fpm/fpm/events/select.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,14 @@ static fd_set fds;
5353
/*
5454
* return the module configuration
5555
*/
56-
struct fpm_event_module_s *fpm_event_select_module(void) /* {{{ */
56+
struct fpm_event_module_s *fpm_event_select_module(void)
5757
{
5858
#ifdef HAVE_SELECT
5959
return &select_module;
6060
#else
6161
return NULL;
6262
#endif /* HAVE_SELECT */
6363
}
64-
/* }}} */
6564

6665
#ifdef HAVE_SELECT
6766

sapi/fpm/fpm/fpm_children.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static void fpm_children_cleanup(int which, void *arg) /* {{{ */
3838
}
3939
/* }}} */
4040

41-
static struct fpm_child_s *fpm_child_alloc(void) /* {{{ */
41+
static struct fpm_child_s *fpm_child_alloc(void)
4242
{
4343
struct fpm_child_s *ret;
4444

@@ -52,7 +52,6 @@ static struct fpm_child_s *fpm_child_alloc(void) /* {{{ */
5252
ret->scoreboard_i = -1;
5353
return ret;
5454
}
55-
/* }}} */
5655

5756
static void fpm_child_free(struct fpm_child_s *child) /* {{{ */
5857
{
@@ -177,7 +176,7 @@ int fpm_children_free(struct fpm_child_s *child) /* {{{ */
177176
}
178177
/* }}} */
179178

180-
void fpm_children_bury() /* {{{ */
179+
void fpm_children_bury(void)
181180
{
182181
int status;
183182
pid_t pid;
@@ -303,7 +302,6 @@ void fpm_children_bury() /* {{{ */
303302
}
304303
}
305304
}
306-
/* }}} */
307305

308306
static struct fpm_child_s *fpm_resources_prepare(struct fpm_worker_pool_s *wp) /* {{{ */
309307
{
@@ -472,7 +470,7 @@ int fpm_children_create_initial(struct fpm_worker_pool_s *wp) /* {{{ */
472470
}
473471
/* }}} */
474472

475-
int fpm_children_init_main() /* {{{ */
473+
int fpm_children_init_main(void)
476474
{
477475
if (fpm_global_config.emergency_restart_threshold &&
478476
fpm_global_config.emergency_restart_interval) {
@@ -492,4 +490,3 @@ int fpm_children_init_main() /* {{{ */
492490

493491
return 0;
494492
}
495-
/* }}} */

sapi/fpm/fpm/fpm_clock.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
static int monotonic_works;
1717

18-
int fpm_clock_init() /* {{{ */
18+
int fpm_clock_init(void)
1919
{
2020
struct timespec ts;
2121

@@ -27,7 +27,6 @@ int fpm_clock_init() /* {{{ */
2727

2828
return 0;
2929
}
30-
/* }}} */
3130

3231
int fpm_clock_get(struct timeval *tv) /* {{{ */
3332
{
@@ -59,7 +58,7 @@ static clock_serv_t mach_clock;
5958

6059
/* this code borrowed from here: http://lists.apple.com/archives/Darwin-development/2002/Mar/msg00746.html */
6160
/* mach_clock also should be re-initialized in child process after fork */
62-
int fpm_clock_init() /* {{{ */
61+
int fpm_clock_init(void)
6362
{
6463
kern_return_t ret;
6564
mach_timespec_t aTime;
@@ -81,7 +80,6 @@ int fpm_clock_init() /* {{{ */
8180

8281
return 0;
8382
}
84-
/* }}} */
8583

8684
int fpm_clock_get(struct timeval *tv) /* {{{ */
8785
{
@@ -104,11 +102,10 @@ int fpm_clock_get(struct timeval *tv) /* {{{ */
104102

105103
#else /* no clock */
106104

107-
int fpm_clock_init() /* {{{ */
105+
int fpm_clock_init(void)
108106
{
109107
return 0;
110108
}
111-
/* }}} */
112109

113110
int fpm_clock_get(struct timeval *tv) /* {{{ */
114111
{

sapi/fpm/fpm/fpm_conf.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ static char *fpm_conf_set_array(zval *key, zval *value, void **config, int conve
593593
}
594594
/* }}} */
595595

596-
static void *fpm_worker_pool_config_alloc(void) /* {{{ */
596+
static void *fpm_worker_pool_config_alloc(void)
597597
{
598598
struct fpm_worker_pool_s *wp;
599599

@@ -635,7 +635,6 @@ static void *fpm_worker_pool_config_alloc(void) /* {{{ */
635635
current_wp = wp;
636636
return wp->config;
637637
}
638-
/* }}} */
639638

640639
int fpm_worker_pool_config_free(struct fpm_worker_pool_config_s *wpc) /* {{{ */
641640
{
@@ -795,7 +794,7 @@ static int fpm_evaluate_full_path(char **path, struct fpm_worker_pool_s *wp, cha
795794
}
796795
/* }}} */
797796

798-
static int fpm_conf_process_all_pools(void) /* {{{ */
797+
static int fpm_conf_process_all_pools(void)
799798
{
800799
struct fpm_worker_pool_s *wp, *wp2;
801800

@@ -1194,9 +1193,8 @@ static int fpm_conf_process_all_pools(void) /* {{{ */
11941193
}
11951194
return 0;
11961195
}
1197-
/* }}} */
11981196

1199-
int fpm_conf_unlink_pid() /* {{{ */
1197+
int fpm_conf_unlink_pid(void)
12001198
{
12011199
if (fpm_global_config.pid_file) {
12021200
if (0 > unlink(fpm_global_config.pid_file)) {
@@ -1206,9 +1204,8 @@ int fpm_conf_unlink_pid() /* {{{ */
12061204
}
12071205
return 0;
12081206
}
1209-
/* }}} */
12101207

1211-
int fpm_conf_write_pid() /* {{{ */
1208+
int fpm_conf_write_pid(void)
12121209
{
12131210
int fd;
12141211

@@ -1235,7 +1232,6 @@ int fpm_conf_write_pid() /* {{{ */
12351232
}
12361233
return 0;
12371234
}
1238-
/* }}} */
12391235

12401236
static int fpm_conf_post_process(int force_daemon) /* {{{ */
12411237
{
@@ -1662,7 +1658,7 @@ int fpm_conf_load_ini_file(char *filename) /* {{{ */
16621658
}
16631659
/* }}} */
16641660

1665-
static void fpm_conf_dump(void) /* {{{ */
1661+
static void fpm_conf_dump(void)
16661662
{
16671663
struct fpm_worker_pool_s *wp;
16681664

@@ -1766,7 +1762,6 @@ static void fpm_conf_dump(void) /* {{{ */
17661762
zlog(ZLOG_NOTICE, " ");
17671763
}
17681764
}
1769-
/* }}} */
17701765

17711766
int fpm_conf_init_main(int test_conf, int force_daemon) /* {{{ */
17721767
{

sapi/fpm/fpm/fpm_env.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ int setenv(char *name, char *value, int overwrite) /* {{{ */
6060
#endif
6161

6262
#ifndef HAVE_CLEARENV
63-
void clearenv() /* {{{ */
63+
void clearenv(void)
6464
{
6565
char **envp;
6666
char *s;
@@ -79,7 +79,6 @@ void clearenv() /* {{{ */
7979
}
8080

8181
}
82-
/* }}} */
8382
#endif
8483

8584
#ifndef HAVE_UNSETENV
@@ -195,7 +194,7 @@ static int fpm_env_conf_wp(struct fpm_worker_pool_s *wp) /* {{{ */
195194
}
196195
/* }}} */
197196

198-
int fpm_env_init_main() /* {{{ */
197+
int fpm_env_init_main(void)
199198
{
200199
struct fpm_worker_pool_s *wp;
201200
char *title;
@@ -273,4 +272,3 @@ int fpm_env_init_main() /* {{{ */
273272
efree(title);
274273
return 0;
275274
}
276-
/* }}} */

sapi/fpm/fpm/fpm_events.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -304,19 +304,17 @@ int fpm_event_pre_init(char *mechanism) /* {{{ */
304304
}
305305
/* }}} */
306306

307-
const char *fpm_event_mechanism_name() /* {{{ */
307+
const char *fpm_event_mechanism_name(void)
308308
{
309309
return module ? module->name : NULL;
310310
}
311-
/* }}} */
312311

313-
int fpm_event_support_edge_trigger() /* {{{ */
312+
int fpm_event_support_edge_trigger(void)
314313
{
315314
return module ? module->support_edge_trigger : 0;
316315
}
317-
/* }}} */
318316

319-
int fpm_event_init_main() /* {{{ */
317+
int fpm_event_init_main(void)
320318
{
321319
struct fpm_worker_pool_s *wp;
322320
int max;
@@ -352,7 +350,6 @@ int fpm_event_init_main() /* {{{ */
352350
}
353351
return 0;
354352
}
355-
/* }}} */
356353

357354
void fpm_event_loop(int err) /* {{{ */
358355
{

0 commit comments

Comments
 (0)