From 0966bdbdfa6bc90a39704bbbd5b6d40c7ebc75d7 Mon Sep 17 00:00:00 2001 From: Ryan Bloom Date: Wed, 5 Jul 2000 18:01:52 +0000 Subject: [PATCH] Remove some warnings from the latest compile. I don't know why these haven't turned up before. We were using the wrong types in our printf calls for times. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85767 13f79535-47bb-0310-9956-ffa450edef68 --- modules/http/http_protocol.c | 4 ++-- modules/loggers/mod_log_config.c | 2 +- server/mpm/dexter/dexter.c | 6 +++--- server/mpm/mpmt_pthread/mpm.h | 2 +- server/mpm/mpmt_pthread/mpmt_pthread.c | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 4fd5608370..ea4bcdf9e1 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -302,7 +302,7 @@ API_EXPORT(int) ap_set_byterange(request_rec *r) long tlength = 0; r->byterange = 2; - r->boundary = ap_psprintf(r->pool, "%lx%lx", + r->boundary = ap_psprintf(r->pool, "%llx%lx", r->request_time, (long) getpid()); while (internal_byterange(0, &tlength, r, &r_range, NULL, NULL)); ap_table_setn(r->headers_out, "Content-Length", @@ -1309,7 +1309,7 @@ API_EXPORT(void) ap_note_digest_auth_failure(request_rec *r) { ap_table_setn(r->err_headers_out, r->proxyreq ? "Proxy-Authenticate" : "WWW-Authenticate", - ap_psprintf(r->pool, "Digest realm=\"%s\", nonce=\"%lu\"", + ap_psprintf(r->pool, "Digest realm=\"%s\", nonce=\"%llx\"", ap_auth_name(r), r->request_time)); } diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c index 026590647c..10bd9d1035 100644 --- a/modules/loggers/mod_log_config.c +++ b/modules/loggers/mod_log_config.c @@ -432,7 +432,7 @@ static const char *log_request_time(request_rec *r, char *a) static const char *log_request_duration(request_rec *r, char *a) { - return ap_psprintf(r->pool, "%ld", (ap_now() - r->request_time) / AP_USEC_PER_SEC); + return ap_psprintf(r->pool, "%lld", (ap_now() - r->request_time) / AP_USEC_PER_SEC); } /* These next two routines use the canonical name:port so that log diff --git a/server/mpm/dexter/dexter.c b/server/mpm/dexter/dexter.c index a5618426b6..6545eaa565 100644 --- a/server/mpm/dexter/dexter.c +++ b/server/mpm/dexter/dexter.c @@ -151,8 +151,8 @@ static ap_pool_t *thread_pool_parent; /* Parent of per-thread pools */ static pthread_mutex_t thread_pool_parent_mutex; static int child_num; -static int my_pid; /* Linux getpid() doesn't work except in main thread. Use - this instead */ +static unsigned int my_pid; /* Linux getpid() doesn't work except in + main thread. Use this instead */ /* Keep track of the number of worker threads currently active */ static int worker_thread_count; static pthread_mutex_t worker_thread_count_mutex; @@ -1087,7 +1087,7 @@ int ap_mpm_run(ap_pool_t *_pconf, ap_pool_t *plog, server_rec *s) ap_log_pid(pconf, ap_pid_fname); /* Initialize cross-process accept lock */ - lock_fname = ap_psprintf(_pconf, "%s.%lu", + lock_fname = ap_psprintf(_pconf, "%s.%u", ap_server_root_relative(_pconf, lock_fname), my_pid); rv = SAFE_ACCEPT(ap_create_lock(&process_accept_mutex, APR_MUTEX, diff --git a/server/mpm/mpmt_pthread/mpm.h b/server/mpm/mpmt_pthread/mpm.h index 455e3c5545..c9319c03eb 100644 --- a/server/mpm/mpmt_pthread/mpm.h +++ b/server/mpm/mpmt_pthread/mpm.h @@ -67,7 +67,7 @@ extern int ap_threads_per_child; extern int ap_max_requests_per_child; extern int ap_extended_status; extern int ap_max_daemons_limit; -extern int ap_my_pid; +extern unsigned int ap_my_pid; extern server_rec *ap_server_conf; extern scoreboard *ap_scoreboard_image; extern void clean_child_exit(int); diff --git a/server/mpm/mpmt_pthread/mpmt_pthread.c b/server/mpm/mpmt_pthread/mpmt_pthread.c index e351537c1b..f036c469bf 100644 --- a/server/mpm/mpmt_pthread/mpmt_pthread.c +++ b/server/mpm/mpmt_pthread/mpmt_pthread.c @@ -151,8 +151,8 @@ int raise_sigstop_flags; static ap_pool_t *pconf; /* Pool for config stuff */ static ap_pool_t *pchild; /* Pool for httpd child stuff */ -int ap_my_pid; /* Linux getpid() doesn't work except in main thread. Use - this instead */ +unsigned int ap_my_pid; /* Linux getpid() doesn't work except in main + thread. Use this instead */ /* Keep track of the number of worker threads currently active */ static int worker_thread_count; static pthread_mutex_t worker_thread_count_mutex; @@ -1110,7 +1110,7 @@ int ap_mpm_run(ap_pool_t *_pconf, ap_pool_t *plog, server_rec *s) ap_log_pid(pconf, ap_pid_fname); /* Initialize cross-process accept lock */ - lock_fname = ap_psprintf(_pconf, "%s.%lu", + lock_fname = ap_psprintf(_pconf, "%s.%u", ap_server_root_relative(_pconf, lock_fname), ap_my_pid); rv = ap_create_lock(&process_accept_mutex, APR_MUTEX, APR_CROSS_PROCESS, -- 2.40.0