cdevienne    2004/08/13 05:27:50

  Modified:    .        ChangeLog configure.in
               examples Makefile.am
               include/log4cxx Makefile.am config_msvc.h.in portability.h
               include/log4cxx/db odbcappender.h
               include/log4cxx/helpers condition.h criticalsection.h
                        event.h gnomexml.h msxml.h mutex.h semaphore.h
                        tchar.h thread.h threadspecificdata.h
               include/log4cxx/net smtpappender.h syslogappender.h
               include/log4cxx/xml domconfigurator.h
               performance Makefile.am
               simplesocketserver Makefile.am
               src      Makefile.am condition.cpp criticalsection.cpp
                        dateformat.cpp domconfigurator.cpp event.cpp
                        gnomexml.cpp loader.cpp msxml.cpp mutex.cpp
                        objectimpl.cpp odbcappender.cpp optionconverter.cpp
                        propertyconfigurator.cpp semaphore.cpp
                        smtpappender.cpp stringtokenizer.cpp
                        syslogappender.cpp system.cpp thread.cpp
                        threadspecificdata.cpp
  Log:
  - Fix global namespace pollution. I had to modify the .cpp files in addition
  to the patch.
  - Add -I$(top_builddir)/include to INCLUDES in the different Makefile.am
  files, so we can successfully build in a separate tree.
  
  Submitted by: Cesar Eduardo Barros
  
  Revision  Changes    Path
  1.35      +2 -0      logging-log4cxx/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/ChangeLog,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- ChangeLog 15 Jun 2004 17:12:06 -0000      1.34
  +++ ChangeLog 13 Aug 2004 12:27:45 -0000      1.35
  @@ -7,6 +7,8 @@
   * Renamed config.h to portability.h (fixes an automake problem).
   * Fixed a memory leak in the "trivial" example.
   * Fixed errors in documentation
  +* simplesocketserver is now in a separate directory.
  +* Fixed global namespace pollution (config_auto.h) (Cesar Eduardo Barros).
   
   Version 0.9.7 (2004-05-10)
   ==========================
  
  
  
  1.43      +2 -1      logging-log4cxx/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/configure.in,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- configure.in      13 Aug 2004 08:50:28 -0000      1.42
  +++ configure.in      13 Aug 2004 12:27:45 -0000      1.43
  @@ -18,7 +18,7 @@
   
   AC_SUBST(LT_VERSION)
   
  -AM_CONFIG_HEADER(include/log4cxx/config_auto.h)
  +AC_CONFIG_HEADERS([include/log4cxx/config_auto.h],[cat 
"${ac_abs_top_builddir}/include/log4cxx/config_auto.h" | sed -e 
's/\(HAVE_\|MUST_\|UNICODE\)/LOG4CXX_\1/;s/^\(.*PACKAGE.*\|.*VERSION.*\|.*STDC_HEADERS.*\)$/\/*
 \1 *\//' > "${ac_abs_top_builddir}/include/log4cxx/config_auto_log4cxx.h"])
   
   AH_VERBATIM([HAVE_NO_EXPLICIT_EXPORTS],
   [/* no explicit exports */
  @@ -350,6 +350,7 @@
        ;;
   esac
   
  +CPPFLAGS="-DLOG4CXX $CPPFLAGS"
   
   # Create files
   # 
----------------------------------------------------------------------------
  
  
  
  1.3       +1 -1      logging-log4cxx/examples/Makefile.am
  
  Index: Makefile.am
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/examples/Makefile.am,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Makefile.am       27 Jan 2004 22:28:21 -0000      1.2
  +++ Makefile.am       13 Aug 2004 12:27:45 -0000      1.3
  @@ -1,6 +1,6 @@
   noinst_PROGRAMS = trivial delayedloop
   
  -INCLUDES = -I$(top_srcdir)/include
  +INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
   
   trivial_SOURCES = trivial.cpp
   trivial_LDADD = $(top_builddir)/src/liblog4cxx.la
  
  
  
  1.5       +1 -1      logging-log4cxx/include/log4cxx/Makefile.am
  
  Index: Makefile.am
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/include/log4cxx/Makefile.am,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Makefile.am       2 Apr 2004 08:44:08 -0000       1.4
  +++ Makefile.am       13 Aug 2004 12:27:45 -0000      1.5
  @@ -1,4 +1,4 @@
   SUBDIRS = helpers net nt spi varia xml config db
   log4cxxincdir = $(includedir)/log4cxx
   log4cxxinc_HEADERS= $(top_srcdir)/include/log4cxx/*.h
  -
  +DISTCLEANFILES = config_auto_log4cxx.h
  
  
  
  1.4       +2 -0      logging-log4cxx/include/log4cxx/config_msvc.h.in
  
  Index: config_msvc.h.in
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/include/log4cxx/config_msvc.h.in,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- config_msvc.h.in  10 Aug 2004 22:39:01 -0000      1.3
  +++ config_msvc.h.in  13 Aug 2004 12:27:45 -0000      1.4
  @@ -25,6 +25,7 @@
   /* XML support */
   #define HAVE_XML 1
   
  +/*
   typedef __int64 int64_t;
   
   #if defined(WIN32) || defined(_WIN32)
  @@ -56,3 +57,4 @@
   #endif
   
   #define _WIN32_WINNT 0x0400
  +*/
  
  
  
  1.2       +1 -1      logging-log4cxx/include/log4cxx/portability.h
  
  Index: portability.h
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/include/log4cxx/portability.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- portability.h     13 May 2004 21:17:36 -0000      1.1
  +++ portability.h     13 Aug 2004 12:27:45 -0000      1.2
  @@ -4,7 +4,7 @@
   #ifdef _MSC_VER
   #include <log4cxx/config_msvc.h>
   #else
  -#include <log4cxx/config_auto.h>
  +#include <log4cxx/config_auto_log4cxx.h>
   #endif
   
   #endif //_LOG4CXX_PORTABILITY_H
  
  
  
  1.13      +3 -3      logging-log4cxx/include/log4cxx/db/odbcappender.h
  
  Index: odbcappender.h
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/include/log4cxx/db/odbcappender.h,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- odbcappender.h    13 May 2004 21:14:38 -0000      1.12
  +++ odbcappender.h    13 Aug 2004 12:27:46 -0000      1.13
  @@ -19,14 +19,14 @@
   
   #include <log4cxx/portability.h>
   
  -#ifdef HAVE_ODBC
  +#ifdef LOG4CXX_HAVE_ODBC
    
   #include <log4cxx/helpers/exception.h>
   #include <log4cxx/appenderskeleton.h>
   #include <log4cxx/spi/loggingevent.h>
   #include <list>
   
  -#ifdef HAVE_MS_ODBC
  +#ifdef LOG4CXX_HAVE_MS_ODBC
   #include <windows.h>
   #endif
   
  @@ -268,5 +268,5 @@
       } // namespace db
   }; // namespace log4cxx
   
  -#endif // HAVE_ODBC
  +#endif // LOG4CXX_HAVE_ODBC
   #endif // _LOG4CXX_NET_SOCKET_APPENDER_H
  
  
  
  1.7       +3 -3      logging-log4cxx/include/log4cxx/helpers/condition.h
  
  Index: condition.h
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/include/log4cxx/helpers/condition.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- condition.h       13 May 2004 21:14:38 -0000      1.6
  +++ condition.h       13 Aug 2004 12:27:46 -0000      1.7
  @@ -22,7 +22,7 @@
   #include <log4cxx/helpers/mutex.h>
   #include <log4cxx/helpers/semaphore.h>
   
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
   #include <pthread.h>
   #endif
   
  @@ -45,9 +45,9 @@
                        void wait(Mutex& mutex, long timeOut);
   
                protected:
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
                        pthread_cond_t condition;
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
                        /// Number of waiting threads.
                        long volatile waiters;
   
  
  
  
  1.9       +4 -4      logging-log4cxx/include/log4cxx/helpers/criticalsection.h
  
  Index: criticalsection.h
  ===================================================================
  RCS file: 
/home/cvs/logging-log4cxx/include/log4cxx/helpers/criticalsection.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- criticalsection.h 13 May 2004 21:14:38 -0000      1.8
  +++ criticalsection.h 13 Aug 2004 12:27:46 -0000      1.9
  @@ -19,9 +19,9 @@
   
   #include <log4cxx/portability.h>
   
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
   #include <pthread.h>
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
   #include <windows.h>
   #endif
   
  @@ -38,9 +38,9 @@
                        void unlock();
                        unsigned long getOwningThread();
   
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
                        pthread_mutex_t mutex;
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
                        CRITICAL_SECTION mutex;
   #endif                                               
                        unsigned long owningThread;
  
  
  
  1.5       +3 -3      logging-log4cxx/include/log4cxx/helpers/event.h
  
  Index: event.h
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/include/log4cxx/helpers/event.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- event.h   13 May 2004 21:14:38 -0000      1.4
  +++ event.h   13 Aug 2004 12:27:46 -0000      1.5
  @@ -20,7 +20,7 @@
   #include <log4cxx/portability.h>
   #include <log4cxx/helpers/exception.h>
   
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
   #include <pthread.h>
   #endif
    
  @@ -86,12 +86,12 @@
                        void wait();
                        
                protected:
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
                        pthread_cond_t condition;
                        pthread_mutex_t mutex;
                        bool state;
                        bool manualReset;
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
                        void * event;
   #endif 
                }; // class Event
  
  
  
  1.7       +2 -2      logging-log4cxx/include/log4cxx/helpers/gnomexml.h
  
  Index: gnomexml.h
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/include/log4cxx/helpers/gnomexml.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- gnomexml.h        13 May 2004 21:14:38 -0000      1.6
  +++ gnomexml.h        13 Aug 2004 12:27:46 -0000      1.7
  @@ -19,7 +19,7 @@
   
   #include <log4cxx/portability.h>
   
  -#ifdef HAVE_LIBXML2
  +#ifdef LOG4CXX_HAVE_LIBXML2
   
   #include <log4cxx/helpers/xml.h>
   #include <log4cxx/helpers/objectimpl.h>
  @@ -128,5 +128,5 @@
        }  // namespace helpers
   }; // namespace log4cxx
   
  -#endif // HAVE_LIBXML2
  +#endif // LOG4CXX_HAVE_LIBXML2
   #endif // _LOG4CXX_HELPERS_MSXML_H
  
  
  
  1.10      +2 -2      logging-log4cxx/include/log4cxx/helpers/msxml.h
  
  Index: msxml.h
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/include/log4cxx/helpers/msxml.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- msxml.h   13 May 2004 21:14:38 -0000      1.9
  +++ msxml.h   13 Aug 2004 12:27:46 -0000      1.10
  @@ -19,7 +19,7 @@
   
   #include <log4cxx/portability.h>
   
  -#ifdef HAVE_MS_XML
  +#ifdef LOG4CXX_HAVE_MS_XML
   
   #include <log4cxx/helpers/xml.h>
   #include <log4cxx/helpers/objectimpl.h>
  @@ -127,5 +127,5 @@
        }  // namespace helpers
   }; // namespace log4cxx
   
  -#endif // HAVE_MS_XML
  +#endif // LOG4CXX_HAVE_MS_XML
   #endif // _LOG4CXX_HELPERS_MSXML_H
  
  
  
  1.7       +3 -3      logging-log4cxx/include/log4cxx/helpers/mutex.h
  
  Index: mutex.h
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/include/log4cxx/helpers/mutex.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- mutex.h   13 May 2004 21:14:38 -0000      1.6
  +++ mutex.h   13 Aug 2004 12:27:46 -0000      1.7
  @@ -20,7 +20,7 @@
   #include <log4cxx/portability.h>
   #include <log4cxx/helpers/exception.h>
   
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
   #include <pthread.h>
   #endif
   
  @@ -44,9 +44,9 @@
                        void unlock();
   
                protected:
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
                        pthread_mutex_t mutex;
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
                        void * mutex;
   #endif
                };
  
  
  
  1.11      +5 -5      logging-log4cxx/include/log4cxx/helpers/semaphore.h
  
  Index: semaphore.h
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/include/log4cxx/helpers/semaphore.h,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- semaphore.h       13 May 2004 21:14:38 -0000      1.10
  +++ semaphore.h       13 Aug 2004 12:27:46 -0000      1.11
  @@ -20,7 +20,7 @@
   #include <log4cxx/portability.h>
   #include <log4cxx/helpers/exception.h>
   
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
   #include <semaphore.h>
   #endif
   
  @@ -32,13 +32,13 @@
                {
                };
   
  -#ifdef HAVE_MS_THREAD
  +#ifdef LOG4CXX_HAVE_MS_THREAD
                class Condition;
   #endif
   
                class LOG4CXX_EXPORT Semaphore
                {
  -#ifdef HAVE_MS_THREAD
  +#ifdef LOG4CXX_HAVE_MS_THREAD
                friend class Condition;
   #endif
                public:
  @@ -49,9 +49,9 @@
                        void post();
   
                protected:
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
                        sem_t semaphore;
  -#elif defined (HAVE_MS_THREAD)
  +#elif defined (LOG4CXX_HAVE_MS_THREAD)
                        void * semaphore;
   #endif
                };
  
  
  
  1.39      +4 -4      logging-log4cxx/include/log4cxx/helpers/tchar.h
  
  Index: tchar.h
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/include/log4cxx/helpers/tchar.h,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- tchar.h   3 Aug 2004 06:01:25 -0000       1.38
  +++ tchar.h   13 Aug 2004 12:27:46 -0000      1.39
  @@ -76,7 +76,7 @@
        }
   }
   
  -#ifdef MUST_UNDEF_T
  +#ifdef LOG4CXX_MUST_UNDEF_T
   #undef _T
   #endif
   
  @@ -98,7 +98,7 @@
   #define A2W(src) Convert::ansiToUnicode((wchar_t *)_dst, src)
   #endif
   
  -#ifdef UNICODE
  +#ifdef LOG4CXX_UNICODE
        #include <wctype.h>
   
   #ifndef _T
  @@ -137,7 +137,7 @@
        #define ttol(s) wcstol(s, 0, 10)
        #define itot _itow
        #define tcscmp wcscmp
  -#else // Not UNICODE
  +#else // Not LOG4CXX_UNICODE
        #include <ctype.h>
   
   #ifndef _T
  @@ -174,7 +174,7 @@
        #define ttol atol
        #define itot itoa
        #define tcscmp strcmp
  -#endif // UNICODE
  +#endif // LOG4CXX_UNICODE
   
   #define _MinInc  size_t(512)
   #define _MaxInc size_t(100 * 1024)
  
  
  
  1.14      +2 -2      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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- thread.h  13 May 2004 21:14:38 -0000      1.13
  +++ thread.h  13 Aug 2004 12:27:46 -0000      1.14
  @@ -131,9 +131,9 @@
                
                protected:
                        /** Thread descriptor */
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
                        pthread_t thread;
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
                        void * thread;
   #endif
                        RunnablePtr runnable;
  
  
  
  1.9       +3 -3      
