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/server/isapi isapi.dsp
Date Sat, 11 May 2002 17:29:28 GMT
nacho       02/05/11 10:29:28

  Modified:    jk/native2/common jk_pool_apr.c
               jk/native2/include jk_global.h
               jk/native2/jni jk_jni_aprImpl.c
               jk/native2/server/isapi isapi.dsp
  Log:
  * Fixed some headers order to silent some redifinition warnings.
  * Fixed the win32 build of AprImpl
  * Include APR in the isapi_redirector2 build
  
  XXX Need to fix build.xml file to include APR there too
  
  Revision  Changes    Path
  1.3       +4 -2      jakarta-tomcat-connectors/jk/native2/common/jk_pool_apr.c
  
  Index: jk_pool_apr.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_pool_apr.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jk_pool_apr.c	25 Apr 2002 19:22:19 -0000	1.2
  +++ jk_pool_apr.c	11 May 2002 17:29:28 -0000	1.3
  @@ -61,13 +61,15 @@
    * @author Costin Manolache
    */
   
  -#include "jk_pool.h"
  -#include "jk_env.h"
   #include "apr_pools.h"
   #include "apr_strings.h"
   #include "apr_network_io.h"
   #include "apr_errno.h"
   #include "apr_general.h"
  +
  +#include "jk_global.h"
  +#include "jk_pool.h"
  +#include "jk_env.h"
   
   /* 
      JK_APR_POOL_DEBUG will enable verbose messages on allocation.
  
  
  
  1.9       +7 -1      jakarta-tomcat-connectors/jk/native2/include/jk_global.h
  
  Index: jk_global.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_global.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- jk_global.h	25 Apr 2002 18:39:44 -0000	1.8
  +++ jk_global.h	11 May 2002 17:29:28 -0000	1.9
  @@ -59,7 +59,7 @@
    * Description: Global definitions and include files that should exist     *
    *              anywhere                                                   *
    * Author:      Gal Shachor <shachor@il.ibm.com>                           *
  - * Version:     $Revision: 1.8 $                                               *
  + * Version:     $Revision: 1.9 $                                               *
    ***************************************************************************/
   
   #ifndef JK_GLOBAL_H
  @@ -158,8 +158,14 @@
   
   /* cut&paste from apr_errno.h */
   typedef int apr_status_t;
  +#ifndef APR_SUCCESS
   #define APR_SUCCESS (0)
  +#endif
  +
  +#ifndef APR_OS_START_USEERR
   #define APR_OS_START_USEERR 21000
  +#endif
  +
   
   typedef  unsigned char   apr_byte_t;
   typedef  short           apr_int16_t;
  
  
  
  1.18      +24 -14    jakarta-tomcat-connectors/jk/native2/jni/jk_jni_aprImpl.c
  
  Index: jk_jni_aprImpl.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/jni/jk_jni_aprImpl.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- jk_jni_aprImpl.c	11 May 2002 00:07:26 -0000	1.17
  +++ jk_jni_aprImpl.c	11 May 2002 17:29:28 -0000	1.18
  @@ -68,11 +68,9 @@
   #include "apr_network_io.h"
   #include "apr_errno.h"
   #include "apr_general.h"
  -
  -#include <stdio.h>
  -#include <string.h>
  -#include <signal.h>
  -#include <sys/un.h>
  +#include "apr_strings.h"
  +#include "apr_portable.h"
  +#include "apr_lib.h"
   
   #include "org_apache_jk_apr_AprImpl.h"
   
  @@ -80,9 +78,6 @@
   #include "jk_map.h"
   #include "jk_pool.h"
   
  -#include "apr_strings.h"
  -#include "apr_portable.h"
  -#include "apr_lib.h"
   
   #if APR_HAVE_SYS_TYPES_H
   #include <sys/types.h>
  @@ -179,14 +174,14 @@
   }
   
   /* -------------------- Signals -------------------- */
  -
  +#ifdef HAVE_SIGNALS
   static struct sigaction jkAction;
   
   static void jk2_SigAction(int sig) {
       fprintf(stderr, "Signal %d\n", sig );
       signal( sig, jk2_SigAction );
   }
  -
  +#endif
   
   /* XXX We need to: - preserve the old signal ( or get them ) - either
        implement "waitSignal" or use invocation in jk2_SigAction
  @@ -198,9 +193,11 @@
   Java_org_apache_jk_apr_AprImpl_signal(JNIEnv *jniEnv, jobject _jthis, jint bitMask,
                                         jobject func)
   {
  +#ifdef HAVE_SIGNALS
       memset(& jkAction, 0, sizeof(jkAction));
       jkAction.sa_handler=jk2_SigAction;
       sigaction((int)bitMask, &jkAction, (void *) NULL);
  +#endif
       return 0;
   }
   
  @@ -312,7 +309,8 @@
       apr_pool_t *pool=(apr_pool_t *)(void *)(long)poolJ;
       const char *host;
       int status;
  -    int unixSocket;
  +    int unixSocket=-1L;
  +#ifdef HAVE_UNIXSOCKETS
       struct sockaddr_un unixAddr;
       mode_t omask;
   
  @@ -349,6 +347,7 @@
       
       fprintf(stderr, "Listening on %d \n",
               unixSocket);
  +#endif
       return (jlong)unixSocket;
   }
   
  @@ -359,7 +358,8 @@
       apr_pool_t *pool=(apr_pool_t *)(void *)(long)poolJ;
       const char *host;
       int status;
  -    int unixSocket;
  +    int unixSocket=-1L;
  +#ifdef HAVE_UNIXSOCKETS
       struct sockaddr_un unixAddr;
   
       memset(& unixAddr, 0, sizeof(struct sockaddr_un));
  @@ -388,13 +388,15 @@
           return -1;
       }
   
  -    return (jlong)(long)(void *)unixSocket;
  +#endif
  +    return (jlong)unixSocket;
   }
   
   JNIEXPORT jlong JNICALL 
   Java_org_apache_jk_apr_AprImpl_unAccept(JNIEnv *jniEnv, jobject _jthis, 
                                         jlong poolJ, jlong unSocketJ)
   {
  +#ifdef HAVE_UNIXSOCKETS
       int listenUnSocket=(int)unSocketJ;
       struct sockaddr_un client;
       int clientlen;
  @@ -430,6 +432,7 @@
           fprintf(stderr, "unAccept: accepted %d\n", connfd);
           return (jlong)connfd;
       }
  +#endif
       return 0L;
   }
   
  @@ -438,6 +441,7 @@
                                         jlong poolJ, jlong unSocketJ,
                                         jbyteArray jbuf, jint from, jint cnt)
   {
  +#ifdef HAVE_UNIXSOCKETS
       apr_pool_t *pool=(apr_pool_t *)(void *)(long)poolJ;
       jbyte *nbuf;
       int rd;
  @@ -473,6 +477,8 @@
           (*jniEnv)->ReleaseByteArrayElements(jniEnv, jbuf, nbuf, 0);
           return (jint)rd;
       }
  +#endif
  +    return (jint)0;
   }
   
   JNIEXPORT jint JNICALL 
  @@ -482,7 +488,8 @@
       apr_status_t status;
       apr_pool_t *pool=(apr_pool_t *)(void *)(long)poolJ;
       jbyte *nbuf;
  -    int rd;
  +    int rd=0;
  +#ifdef HAVE_UNIXSOCKETS
       jboolean iscopy;
   
       nbuf = (*jniEnv)->GetByteArrayElements(jniEnv, jbuf, &iscopy);
  @@ -494,6 +501,7 @@
       write( (int) unSocketJ, nbuf + from, cnt );
       
       (*jniEnv)->ReleaseByteArrayElements(jniEnv, jbuf, nbuf, 0);
  +#endif
       return (jint)rd;
   }
   
  @@ -508,6 +516,7 @@
       jint        l_onoff,
       jint        l_linger)
   {
  +#ifdef HAVE_UNIXSOCKETS
       struct linger {
           int   l_onoff;    /* linger active */
           int   l_linger;   /* how many seconds to linger for */
  @@ -520,6 +529,7 @@
       if( rc < 0) {
           return -errno;
       }
  +#endif
       return 0;
   }
   
  
  
  
  1.7       +14 -2     jakarta-tomcat-connectors/jk/native2/server/isapi/isapi.dsp
  
  Index: isapi.dsp
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/isapi/isapi.dsp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- isapi.dsp	1 May 2002 22:23:36 -0000	1.6
  +++ isapi.dsp	11 May 2002 17:29:28 -0000	1.7
  @@ -53,7 +53,7 @@
   # ADD BSC32 /nologo
   LINK32=link.exe
   # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
  -# ADD LINK32 kernel32.lib user32.lib advapi32.lib wsock32.lib /nologo /dll /machine:I386
