Boost logo

Boost-Commit :

From: john.groups_at_[hidden]
Date: 2007-10-30 06:48:42


Author: jtorjo
Date: 2007-10-30 06:48:41 EDT (Tue, 30 Oct 2007)
New Revision: 40602
URL: http://svn.boost.org/trac/boost/changeset/40602

Log:
[logging]
v0.9.4, 30 oct 2007
- compiles with gcc 3.4.2

Text files modified:
   sandbox/logging/boost/logging/changelog.hpp | 3 +++
   sandbox/logging/boost/logging/detail/format_msg_type.hpp | 2 +-
   sandbox/logging/boost/logging/detail/fwd.hpp | 5 +++--
   sandbox/logging/boost/logging/format/destination/file.hpp | 8 ++++----
   sandbox/logging/boost/logging/format/formatter/time.hpp | 4 ++--
   sandbox/logging/boost/logging/format/op_equal.hpp | 1 +
   sandbox/logging/boost/logging/format/optimize.hpp | 6 +++---
   sandbox/logging/boost/logging/macros.hpp | 12 ++++++------
   sandbox/logging/lib/logging/samples/gcc/main.cpp | 5 +++--
   9 files changed, 26 insertions(+), 20 deletions(-)

Modified: sandbox/logging/boost/logging/changelog.hpp
==============================================================================
--- sandbox/logging/boost/logging/changelog.hpp (original)
+++ sandbox/logging/boost/logging/changelog.hpp 2007-10-30 06:48:41 EDT (Tue, 30 Oct 2007)
@@ -1,6 +1,9 @@
 /**
 @page page_changelog Changelog
 
+v0.9.4, 30 oct 2007
+- compiles with gcc 3.4.2
+
 v0.9.3, 30 oct 2007
 - updated documentation
     - updated workflow/most of the pages in the table of contents

Modified: sandbox/logging/boost/logging/detail/format_msg_type.hpp
==============================================================================
--- sandbox/logging/boost/logging/detail/format_msg_type.hpp (original)
+++ sandbox/logging/boost/logging/detail/format_msg_type.hpp 2007-10-30 06:48:41 EDT (Tue, 30 Oct 2007)
@@ -62,7 +62,7 @@
         typedef typename boost::remove_reference<msg_type_ref>::type msg_type;
 
         typedef typename find_gather< msg_type >::type gather_msg;
- typedef typename logger< gather_msg, default_ > log_type;
+ typedef logger< gather_msg, default_ > log_type;
     };
 
 }

Modified: sandbox/logging/boost/logging/detail/fwd.hpp
==============================================================================
--- sandbox/logging/boost/logging/detail/fwd.hpp (original)
+++ sandbox/logging/boost/logging/detail/fwd.hpp 2007-10-30 06:48:41 EDT (Tue, 30 Oct 2007)
@@ -30,7 +30,7 @@
 // minimize inclusion of STL headers in our headers!!!
 #include <string>
 
-#define BOOST_LOGGING_STR(x) ansi_unicode_char_holder ( x, L ## x)
+#define BOOST_LOGGING_STR(x) (const char_type*)ansi_unicode_char_holder ( x, L ## x)
 
 
 /*
@@ -83,7 +83,8 @@
 
     template<class self_type> struct flag {
         template<class val_type> struct t : flag_with_self_type<self_type,val_type> {
- t(self_type * self, const val_type& val = val_type() ) : flag_with_self_type(self,val) {}
+ typedef flag_with_self_type<self_type,val_type> flag_base_type;
+ t(self_type * self, const val_type& val = val_type() ) : flag_base_type(self,val) {}
         };
     };
 }

Modified: sandbox/logging/boost/logging/format/destination/file.hpp
==============================================================================
--- sandbox/logging/boost/logging/format/destination/file.hpp (original)
+++ sandbox/logging/boost/logging/format/destination/file.hpp 2007-10-30 06:48:41 EDT (Tue, 30 Oct 2007)
@@ -44,7 +44,7 @@
         : flush_each_time(this, true)
         , initial_overwrite(this, false)
         , do_append(this, true)
- , extra_flags(this, 0) {}
+ , extra_flags(this, std::ios_base::out) {}
 
 
     /// if true (default), flushes after each write
@@ -55,12 +55,12 @@
     flag::t<bool> do_append;
 
     /// just in case you have some extra flags to pass, when opening the file
- flag::t<std::ios_base::open_mode> extra_flags;
+ flag::t<std::ios_base::openmode> extra_flags;
 };
 
 namespace detail {
- inline std::ios_base::open_mode open_flags(file_settings fs) {
- std::ios_base::open_mode flags = std::ios_base::out | fs.extra_flags() ;
+ inline std::ios_base::openmode open_flags(file_settings fs) {
+ std::ios_base::openmode flags = std::ios_base::out | fs.extra_flags() ;
         if ( fs.do_append() )
             flags |= std::ios_base::app;
         if ( !fs.initial_overwrite() )

Modified: sandbox/logging/boost/logging/format/formatter/time.hpp
==============================================================================
--- sandbox/logging/boost/logging/format/formatter/time.hpp (original)
+++ sandbox/logging/boost/logging/format/formatter/time.hpp 2007-10-30 06:48:41 EDT (Tue, 30 Oct 2007)
@@ -105,7 +105,7 @@
         // create the format string, that we can actually pass to sprintf
         uint prev_idx = 0;
         int idx = 0;
- for ( array::iterator begin = indexes.begin(), end = indexes.end(); begin != end; ++begin) {
+ for ( typename array::iterator begin = indexes.begin(), end = indexes.end(); begin != end; ++begin) {
             m_format += format.substr( prev_idx, begin->src_idx - prev_idx);
             *begin->format_idx = idx;
             m_format += (begin->size == 4) ? BOOST_LOGGING_STR("%04d") : BOOST_LOGGING_STR("%02d");
@@ -178,7 +178,7 @@
     template<class msg_type> void operator()(msg_type & msg) const {
         char_type buffer[64];
         ::time_t t = ::time (0);
- tm t_details = m_localtime ? *localtime( &m_t) : *gmtime( &m_t);
+ ::tm t_details = m_localtime ? *localtime( &t) : *gmtime( &t);
     #ifdef UNICODE
         if (0 != wcsftime (buffer, sizeof (buffer), m_format.c_str (), &t_details))
     #else

Modified: sandbox/logging/boost/logging/format/op_equal.hpp
==============================================================================
--- sandbox/logging/boost/logging/format/op_equal.hpp (original)
+++ sandbox/logging/boost/logging/format/op_equal.hpp 2007-10-30 06:48:41 EDT (Tue, 30 Oct 2007)
@@ -22,6 +22,7 @@
 
 #include <boost/logging/detail/fwd.hpp>
 #include <vector>
+#include <typeinfo>
 
 namespace boost { namespace logging {
 

Modified: sandbox/logging/boost/logging/format/optimize.hpp
==============================================================================
--- sandbox/logging/boost/logging/format/optimize.hpp (original)
+++ sandbox/logging/boost/logging/format/optimize.hpp 2007-10-30 06:48:41 EDT (Tue, 30 Oct 2007)
@@ -301,13 +301,13 @@
                 m_full_msg_computed = true;
 
                 m_full_msg.erase();
- for ( array::const_iterator b = m_cur_msg.begin(), e = m_cur_msg.end(); b != e; ++b)
+ for ( typename array::const_iterator b = m_cur_msg.begin(), e = m_cur_msg.end(); b != e; ++b)
                     if ( b->prepended)
                         m_full_msg += *(b->msg);
 
                 m_full_msg += m_msg;
 
- for ( array::const_iterator b = m_cur_msg.begin(), e = m_cur_msg.end(); b != e; ++b)
+ for ( typename array::const_iterator b = m_cur_msg.begin(), e = m_cur_msg.end(); b != e; ++b)
                     if ( !b->prepended)
                         m_full_msg += *(b->msg);
             }
@@ -326,7 +326,7 @@
         void restart() {
             m_full_msg_computed = false;
 
- for ( array::const_iterator b = m_cur_msg.begin(), e = m_cur_msg.end(); b != e; ++b)
+ for ( typename array::const_iterator b = m_cur_msg.begin(), e = m_cur_msg.end(); b != e; ++b)
                 if ( b->is_new)
                     m_cached[ b->id ] = *b;
             m_cur_msg.clear();

Modified: sandbox/logging/boost/logging/macros.hpp
==============================================================================
--- sandbox/logging/boost/logging/macros.hpp (original)
+++ sandbox/logging/boost/logging/macros.hpp 2007-10-30 06:48:41 EDT (Tue, 30 Oct 2007)
@@ -193,9 +193,9 @@
     something residing in @c boost::logging namespace.
 */
 #define BOOST_LOG_FORMAT_MSG(msg_class) \
