You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Günter Knauf <ef...@gmx.net> on 2003/06/01 14:49:14 UTC
some patches to mod_jk2
Hi all,
I'm currently working on getting mod_jk2 compiled for NetWare, and have fixed some problems which I find are correct, so can you please take a look at the diffs and - if they look ok - ckeck them into CVS?
the following patch is necessary to get jk_shm.c compiled without APR_HAS_MMAP; if you look at apr.h then you find that those features which are not supported are defined with a value 0, so the '#ifdef APR_HAS_MMAP' is always true, even if the platform doesnt support that feature, the patch below fixes that.
--- jk_shm.c.orig Tue Mar 04 12:51:08 2003
+++ jk_shm.c Sat May 31 19:59:16 2003
@@ -95,7 +95,7 @@
#define SHM_DUMP 6
-#ifdef APR_HAS_MMAP
+#if APR_HAS_MMAP == 1
static int JK_METHOD jk2_shm_destroy(jk_env_t *env, jk_shm_t *shm)
{
#############################################################################
this is because our compiler doesnt like it without; and I think it is correct from what I see at the other definition at line 205.
--- jk\native2\common\jk_logger_win32.c.orig Tue Feb 04 12:38:26 2003
+++ jk\native2\common\jk_logger_win32.c Thu May 22 01:59:50 2003
@@ -229,6 +229,7 @@
}
#else
+int JK_METHOD
jk2_logger_win32_factory(jk_env_t *env, jk_pool_t *pool, jk_bean_t *result,
const char *type, const char *name)
{
#############################################################################
we dont have user stuff on NetWare, same as with Win32.
--- jk\native2\common\jk_user.c.orig Tue Feb 04 12:38:26 2003
+++ jk\native2\common\jk_user.c Thu May 22 01:36:44 2003
@@ -59,7 +59,7 @@
#include "jk_map.h"
#include "jk_pool.h"
-#ifndef WIN32
+#if !(defined(WIN32) || defined(NETWARE))
#include <unistd.h>
#include <pwd.h>
then I found some other things which I would like to clean up also; they are related to Win32 and make the jk_global.h and other code more readable, f.e.:
jk_global.h defines at line 150 _snprintf for Win32, but in jk_logger_file.c line 343 there is a Win32 ifdef which is absolutely identical to what's called in the 'else' except the underscore for snprintf...
the same applies with vsnprintf:
defined in jk_global.h 265, but nevertheless a ifdef in jk_logger_file.c line 368...
if you agree that these are obsolete than I will remove that too and make patches ready which I send you;
I will first check with Mike Anderson from Novell about my other changes, but these three patches
I think are correct anyway...
thanks, Guenter.