tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "TAKAHASHI Hideo(BSD-M1G)" <>
Subject isapi_redirect.dll in ajp13-tc4.0
Date Tue, 04 Dec 2001 13:32:34 GMT

I tried building jakarta-tomcat-connectors-20011113.tar.gz for ISAPI
and stepped into some trouble and fixed it.

I tried building jk/native/iis .  Not working right away, after some
tracking down, I found out that one of the function pointer calls
were failing because of a calling sequence mismatch between the
caller and callee. On Windows, JK_METHOD is defined to one of those
VC++ keywords that change the stack frame. The keyword existed on the
caller side, but not the callee side. The functions are the virtual
functions of the jk_env type.

On the caller side, JK_METHOD was set.

[from jk_env.h]

struct jk_env {
  jk_env_objectFactory_t *
  (JK_METHOD *getFactory)( jk_env_t *env, char *type, char *name );

  /** Register a factory for a type ( channel, worker ).
  void (JK_METHOD *registerFactory)(
     jk_env_t *env, char *type, char *name, 
     jk_env_objectFactory_t factory);

On the callee side, it was not set.

[from jk_env.c]
static jk_env_objectFactory_t * jk_env_getFactory(
     jk_env_t *env,
     char *type,
     char *name );
static void JK_METHOD jk_env_registerFactory(jk_env_t *env, 
     char *type,
     char *name,
    jk_env_objectFactory_t fact);

static jk_env_initEnv( jk_env_t *env, char *id ) {
  /*   env->logger=NULL; */
  /*   map_alloc( & env->properties ); */
  env->getFactory= (void *)jk_env_getFactory; 
  env->registerFactory= (void *)jk_env_registerFactory;

Removing the (void *) cast where the function table is set will reveal
that the assignment is between incompatible pointer types.

Taking away the cast and either adding JK_METHOD on the function
declaration and implementation, or taking it away from the pointer
variable declarations, this can be solved.

I tried to see if this still remains in the cvs but the server seems to
be overloaded or something.  I couldn't check.

Hideo Takahashi
Business Solutions Division, Hitachi Ltd.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message