httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <bp...@pacbell.net>
Subject Re: [Win32] Apache 2.0.40-dev error compiling latest snapshots
Date Sun, 07 Jul 2002 06:19:55 GMT
On Sat, 2002-07-06 at 23:07, Sebastian Bergmann wrote:
> Juergen Heckel wrote:
> > Replacing the ab.c with an older version solves this little problem.
> 
> Index: support/ab.c
> ===================================================================
> RCS file: /home/cvspublic/httpd-2.0/support/ab.c,v
> retrieving revision 1.106
> diff -u -r1.106 ab.c
> --- support/ab.c	4 Jul 2002 22:56:51 -0000	1.106
> +++ support/ab.c	7 Jul 2002 06:06:10 -0000
> @@ -1101,8 +1101,8 @@
>  	   trstring, tdstring, tdstring, concurrency);
>      printf("<tr %s><th colspan=2 %s>Time taken for tests:</th>"
>  	   "<td colspan=2 %s>%qd.%03qd seconds</td></tr>\n",
> -	   trstring, tdstring, tdstring, (long long)apr_time_sec(timetaken),
> -           (long long)apr_time_usec(timetaken));
> +	   trstring, tdstring, tdstring, (long)apr_time_sec(timetaken),
> +           (long)apr_time_usec(timetaken));
>      printf("<tr %s><th colspan=2 %s>Complete requests:</th>"
>  	   "<td colspan=2 %s>%ld</td></tr>\n",
>  	   trstring, tdstring, tdstring, done);


It may be unsafe to cast to a long when the arg is a "%qd".  How
about this:

Index: support/ab.c
===================================================================
RCS file: /home/cvs/httpd-2.0/support/ab.c,v
retrieving revision 1.106
diff -u -r1.106 ab.c
--- support/ab.c	4 Jul 2002 22:56:51 -0000	1.106
+++ support/ab.c	7 Jul 2002 06:16:55 -0000
@@ -1100,9 +1100,9 @@
 	   "<td colspan=2 %s>%d</td></tr>\n",
 	   trstring, tdstring, tdstring, concurrency);
     printf("<tr %s><th colspan=2 %s>Time taken for tests:</th>"
-	   "<td colspan=2 %s>%qd.%03qd seconds</td></tr>\n",
-	   trstring, tdstring, tdstring, (long long)apr_time_sec(timetaken),
-           (long long)apr_time_usec(timetaken));
+	   "<td colspan=2 %s>%qd.%03ld seconds</td></tr>\n",
+	   trstring, tdstring, tdstring, apr_time_sec(timetaken),
+           (long)apr_time_usec(timetaken));
     printf("<tr %s><th colspan=2 %s>Complete requests:</th>"
 	   "<td colspan=2 %s>%ld</td></tr>\n",
 	   trstring, tdstring, tdstring, done);



Mime
View raw message