- namespace boost { namespace logging { \
- template<> struct formatter::msg_type<override> { typedef msg_class & type; }; \
- }}
+ namespace boost { namespace logging { namespace formatter { \
+ template<> struct msg_type<override> { typedef msg_class & type; }; \
+ }}}
 
 /**
 
@@ -206,9 +206,9 @@
     something residing in @c boost::logging namespace.
 */
 #define BOOST_LOG_DESTINATION_MSG(msg_class) \
- namespace boost { namespace logging { \
- template<> struct destination::msg_type<override> { typedef const msg_class & type; }; \
- }}
+ namespace boost { namespace logging { namespace destination { \
+ template<> struct msg_type<override> { typedef const msg_class & type; }; \
+ }}}
 
 
 

Modified: sandbox/logging/lib/logging/samples/gcc/main.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/gcc/main.cpp (original)
+++ sandbox/logging/lib/logging/samples/gcc/main.cpp 2007-10-30 06:48:41 EDT (Tue, 30 Oct 2007)
@@ -1,12 +1,13 @@
 #include <cstdlib>
 #include <iostream>
 
-void test_simple_format_and_write_simple_formatter();
 
 using namespace std;
+void custom_fmt_dest_example() ;
 
 int main(int argc, char *argv[])
 {
-test_simple_format_and_write_simple_formatter();
+ custom_fmt_dest_example();
+
     return EXIT_SUCCESS;
 }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk