From: Andreas Steinmetz Date: Tue, 23 Aug 2005 16:06:24 +0000 (+0000) Subject: fix 64bit build warnings X-Git-Tag: 2.3.0~3103 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aec1dab812fc312e8d3772b26625b9f4b0eb642f;p=apache fix 64bit build warnings git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@239423 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c index 0437f884ca..4c1b3bab98 100644 --- a/modules/generators/mod_cgid.c +++ b/modules/generators/mod_cgid.c @@ -684,7 +684,7 @@ static int cgid_server(void *data) if (cgid_req.req_type == GETPID_REQ) { pid_t pid; - pid = (pid_t)apr_hash_get(script_hash, &cgid_req.conn_id, sizeof(cgid_req.conn_id)); + pid = (pid_t)((long)apr_hash_get(script_hash, &cgid_req.conn_id, sizeof(cgid_req.conn_id))); if (write(sd2, &pid, sizeof(pid)) != sizeof(pid)) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, main_server, @@ -782,7 +782,7 @@ static int cgid_server(void *data) memcpy(key, &cgid_req.conn_id, sizeof(cgid_req.conn_id)); } apr_hash_set(script_hash, key, sizeof(cgid_req.conn_id), - (void *)procnew->pid); + (void *)((long)procnew->pid)); } } } @@ -1097,7 +1097,7 @@ static int log_script(request_rec *r, cgid_server_conf * conf, int ret, static apr_status_t close_unix_socket(void *thefd) { - int fd = (int)thefd; + int fd = (int)((long)thefd); return close(fd); } @@ -1140,8 +1140,8 @@ static int connect_to_daemon(int *sdptr, request_rec *r, } } else { - apr_pool_cleanup_register(r->pool, (void *)sd, close_unix_socket, - apr_pool_cleanup_null); + apr_pool_cleanup_register(r->pool, (void *)((long)sd), + close_unix_socket, apr_pool_cleanup_null); break; /* we got connected! */ } /* gotta try again, but make sure the cgid daemon is still around */ @@ -1377,7 +1377,7 @@ static int cgid_handler(request_rec *r) */ apr_os_pipe_put_ex(&tempsock, &sd, 1, r->pool); - apr_pool_cleanup_kill(r->pool, (void *)sd, close_unix_socket); + apr_pool_cleanup_kill(r->pool, (void *)((long)sd), close_unix_socket); if ((argv0 = strrchr(r->filename, '/')) != NULL) argv0++; @@ -1672,7 +1672,7 @@ static int include_cmd(include_ctx_t *ctx, ap_filter_t *f, * get rid of the cleanup we registered when we created the socket. */ apr_os_pipe_put_ex(&tempsock, &sd, 1, r->pool); - apr_pool_cleanup_kill(r->pool, (void *)sd, close_unix_socket); + apr_pool_cleanup_kill(r->pool, (void *)((long)sd), close_unix_socket); APR_BRIGADE_INSERT_TAIL(bb, apr_bucket_pipe_create(tempsock, f->c->bucket_alloc));