carnold     2005/03/12 13:00:37

  Modified:    .        apr-1.1.0.patch apr-build.xml build.xml
               include/log4cxx asyncappender.h portability.h
               include/log4cxx/helpers filewatchdog.h simpledateformat.h
                        thread.h
               include/log4cxx/net socketappenderskeleton.h
                        sockethubappender.h telnetappender.h
               include/log4cxx/spi/location locationinfo.h
               src      asyncappender.cpp consoleappender.cpp
                        filewatchdog.cpp loglog.cpp
                        socketappenderskeleton.cpp sockethubappender.cpp
                        telnetappender.cpp thread.cpp
  Log:
  LOGCXX-74: MinGW build (partial)
  
  Revision  Changes    Path
  1.2       +74 -1     logging-log4cxx/apr-1.1.0.patch
  
  Index: apr-1.1.0.patch
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/apr-1.1.0.patch,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apr-1.1.0.patch   13 Feb 2005 05:55:00 -0000      1.1
  +++ apr-1.1.0.patch   12 Mar 2005 21:00:37 -0000      1.2
  @@ -1,3 +1,21 @@
  +Index: include/arch/win32/apr_arch_misc.h
  +===================================================================
  +--- include/arch/win32/apr_arch_misc.h       (revision 153549)
  ++++ include/arch/win32/apr_arch_misc.h       (working copy)
  +@@ -133,10 +133,12 @@
  + #if APR_HAS_ANSI_FS && APR_HAS_UNICODE_FS
  + #define IF_WIN_OS_IS_UNICODE if (apr_os_level >= APR_WIN_UNICODE)
  + #define ELSE_WIN_OS_IS_ANSI else
  +-#else APR_HAS_UNICODE_FS
  ++#else 
  ++#if APR_HAS_UNICODE_FS
  + #define IF_WIN_OS_IS_UNICODE
  + #define ELSE_WIN_OS_IS_ANSI
  + #endif /* WINNT */
  ++#endif
  + 
  + typedef enum {
  +     DLL_WINBASEAPI = 0,    // kernel32 From WinBase.h
   Index: include/arch/win32/apr_private.h
   ===================================================================
   --- include/arch/win32/apr_private.h (revision 153549)
  @@ -64,6 +82,18 @@
    /*
     * Include common private declarations.
     */
  +Index: include/arch/win32/apr_arch_file_io.h
  +===================================================================
  +--- include/arch/win32/apr_arch_file_io.h    (revision 153549)
  ++++ include/arch/win32/apr_arch_file_io.h    (working copy)
  +@@ -52,7 +52,6 @@
  + #include "arch/win32/apr_arch_utf8.h"
  + #include <wchar.h>
  + 
  +-typedef apr_uint16_t apr_wchar_t;
  + 
  + /* Helper functions for the WinNT ApiW() functions.  APR treats all
  +  * resource identifiers (files, etc) by their UTF-8 name, to provide 
   Index: include/apr.hw
   ===================================================================
   --- include/apr.hw   (revision 153549)
  @@ -86,7 +116,7 @@
    #else
    #include <winsock.h>
    #endif
  -@@ -349,8 +352,10 @@
  +@@ -349,15 +352,21 @@
     * based on some APR_HAVE_PID/GID/UID?
     */
    typedef  int         pid_t;
  @@ -97,6 +127,34 @@
    
    /* Mechanisms to properly type numeric literals */
    
  ++#if defined(__GNUC__)
  ++#define APR_INT64_C(val) (val##LL)
  ++#define APR_UINT64_C(val) (val##ULL)
  ++#else
  + #define APR_INT64_C(val) (val##i64)
  + #define APR_UINT64_C(val) (val##Ui64)
  ++#endif
  + 
  +-
  + #if APR_HAVE_IPV6
  + 
  + /* Appears in later flavors, not the originals. */
  +Index: threadproc/win32/proc.c
  +===================================================================
  +--- threadproc/win32/proc.c  (revision 153549)
  ++++ threadproc/win32/proc.c  (working copy)
  +@@ -210,6 +210,11 @@
  +     return APR_SUCCESS;
  + }
  + 
  ++#if !defined(LOGON32_LOGON_NETWORK)
  ++#define LOGON32_LOGON_NETWORK 3
  ++#endif
  ++
  ++
  + APR_DECLARE(apr_status_t) apr_procattr_user_set(apr_procattr_t *attr, 
  +                                                 const char *username,
  +                                                 const char *password)
   Index: misc/win32/apr_app.c
   ===================================================================
   --- misc/win32/apr_app.c     (revision 153549)
  @@ -120,6 +178,21 @@
        memcpy(_environ, env, (dupenv + 1) * sizeof (char *));
    
        /* MSVCRT will attempt to maintain the wide environment calls
  +Index: misc/win32/rand.c
  +===================================================================
  +--- misc/win32/rand.c        (revision 153549)
  ++++ misc/win32/rand.c        (working copy)
  +@@ -20,8 +20,10 @@
  + #include "apr_portable.h"
  + #include "apr_arch_misc.h"
  + #include <wincrypt.h>
  ++#include <basetyps.h>
  + 
  + 
  ++
  + APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char * buf,
  +                                                     apr_size_t length)
  + {
   Index: misc/win32/misc.c
   ===================================================================
   --- misc/win32/misc.c        (revision 153549)
  
  
  
  1.12      +4 -1      logging-log4cxx/apr-build.xml
  
  Index: apr-build.xml
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/apr-build.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- apr-build.xml     11 Mar 2005 15:17:07 -0000      1.11
  +++ apr-build.xml     12 Mar 2005 21:00:37 -0000      1.12
  @@ -213,7 +213,8 @@
           <compilerarg value="${pic-option}" if="pic-option"/>
           <libset dir="${apr.lib.dir}" libs="apr-1${lib-suffix}"/>
           <libset libs="cw32mt" if="is-bcc"/>
  -        <libset libs="pthread dl" if="is-unix"/>
  +        <libset libs="pthread dl" if="is-unix"/>
  +        <libset libs="advapi32 ws2_32 mswsock rpcrt4" if="is-windows"/>
           <project type="${project.type}" outfile="${project.dir}/${test}" 
if="project.if"/>
       </cc>
   </target>
  @@ -344,6 +345,7 @@
           <compilerarg value="${pic-option}" if="pic-option"/>
           <libset dir="${apr.lib.dir}" libs="apr-1${lib-suffix}"/>
           <libset libs="cw32mt" if="is-bcc"/>
  +        <libset libs="advapi32 ws2_32 mswsock rpcrt4" if="is-windows"/>
           <project type="${project.type}" outfile="${project.dir}/mod_test" 
if="project.if"/>
       </cc>
       <copy file="${libmod_test.so}" 
tofile="${apr.lib.dir}/.libs/mod_test.so"/>
  @@ -384,6 +386,7 @@
           <libset dir="${apr.lib.dir}" libs="apr-1${lib-suffix}"/>
           <libset libs="cw32mt" if="is-bcc"/>
           <libset libs="pthread dl" if="is-unix"/>
  +        <libset libs="advapi32 ws2_32 mswsock rpcrt4" if="is-windows"/>
           <project type="${project.type}" outfile="${project.dir}/testall" 
if="project.if"/>
       </cc>
   </target>
  
  
  
  1.52      +15 -7     logging-log4cxx/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/build.xml,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- build.xml 12 Mar 2005 06:49:31 -0000      1.51
  +++ build.xml 12 Mar 2005 21:00:37 -0000      1.52
  @@ -132,6 +132,14 @@
           <condition property="os.family" value="unix">
               <isset property="is-unix"/>
           </condition>
  +        <condition property="is-gcc" value="true">
  +            <or>
  +               <equals arg1="${compiler}" arg2="gcc"/>
  +               <equals arg1="${compiler}" arg2="g++"/>
  +            </or>
  +        </condition>
  +
  +
   </target>
   
   
  @@ -147,6 +155,9 @@
           </or>
       </condition>
   
  +    <condition property="is-mingw" value="true">
  +        <isset property="is-gcc"/>
  +    </condition>
   </target>
   
   <target name="mac-init" depends="os-detect" if="is-mac">
  @@ -158,13 +169,6 @@
   <target name="unix-init" depends="mac-init" if="is-unix">
   
       <property name="compiler" value="gcc"/>
  -    <condition property="is-gcc" value="true">
  -        <or>
  -           <equals arg1="${compiler}" arg2="gcc"/>
  -           <equals arg1="${compiler}" arg2="g++"/>
  -        </or>
  -    </condition>
  -
       <condition property="pic-option" value="-fPIC">
           <and>
                   <isset property="is-gcc"/>
  @@ -612,6 +616,10 @@
           <defineset>
               <define name="LOG4CXX_HAS_WCHAR_T" value="${has.wchar_t}"/>
           </defineset>
  +        <defineset if="is-mingw">
  +            <define name="LOG4CXX_HAS_STD_WCOUT" value="0"/>
  +            <define name="LOG4CXX_HAS_STD_WLOCALE" value="0"/>
  +        </defineset>
           <compilerarg value="${pic-option}" if="pic-option"/>
           <libset libs="advapi32 odbc32 ws2_32" if="is-windows"/>
           <libset libs="stdc++" if="is-gcc"/>
  
  
  
  1.20      +1 -1      logging-log4cxx/include/log4cxx/asyncappender.h
  
  Index: asyncappender.h
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/include/log4cxx/asyncappender.h,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- asyncappender.h   15 Feb 2005 23:55:58 -0000      1.19
  +++ asyncappender.h   12 Mar 2005 21:00:37 -0000      1.20
  @@ -136,7 +136,7 @@
   
                   enum { DEFAULT_BUFFER_SIZE = 128 };
   
  -                static void* LOG4CXX_THREAD_FUNC dispatch(apr_thread_t* 
thread, void* data);
  +                static void* LOG4CXX_THREAD_FUNC 
dispatch(helpers::log4cxx_thread_t* thread, void* data);
   
           }; // class AsyncAppender
   
  
  
  
  1.13      +16 -5     logging-log4cxx/include/log4cxx/portability.h
  
  Index: portability.h
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/include/log4cxx/portability.h,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- portability.h     1 Mar 2005 23:30:44 -0000       1.12
  +++ portability.h     12 Mar 2005 21:00:37 -0000      1.13
  @@ -55,14 +55,25 @@
   typedef log4cxx_int64_t log4cxx_time_t;
   typedef int log4cxx_status_t;
   
  -#if !defined(__BORLANDC__)
  -#define HAVE_XML 1
  -#define LOG4CXX_HAVE_XML 1
  +#if defined(_MSC_VER)
  +#define HAVE_XML 1
  +#define LOG4CXX_HAVE_XML 1
  +#endif
  +
  +#if !defined(__BORLANDC__)
   #define LOG4CXX_RETURN_AFTER_THROW
   #endif
   
  -#if !defined(_WIN32)
  +#if !defined(_WIN32)
   #define LOG4CXX_HAVE_SYSLOG 1
  -#endif
  +#endif
  +
  +#if !defined(LOG4CXX_HAS_STD_WCOUT)
  +#define LOG4CXX_HAS_STD_WCOUT 1
  +#endif
  +
  +#if !defined(LOG4CXX_HAS_STD_WLOCALE)
  +#define LOG4CXX_HAS_STD_WLOCALE 1
  +#endif
   
   #endif //_LOG4CXX_PORTABILITY_H
  
  
  
  1.13      +1 -1      logging-log4cxx/include/log4cxx/helpers/filewatchdog.h
  
  Index: filewatchdog.h
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/include/log4cxx/helpers/filewatchdog.h,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- filewatchdog.h    1 Mar 2005 23:30:44 -0000       1.12
  +++ filewatchdog.h    12 Mar 2005 21:00:37 -0000      1.13
  @@ -70,7 +70,7 @@
                           void start();
   
                   private:
  -                        static void* LOG4CXX_THREAD_FUNC run(apr_thread_t* 
thread, void* data);
  +                    static void* LOG4CXX_THREAD_FUNC run(log4cxx_thread_t* 
thread, void* data);
                           Pool pool;
                           Thread thread;
   
  
  
  
  1.11      +1 -1      
logging-log4cxx/include/log4cxx/helpers/simpledateformat.h
  
  Index: simpledateformat.h
  ===================================================================
  RCS file: 
/home/cvs/logging-log4cxx/include/log4cxx/helpers/simpledateformat.h,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- simpledateformat.h        11 Mar 2005 06:34:49 -0000      1.10
  +++ simpledateformat.h        12 Mar 2005 21:00:37 -0000      1.11
  @@ -55,7 +55,7 @@
                     */
                     void setTimeZone(const TimeZonePtr& zone);
   
  -#if LOG4CXX_HAS_WCHAR_T
  +#if LOG4CXX_HAS_STD_WLOCALE && LOG4CXX_HAS_WCHAR_T
                     typedef wchar_t localechar;
   #else
                     typedef char localechar;
  
  
  
  1.26      +5 -8      logging-log4cxx/include/log4cxx/helpers/thread.h
  
  Index: thread.h
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/include/log4cxx/helpers/thread.h,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- thread.h  15 Feb 2005 23:55:59 -0000      1.25
  +++ thread.h  12 Mar 2005 21:00:37 -0000      1.26
  @@ -32,15 +32,12 @@
   #endif
   
   
  -extern "C" {
  -struct apr_thread_t;
  -}
  -
   namespace log4cxx
   {
           namespace helpers
           {
                   class Pool;
  +                typedef void log4cxx_thread_t;
   
                   class LOG4CXX_EXPORT Thread
                   {
  @@ -49,8 +46,8 @@
                           ~Thread();
   
                           void run(log4cxx::helpers::Pool& pool,
  -                                void* (LOG4CXX_THREAD_FUNC 
*start)(apr_thread_t* thread, void* data),
  -                                void* data);
  +                                void* (LOG4CXX_THREAD_FUNC 
*start)(log4cxx_thread_t* thread, void* data),
  +                                void* data);
                           void stop();
                           void join();
                           //
  @@ -58,10 +55,10 @@
                           //    immediate exit from the start method
                           void ending();
   
  -                        inline bool isActive() { return thread != 0; }
  +                        inline bool isActive() { return thread != 0; }
   
                   private:
  -                        apr_thread_t* thread;
  +                        log4cxx_thread_t* thread;
                           volatile bool finished;
                           Thread(const Thread&);
                           Thread& operator=(const Thread&);
  
  
  
  1.8       +1 -1      
logging-log4cxx/include/log4cxx/net/socketappenderskeleton.h
  
  Index: socketappenderskeleton.h
  ===================================================================
  RCS file: 
/home/cvs/logging-log4cxx/include/log4cxx/net/socketappenderskeleton.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- socketappenderskeleton.h  15 Feb 2005 23:56:00 -0000      1.7
  +++ socketappenderskeleton.h  12 Mar 2005 21:00:37 -0000      1.8
  @@ -188,7 +188,7 @@
                           */
   
                      helpers::Thread thread;
  -                    static void* LOG4CXX_THREAD_FUNC monitor(apr_thread_t* 
thread, void* data);
  +                   static void* LOG4CXX_THREAD_FUNC 
monitor(helpers::log4cxx_thread_t* thread, void* data);
                           SocketAppenderSkeleton(const 
SocketAppenderSkeleton&);
                           SocketAppenderSkeleton& operator=(const 
SocketAppenderSkeleton&);
   
  
  
  
  1.19      +1 -1      logging-log4cxx/include/log4cxx/net/sockethubappender.h
  
  Index: sockethubappender.h
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/include/log4cxx/net/sockethubappender.h,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- sockethubappender.h       15 Feb 2005 23:56:00 -0000      1.18
  +++ sockethubappender.h       12 Mar 2005 21:00:37 -0000      1.19
  @@ -183,7 +183,7 @@
                           void startServer();
   
                           helpers::Thread thread;
  -                    static void* LOG4CXX_THREAD_FUNC monitor(apr_thread_t* 
thread, void* data);
  +                        static void* LOG4CXX_THREAD_FUNC 
monitor(helpers::log4cxx_thread_t* thread, void* data);
   
                   }; // class SocketHubAppender
           }  // namespace net
  
  
  
  1.20      +1 -1      logging-log4cxx/include/log4cxx/net/telnetappender.h
  
  Index: telnetappender.h
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/include/log4cxx/net/telnetappender.h,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- telnetappender.h  15 Feb 2005 23:56:00 -0000      1.19
  +++ telnetappender.h  12 Mar 2005 21:00:37 -0000      1.20
  @@ -129,7 +129,7 @@
                           helpers::ServerSocket* serverSocket;
                           helpers::Thread sh;
                           volatile unsigned int activeConnections;
  -                        static void* LOG4CXX_THREAD_FUNC 
