mmanders    2003/11/19 15:57:29

  Modified:    jk/native2/common jk_nwmain.c
  Log:
  Patch submitted by Guenter  Knauf to handle CLIB/LibC issues on NetWare.
  
  Revision  Changes    Path
  1.4       +56 -1     jakarta-tomcat-connectors/jk/native2/common/jk_nwmain.c
  
  Index: jk_nwmain.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_nwmain.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- jk_nwmain.c       4 Feb 2003 07:39:58 -0000       1.3
  +++ jk_nwmain.c       19 Nov 2003 23:57:29 -0000      1.4
  @@ -71,6 +71,12 @@
    */
   
   #include <stdio.h>
  +
  +/* Apache 2/APR uses NOVELL_LIBC which has a different way of handling
  + * "library" nlms.  If we aren't on LIBC, use the old method
  + */
  +
  +#ifndef __NOVELL_LIBC__
   #include <nwthread.h>
   #include <netdb.h>
   
  @@ -91,4 +97,53 @@
   {
      ExitThread (TSR_THREAD, 0);
   }
  +#else /* __NOVELL_LIBC__ */
  +
  +/* Since we are on LibC, we need to handle our own startup and shutdown */
  +
  +#include <netware.h>
  +#include "novsock2.h"
  +
  +int _NonAppStart
  +(
  +    void        *NLMHandle,
  +    void        *errorScreen,
  +    const char  *cmdLine,
  +    const char  *loadDirPath,
  +    size_t      uninitializedDataLength,
  +    void        *NLMFileHandle,
  +    int         (*readRoutineP)( int conn, void *fileHandle, size_t offset,
  +                    size_t nbytes, size_t *bytesRead, void *buffer ),
  +    size_t      customDataOffset,
  +    size_t      customDataSize,
  +    int         messageCount,
  +    const char  **messages
  +)
  +{
  +#pragma unused(cmdLine)
  +#pragma unused(loadDirPath)
  +#pragma unused(uninitializedDataLength)
  +#pragma unused(NLMFileHandle)
  +#pragma unused(readRoutineP)
  +#pragma unused(customDataOffset)
  +#pragma unused(customDataSize)
  +#pragma unused(messageCount)
  +#pragma unused(messages)
  +
  +    WSADATA wsaData;
  +    
  +    return WSAStartup((WORD) MAKEWORD(2, 0), &wsaData);
  +}
  +
  +void _NonAppStop( void )
  +{
  +    WSACleanup();
  +}
  +
  +int  _NonAppCheckUnload( void )
  +{
  +     return 0;
  +}
  +#endif /* __NOVELL_LIBC__ */
  +
   #endif
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to