/out:"Release/isapi_redirector2.dll"
  +# ADD LINK32 libapr.lib libaprutil.lib kernel32.lib user32.lib advapi32.lib wsock32.lib
/nologo /dll /machine:I386 /out:"Release/isapi_redirector2.dll"
   
   !ELSEIF  "$(CFG)" == "isapi - Win32 Debug"
   
  @@ -79,7 +79,7 @@
   # ADD BSC32 /nologo
   LINK32=link.exe
   # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386
/pdbtype:sept
  -# ADD LINK32 kernel32.lib user32.lib advapi32.lib wsock32.lib /nologo /dll /debug /machine:I386
/out:"Debug/isapi_redirector2.dll" /pdbtype:sept
  +# ADD LINK32 libapr.lib libaprutil.lib kernel32.lib user32.lib advapi32.lib wsock32.lib
/nologo /dll /debug /machine:I386 /out:"Debug/isapi_redirector2.dll" /pdbtype:sept /libpath:"$(APR_HOME)\apr\Release"
/libpath:"$(APR_HOME)\apr-util\Release"
   # SUBTRACT LINK32 /nodefaultlib
   
   !ENDIF 
  @@ -129,6 +129,10 @@
   # End Source File
   # Begin Source File
   
  +SOURCE=..\..\jni\jk_jni_aprImpl.c
  +# End Source File
  +# Begin Source File
  +
   SOURCE=..\..\common\jk_logger_file.c
   # End Source File
   # Begin Source File
  @@ -153,6 +157,10 @@
   # End Source File
   # Begin Source File
   
  +SOURCE=..\..\common\jk_pool_apr.c
  +# End Source File
  +# Begin Source File
  +
   SOURCE=..\..\common\jk_registry.c
   # End Source File
   # Begin Source File
  @@ -206,6 +214,10 @@
   # Begin Source File
   
   SOURCE=..\..\common\jk_workerEnv.c
  +# End Source File
  +# Begin Source File
  +
  +SOURCE=..\..\jni\org_apache_jk_apr_AprImpl.h
   # End Source File
   # End Group
   # Begin Group "Header Files"
  
  
  

--
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