Index: /branches/with_autoconf/src/sc_int.h
===================================================================
--- /branches/with_autoconf/src/sc_int.h	(revision 23)
+++ /branches/with_autoconf/src/sc_int.h	(revision 24)
@@ -18,4 +18,5 @@
 #include <sc_logic.h>
 #include <sc_bv.h>
+#include <cstdlib>
 
 // ----------------------------------------------------------------------------
@@ -135,5 +136,5 @@
   sc_int()                 { val = 0; }
 //  sc_int(data_type val_)  { val = 0; write (val_); }
-  sc_int (const char *a)   { val = 0; write (atoi (a)); }
+  sc_int (const char *a)   { val = 0; write (std::atoi (a)); }
   sc_int (unsigned short a){ val = 0; write (a); }
   sc_int (short a)         { val = 0; write (a); }
@@ -197,34 +198,21 @@
 
   // arithmetic
-  template <typename T>
-  inline sc_int& operator <<= (T v)
-  { vf.valW <<= v; return *this; }
-  template <typename T>
-  inline sc_int& operator >>= (T v)
-  { vf.valW >>= v; return *this; }
-  template <typename T>
-  inline sc_int& operator += (T v)
-  { vf.valW += v; return *this; }
-  template <typename T>
-  inline sc_int& operator -= (T v)
-  { vf.valW -= v; return *this; }
-  template <typename T>
-  inline sc_int& operator *= (T v)
-  { vf.valW *= v; return *this; }
-  template <typename T>
-  inline sc_int& operator /= (T v)
-  { vf.valW /= v; return *this; }
-  template <typename T>
-  inline sc_int& operator %= (T v)
-  { vf.valW %= v; return *this; }
-  template <typename T>
-  inline sc_int& operator &= (T v)
-  { vf.valW &= v; return *this; }
-  template <typename T>
-  inline sc_int& operator |= (T v)
-  { vf.valW |= v; return *this; }
-  template <typename T>
-  inline sc_int& operator ^= (T v)
-  { vf.valW ^= v; return *this; }
+#define DEFINE_OPERATOR(OPER)        \
+  template <typename T>              \
+  inline sc_int& operator OPER (T v) \
+  { vf.valW OPER v; return *this; }
+
+  DEFINE_OPERATOR(<<=)
+  DEFINE_OPERATOR(>>=)
+  DEFINE_OPERATOR(+=)
+  DEFINE_OPERATOR(-=)
+  DEFINE_OPERATOR(*=)
+  DEFINE_OPERATOR(/=)
+  DEFINE_OPERATOR(%=)
+  DEFINE_OPERATOR(&=)
+  DEFINE_OPERATOR(|=)
+  DEFINE_OPERATOR(^=)
+#undef DEFINE_OPERATOR
+
   inline sc_int_bit_ref& operator [] (int v)
   { return (vf.valW >> v) & 1; }
Index: /branches/with_autoconf/src/sc_signal.h
===================================================================
--- /branches/with_autoconf/src/sc_signal.h	(revision 23)
+++ /branches/with_autoconf/src/sc_signal.h	(revision 24)
@@ -82,5 +82,5 @@
 	size_t size = (sizeof (T)-1) / sizeof (base_type);
 	size_t i = 0;
-	const base_type *pvalue = (const base_type*)(&value_);
+	const base_type *pvalue = (const base_type*)(void*)(&value_);
 	do {
 #if 0
@@ -96,6 +96,6 @@
 	if (sizeof (T) > sizeof (base_type)) {
 #if 0
-    cout << "sizeof (T) = " << sizeof (T) << " (base_type = " << sizeof
-(base_type) << "\n";
+  std::cout << "sizeof (T) = " << sizeof (T) 
+            << " (base_type = " << sizeof (base_type) << "\n";
 #endif
 		post_multiwrite (pointer_,value_);
@@ -171,8 +171,10 @@
   typedef T  data_type;
   typedef sc_signal < T >  this_type;
+
 	///////////
 	// Internal
 	public: void init ();
 	///////////
+
 //  virtual void update ();
   void check_writer ();
Index: /branches/with_autoconf/src/sc_uint.h
===================================================================
--- /branches/with_autoconf/src/sc_uint.h	(revision 23)
+++ /branches/with_autoconf/src/sc_uint.h	(revision 24)
@@ -183,34 +183,32 @@
 
   // arithmetic
-  template <typename T>
-  inline sc_uint& operator <<= (T v)
-  { vf.valW <<= v; return *this; }
-  template <typename T>
-  inline sc_uint& operator >>= (T v)
-  { vf.valW >>= v; return *this; }
-  template <typename T>
-  inline sc_uint& operator += (T v)
-  { vf.valW += v; return *this; }
-  template <typename T>
-  inline sc_uint& operator -= (T v)
-  { vf.valW -= v; return *this; }
-  template <typename T>
-  inline sc_uint& operator *= (T v)
-  { vf.valW *= v; return *this; }
-  template <typename T>
-  inline sc_uint& operator /= (T v)
-  { vf.valW /= v; return *this; }
-  template <typename T>
-  inline sc_uint& operator %= (T v)
-  { vf.valW %= v; return *this; }
-  template <typename T>
-  inline sc_uint& operator &= (T v)
-  { vf.valW &= v; return *this; }
-  template <typename T>
-  inline sc_uint& operator |= (T v)
-  { vf.valW |= v; return *this; }
-  template <typename T>
-  inline sc_uint& operator ^= (T v)
-  { vf.valW ^= v; return *this; }
+#define DEFINE_OPERATOR(OPER)        \
+  template <typename T>              \
+  inline sc_uint& operator OPER (T v)\
+  { vf.valW OPER v; return *this; }
+
+  DEFINE_OPERATOR(<<=)
+  DEFINE_OPERATOR(>>=)
+  DEFINE_OPERATOR(+=)
+  DEFINE_OPERATOR(-=)
+  DEFINE_OPERATOR(*=)
+  DEFINE_OPERATOR(/=)
+  DEFINE_OPERATOR(%=)
+  DEFINE_OPERATOR(&=)
+  DEFINE_OPERATOR(|=)
+  DEFINE_OPERATOR(^=)
+#undef DEFINE_OPERATOR
+
+#if 0
+#define DEFINE_OPERATOR(OPER)                                              \
+  friend bool operator OPER (const data_type& a, const data_type& b);
+//  { return (a.valW) OPER (b.valW); }
+
+  DEFINE_OPERATOR(==)
+  DEFINE_OPERATOR(!=)
+  DEFINE_OPERATOR(>=)
+  DEFINE_OPERATOR(<=)
+#undef DEFINE_OPERATOR
+#endif
   inline sc_uint_bit_ref operator [] (int v)
   { return (vf.valW >> v) & 1; }
