--- work.orig/netxx-0.4.2/include/netxx/netbuf.h	2004-02-05 19:12:36.000000000 -0800
+++ work/netxx-0.4.2/include/netxx/netbuf.h	2005-05-05 19:45:47.000000000 -0700
@@ -61,7 +61,7 @@
  * This streambuf is buffered so you should call std::flush to make sure it
  * sends the data that you inserted.
 **/
-template <typename std::streamsize bufsize, class charT=char, class traits=std::char_traits<char> >
+template <std::streamsize bufsize, class charT=char, class traits=std::char_traits<char> >
 class Netbuf : public std::basic_streambuf<charT, traits> {
 public:
     /// int type
@@ -92,7 +92,8 @@
     ~Netbuf (void);
 protected:
     // TODO streamsize xsputn (const char_type *s, streamsize n);
-    int_type overflow (int_type c=traits_type::eof());
+
+    int_type overflow (int_type c=traits::eof());
     int sync (void);
 
     int_type underflow (void);
@@ -116,7 +117,7 @@
     : stream_(stream)
 {
     setp(putbuf_, putbuf_ + bufsize);
-    setg(getbuf_+PUTBACK_SIZE, getbuf_+PUTBACK_SIZE, getbuf_+PUTBACK_SIZE);
+    Netbuf::setg(getbuf_+PUTBACK_SIZE, getbuf_+PUTBACK_SIZE, getbuf_+PUTBACK_SIZE);
 }
 //#############################################################################
 template<std::streamsize bufsize, class charT, class traits>
@@ -127,11 +128,11 @@
 template<std::streamsize bufsize, class charT, class traits>
 typename Netbuf<bufsize, charT, traits>::int_type Netbuf<bufsize, charT, traits>::overflow (int_type c) {
     if (buffer_out() < 0) {
-	return traits_type::eof();
-    } else if (!traits_type::eq_int_type(c, traits_type::eof())) {
+	return traits::eof();
+    } else if (!traits::eq_int_type(c, traits::eof())) {
 	return sputc(c);
     } else {
-	return traits_type::not_eof(c);
+	return traits::not_eof(c);
     }
 }
 //#############################################################################
@@ -142,47 +143,47 @@
 //#############################################################################
 template<std::streamsize bufsize, class charT, class traits>
 int Netbuf<bufsize, charT, traits>::buffer_out (void) {
-    int length = pptr() - pbase();
+    int length = Netbuf::pptr() - Netbuf::pbase();
     int rc = stream_.write(putbuf_, length);
-    pbump(-length);
+    Netbuf::pbump(-length);
     return rc;
 }
 //#############################################################################
 template<std::streamsize bufsize, class charT, class traits>
 typename Netbuf<bufsize, charT, traits>::int_type Netbuf<bufsize, charT, traits>::underflow (void) {
-    if (gptr() < egptr()) return traits_type::to_int_type(*gptr());
-    if (buffer_in() < 0) return traits_type::eof();
-    else return traits_type::to_int_type(*gptr());
+    if (Netbuf::gptr() < Netbuf::egptr()) return traits::to_int_type(*Netbuf::gptr());
+    if (buffer_in() < 0) return traits::eof();
+    else return traits::to_int_type(*Netbuf::gptr());
 }
 //#############################################################################
 template<std::streamsize bufsize, class charT, class traits>
 typename Netbuf<bufsize, charT, traits>::int_type Netbuf<bufsize, charT, traits>::pbackfail(int_type c) {
-    if (gptr() != eback()) {
-	gbump(-1);
+    if (Netbuf::gptr() != Netbuf::eback()) {
+	Netbuf::gbump(-1);
 
-	if (!traits_type::eq_int_type(c, traits_type::eof())) {
-	    *(gptr()) = traits_type::to_char_type(c);
+	if (!traits::eq_int_type(c, traits::eof())) {
+	    *(Netbuf::gptr()) = traits::to_char_type(c);
 	}
 
-	return traits_type::not_eof(c);
+	return traits::not_eof(c);
     } else {
-	return traits_type::eof();
+	return traits::eof();
     }
 }
 //#############################################################################
 template<std::streamsize bufsize, class charT, class traits>
 int Netbuf<bufsize, charT, traits>::buffer_in (void) {
-    std::streamsize number_putbacks = std::min(gptr() - eback(), PUTBACK_SIZE);
+    std::streamsize number_putbacks = std::min(Netbuf::gptr() - Netbuf::eback(), PUTBACK_SIZE);
     std::memcpy(getbuf_ + (PUTBACK_SIZE - number_putbacks) * sizeof(char_type),
-	    gptr() - number_putbacks * sizeof(char_type), number_putbacks * sizeof(char_type));
+	    Netbuf::gptr() - number_putbacks * sizeof(char_type), number_putbacks * sizeof(char_type));
 
     int rc = stream_.read(getbuf_ + PUTBACK_SIZE * sizeof(char_type), bufsize - PUTBACK_SIZE);
     
     if (rc <= 0) {
-	setg(0, 0, 0);
+	Netbuf::setg(0, 0, 0);
 	return -1;
     } else {
-	setg(getbuf_ + PUTBACK_SIZE - number_putbacks, getbuf_ + PUTBACK_SIZE, getbuf_ + PUTBACK_SIZE + rc);
+	Netbuf::setg(getbuf_ + PUTBACK_SIZE - number_putbacks, getbuf_ + PUTBACK_SIZE, getbuf_ + PUTBACK_SIZE + rc);
 	return rc;
     }
 }
