tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_shm.h
Date Sun, 12 May 2002 01:07:10 GMT
nacho       02/05/11 18:07:10

  Modified:    jk/native2/common jk_shm.c
               jk/native2/include jk_shm.h
  Log:
  * Fixed to build in win32
  
  Revision  Changes    Path
  1.13      +9 -9      jakarta-tomcat-connectors/jk/native2/common/jk_shm.c
  
  Index: jk_shm.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_shm.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- jk_shm.c	9 May 2002 23:47:31 -0000	1.12
  +++ jk_shm.c	12 May 2002 01:07:10 -0000	1.13
  @@ -111,7 +111,7 @@
       return apr_shm_destroy(aprShm);
   }
   
  -static int jk2_shm_detach(jk_env_t *env, jk_shm_t *shm)
  +static int JK_METHOD jk2_shm_detach(jk_env_t *env, jk_shm_t *shm)
   {
       apr_shm_t *aprShm=(apr_shm_t *)shm->privateData;
   
  @@ -186,7 +186,7 @@
   /* Create or reinit an existing scoreboard. The MPM can control whether
    * the scoreboard is shared across multiple processes or not
    */
  -static int  jk2_shm_init(struct jk_env *env, jk_shm_t *shm) {
  +static int JK_METHOD jk2_shm_init(struct jk_env *env, jk_shm_t *shm) {
       apr_status_t rv=APR_SUCCESS;
       jk_shm_head_t *head;
       
  @@ -300,16 +300,16 @@
   
   /* pos starts with 1 ( 0 is the head )
    */
  -jk_shm_slot_t *jk2_shm_getSlot(struct jk_env *env, struct jk_shm *shm, int pos)
  +jk_shm_slot_t * JK_METHOD jk2_shm_getSlot(struct jk_env *env, struct jk_shm *shm, int pos)
   {
       if( pos==0 ) return NULL;
       if( shm->image==NULL ) return NULL;
       if( pos > shm->slotMaxCount ) return NULL;
       /* Pointer aritmethic, I hope it's right */
  -    return shm->image + pos * shm->slotSize;
  +    return (jk_shm_slot_t *)((long)shm->image + (pos * shm->slotSize));
   }
   
  -jk_shm_slot_t *jk2_shm_createSlot(struct jk_env *env, struct jk_shm *shm, 
  +jk_shm_slot_t * JK_METHOD jk2_shm_createSlot(struct jk_env *env, struct jk_shm *shm, 
                                     char *name, int size)
   {
       /* For now all slots are equal size
  @@ -338,7 +338,7 @@
   
   /** Get an ID that is unique across processes.
    */
  -int jk2_shm_getId(struct jk_env *env, struct jk_shm *shm)
  +int JK_METHOD jk2_shm_getId(struct jk_env *env, struct jk_shm *shm)
   {
   
       return 0;
  @@ -346,7 +346,7 @@
   
   
   
  -static int jk2_shm_setAttribute( jk_env_t *env, jk_bean_t *mbean, char *name, void *valueP
) {
  +static int JK_METHOD jk2_shm_setAttribute( jk_env_t *env, jk_bean_t *mbean, char *name,
void *valueP ) {
       jk_shm_t *shm=(jk_shm_t *)mbean->object;
       char *value=(char *)valueP;
       
  @@ -398,7 +398,7 @@
       
   /** Called by java. Will call the right shm method.
    */
  -static int jk2_shm_dispatch(jk_env_t *env, void *target, jk_endpoint_t *ep, jk_msg_t *msg)
  +static int JK_METHOD jk2_shm_dispatch(jk_env_t *env, void *target, jk_endpoint_t *ep, jk_msg_t
*msg)
   {
       jk_bean_t *bean=(jk_bean_t *)target;
       jk_shm_t *shm=(jk_shm_t *)bean->object;
  @@ -454,7 +454,7 @@
       return JK_ERR;
   }
   
  -static int jk2_shm_setWorkerEnv( jk_env_t *env, jk_shm_t *shm, jk_workerEnv_t *wEnv ) {
  +static int JK_METHOD jk2_shm_setWorkerEnv( jk_env_t *env, jk_shm_t *shm, jk_workerEnv_t
*wEnv ) {
       wEnv->registerHandler( env, wEnv, "shm",
                              "shmDispatch", JK_HANDLE_SHM_DISPATCH,
                              jk2_shm_dispatch, NULL );
  
  
  
  1.4       +6 -6      jakarta-tomcat-connectors/jk/native2/include/jk_shm.h
  
  Index: jk_shm.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_shm.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- jk_shm.h	25 Apr 2002 18:41:46 -0000	1.3
  +++ jk_shm.h	12 May 2002 01:07:10 -0000	1.4
  @@ -145,28 +145,28 @@
       /** Initialize the shared memory area. It'll map the shared memory 
        *  segment if it exists, or create and init it if not.
        */
  -    int (*init)(struct jk_env *env, struct jk_shm *shm);
  +    int (JK_METHOD *init)(struct jk_env *env, struct jk_shm *shm);
   
       /** Detach from the shared memory segment
        */
  -    int (*destroy)(struct jk_env *env, struct jk_shm *shm);
  +    int (JK_METHOD *destroy)(struct jk_env *env, struct jk_shm *shm);
   
       /** 
        */
  -    int (*setWorkerEnv)( struct jk_env *env, struct jk_shm *shm,
  +    int (JK_METHOD *setWorkerEnv)( struct jk_env *env, struct jk_shm *shm,
                            struct jk_workerEnv *wEnv );
   
       /** Get a shm slot. Each slot has different rules for synchronization, based on type.

        */
  -    struct jk_shm_slot *(*getSlot)(struct jk_env *env, struct jk_shm *shm, int pos);
  +    struct jk_shm_slot *(JK_METHOD *getSlot)(struct jk_env *env, struct jk_shm *shm, int
pos);
   
       /** Create a slot. This typically involves inter-process synchronization.
        */
  -    struct jk_shm_slot *(*createSlot)(struct jk_env *env, struct jk_shm *shm, char *name,
int size);
  +    struct jk_shm_slot *(JK_METHOD *createSlot)(struct jk_env *env, struct jk_shm *shm,
char *name, int size);
   
       /** Get an ID that is unique across processes.
        */
  -    int (*getId)(struct jk_env *env, struct jk_shm *shm);
  +    int (JK_METHOD *getId)(struct jk_env *env, struct jk_shm *shm);
   
       int size;
   
  
  
  

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


Mime
View raw message