Index: trunk/SophyaLib/BaseTools/datatype.cc
===================================================================
--- trunk/SophyaLib/BaseTools/datatype.cc	(revision 2879)
+++ trunk/SophyaLib/BaseTools/datatype.cc	(revision 2884)
@@ -34,14 +34,25 @@
 template <class T>
 string DataTypeInfo<T>::getTypeName() { return("???unknowntype???"); }
+DECL_TEMP_SPEC
 string DataTypeInfo<uint_1>::getTypeName() { return("uint_1"); }
+DECL_TEMP_SPEC
 string DataTypeInfo<uint_2>::getTypeName() { return("uint_2"); }
+DECL_TEMP_SPEC
 string DataTypeInfo<int_2>::getTypeName() { return("int_2"); }
+DECL_TEMP_SPEC
 string DataTypeInfo<int_4>::getTypeName() { return("int_4"); }
+DECL_TEMP_SPEC
 string DataTypeInfo<int_8>::getTypeName() { return("int_8"); }
+DECL_TEMP_SPEC
 string DataTypeInfo<uint_4>::getTypeName() { return("uint_4"); }
+DECL_TEMP_SPEC
 string DataTypeInfo<uint_8>::getTypeName() { return("uint_8"); }
+DECL_TEMP_SPEC
 string DataTypeInfo<r_4>::getTypeName() { return("r_4"); }
+DECL_TEMP_SPEC
 string DataTypeInfo<r_8>::getTypeName() { return("r_8"); }
+DECL_TEMP_SPEC
 string DataTypeInfo< complex<r_4> >::getTypeName() { return(" complex<r_4> "); }
+DECL_TEMP_SPEC
 string DataTypeInfo< complex<r_8> >::getTypeName() { return(" complex<r_8> "); }
 #endif
Index: trunk/SophyaLib/BaseTools/machdefs_mkmf.h
===================================================================
--- trunk/SophyaLib/BaseTools/machdefs_mkmf.h	(revision 2879)
+++ trunk/SophyaLib/BaseTools/machdefs_mkmf.h	(revision 2884)
@@ -222,10 +222,10 @@
 /*    __KCC__      : KCC, version >= 3.3 is required                   */
 /*    __SGICC__    : SGI (IRIX64) CC compiler                          */
+/*    __INTEL_COMPILER :   : INTEL compiler                            */
+/*    __IBMCPP__   : AIX (IBM) xlC c++ compiler                        */
 
 /***********************************************************************/
 /* Compiler-specific stuff                                             */
 /***********************************************************************/
-
-/* Some features will be *required* for Planck. Which ones ?               */
   
 /*   ANSI_TEMPLATES        : use ANSI syntax for explicit templates        */
@@ -245,4 +245,5 @@
 /*   NO_IOS_COMPLEX        : does not have operator << defined for complex */
 /*   DECL_TEMP_SPEC        : Template specialization declaration           */
+/*   TSNMLUPG4             : Two stage name look-up scheme (g++>3.4)       */
 
 
@@ -269,4 +270,10 @@
 #endif
 
+/* Most compilers dot not implement two level name lookup for templates 
+   introduced by gcc >= 3.4 
+*/
+#ifdef TSNMLUPG4
+#undef TSNMLUPG4
+#endif
 
 /* now the specific things */
@@ -284,4 +291,7 @@
 
 #ifdef __GNUG__
+#define GCC_VERSION (__GNUC__ * 10000 \
+                               + __GNUC_MINOR__ * 100 \
+                               + __GNUC_PATCHLEVEL__)
 #define ANSI_TEMPLATES
 /*
@@ -294,4 +304,13 @@
 #define HAS_IOS_BIN
 #define HAS_IOS_NOCREATE
+#if ( GCC_VERSION >= 30000 ) 
+#undef  DECL_TEMP_SPEC
+#define DECL_TEMP_SPEC template <>
+#endif
+#if ( GCC_VERSION >= 34000 )
+/* Two level name look-up scheme for templates introduced from gcc 3.4 */
+#define TSNMLUPG4
+#endif
+
 #endif
 
Index: trunk/SophyaLib/BaseTools/mutyv.cc
===================================================================
--- trunk/SophyaLib/BaseTools/mutyv.cc	(revision 2879)
+++ trunk/SophyaLib/BaseTools/mutyv.cc	(revision 2884)
@@ -150,7 +150,30 @@
 
 /* --Methode-- */
+string & MuTyV::Convert(string & x) const 
+{
+  if (typ == MTVString)  x = *strv;
+  else if (typ == MTVTimeStamp) { x = TimeStamp(dv).ToString(); }
+  else {
+    char buff[96];
+    if (typ == MTVInteger)  sprintf(buff,"%ld", (long)iv);
+    else if (typ == MTVFloat) sprintf(buff,"%g", dv);
+    else if (typ == MTVComplex) sprintf(buff,"(%g,%g)", dv, dv_im);
+    else buff[0] = '\0';
+    x = buff;
+  }
+  return x;
+}
+
+/* --Methode-- */
 MuTyV::operator TimeStamp() const 
 {
   return TimeStamp(dv);
+}
+
+/* --Methode-- */
+TimeStamp& MuTyV::Convert(TimeStamp& x) const 
+{
+  x = TimeStamp(dv);
+  return x;
 }
 
Index: trunk/SophyaLib/BaseTools/mutyv.h
===================================================================
--- trunk/SophyaLib/BaseTools/mutyv.h	(revision 2879)
+++ trunk/SophyaLib/BaseTools/mutyv.h	(revision 2884)
@@ -77,4 +77,19 @@
          operator TimeStamp() const ; 
 
+  inline uint_2 Convert(uint_2& x) const { x = (uint_2)iv; return x; }
+  inline uint_4 Convert(uint_4& x) const { x = (uint_4)iv; return x; }
+  inline uint_8 Convert(uint_8& x) const { x = (uint_8)iv; return x; }
+  inline int_4 Convert(int_4& x) const { x = (int_4)iv; return x; }
+  inline int_8 Convert(int_8& x) const { x = iv; return x; }
+  inline r_4 Convert(r_4& x) const { x = (r_4)dv; return x; }
+  inline r_8 Convert(r_8& x) const { x = dv; return x; }
+  inline complex<r_4> Convert(complex<r_4> & x) const 
+    { x = complex< r_4 > ((r_4)dv, (r_4)dv_im); return x; }
+  inline complex<r_8> Convert(complex<r_8> & x) const 
+    { x = complex< r_8 > (dv, dv_im); return x; }
+  
+  string&  Convert(string& x) const ; 
+  TimeStamp& Convert(TimeStamp& x) const ; 
+
   inline MTVType Type() const { return typ; }
   inline int_8   GetIntPart() const { return iv; }
Index: trunk/SophyaLib/BaseTools/segdatablock.h
===================================================================
--- trunk/SophyaLib/BaseTools/segdatablock.h	(revision 2879)
+++ trunk/SophyaLib/BaseTools/segdatablock.h	(revision 2884)
@@ -91,6 +91,6 @@
   {
     SegDataBlock<T> * sdb = dynamic_cast< SegDataBlock<T> *>(&a);
-    if (p != NULL) { 
-      mSRef = p->mSRef;
+    if (sdb != NULL) { 
+      mSRef = sdb->mSRef;
       mSRef->nref++;
     }
