Ouch,
E:\build\httpd-2.3.x-dev\support\rotatelogs.c(307) : warning C4013:
'snprintf' undefined; assuming extern returning int
Linking...
rotatelogs.obj : error LNK2001: unresolved external symbol _snprintf
Release/rotatelogs.exe : fatal error LNK1120: 1 unresolved externals
should it be apr_snprintf? Probably not since I do see this function
(snprintf) in jlibtool.c, but I do not think Windows uses it, it does
sound Unixish.
Thanks,
Gregg
[email protected] wrote:
Author: minfrin
Date: Tue Feb 16 22:01:21 2010
New Revision: 910719
URL: http://svn.apache.org/viewvc?rev=910719&view=rev
Modified: httpd/httpd/trunk/support/rotatelogs.c
URL:
http://svn.apache.org/viewvc/httpd/httpd/trunk/support/rotatelogs.c?rev=910719&r1=910718&r2=910719&view=diff
==============================================================================
--- httpd/httpd/trunk/support/rotatelogs.c (original)
+++ httpd/httpd/trunk/support/rotatelogs.c Tue Feb 16 22:01:21 2010
...
@@ -296,14 +300,20 @@
apr_strftime(status->filename, &rs, sizeof(status->filename),
config->szLogRoot, &e);
}
else {
- sprintf(status->filename, "%s.%010d", config->szLogRoot, tLogStart);
+ if (config->truncate) {
+ snprintf(status->filename, sizeof(status->filename), "%s",
config->szLogRoot);
+ }
+ else {
+ snprintf(status->filename, sizeof(status->filename), "%s.%010d",
config->szLogRoot,
+ tLogStart);
+ }
}