You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mt...@apache.org on 2003/06/10 07:14:28 UTC
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_logger_file.c
mturk 2003/06/09 22:14:28
Modified: jk/native2/common jk_logger_file.c
Log:
Remove the _snprintf WIN32 dependency.
Thanks to Guenter again for that.
Revision Changes Path
1.39 +8 -15 jakarta-tomcat-connectors/jk/native2/common/jk_logger_file.c
Index: jk_logger_file.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_logger_file.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- jk_logger_file.c 9 Jun 2003 10:57:51 -0000 1.38
+++ jk_logger_file.c 10 Jun 2003 05:14:28 -0000 1.39
@@ -340,23 +340,18 @@
f++;
}
-#ifdef WIN32
- jk2_logger_file_setTimeStr(env,buf, HUGE_BUFFER_SIZE);
- used = strlen(buf);
- if( level >= JK_LOG_DEBUG_LEVEL )
- used += snprintf(&buf[used], HUGE_BUFFER_SIZE, " (%5s) [%s (%d)]: ", slevel, f, line);
-#elif defined(NETWARE) /* until we get a snprintf function */
+#if defined(NETWARE) && !defined(__NOVELL_LIBC__) /* until we get a snprintf function */
buf = (char *) malloc(HUGE_BUFFER_SIZE);
if (NULL == buf)
return -1;
- jk2_logger_file_setTimeStr(buf, HUGE_BUFFER_SIZE);
- used = strlen(buf);
+ jk2_logger_file_setTimeStr(buf, HUGE_BUFFER_SIZE);
+ used = strlen(buf);
if( level >= JK_LOG_DEBUG_LEVEL )
used += sprintf(&buf[used], " (%5s) [%s (%d)]: ", slevel, f, line);
#else
- jk2_logger_file_setTimeStr(env, buf, HUGE_BUFFER_SIZE);
- used = strlen(buf);
+ jk2_logger_file_setTimeStr(env, buf, HUGE_BUFFER_SIZE);
+ used = strlen(buf);
if( level >= JK_LOG_DEBUG_LEVEL )
used += snprintf(&buf[used], HUGE_BUFFER_SIZE, " (%5s) [%s (%d)]: ", slevel, f, line);
#endif
@@ -364,16 +359,14 @@
return -1; /* [V] not sure what to return... */
}
-#ifdef WIN32
- rc = vsnprintf(buf + used, HUGE_BUFFER_SIZE - used, fmt, args);
-#elif defined(NETWARE) /* until we get a vsnprintf function */
+#if defined(NETWARE) && !defined(__NOVELL_LIBC__) /* until we get a vsnprintf function */
rc = vsprintf(buf + used, fmt, args);
#else
rc = vsnprintf(buf + used, HUGE_BUFFER_SIZE - used, fmt, args);
#endif
l->log(env, l , level, buf);
-#ifdef NETWARE
+#if defined(NETWARE) && !defined(__NOVELL_LIBC__)
free(buf);
#endif
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org