acceptConnections(apr_thread_t* thread, void* data);
  +                        static void* LOG4CXX_THREAD_FUNC 
acceptConnections(helpers::log4cxx_thread_t* thread, void* data);
                   }; // class TelnetAppender
       } // namespace net
   } // namespace log4cxx
  
  
  
  1.13      +1 -1      
logging-log4cxx/include/log4cxx/spi/location/locationinfo.h
  
  Index: locationinfo.h
  ===================================================================
  RCS file: 
/home/cvs/logging-log4cxx/include/log4cxx/spi/location/locationinfo.h,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- locationinfo.h    3 Mar 2005 03:47:51 -0000       1.12
  +++ locationinfo.h    12 Mar 2005 21:00:37 -0000      1.13
  @@ -133,7 +133,7 @@
         #define __LOG4CXX_FUNC__ __FUNCSIG__
   #endif
   #else
  -#if defined(__GCC)
  +#if defined(__GNUC__)
         #define __LOG4CXX_FUNC__ __PRETTY_FUNCTION__
   #endif
   #endif
  
  
  
  1.20      +1 -1      logging-log4cxx/src/asyncappender.cpp
  
  Index: asyncappender.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/asyncappender.cpp,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- asyncappender.cpp 15 Feb 2005 23:56:01 -0000      1.19
  +++ asyncappender.cpp 12 Mar 2005 21:00:37 -0000      1.20
  @@ -165,7 +165,7 @@
           aai->removeAppender(name);
   }
   
  -void* APR_THREAD_FUNC AsyncAppender::dispatch(apr_thread_t* thread, void* 
data) {
  +void* LOG4CXX_THREAD_FUNC AsyncAppender::dispatch(log4cxx_thread_t* thread, 
void* data) {
           AsyncAppender* pThis = (AsyncAppender*) data;
           LoggingEventPtr event;
           while(true) {
  
  
  
  1.14      +1 -1      logging-log4cxx/src/consoleappender.cpp
  
  Index: consoleappender.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/consoleappender.cpp,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- consoleappender.cpp       11 Mar 2005 06:34:49 -0000      1.13
  +++ consoleappender.cpp       12 Mar 2005 21:00:37 -0000      1.14
  @@ -124,7 +124,7 @@
   
   
   void ConsoleAppender::subAppend(const LogString& msg, Pool&) {
  -#if LOG4CXX_HAS_WCHAR_T
  +#if LOG4CXX_HAS_WCHAR_T && LOG4CXX_HAS_STD_WCOUT
           std::wstring wmsg;
           log4cxx::helpers::Transcoder::encode(msg, wmsg);
           if (useErr) {
  
  
  
  1.16      +1 -1      logging-log4cxx/src/filewatchdog.cpp
  
  Index: filewatchdog.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/filewatchdog.cpp,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- filewatchdog.cpp  4 Mar 2005 04:23:19 -0000       1.15
  +++ filewatchdog.cpp  12 Mar 2005 21:00:37 -0000      1.16
  @@ -65,7 +65,7 @@
      }
   }
   
  -void* APR_THREAD_FUNC FileWatchdog::run(apr_thread_t* thread, void* data) {
  +void* APR_THREAD_FUNC FileWatchdog::run(log4cxx_thread_t* thread, void* 
data) {
      FileWatchdog* pThis = (FileWatchdog*) data;
   
      unsigned int interrupted = apr_atomic_read32(&pThis->interrupted);
  
  
  
  1.11      +6 -1      logging-log4cxx/src/loglog.cpp
  
  Index: loglog.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/loglog.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- loglog.cpp        11 Mar 2005 06:34:49 -0000      1.10
  +++ loglog.cpp        12 Mar 2005 21:00:37 -0000      1.11
  @@ -83,6 +83,11 @@
   
   #if LOG4CXX_HAS_WCHAR_T
   void LogLog::emit(const std::wstring& msg) {
  -    std::wcerr << msg << std::endl;
  +#if LOG4CXX_HAS_STD_WCOUT
  +    std::wcerr << msg << std::endl;
  +#else
  +    LOG4CXX_ENCODE_CHAR(encoded, msg);
  +    std::err << encoded << std::endl;
  +#endif
   }
   #endif
  
  
  
  1.8       +1 -1      logging-log4cxx/src/socketappenderskeleton.cpp
  
  Index: socketappenderskeleton.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/socketappenderskeleton.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- socketappenderskeleton.cpp        4 Mar 2005 04:23:19 -0000       1.7
  +++ socketappenderskeleton.cpp        12 Mar 2005 21:00:37 -0000      1.8
  @@ -203,7 +203,7 @@
           }
   }
   
  -void* APR_THREAD_FUNC SocketAppenderSkeleton::monitor(apr_thread_t* thread, 
void* data) {
  +void* APR_THREAD_FUNC SocketAppenderSkeleton::monitor(log4cxx_thread_t* 
thread, void* data) {
           SocketAppenderSkeleton* socketAppender = (SocketAppenderSkeleton*) 
data;
           SocketPtr socket;
           apr_uint32_t isClosed = apr_atomic_read32(&socketAppender->closed);
  
  
  
  1.18      +1 -1      logging-log4cxx/src/sockethubappender.cpp
  
  Index: sockethubappender.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/sockethubappender.cpp,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- sockethubappender.cpp     15 Feb 2005 23:56:01 -0000      1.17
  +++ sockethubappender.cpp     12 Mar 2005 21:00:37 -0000      1.18
  @@ -149,7 +149,7 @@
           thread.run(pool, monitor, this);
   }
   
  -void* APR_THREAD_FUNC SocketHubAppender::monitor(apr_thread_t* thread, void* 
data) {
  +void* APR_THREAD_FUNC SocketHubAppender::monitor(log4cxx_thread_t* thread, 
void* data) {
           SocketHubAppender* pThis = (SocketHubAppender*) data;
   
           ServerSocket * serverSocket = 0;
  
  
  
  1.17      +1 -1      logging-log4cxx/src/telnetappender.cpp
  
  Index: telnetappender.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/telnetappender.cpp,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- telnetappender.cpp        15 Feb 2005 23:56:01 -0000      1.16
  +++ telnetappender.cpp        12 Mar 2005 21:00:37 -0000      1.17
  @@ -140,7 +140,7 @@
   }
   
   
  -void* APR_THREAD_FUNC TelnetAppender::acceptConnections(apr_thread_t* 
thread, void* data) {
  +void* APR_THREAD_FUNC TelnetAppender::acceptConnections(log4cxx_thread_t* 
thread, void* data) {
           TelnetAppender* pThis = (TelnetAppender*) data;
   
           try
  
  
  
  1.25      +12 -10    logging-log4cxx/src/thread.cpp
  
  Index: thread.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/thread.cpp,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- thread.cpp        15 Feb 2005 23:56:01 -0000      1.24
  +++ thread.cpp        12 Mar 2005 21:00:37 -0000      1.25
  @@ -29,28 +29,30 @@
   Thread::~Thread() {
           join();
   }
  -
  -
  -void Thread::run(Pool& p, apr_thread_start_t start, void* data) {
  -    if (thread != NULL && !finished) {
  +
  +void Thread::run(log4cxx::helpers::Pool& p,
  +        void* (LOG4CXX_THREAD_FUNC *start)(log4cxx_thread_t* thread, void* 
data),
  +        void* data) {
  +        if (thread != NULL && !finished) {
                   throw ThreadException(0);
           }
           apr_threadattr_t* attrs;
           apr_status_t stat = apr_threadattr_create(&attrs, (apr_pool_t*) 
p.getAPRPool());
           if (stat != APR_SUCCESS) {
                   throw ThreadException(stat);
  -        }
  -        stat = apr_thread_create(&thread, attrs, start, data, (apr_pool_t*) 
p.getAPRPool());
  +        }
  +        stat = apr_thread_create((apr_thread_t**) &thread, attrs, 
  +            (apr_thread_start_t) start, data, (apr_pool_t*) p.getAPRPool());
           if (stat != APR_SUCCESS) {
                   throw ThreadException(stat);
  -        }
  -}
  +        }
  +}
   
   
   
   void Thread::stop() {
           if (thread != NULL && !finished) {
  -                apr_status_t stat = apr_thread_exit(thread, 0);
  +                apr_status_t stat = apr_thread_exit((apr_thread_t*) thread, 
0);
                   finished = true;
                   thread = NULL;
                   if (stat != APR_SUCCESS) {
  @@ -62,7 +64,7 @@
   void Thread::join() {
           if (thread != NULL && !finished) {
                   apr_status_t startStat;
  -                apr_status_t stat = apr_thread_join(&startStat, thread);
  +                apr_status_t stat = apr_thread_join(&startStat, 
(apr_thread_t*) thread);
                   finished = true;
                   thread = NULL;
                   if (stat != APR_SUCCESS) {
  
  
  

Reply via email to