libi2ncommon: (reinhard) changes for g++ 4.3.1
authorReinhard Pfau <reinhard.pfau@intra2net.com>
Fri, 1 Aug 2008 12:47:15 +0000 (12:47 +0000)
committerReinhard Pfau <reinhard.pfau@intra2net.com>
Fri, 1 Aug 2008 12:47:15 +0000 (12:47 +0000)
configure.in
src/containerfunc.hpp
src/daemonfunc.cpp
src/filefunc.cpp
src/logfunc.cpp
src/oftmpstream.cpp
src/stringfunc.cpp
src/timefunc.cpp

index 479323b..f14562c 100644 (file)
@@ -3,7 +3,7 @@ AC_INIT(configure.in)
 AM_CONFIG_HEADER(config.h)
 AM_INIT_AUTOMAKE(libi2ncommon, 1.0)
 
-LIBI2NCOMMON_LIB_VERSION=1:0:0
+LIBI2NCOMMON_LIB_VERSION=2:0:1
 
 AC_SUBST(LIBI2NCOMMON_LIB_VERSION)
 
index 7c7b459..341505d 100644 (file)
@@ -28,59 +28,71 @@ template<typename K, typename V>
 class MapFiller
 {
         std::map<K,V> & MapRef;
-    
+
     public:
         MapFiller( std::map<K,V> & map_ref)
         : MapRef(map_ref)
         {
         }
-        
+
         MapFiller& operator () (const K& key, const V& value)
         {
             MapRef[key]= value;
             return *this;
         }
-        
+
 }; // eo class MapFiller
 
 
 /**
  * convenience class to fill values into a container (using push_back).
  */
-template<typename T, template <typename> class C= std::list >
+template<
+    typename T,
+    template< typename, typename> class C= std::list,
+    typename Alloc = std::allocator< T >
+>
 class PushBackFiller
 {
-        C<T> &CRef;
+        C< T, Alloc > &CRef;
     public:
-        PushBackFiller( C<T> & c )
+        PushBackFiller( C<T, Alloc > & c )
         : CRef(c)
         {}
-        
+
         PushBackFiller& operator () (const T& value)
         {
             CRef.push_back(value);
             return *this;
         } // eo operator ()
-        
+
 }; // eo class PushBackFiller
 
 
-template< typename T, template <typename> class C >
-PushBackFiller< T, C > get_push_back_filler( C< T >& c)
+template<
+    typename T,
+    template< typename, typename > class C,
+    typename Alloc
+>
+PushBackFiller< T, C, Alloc > get_push_back_filler( C< T, Alloc >& c)
 {
-    return PushBackFiller< T, C >(c);
-} // eo get_push_back_filler(C< T >&)
+    return PushBackFiller< T, C, Alloc >(c);
+} // eo get_push_back_filler(C< T, Alloc >&)
 
 
 /**
  * convenience class for transient construction of a container including values.
  */
-template<typename T, template<typename> class C= std::list >
+template<
+    typename T,
+    template< typename, typename> class C= std::list,
+    typename Alloc = std::allocator< T >
+>
 class TransientPushBackFiller
 {
-        C< T > MyC;
+        C< T, Alloc > MyC;
     public:
-        typedef C< T > CType;
+        typedef C< T, Alloc > CType;
     
         TransientPushBackFiller()
         {}
index 7500754..d6ecad9 100644 (file)
@@ -5,6 +5,7 @@
  ***************************************************************************/
 #include <sys/types.h>
 #include <unistd.h>
+#include <stdlib.h>
 #include <pwd.h>
 #include <grp.h>
 
index a8d60fe..4b67c47 100644 (file)
@@ -20,6 +20,7 @@
 #include <grp.h>
 #include <unistd.h>
 #include <errno.h>
+#include <string.h>
 
 #include <boost/scoped_array.hpp>
 #include "filefunc.hxx"
index 2f40ae6..ed88ef7 100644 (file)
@@ -19,6 +19,7 @@
 #include <iostream>
 #include <fstream>
 #include <unistd.h>
+#include <string.h>
 #include <boost/shared_ptr.hpp>
 
 #include <stringfunc.hxx>
index d847cd7..4d764e3 100644 (file)
@@ -3,6 +3,7 @@
 #include <unistd.h>
 #include <sys/stat.h>
 #include <errno.h>
+#include <string.h>
 
 #include <oftmpstream.hxx>
 
index bf6567d..c2badcb 100644 (file)
@@ -9,6 +9,7 @@
 #include <string>
 #include <sstream>
 #include <stdexcept>
+#include <algorithm>
 
 #include <wchar.h>
 #include <stdlib.h>
index 6792e20..7713298 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <time.h>
 #include <unistd.h>
+#include <string.h>
 #include <sys/timeb.h>
 #include <sys/syscall.h>