logging-log4cxx/include/log4cxx/helpers/threadspecificdata.h
  
  Index: threadspecificdata.h
  ===================================================================
  RCS file: 
/home/cvs/logging-log4cxx/include/log4cxx/helpers/threadspecificdata.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- threadspecificdata.h      13 May 2004 21:14:38 -0000      1.8
  +++ threadspecificdata.h      13 Aug 2004 12:27:46 -0000      1.9
  @@ -19,7 +19,7 @@
   
   #include <log4cxx/portability.h>
   
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
   #include <pthread.h>
   #endif
   
  @@ -36,9 +36,9 @@
                        void SetData(void * data);
   
                protected:
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
                        pthread_key_t key;
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
                        void * key;
   #endif
                };
  
  
  
  1.14      +2 -2      logging-log4cxx/include/log4cxx/net/smtpappender.h
  
  Index: smtpappender.h
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/include/log4cxx/net/smtpappender.h,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- smtpappender.h    13 May 2004 21:14:38 -0000      1.13
  +++ smtpappender.h    13 Aug 2004 12:27:47 -0000      1.14
  @@ -19,7 +19,7 @@
   
   #include <log4cxx/portability.h>
   
  -#ifdef HAVE_SMTP
  +#ifdef LOG4CXX_HAVE_SMTP
   
   #include <log4cxx/appenderskeleton.h>
   #include <log4cxx/helpers/cyclicbuffer.h>
  @@ -270,5 +270,5 @@
        }  // namespace net
   }; // namespace log4cxx
   
  -#endif // HAVE_SMTP
  +#endif // LOG4CXX_HAVE_SMTP
   #endif // _LOG4CXX_NET_SMTP_H
  
  
  
  1.10      +1 -1      logging-log4cxx/include/log4cxx/net/syslogappender.h
  
  Index: syslogappender.h
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/include/log4cxx/net/syslogappender.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- syslogappender.h  22 Apr 2004 21:21:32 -0000      1.9
  +++ syslogappender.h  13 Aug 2004 12:27:47 -0000      1.10
  @@ -20,7 +20,7 @@
   #include <log4cxx/appenderskeleton.h>
   #include <log4cxx/helpers/syslogwriter.h>
   
  -#ifndef HAVE_SYSLOG
  +#ifndef LOG4CXX_HAVE_SYSLOG
   #endif
   
   namespace log4cxx
  
  
  
  1.17      +2 -2      logging-log4cxx/include/log4cxx/xml/domconfigurator.h
  
  Index: domconfigurator.h
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/include/log4cxx/xml/domconfigurator.h,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- domconfigurator.h 20 May 2004 08:50:26 -0000      1.16
  +++ domconfigurator.h 13 Aug 2004 12:27:47 -0000      1.17
  @@ -19,7 +19,7 @@
   
   #include <log4cxx/portability.h>
   
  -#ifdef HAVE_XML
  +#ifdef LOG4CXX_HAVE_XML
   
   #include <log4cxx/helpers/tchar.h>
   #include <log4cxx/helpers/objectptr.h>
  @@ -220,5 +220,5 @@
        }  // namespace xml
   }; // namespace log4cxx
   
  -#endif // HAVE_XML
  +#endif // LOG4CXX_HAVE_XML
   #endif // _LOG4CXX_XML_DOM_CONFIGURATOR_H
  
  
  
  1.4       +1 -1      logging-log4cxx/performance/Makefile.am
  
  Index: Makefile.am
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/performance/Makefile.am,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile.am       2 Apr 2004 08:53:06 -0000       1.3
  +++ Makefile.am       13 Aug 2004 12:27:47 -0000      1.4
  @@ -4,7 +4,7 @@
   performanceincdir = $(includedir)/log4cxx
   noinst_HEADERS= $(top_srcdir)/performance/*.h
   
  -INCLUDES = -I$(top_srcdir)/include
  +INCLUDES = -I$(top_srcdir)/include  -I$(top_builddir)/include
   
   logging_SOURCES = main.cpp nullappender.cpp
   logging_LDADD = $(top_builddir)/src/liblog4cxx.la
  
  
  
  1.2       +1 -1      logging-log4cxx/simplesocketserver/Makefile.am
  
  Index: Makefile.am
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/simplesocketserver/Makefile.am,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Makefile.am       13 Aug 2004 08:50:28 -0000      1.1
  +++ Makefile.am       13 Aug 2004 12:27:47 -0000      1.2
  @@ -1,4 +1,4 @@
  -INCLUDES = -I$(top_srcdir)/include
  +INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
   
   AM_CPPFLAGS = @CPPFLAGS_XML@ @CPPFLAGS_ODBC@
   
  
  
  
  1.17      +1 -1      logging-log4cxx/src/Makefile.am
  
  Index: Makefile.am
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/Makefile.am,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Makefile.am       13 Aug 2004 08:50:28 -0000      1.16
  +++ Makefile.am       13 Aug 2004 12:27:47 -0000      1.17
  @@ -1,6 +1,6 @@
   lib_LTLIBRARIES = liblog4cxx.la
   
  -INCLUDES = -I$(top_srcdir)/include
  +INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
   
   liblog4cxx_la_SOURCES = \
        appenderattachableimpl.cpp \
  
  
  
  1.8       +14 -14    logging-log4cxx/src/condition.cpp
  
  Index: condition.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/condition.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- condition.cpp     10 Aug 2004 22:39:00 -0000      1.7
  +++ condition.cpp     13 Aug 2004 12:27:47 -0000      1.8
  @@ -16,7 +16,7 @@
   
   #include <log4cxx/portability.h>
   
  -#ifdef HAVE_MS_THREAD
  +#ifdef LOG4CXX_HAVE_MS_THREAD
   #ifndef _WIN32_WINNT
   #define _WIN32_WINNT 0x0400 // SignalObjectAndWait
   #endif
  @@ -30,9 +30,9 @@
   
   Condition::Condition()
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        ::pthread_cond_init(&condition, 0);
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        waiters = 0;
        wasBroadCast = false;
        waitersDone = ::CreateEvent(0, FALSE, FALSE, NULL);
  @@ -41,26 +41,26 @@
   
   Condition::~Condition()
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        ::pthread_cond_destroy(&condition);
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        ::CloseHandle(waitersDone);
   #endif
   }
   
   void Condition::broadcast()
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        ::pthread_cond_broadcast(&condition);
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
   #endif
   }
   
   void Condition::signal()
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        ::pthread_cond_signal(&condition);
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        // If there aren't any waiters, then this is a no-op.  Note that
        // this function *must* be called with the <external_mutex> held
        // since other wise there is a race condition that can lead to the
  @@ -69,7 +69,7 @@
        // updated by another thread.
   
        // if (waiters != 0) (atomic comparison)
  -#    if LOG4CXX_HAVE_OLD_WIN32_INTERLOCKS    // MSDEV 6
  +#    if LOG4CXX_LOG4CXX_HAVE_OLD_WIN32_INTERLOCKS    // MSDEV 6
        if ((long)InterlockedCompareExchange((void**)&waiters, 0, 0) != 0)
   #    else
        if ((long)InterlockedCompareExchange(&waiters, 0, 0) != 0)
  @@ -82,11 +82,11 @@
   
   void Condition::wait(Mutex& mutex)
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        ::pthread_cond_wait(&condition, &mutex.mutex);
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
   
  -#if LOG4CXX_HAVE_OLD_WIN32_INTERLOCKS        // MSDEV 6
  +#if LOG4CXX_LOG4CXX_HAVE_OLD_WIN32_INTERLOCKS        // MSDEV 6
        ::InterlockedIncrement((long *)&waiters);
   #else
        ::InterlockedIncrement(&waiters);
  @@ -98,7 +98,7 @@
                throw ConditionException();
        }
   
  -#if LOG4CXX_HAVE_OLD_WIN32_INTERLOCKS        // MSDEV 6
  +#if LOG4CXX_LOG4CXX_HAVE_OLD_WIN32_INTERLOCKS        // MSDEV 6
        long oldWaiters = ::InterlockedDecrement((long*)&waiters);
   #else
        long oldWaiters = ::InterlockedDecrement(&waiters);
  
  
  
  1.7       +8 -8      logging-log4cxx/src/criticalsection.cpp
  
  Index: criticalsection.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/criticalsection.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- criticalsection.cpp       22 Apr 2004 21:21:33 -0000      1.6
  +++ criticalsection.cpp       13 Aug 2004 12:27:47 -0000      1.7
  @@ -21,31 +21,31 @@
   
   CriticalSection::CriticalSection() : owningThread(0)
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        pthread_mutexattr_t attr;
        pthread_mutexattr_init(&attr);
        pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
        pthread_mutex_init(&mutex, &attr);
        pthread_mutexattr_destroy(&attr);
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        InitializeCriticalSection(&mutex);
   #endif                                               
   }
   
   CriticalSection::~CriticalSection()
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        pthread_mutex_destroy(&mutex);
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        DeleteCriticalSection(&mutex);
   #endif
   }
   
   void CriticalSection::lock()
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        pthread_mutex_lock(&mutex);
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        EnterCriticalSection(&mutex);
   #endif
        owningThread = Thread::getCurrentThreadId();
  @@ -55,9 +55,9 @@
   {
        owningThread = 0;
   
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        pthread_mutex_unlock(&mutex);
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        LeaveCriticalSection(&mutex);
   #endif
   }
  
  
  
  1.13      +1 -1      logging-log4cxx/src/dateformat.cpp
  
  Index: dateformat.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/dateformat.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- dateformat.cpp    10 Aug 2004 22:39:01 -0000      1.12
  +++ dateformat.cpp    13 Aug 2004 12:27:48 -0000      1.13
  @@ -70,7 +70,7 @@
        time_t time = (time_t)(localTimeMillis/1000);
        const tm * tm = ::gmtime(&time);
   
  -#ifdef UNICODE
  +#ifdef LOG4CXX_UNICODE
        size_t len = ::wcsftime(buffer, 255, dateFormat.c_str(), tm);
   #else
        size_t len = ::strftime(buffer, 255, dateFormat.c_str(), tm);
  
  
  
  1.15      +6 -6      logging-log4cxx/src/domconfigurator.cpp
  
  Index: domconfigurator.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/domconfigurator.cpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- domconfigurator.cpp       4 Jul 2004 20:44:41 -0000       1.14
  +++ domconfigurator.cpp       13 Aug 2004 12:27:48 -0000      1.15
  @@ -16,11 +16,11 @@
    
   #include <log4cxx/portability.h>
   
  -#ifdef HAVE_XML
  +#ifdef LOG4CXX_HAVE_XML
   
  -#ifdef HAVE_LIBXML2
  +#ifdef LOG4CXX_HAVE_LIBXML2
   #include <log4cxx/helpers/gnomexml.h>
  -#elif defined(HAVE_MS_XML)
  +#elif defined(LOG4CXX_HAVE_MS_XML)
   #include <windows.h>
   #include <log4cxx/helpers/msxml.h>
   #endif
  @@ -586,9 +586,9 @@
   
        try
        {
  -#ifdef HAVE_LIBXML2
  +#ifdef LOG4CXX_HAVE_LIBXML2
                XMLDOMDocumentPtr doc = new GnomeXMLDOMDocument();
  -#elif defined(HAVE_MS_XML)
  +#elif defined(LOG4CXX_HAVE_MS_XML)
                XMLDOMDocumentPtr doc = new MsXMLDOMDocument();
   #endif
                doc->load(filename); 
  @@ -735,4 +735,4 @@
       }
   }
   
  -#endif // HAVE_XML
  +#endif // LOG4CXX_HAVE_XML
  
  
  
  1.3       +12 -12    logging-log4cxx/src/event.cpp
  
  Index: event.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/event.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- event.cpp 22 Apr 2004 21:21:33 -0000      1.2
  +++ event.cpp 13 Aug 2004 12:27:48 -0000      1.3
  @@ -16,21 +16,21 @@
    
   #include <log4cxx/helpers/event.h>
   
  -#ifdef HAVE_MS_THREAD
  +#ifdef LOG4CXX_HAVE_MS_THREAD
   #include <windows.h>
   #endif 
   
   using namespace log4cxx::helpers;
   
   Event::Event(bool manualReset, bool initialState)
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
   : manualReset(manualReset), state(initialState)
   #endif 
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        pthread_cond_init(&condition, 0);
        pthread_mutex_init(&mutex, 0);
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        event = ::CreateEvent(
                NULL, 
                manualReset ? TRUE : FALSE, 
  @@ -46,17 +46,17 @@
   
   Event::~Event()
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        ::pthread_cond_destroy(&condition);
        pthread_mutex_destroy(&mutex);
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        ::CloseHandle((HANDLE)event);
   #endif 
   }
   
   void Event::set()
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        if (pthread_mutex_lock(&mutex) != 0)
        {
                throw EventException(_T("Cannot lock mutex"));
  @@ -89,7 +89,7 @@
        {
                throw EventException(_T("Cannot unlock mutex"));
        }
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        if (!::SetEvent((HANDLE)event))
        {
                throw EventException(_T("Cannot set event"));
  @@ -99,7 +99,7 @@
   
   void Event::reset()
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        if (pthread_mutex_lock(&mutex) != 0)
        {
                throw EventException(_T("Cannot lock mutex"));
  @@ -111,7 +111,7 @@
        {
                throw EventException(_T("Cannot unlock mutex"));
        }
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        if (!::ResetEvent((HANDLE)event))
        {
                throw EventException(_T("Cannot reset event"));
  @@ -121,7 +121,7 @@
   
   void Event::wait()
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        if (pthread_mutex_lock(&mutex) != 0)
        {
                throw EventException(_T("Cannot lock mutex"));
  @@ -144,7 +144,7 @@
        {
                throw EventException(_T("Cannot unlock mutex"));
        }
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        if (::WaitForSingleObject((HANDLE)event, INFINITE)
                != WAIT_OBJECT_0)
        {
  
  
  
  1.5       +2 -2      logging-log4cxx/src/gnomexml.cpp
  
  Index: gnomexml.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/gnomexml.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- gnomexml.cpp      13 May 2004 21:14:38 -0000      1.4
  +++ gnomexml.cpp      13 Aug 2004 12:27:48 -0000      1.5
  @@ -16,7 +16,7 @@
    
   #include <log4cxx/portability.h>
   
  -#ifdef HAVE_LIBXML2
  +#ifdef LOG4CXX_HAVE_LIBXML2
   
   #include <log4cxx/helpers/gnomexml.h>
   #include <log4cxx/helpers/loglog.h>
  @@ -239,4 +239,4 @@
        }
   }
   
  -#endif // HAVE_LIBXML2
  +#endif // LOG4CXX_HAVE_LIBXML2
  
  
  
  1.9       +1 -1      logging-log4cxx/src/loader.cpp
  
  Index: loader.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/loader.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- loader.cpp        22 Apr 2004 21:21:33 -0000      1.8
  +++ loader.cpp        13 Aug 2004 12:27:48 -0000      1.9
  @@ -77,7 +77,7 @@
                return 0;
        }
   
  -#ifdef UNICODE
  +#ifdef LOG4CXX_UNICODE
                std::wifstream * stream = new std::wifstream();
   #else
                std::ifstream * stream = new std::ifstream();
  
  
  
  1.8       +1 -1      logging-log4cxx/src/msxml.cpp
  
  Index: msxml.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/msxml.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- msxml.cpp 13 May 2004 21:14:38 -0000      1.7
  +++ msxml.cpp 13 Aug 2004 12:27:48 -0000      1.8
  @@ -17,7 +17,7 @@
   #define _WIN32_DCOM
   #include <log4cxx/portability.h>
   
  -#ifdef HAVE_MS_XML
  +#ifdef LOG4CXX_HAVE_MS_XML
   
   #include <windows.h>
   #include <log4cxx/helpers/msxml.h>
  
  
  
  1.5       +9 -9      logging-log4cxx/src/mutex.cpp
  
  Index: mutex.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/mutex.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mutex.cpp 13 May 2004 21:14:38 -0000      1.4
  +++ mutex.cpp 13 Aug 2004 12:27:48 -0000      1.5
  @@ -16,7 +16,7 @@
    
   #include <log4cxx/portability.h>
   
  -#ifdef HAVE_MS_THREAD
  +#ifdef LOG4CXX_HAVE_MS_THREAD
   #include <windows.h>
   #endif
   
  @@ -27,34 +27,34 @@
   
   Mutex::Mutex()
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        pthread_mutexattr_t attr;
        pthread_mutexattr_init(&attr);
        pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
        pthread_mutex_init(&mutex, &attr);
        pthread_mutexattr_destroy(&attr);
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        mutex = ::CreateMutex(0, 0, 0);
   #endif
   }
   
   Mutex::~Mutex()
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        pthread_mutex_destroy(&mutex);
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        ::CloseHandle(mutex);
   #endif
   }
   
   void Mutex::lock()
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        if (pthread_mutex_lock(&mutex) != 0)
        {
                throw MutexException();
        }
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        if (::WaitForSingleObject(mutex, INFINITE) == WAIT_ABANDONED)
        {
                throw MutexException();
  @@ -64,12 +64,12 @@
   
   void Mutex::unlock()
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        if (pthread_mutex_unlock(&mutex) != 0)
        {
                throw MutexException();
        }
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        if (!::ReleaseMutex(mutex))
        {
                throw MutexException();
  
  
  
  1.15      +1 -1      logging-log4cxx/src/objectimpl.cpp
  
  Index: objectimpl.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/objectimpl.cpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- objectimpl.cpp    13 May 2004 21:14:38 -0000      1.14
  +++ objectimpl.cpp    13 Aug 2004 12:27:48 -0000      1.15
  @@ -16,7 +16,7 @@
    
   #include <log4cxx/portability.h>
   
  -#ifdef HAVE_MS_THREAD
  +#ifdef LOG4CXX_HAVE_MS_THREAD
   #include <windows.h>
   #endif
   
  
  
  
  1.12      +4 -4      logging-log4cxx/src/odbcappender.cpp
  
  Index: odbcappender.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/odbcappender.cpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- odbcappender.cpp  3 Aug 2004 06:01:25 -0000       1.11
  +++ odbcappender.cpp  13 Aug 2004 12:27:48 -0000      1.12
  @@ -22,7 +22,7 @@
   
   #include <log4cxx/db/odbcappender.h>
   
  -#ifdef HAVE_ODBC
  +#ifdef LOG4CXX_HAVE_ODBC
   
   #include <log4cxx/helpers/loglog.h>
   #include <log4cxx/helpers/optionconverter.h>
  @@ -107,7 +107,7 @@
                        throw SQLException(ret);
                }
   
  -#if defined(HAVE_MS_ODBC)
  +#if defined(LOG4CXX_HAVE_MS_ODBC)
                ret = SQLExecDirect(stmt, (SQLTCHAR *)sql.c_str(), SQL_NTS);
   #else
                USES_CONVERSION;
  @@ -171,7 +171,7 @@
                }
   
   
  -#if defined(HAVE_MS_ODBC)
  +#if defined(LOG4CXX_HAVE_MS_ODBC)
                ret = SQLConnect(connection,
                        (SQLTCHAR *)databaseURL.c_str(), SQL_NTS,
                        (SQLTCHAR *)databaseUser.c_str(), SQL_NTS,
  @@ -265,4 +265,4 @@
        }
   }
   
  -#endif //HAVE_ODBC
  +#endif //LOG4CXX_HAVE_ODBC
  
  
  
  1.16      +2 -2      logging-log4cxx/src/optionconverter.cpp
  
  Index: optionconverter.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/optionconverter.cpp,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- optionconverter.cpp       10 Aug 2004 22:39:01 -0000      1.15
  +++ optionconverter.cpp       13 Aug 2004 12:27:48 -0000      1.16
  @@ -36,7 +36,7 @@
   using namespace log4cxx;
   using namespace log4cxx::helpers;
   using namespace log4cxx::spi;
  -#ifdef HAVE_XML
  +#ifdef LOG4CXX_HAVE_XML
   using namespace log4cxx::xml;
   #endif
   
  @@ -384,7 +384,7 @@
        ConfiguratorPtr configurator;
        String clazz = _clazz;
        
  -#ifdef HAVE_XML
  +#ifdef LOG4CXX_HAVE_XML
        if(clazz.empty() && !configFileName.empty() 
                && StringHelper::endsWith(configFileName, _T(".xml")))
        {
  
  
  
  1.12      +1 -1      logging-log4cxx/src/propertyconfigurator.cpp
  
  Index: propertyconfigurator.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/propertyconfigurator.cpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- propertyconfigurator.cpp  22 Apr 2004 21:21:34 -0000      1.11
  +++ propertyconfigurator.cpp  13 Aug 2004 12:27:48 -0000      1.12
  @@ -86,7 +86,7 @@
   
        try
        {
  -#ifdef UNICODE
  +#ifdef LOG4CXX_UNICODE
                std::wifstream istream;
   #else
                std::ifstream istream;
  
  
  
  1.7       +12 -12    logging-log4cxx/src/semaphore.cpp
  
  Index: semaphore.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/semaphore.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- semaphore.cpp     13 May 2004 21:14:38 -0000      1.6
  +++ semaphore.cpp     13 Aug 2004 12:27:48 -0000      1.7
  @@ -16,9 +16,9 @@
    
   #include <log4cxx/portability.h>
   
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
   #include <semaphore.h>
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
   #include <windows.h>
   #include <limits.h>
   #endif
  @@ -29,12 +29,12 @@
   
   Semaphore::Semaphore(int value)
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        if (::sem_init(&semaphore, 0, value) != 0)
        {
                throw SemaphoreException();
        }
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        semaphore = ::CreateSemaphore(0, (long)value, LONG_MAX, 0);
        if (semaphore == 0)
        {
  @@ -45,21 +45,21 @@
   
   Semaphore::~Semaphore()
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        ::sem_destroy(&semaphore);
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        ::CloseHandle(semaphore);
   #endif
   }
   
   void Semaphore::wait()
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        if (::sem_wait(&semaphore) != 0)
        {
                throw SemaphoreException();
        }
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        if (::WaitForSingleObject(semaphore, INFINITE) != WAIT_OBJECT_0)
        {
                throw SemaphoreException();
  @@ -69,9 +69,9 @@
   
   bool Semaphore::tryWait()
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        return (::sem_trywait(&semaphore) == 0);
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        bool bSuccess;
        switch(::WaitForSingleObject(semaphore, 0))
        {
  @@ -91,12 +91,12 @@
   
   void Semaphore::post()
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        if (::sem_post(&semaphore) != 0)
        {
                throw SemaphoreException();
        }
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        long previousCount;
        if (!::ReleaseSemaphore(semaphore, 1, &previousCount))
        {
  
  
  
  1.7       +2 -2      logging-log4cxx/src/smtpappender.cpp
  
  Index: smtpappender.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/smtpappender.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- smtpappender.cpp  13 May 2004 21:14:38 -0000      1.6
  +++ smtpappender.cpp  13 Aug 2004 12:27:48 -0000      1.7
  @@ -16,7 +16,7 @@
    
   #include <log4cxx/portability.h>
   
  -#ifdef HAVE_SMTP
  +#ifdef LOG4CXX_HAVE_SMTP
   
   #include <log4cxx/net/smtpappender.h>
   #include <log4cxx/level.h>
  @@ -429,5 +429,5 @@
                TriggeringEventEvaluator::getStaticClass(), evaluator);
   }
   
  -#endif //HAVE_SMTP
  +#endif //LOG4CXX_HAVE_SMTP
   
  
  
  
  1.6       +2 -2      logging-log4cxx/src/stringtokenizer.cpp
  
  Index: stringtokenizer.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/stringtokenizer.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- stringtokenizer.cpp       3 Aug 2004 06:01:25 -0000       1.5
  +++ stringtokenizer.cpp       13 Aug 2004 12:27:48 -0000      1.6
  @@ -24,7 +24,7 @@
   {
        this->str = new TCHAR[str.length() + 1];
   
  -#ifdef UNICODE
  +#ifdef LOG4CXX_UNICODE
        wcscpy(this->str, str.c_str());
   #if defined(WIN32) || defined(_WIN32)
        token = wcstok(this->str, this->delim.c_str());
  @@ -56,7 +56,7 @@
   
        String currentToken = token;
   
  -#ifdef UNICODE
  +#ifdef LOG4CXX_UNICODE
   #if defined(WIN32) || defined(_WIN32)
        token = wcstok(0, delim.c_str());
   #else
  
  
  
  1.9       +3 -3      logging-log4cxx/src/syslogappender.cpp
  
  Index: syslogappender.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/syslogappender.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- syslogappender.cpp        22 Apr 2004 21:21:34 -0000      1.8
  +++ syslogappender.cpp        13 Aug 2004 12:27:48 -0000      1.9
  @@ -21,7 +21,7 @@
   #include <log4cxx/spi/loggingevent.h>
   #include <log4cxx/level.h>
   
  -#ifdef HAVE_SYSLOG
  +#ifdef LOG4CXX_HAVE_SYSLOG
        #include <syslog.h>     
   #else
        /* facility codes */
  @@ -253,7 +253,7 @@
   
   // On the local host, we can directly use the system function 'syslog'
   // if it is available
  -#ifdef HAVE_SYSLOG   
  +#ifdef LOG4CXX_HAVE_SYSLOG   
        if (sw == 0)
        {
                StringBuffer sbuf;
  @@ -318,7 +318,7 @@
        
   // On the local host, we can directly use the system function 'syslog'
   // if it is available (cf. append)
  -#ifdef HAVE_SYSLOG   
  +#ifdef LOG4CXX_HAVE_SYSLOG   
        if (syslogHost != _T("localhost") && syslogHost != _T("127.0.0.1")
        && !syslogHost.empty())
   #endif               
  
  
  
  1.13      +5 -5      logging-log4cxx/src/system.cpp
  
  Index: system.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/system.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- system.cpp        24 Apr 2004 08:11:32 -0000      1.12
  +++ system.cpp        13 Aug 2004 12:27:48 -0000      1.13
  @@ -16,11 +16,11 @@
    
   #include <log4cxx/helpers/system.h>
   
  -#if defined(HAVE_FTIME)
  +#if defined(LOG4CXX_HAVE_FTIME)
   #include <sys/timeb.h>
   #endif
   
  -#if defined(HAVE_GETTIMEOFDAY)
  +#if defined(LOG4CXX_HAVE_GETTIMEOFDAY)
   #include <sys/time.h>
   #endif
   
  @@ -32,12 +32,12 @@
   
   int64_t System::currentTimeMillis()
   {
  -#if defined(HAVE_GETTIMEOFDAY)
  +#if defined(LOG4CXX_HAVE_GETTIMEOFDAY)
       timeval tp;
       ::gettimeofday(&tp, 0);
   
       return ((int64_t)tp.tv_sec * 1000) + (int64_t)(tp.tv_usec / 1000);
  -#elif defined(HAVE_FTIME)
  +#elif defined(LOG4CXX_HAVE_FTIME)
       struct timeb tp;
       ::ftime(&tp);
   
  @@ -73,7 +73,7 @@
                throw IllegalArgumentException(_T("key is empty"));
        }
        
  -#ifndef HAVE_SETENV
  +#ifndef LOG4CXX_HAVE_SETENV
        String strEnv = key + _T("=") + value;
        USES_CONVERSION;
        ::putenv((char *)T2A(strEnv.c_str()));
  
  
  
  1.14      +16 -16    logging-log4cxx/src/thread.cpp
  
  Index: thread.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/thread.cpp,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- thread.cpp        10 Aug 2004 22:39:00 -0000      1.13
  +++ thread.cpp        13 Aug 2004 12:27:48 -0000      1.14
  @@ -16,7 +16,7 @@
    
   #include <log4cxx/portability.h>
   
  -#if defined(HAVE_MS_THREAD)
  +#if defined(LOG4CXX_HAVE_MS_THREAD)
   #include <windows.h>
   #endif
   
  @@ -28,7 +28,7 @@
   IMPLEMENT_LOG4CXX_OBJECT(Runnable)
   IMPLEMENT_LOG4CXX_OBJECT(Thread)
   
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
   #include <pthread.h>
   #include <unistd.h> // usleep
   void * threadProc(void * arg)
  @@ -40,7 +40,7 @@
        pthread_exit(0);
        return 0;
   }
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
   DWORD WINAPI threadProc(void * arg)
   {
   //   LogLog::debug(_T("entering thread proc"));
  @@ -68,9 +68,9 @@
   {
        if (thread != 0)
        {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
                ::pthread_join(thread, 0);
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
                ::CloseHandle((HANDLE)thread);
   #endif
                LOGLOG_DEBUG(_T("Thread destroyed."));
  @@ -79,9 +79,9 @@
   
   unsigned long Thread::getCurrentThreadId()
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        return (unsigned long)::pthread_self();
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        return ::GetCurrentThreadId();
   #endif
   }
  @@ -89,13 +89,13 @@
   void Thread::start()
   {
        parentMDCMap = MDC::getContext();
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
   //   LogLog::debug(_T("Thread::start"));
        if (::pthread_create(&thread, NULL, threadProc, this) != 0)
        {
                throw ThreadException();
        }
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        unsigned long threadId = 0;
        thread =
                (void *)::CreateThread(NULL, 0, threadProc, this, 0, &threadId);
  @@ -118,9 +118,9 @@
   void Thread::join()
   {
        bool bSuccess = true;
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        ::pthread_join(thread, 0);
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        if (::WaitForSingleObject((HANDLE)thread, INFINITE) != WAIT_OBJECT_0)
        {
                bSuccess = false;
  @@ -141,7 +141,7 @@
   
   void Thread::sleep(long millis)
   {
  -#ifdef HAVE_MS_THREAD
  +#ifdef LOG4CXX_HAVE_MS_THREAD
        ::Sleep(millis);
   #else
        ::usleep(1000 * millis);
  @@ -204,8 +204,8 @@
   #elif defined(sparc) && defined(__SUNPRO_CC)
        sparc_atomic_add_32(val, 1);
        return *val;
  -#elif defined(HAVE_MS_THREAD)
  -#if LOG4CXX_HAVE_OLD_WIN32_INTERLOCKS        // MSDEV 6
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
  +#if LOG4CXX_LOG4CXX_HAVE_OLD_WIN32_INTERLOCKS        // MSDEV 6
        return ::InterlockedIncrement((long *)val);
   #else
        return ::InterlockedIncrement(val);
  @@ -230,8 +230,8 @@
   #elif defined(sparc) && defined(__SUNPRO_CC)
        sparc_atomic_add_32(val, -1);
        return *val;
  -#elif defined(HAVE_MS_THREAD)
  -#if LOG4CXX_HAVE_OLD_WIN32_INTERLOCKS        // MSDEV 6
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
  +#if LOG4CXX_LOG4CXX_HAVE_OLD_WIN32_INTERLOCKS        // MSDEV 6
        return ::InterlockedDecrement((long *)val);
   #else
        return ::InterlockedDecrement(val);
  
  
  
  1.7       +10 -10    logging-log4cxx/src/threadspecificdata.cpp
  
  Index: threadspecificdata.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/src/threadspecificdata.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- threadspecificdata.cpp    13 May 2004 21:14:39 -0000      1.6
  +++ threadspecificdata.cpp    13 Aug 2004 12:27:48 -0000      1.7
  @@ -16,9 +16,9 @@
    
   #include <log4cxx/portability.h>
   
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
   #include <pthread.h>
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
   #include <windows.h>
   #endif
   
  @@ -28,27 +28,27 @@
   
   ThreadSpecificData::ThreadSpecificData() : key(0)
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        pthread_key_create(&key, NULL);
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        key = (void *)TlsAlloc();
   #endif
   }
   
   ThreadSpecificData::~ThreadSpecificData()
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        pthread_key_delete(key);
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        TlsFree((DWORD)key);
   #endif
   }
   
   void * ThreadSpecificData::GetData() const
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        return pthread_getspecific((pthread_key_t)key);
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        return TlsGetValue((DWORD)key);
   #else
        return key;
  @@ -57,9 +57,9 @@
   
   void ThreadSpecificData::SetData(void * data)
   {
  -#ifdef HAVE_PTHREAD
  +#ifdef LOG4CXX_HAVE_PTHREAD
        pthread_setspecific((pthread_key_t)key, data);
  -#elif defined(HAVE_MS_THREAD)
  +#elif defined(LOG4CXX_HAVE_MS_THREAD)
        TlsSetValue((DWORD)key, data);
   #else
        key = data;
  
  
  

Reply via email to