Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/dist/postfix/master Play casting tricks so that storing ...



details:   https://anonhg.NetBSD.org/src/rev/91b8b65dfa79
branches:  trunk
changeset: 485735:91b8b65dfa79
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu May 04 06:10:53 2000 +0000

description:
Play casting tricks so that storing an int in the context pointer
doens't generate warnings on LP64 platforms (the usage is safe).

diffstat:

 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(-)

diffs (90 lines):

diff -r 626e7eac0801 -r 91b8b65dfa79 gnu/dist/postfix/master/multi_server.c
--- a/gnu/dist/postfix/master/multi_server.c    Thu May 04 06:08:56 2000 +0000
+++ b/gnu/dist/postfix/master/multi_server.c    Thu May 04 06:10:53 2000 +0000
@@ -258,7 +258,7 @@
 
 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_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 @@
     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 -r 626e7eac0801 -r 91b8b65dfa79 gnu/dist/postfix/master/single_server.c
--- a/gnu/dist/postfix/master/single_server.c   Thu May 04 06:08:56 2000 +0000
+++ b/gnu/dist/postfix/master/single_server.c   Thu May 04 06:10:53 2000 +0000
@@ -229,7 +229,7 @@
 
 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_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 @@
     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 -r 626e7eac0801 -r 91b8b65dfa79 gnu/dist/postfix/master/trigger_server.c
--- a/gnu/dist/postfix/master/trigger_server.c  Thu May 04 06:08:56 2000 +0000
+++ b/gnu/dist/postfix/master/trigger_server.c  Thu May 04 06:10:53 2000 +0000
@@ -228,7 +228,7 @@
 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_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 @@
     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);



Home | Main Index | Thread Index | Old Index