Play casting tricks so that storing an int in the context pointer
doens't generate warnings on LP64 platforms (the usage is safe).
This commit is contained in:
parent
926784fb90
commit
474f2f53cc
6
gnu/dist/postfix/master/multi_server.c
vendored
6
gnu/dist/postfix/master/multi_server.c
vendored
@ -258,7 +258,7 @@ static void multi_server_wakeup(int fd)
|
||||
|
||||
static void multi_server_accept_local(int unused_event, char *context)
|
||||
{
|
||||
int listen_fd = (int) context;
|
||||
int listen_fd = (int) (long) context;
|
||||
int time_left = -1;
|
||||
int fd;
|
||||
|
||||
@ -292,7 +292,7 @@ static void multi_server_accept_local(int unused_event, char *context)
|
||||
|
||||
static void multi_server_accept_inet(int unused_event, char *context)
|
||||
{
|
||||
int listen_fd = (int) context;
|
||||
int listen_fd = (int) (long) context;
|
||||
int time_left = -1;
|
||||
int fd;
|
||||
|
||||
@ -557,7 +557,7 @@ NORETURN multi_server_main(int argc, char **argv, MULTI_SERVER_FN service,...)
|
||||
if (var_idle_limit > 0)
|
||||
event_request_timer(multi_server_timeout, (char *) 0, var_idle_limit);
|
||||
for (fd = MASTER_LISTEN_FD; fd < MASTER_LISTEN_FD + socket_count; fd++) {
|
||||
event_enable_read(fd, multi_server_accept, (char *) fd);
|
||||
event_enable_read(fd, multi_server_accept, (char *) (long) fd);
|
||||
close_on_exec(fd, CLOSE_ON_EXEC);
|
||||
}
|
||||
event_enable_read(MASTER_STATUS_FD, multi_server_abort, (char *) 0);
|
||||
|
6
gnu/dist/postfix/master/single_server.c
vendored
6
gnu/dist/postfix/master/single_server.c
vendored
@ -229,7 +229,7 @@ static void single_server_wakeup(int fd)
|
||||
|
||||
static void single_server_accept_local(int unused_event, char *context)
|
||||
{
|
||||
int listen_fd = (int) context;
|
||||
int listen_fd = (int) (long) context;
|
||||
int time_left = -1;
|
||||
int fd;
|
||||
|
||||
@ -262,7 +262,7 @@ static void single_server_accept_local(int unused_event, char *context)
|
||||
|
||||
static void single_server_accept_inet(int unused_event, char *context)
|
||||
{
|
||||
int listen_fd = (int) context;
|
||||
int listen_fd = (int) (long) context;
|
||||
int time_left = -1;
|
||||
int fd;
|
||||
|
||||
@ -526,7 +526,7 @@ NORETURN single_server_main(int argc, char **argv, SINGLE_SERVER_FN service,...)
|
||||
if (var_idle_limit > 0)
|
||||
event_request_timer(single_server_timeout, (char *) 0, var_idle_limit);
|
||||
for (fd = MASTER_LISTEN_FD; fd < MASTER_LISTEN_FD + socket_count; fd++) {
|
||||
event_enable_read(fd, single_server_accept, (char *) fd);
|
||||
event_enable_read(fd, single_server_accept, (char *) (long) fd);
|
||||
close_on_exec(fd, CLOSE_ON_EXEC);
|
||||
}
|
||||
event_enable_read(MASTER_STATUS_FD, single_server_abort, (char *) 0);
|
||||
|
6
gnu/dist/postfix/master/trigger_server.c
vendored
6
gnu/dist/postfix/master/trigger_server.c
vendored
@ -228,7 +228,7 @@ static void trigger_server_wakeup(int fd)
|
||||
static void trigger_server_accept_fifo(int unused_event, char *context)
|
||||
{
|
||||
char *myname = "trigger_server_accept_fifo";
|
||||
int listen_fd = (int) context;
|
||||
int listen_fd = (int) (long) context;
|
||||
|
||||
if (trigger_server_lock != 0
|
||||
&& myflock(vstream_fileno(trigger_server_lock), MYFLOCK_NONE) < 0)
|
||||
@ -251,7 +251,7 @@ static void trigger_server_accept_fifo(int unused_event, char *context)
|
||||
static void trigger_server_accept_local(int unused_event, char *context)
|
||||
{
|
||||
char *myname = "trigger_server_accept_local";
|
||||
int listen_fd = (int) context;
|
||||
int listen_fd = (int) (long) context;
|
||||
int time_left = 0;
|
||||
int fd;
|
||||
|
||||
@ -538,7 +538,7 @@ NORETURN trigger_server_main(int argc, char **argv, TRIGGER_SERVER_FN service,..
|
||||
if (var_idle_limit > 0)
|
||||
event_request_timer(trigger_server_timeout, (char *) 0, var_idle_limit);
|
||||
for (fd = MASTER_LISTEN_FD; fd < MASTER_LISTEN_FD + socket_count; fd++) {
|
||||
event_enable_read(fd, trigger_server_accept, (char *) fd);
|
||||
event_enable_read(fd, trigger_server_accept, (char *) (long) fd);
|
||||
close_on_exec(fd, CLOSE_ON_EXEC);
|
||||
}
|
||||
event_enable_read(MASTER_STATUS_FD, trigger_server_abort, (char *) 0);
|
||||
|
Loading…
Reference in New Issue
Block a user