tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fua...@apache.org
Subject svn commit: r529272 - /tomcat/connectors/trunk/jk/native/common/jk_global.h
Date Mon, 16 Apr 2007 14:42:58 GMT
Author: fuankg
Date: Mon Apr 16 07:42:57 2007
New Revision: 529272

URL: http://svn.apache.org/viewvc?view=rev&rev=529272
Log:
changed to use ap_snprintf() / ap_vsnprintf() if HAVE_SNPRINTF / HAVE_VSNPRINTF / HAVE_APR
not defined.

Modified:
    tomcat/connectors/trunk/jk/native/common/jk_global.h

Modified: tomcat/connectors/trunk/jk/native/common/jk_global.h
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_global.h?view=diff&rev=529272&r1=529271&r2=529272
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_global.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_global.h Mon Apr 16 07:42:57 2007
@@ -25,13 +25,8 @@
 #ifndef JK_GLOBAL_H
 #define JK_GLOBAL_H
 
-#ifndef NETWARE
-#if !defined(WIN32) && !defined(AS400)
+#if !defined(WIN32) && !defined(AS400) && !defined(NETWARE)
 #include "portable.h"
-#else
-#define HAVE_VSNPRINTF
-#define HAVE_SNPRINTF
-#endif
 #endif
 
 #if defined(WIN32)
@@ -310,6 +305,8 @@
 #ifdef WIN32
 /* For WIN32, emulate gettimeofday() using _ftime() */
 #define gettimeofday(tv,tz) { struct _timeb tb; _ftime(&tb); (tv)->tv_sec = tb.time;
(tv)->tv_usec = tb.millitm * 1000; }
+#define HAVE_VSNPRINTF
+#define HAVE_SNPRINTF
 #ifdef HAVE_APR
 #define snprintf apr_snprintf
 #define vsnprintf apr_vsnprintf
@@ -330,11 +327,14 @@
 #endif
 #endif
 
-/* XXXX There is a snprintf() and vsnprintf() in jk_util.c */
-/* if those work remove the #define. */
-#if defined(NETWARE) || defined(AS400)
-#define USE_SPRINTF
-#define USE_VSPRINTF
+/* Use ap snprintf() and vsnprintf() when needed */
+#if !defined(HAVE_APR)
+#if !defined(HAVE_SNPRINTF)
+#define snprintf ap_snprintf
+#endif
+#if !defined(HAVE_VSNPRINTF)
+#define vsnprintf ap_vsnprintf
+#endif
 #endif
 
 #if defined(WIN32) || (defined(NETWARE) && defined(__NOVELL_LIBC__))



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message