You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2011/04/07 01:00:44 UTC
svn commit: r1089659 - in /httpd/httpd/trunk/server/mpm/winnt: mpm_winnt.c
nt_eventlog.c
Author: trawick
Date: Wed Apr 6 23:00:44 2011
New Revision: 1089659
URL: http://svn.apache.org/viewvc?rev=1089659&view=rev
Log:
format string fixes:
DWORD is unsigned long and needs %lu instead of %d or %i
Modified:
httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c
httpd/httpd/trunk/server/mpm/winnt/nt_eventlog.c
Modified: httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c?rev=1089659&r1=1089658&r2=1089659&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c (original)
+++ httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c Wed Apr 6 23:00:44 2011
@@ -473,7 +473,7 @@ static int send_listeners_to_child(apr_p
lpWSAProtocolInfo = apr_pcalloc(p, sizeof(WSAPROTOCOL_INFO));
apr_os_sock_get(&nsd, lr->sd);
ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, ap_server_conf,
- "Parent: Duplicating socket %d and sending it to child process %d",
+ "Parent: Duplicating socket %d and sending it to child process %lu",
nsd, dwProcessId);
if (WSADuplicateSocket(nsd, dwProcessId,
lpWSAProtocolInfo) == SOCKET_ERROR) {
@@ -492,7 +492,7 @@ static int send_listeners_to_child(apr_p
}
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
- "Parent: Sent %d listeners to child %d", lcnt, dwProcessId);
+ "Parent: Sent %d listeners to child %lu", lcnt, dwProcessId);
return 0;
}
@@ -593,7 +593,7 @@ static int create_process(apr_pool_t *p,
}
env = apr_palloc(ptemp, (envc + 2) * sizeof (char*));
memcpy(env, _environ, envc * sizeof (char*));
- apr_snprintf(pidbuf, sizeof(pidbuf), "AP_PARENT_PID=%i", parent_pid);
+ apr_snprintf(pidbuf, sizeof(pidbuf), "AP_PARENT_PID=%lu", parent_pid);
env[envc] = pidbuf;
env[envc + 1] = NULL;
@@ -807,14 +807,14 @@ static int master_main(server_rec *s, HA
|| exitcode == APEXIT_CHILDINIT
|| exitcode == APEXIT_INIT) {
ap_log_error(APLOG_MARK, APLOG_CRIT, 0, ap_server_conf,
- "Parent: child process exited with status %u -- Aborting.", exitcode);
+ "Parent: child process exited with status %lu -- Aborting.", exitcode);
shutdown_pending = 1;
}
else {
int i;
restart_pending = 1;
ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, ap_server_conf,
- "Parent: child process exited with status %u -- Restarting.", exitcode);
+ "Parent: child process exited with status %lu -- Restarting.", exitcode);
for (i = 0; i < ap_threads_per_child; i++) {
ap_update_child_status_from_indexes(0, i, SERVER_DEAD, NULL);
}
@@ -1518,7 +1518,7 @@ static int winnt_post_config(apr_pool_t
* across a restart
*/
PSECURITY_ATTRIBUTES sa = GetNullACL(); /* returns NULL if invalid (Win95?) */
- setup_signal_names(apr_psprintf(pconf,"ap%d", parent_pid));
+ setup_signal_names(apr_psprintf(pconf, "ap%lu", parent_pid));
ap_log_pid(pconf, ap_pid_fname);
@@ -1608,7 +1608,7 @@ static void winnt_child_init(apr_pool_t
{
apr_status_t rv;
- setup_signal_names(apr_psprintf(pchild,"ap%d", parent_pid));
+ setup_signal_names(apr_psprintf(pchild, "ap%lu", parent_pid));
/* This is a child process, not in single process mode */
if (!one_process) {
Modified: httpd/httpd/trunk/server/mpm/winnt/nt_eventlog.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/nt_eventlog.c?rev=1089659&r1=1089658&r2=1089659&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/winnt/nt_eventlog.c (original)
+++ httpd/httpd/trunk/server/mpm/winnt/nt_eventlog.c Wed Apr 6 23:00:44 2011
@@ -99,7 +99,7 @@ static DWORD WINAPI service_stderr_threa
if ((errres = GetLastError()) != ERROR_BROKEN_PIPE) {
apr_snprintf(errbuf, sizeof(errbuf),
- "Win32 error %d reading stderr pipe stream\r\n",
+ "Win32 error %lu reading stderr pipe stream\r\n",
GetLastError());
ReportEvent(hEventSource, EVENTLOG_ERROR_TYPE, 0,