From 474f2f53cc0dad6685617b2531e67f5a0d402f6f Mon Sep 17 00:00:00 2001 From: thorpej Date: Thu, 4 May 2000 06:10:53 +0000 Subject: [PATCH] Play casting tricks so that storing an int in the context pointer doens't generate warnings on LP64 platforms (the usage is safe). --- gnu/dist/postfix/master/multi_server.c | 6 +++--- gnu/dist/postfix/master/single_server.c | 6 +++--- gnu/dist/postfix/master/trigger_server.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gnu/dist/postfix/master/multi_server.c b/gnu/dist/postfix/master/multi_server.c index 2af61dc9df17..3ccea0fe6f70 100644 --- a/gnu/dist/postfix/master/multi_server.c +++ b/gnu/dist/postfix/master/multi_server.c @@ -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); diff --git a/gnu/dist/postfix/master/single_server.c b/gnu/dist/postfix/master/single_server.c index 15e500e41739..5958c7014bcc 100644 --- a/gnu/dist/postfix/master/single_server.c +++ b/gnu/dist/postfix/master/single_server.c @@ -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); diff --git a/gnu/dist/postfix/master/trigger_server.c b/gnu/dist/postfix/master/trigger_server.c index 7c777319c14f..fd163fe5935e 100644 --- a/gnu/dist/postfix/master/trigger_server.c +++ b/gnu/dist/postfix/master/trigger_server.c @@ -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);