diff -c -r libg++-2.3/libg++/ChangeLog libg++-2.3.1/libg++/ChangeLog
*** libg++-2.3/libg++/ChangeLog	Wed Dec  9 15:10:01 1992
--- libg++-2.3.1/libg++/ChangeLog	Tue May 25 13:29:43 1993
***************
*** 1,3 ****
--- 1,10 ----
+ Wed May 26 05:29:50 1993  Per Bothner  (bothner@cygnus.com)
+ 
+ 	* Makefile.in:  Set version to 2.3.1.
+ 	THIS IS NOT A REGULAR RELEASE.  This is a bug-fix relase,
+ 	for the GNU CD-ROM.  The release is 2.3 with selected
+ 	patches applied.  Release 2.4 will be out soon.
+ 
  Wed Dec  9 15:08:34 1992  Per Bothner  (bothner@cygnus.com)
  
  	* Makefile.in:  Set version to 2.3.
diff -c -r libg++-2.3/libg++/Makefile.in libg++-2.3.1/libg++/Makefile.in
*** libg++-2.3/libg++/Makefile.in	Wed Dec  9 17:38:32 1992
--- libg++-2.3.1/libg++/Makefile.in	Tue May 25 13:27:01 1993
***************
*** 75,81 ****
  # This file contains the documentation for the macros and possible values.
  # Don't remove them even, if they are only comments !
  
! LIBG++_DIST_VERSION = 2.3
  
  # needed only for shared libraries on SunOS 4; the number must consist of
  # <major number>.<minor number>
--- 75,81 ----
  # This file contains the documentation for the macros and possible values.
  # Don't remove them even, if they are only comments !
  
! LIBG++_DIST_VERSION = 2.3.1
  
  # needed only for shared libraries on SunOS 4; the number must consist of
  # <major number>.<minor number>
***************
*** 404,410 ****
  
  _G_config.h: ${srcdir}/utils/gen-params
  	rootme=`pwd`/ ; export rootme; \
! 	CC="$(CC) $(XTRAFLAGS)"; export CC; \
  	CXX="$(CXX) $(XTRAFLAGS) $(NOSTDINC)"; export CXX; \
  	CONFIG_NM="$(NM)"; export CONFIG_NM; \
  	${srcdir}/utils/gen-params LIB_VERSION=$(LIBG++_DIST_VERSION) $(G_CONFIG_ARGS) >tmp-params.h
--- 404,410 ----
  
  _G_config.h: ${srcdir}/utils/gen-params
  	rootme=`pwd`/ ; export rootme; \
! 	CC="$(CXX) $(XTRAFLAGS)"; export CC; \
  	CXX="$(CXX) $(XTRAFLAGS) $(NOSTDINC)"; export CXX; \
  	CONFIG_NM="$(NM)"; export CONFIG_NM; \
  	${srcdir}/utils/gen-params LIB_VERSION=$(LIBG++_DIST_VERSION) $(G_CONFIG_ARGS) >tmp-params.h
diff -c -r libg++-2.3/libg++/NEWS libg++-2.3.1/libg++/NEWS
*** libg++-2.3/libg++/NEWS	Wed Dec  9 15:09:55 1992
--- libg++-2.3.1/libg++/NEWS	Tue May 25 13:32:44 1993
***************
*** 1,3 ****
--- 1,8 ----
+ *** Changes in libg++ version 2.3.1:
+ 
+ A number of bugs fixed.  (This is a bug-fix release, made for
+ the GNU CD-ROM.  Version 2.4 will be released soon.)
+ 
  *** Changes in libg++ version 2.3:
  
  * iostream classes use multiple inheritance and virtual base classes.
diff -c -r libg++-2.3/libg++/README libg++-2.3.1/libg++/README
*** libg++-2.3/libg++/README	Wed Dec  9 15:09:54 1992
--- libg++-2.3.1/libg++/README	Tue May 25 13:31:25 1993
***************
*** 1,5 ****
! This is version 2.3 of libg++, the GNU C++ class library.
! Release date December 9, 1992 by Cygnus Support
  
  * Please skim through this once BEFORE attempting to make and install libg++.
  
--- 1,7 ----
! This is version 2.3.1 of libg++, the GNU C++ class library.
! Release date May 25, 1993 by Cygnus Support
! THIS IS A BUG-FIX RELEASE FOR THE GNU CD-ROM.  IT IS ESSENTIALLY
! VERSION 2.3 WITH SELECTED PATCHES APPLIED.  Release 2.4 will be out soon.
  
  * Please skim through this once BEFORE attempting to make and install libg++.
  
diff -c -r libg++-2.3/libg++/etc/ChangeLog libg++-2.3.1/libg++/etc/ChangeLog
*** libg++-2.3/libg++/etc/ChangeLog	Thu Dec  3 19:36:02 1992
--- libg++-2.3.1/libg++/etc/ChangeLog	Tue May 25 19:35:28 1993
***************
*** 1,3 ****
--- 1,9 ----
+ Sat Jan 23 18:11:25 1993  Per Bothner  (bothner@cygnus.com)
+ 
+ 	* benchmarks/{Char.h,Int.h}:  Delete operator= that assign to char/int;
+ 	the ARM says operator= must be a member function.
+ 	* benchmarks/dhrystone.cc:  Remove memcpy().  Not needed.
+ 
  Thu Dec  3 19:23:27 1992  Per Bothner  (bothner@cygnus.com)
  
  	* Makefile.in: Fix distclean, realclean to not delete
diff -c -r libg++-2.3/libg++/etc/benchmarks/Char.h libg++-2.3.1/libg++/etc/benchmarks/Char.h
*** libg++-2.3/libg++/etc/benchmarks/Char.h	Sun Nov  1 16:12:11 1992
--- libg++-2.3.1/libg++/etc/benchmarks/Char.h	Tue May 25 16:14:31 1993
***************
*** 193,200 ****
  { rep >>= b; ReturnCharR; }
  
  
- INLINE char& operator  = (char& a,  const Char REF  b) 
- { a = b.Char::val(); return a;}
  INLINE char& operator += (char& a,  const Char REF  b) 
  { a += b.Char::val(); return a; }
  INLINE char& operator -= (char& a,  const Char REF  b) 
--- 193,198 ----
diff -c -r libg++-2.3/libg++/etc/benchmarks/Int.h libg++-2.3.1/libg++/etc/benchmarks/Int.h
*** libg++-2.3/libg++/etc/benchmarks/Int.h	Sun Nov  1 16:12:10 1992
--- libg++-2.3.1/libg++/etc/benchmarks/Int.h	Tue May 25 16:14:32 1993
***************
*** 191,198 ****
  { rep >>= b; ReturnIntR; }
  
  
- INLINE int& operator  = (int& a,  const Int REF  b) 
- { a = b.Int::val(); return a;}
  INLINE int& operator += (int& a,  const Int REF  b) 
  { a += b.Int::val(); return a; }
  INLINE int& operator -= (int& a,  const Int REF  b) 
--- 191,196 ----
diff -c -r libg++-2.3/libg++/etc/benchmarks/dhrystone.cc libg++-2.3.1/libg++/etc/benchmarks/dhrystone.cc
*** libg++-2.3/libg++/etc/benchmarks/dhrystone.cc	Fri Jun  5 13:20:58 1992
--- libg++-2.3.1/libg++/etc/benchmarks/dhrystone.cc	Tue May 25 16:14:32 1993
***************
*** 299,304 ****
--- 299,309 ----
  /* Compiler dependent options */
  #undef	NOENUM			/* Define if compiler has no enum's */
  #undef	NOSTRUCTASSIGN		/* Define if compiler can't assign structures */
+ /* cfront 3.0 can't handle the assignments */
+ #ifndef __GNUG__
+ #define	NOSTRUCTASSIGN
+ #endif
+ 
  
  /* define only one of the next two defines */
  #ifndef _G_SYSV
***************
*** 326,331 ****
--- 331,337 ----
  
  
  #ifdef	NOSTRUCTASSIGN
+ #include <string.h>
  #define	structassign(d, s)	memcpy(&(d), &(s), sizeof(d))
  #else
  #define	structassign(d, s)	d = s
***************
*** 691,705 ****
  	if (EnumLoc == Ident3) return (TRUE);
  	return (FALSE);
  }
- 
- #ifdef	NOSTRUCTASSIGN
- memcpy(d, s, l)
- register char	*d;
- register char	*s;
- int	l;
- {
- 	while (l--) *d++ = *s++;
- }
- #endif
- 
- 
--- 697,699 ----
diff -c -r libg++-2.3/libg++/g++-include/ChangeLog libg++-2.3.1/libg++/g++-include/ChangeLog
*** libg++-2.3/libg++/g++-include/ChangeLog	Tue Nov 17 21:47:17 1992
--- libg++-2.3.1/libg++/g++-include/ChangeLog	Tue May 25 12:30:31 1993
***************
*** 1,3 ****
--- 1,11 ----
+ Mon May  3 14:27:47 1993  Per Bothner  (bothner@cygnus.com)
+ 
+ 	* time.h:  Fix protection against multiple inclusion.
+ 	* sys/signal.h:  Check if included implicitly by
+ 	/usr/include/signal.h (as under Irix 4.0.5).
+ 	* stdlib.h (bsearch):  Fix return value.
+ 	* stdlib.h (getopt):  Protect with _G_ARGS (needed for Irix).
+ 
  Tue Nov 17 21:43:19 1992  Per Bothner  (bothner@rtl.cygnus.com)
  
  	* curses.h:  Added patch for HPUX.
diff -c -r libg++-2.3/libg++/g++-include/stdlib.h libg++-2.3.1/libg++/g++-include/stdlib.h
*** libg++-2.3/libg++/g++-include/stdlib.h	Wed Jun 17 18:47:12 1992
--- libg++-2.3.1/libg++/g++-include/stdlib.h	Tue May 25 12:30:32 1993
***************
*** 3,8 ****
--- 3,9 ----
  #ifndef _stdlib_h
  #define _stdlib_h 1
  
+ #include <_G_config.h>
  #include <stddef.h>
  
  extern "C" {
***************
*** 20,26 ****
  long      atol(const char*);
  
  int       atexit(auto void (*p) (void));
! int       bsearch (const void *, const void *, size_t, 
                     size_t, auto int (*ptf)(const void*, const void*));
  void*     calloc(size_t, size_t);
  void      cfree(void*);
--- 21,27 ----
  long      atol(const char*);
  
  int       atexit(auto void (*p) (void));
! void*     bsearch (const void *, const void *, size_t, 
                     size_t, auto int (*ptf)(const void*, const void*));
  void*     calloc(size_t, size_t);
  void      cfree(void*);
***************
*** 34,40 ****
  char*     fcvt(double, int, int*, int*);
  void      free(void*);
  char*     getenv(const char*);
! int       getopt(int, char * const *, const char*);
  int       getpw(int, char*);
  char*     gcvt(double, int, char*);
  char*     ecvt(double, int, int*, int*);
--- 35,41 ----
  char*     fcvt(double, int, int*, int*);
  void      free(void*);
  char*     getenv(const char*);
! int       getopt _G_ARGS((int, char * const *, const char*));
  int       getpw(int, char*);
  char*     gcvt(double, int, char*);
  char*     ecvt(double, int, int*, int*);
diff -c -r libg++-2.3/libg++/g++-include/sys/signal.h libg++-2.3.1/libg++/g++-include/sys/signal.h
*** libg++-2.3/libg++/g++-include/sys/signal.h	Sun May 10 21:52:54 1992
--- libg++-2.3.1/libg++/g++-include/sys/signal.h	Tue May 25 12:31:03 1993
***************
*** 20,26 ****
  /* But note that some systems that use sys/signal.h to define signal.h. */
  
  #ifndef __libgxx_sys_signal_h
! #ifdef __sys_signal_h_recursive
  #include_next <sys/signal.h>
  #else
  #define __sys_signal_h_recursive
--- 20,26 ----
  /* But note that some systems that use sys/signal.h to define signal.h. */
  
  #ifndef __libgxx_sys_signal_h
! #if defined(__sys_signal_h_recursive) || defined(__signal_h_recursive)
  #include_next <sys/signal.h>
  #else
  #define __sys_signal_h_recursive
diff -c -r libg++-2.3/libg++/g++-include/time.h libg++-2.3.1/libg++/g++-include/time.h
*** libg++-2.3/libg++/g++-include/time.h	Wed Jun 17 18:47:16 1992
--- libg++-2.3.1/libg++/g++-include/time.h	Tue May 25 12:30:33 1993
***************
*** 1,4 ****
! #ifndef time_h
  
  extern "C" {
  
--- 1,5 ----
! #ifndef _G_time_h
! #define _G_time_h
  
  extern "C" {
  
diff -c -r libg++-2.3/libg++/iostream/ChangeLog libg++-2.3.1/libg++/iostream/ChangeLog
*** libg++-2.3/libg++/iostream/ChangeLog	Wed Dec  9 14:49:43 1992
--- libg++-2.3.1/libg++/iostream/ChangeLog	Tue May 25 13:12:04 1993
***************
*** 1,3 ****
--- 1,36 ----
+ Tue Apr 27 20:31:18 1993  Per Bothner  (bothner@cygnus.com)
+ 
+ 	* iomanip.h (omanip):  Fix typo (friend operator>> to <<).
+ 
+ Tue Apr 20 19:17:55 1993  Per Bothner  (bothner@cygnus.com)
+ 
+ 	* floatconv.c (dtoa):  Fixed memory management bug.
+ 
+ Mon Apr 19 01:11:00 1993  Per Bothner  (bothner@cygnus.com)
+ 
+ 	* streambuf.C (backupbuf::pbackfail):  Handle the case
+ 	that _gptr > _eback.
+ 	* filebuf.C (filebuf::open):  Fix for '+'-suffixed modes.
+ 	* filebuf.C (filebuf::do_write):  Even if write fails,
+ 	update the buffer the mark the data as out-of-here.
+ 
+ Fri Apr 16 13:27:05 1993  Per Bothner  (bothner@cygnus.com)
+ 
+ 	* stdiostream.C (stdiobuf::sync):  Don't fseek.
+ 
+ Tue Dec 22 14:12:52 1992  Per Bothner  (bothner@rtl.cygnus.com)
+ 
+ 	* streambuf.h: Don't define fpos_t (vulnerable to name clashes,
+ 	as well as being non-standard); just use _G_pos_t.
+ 	* streambuf.h, filebuf.C, parsestream.h, stdiostream.[hC]:
+ 	Replace fpos_t -> _G_fpos_t.
+ 	* filebuf.C (filebuf::underflow):  Call switch_to_get_mode().
+ 
+ Sun Dec 20 14:05:37 1992  Per Bothner  (bothner@cygnus.com)
+ 
+ 	* outfloat.C (__outfloat):  Handle cases like 10.0 correctly.
+ 	(Fix from H.J. Lu.)
+ 
  Wed Dec  9 14:48:38 1992  Per Bothner  (bothner@cygnus.com)
  
  	* streambuf.h:  #undef open and close, in case some header
diff -c -r libg++-2.3/libg++/iostream/filebuf.C libg++-2.3.1/libg++/iostream/filebuf.C
*** libg++-2.3/libg++/iostream/filebuf.C	Mon Nov 23 14:07:11 1992
--- libg++-2.3.1/libg++/iostream/filebuf.C	Tue May 25 13:11:14 1993
***************
*** 168,174 ****
      }
      if (mode[0] == '+' || (mode[0] == 'b' && mode[1] == '+')) {
  	omode = O_RDWR;
! 	read_write = 0;
      }
      int fdesc = ::open(filename, omode|oflags, oprot);
      if (fdesc < 0)
--- 168,174 ----
      }
      if (mode[0] == '+' || (mode[0] == 'b' && mode[1] == '+')) {
  	omode = O_RDWR;
! 	read_write &= _S_IS_APPENDING;
      }
      int fdesc = ::open(filename, omode|oflags, oprot);
      if (fdesc < 0)
***************
*** 250,260 ****
  	// Flush all line buffered files before reading.
  	streambuf::flush_all_linebuffered();
      }
- #if 1
-     if (pptr() > pbase())
- 	if (do_flush()) return EOF;
- #endif
  
      _G_ssize_t count = sys_read(base(), ebuf() - base());
      if (count <= 0) {
  	if (count == 0)
--- 250,258 ----
  	// Flush all line buffered files before reading.
  	streambuf::flush_all_linebuffered();
      }
  
+     switch_to_get_mode();
+ 
      _G_ssize_t count = sys_read(base(), ebuf() - base());
      if (count <= 0) {
  	if (count == 0)
***************
*** 292,303 ****
      _G_ssize_t count = sys_write(data, to_do);
      if (_cur_column)
  	_cur_column = __adjust_column(_cur_column - 1, data, to_do) + 1;
-     if (count != to_do)
- 	return EOF;
      setg(base(), base(), base());
      if (xflags() & _S_LINE_BUF+_S_UNBUFFERED) setp(base(), base());
      else setp(base(), ebuf());
!     return 0;
  }
  
  int filebuf::sync()
--- 290,299 ----
      _G_ssize_t count = sys_write(data, to_do);
      if (_cur_column)
  	_cur_column = __adjust_column(_cur_column - 1, data, to_do) + 1;
      setg(base(), base(), base());
      if (xflags() & _S_LINE_BUF+_S_UNBUFFERED) setp(base(), base());
      else setp(base(), ebuf());
!     return count != to_do ? EOF : 0;
  }
  
  int filebuf::sync()
***************
*** 370,376 ****
      // If destination is within current buffer, optimize:
      if (_fb._offset >= 0 && _eback != NULL) {
  	// Offset relative to start of main get area.
! 	fpos_t rel_offset = offset - _fb._offset
  	    + (eGptr()-Gbase());
  	if (rel_offset >= 0) {
  	    if (in_backup())
--- 366,372 ----
      // If destination is within current buffer, optimize:
      if (_fb._offset >= 0 && _eback != NULL) {
  	// Offset relative to start of main get area.
! 	_G_fpos_t rel_offset = offset - _fb._offset
  	    + (eGptr()-Gbase());
  	if (rel_offset >= 0) {
  	    if (in_backup())
***************
*** 471,477 ****
      }
  }
  
! fpos_t filebuf::sys_seek(fpos_t offset, _seek_dir dir)
  {
      return ::lseek(fd(), offset, (int)dir);
  }
--- 467,473 ----
      }
  }
  
! _G_fpos_t filebuf::sys_seek(_G_fpos_t offset, _seek_dir dir)
  {
      return ::lseek(fd(), offset, (int)dir);
  }
diff -c -r libg++-2.3/libg++/iostream/floatconv.C libg++-2.3.1/libg++/iostream/floatconv.C
*** libg++-2.3/libg++/iostream/floatconv.C	Sun Nov  1 16:23:44 1992
--- libg++-2.3.1/libg++/iostream/floatconv.C	Tue May 25 12:58:08 1993
***************
*** 2005,2011 ****
                                  i = 1;
                  }
          j = sizeof(unsigned long);
!         for(result_k = 0; sizeof(Bigint) - sizeof(unsigned long) + j < i;
                  j <<= 1) result_k++;
          result = Balloc(result_k);
          s = s0 = (char *)result;
--- 2005,2011 ----
                                  i = 1;
                  }
          j = sizeof(unsigned long);
!         for(result_k = 0; sizeof(Bigint) - sizeof(unsigned long) + j <= i;
                  j <<= 1) result_k++;
          result = Balloc(result_k);
          s = s0 = (char *)result;
diff -c -r libg++-2.3/libg++/iostream/iomanip.h libg++-2.3.1/libg++/iostream/iomanip.h
*** libg++-2.3/libg++/iostream/iomanip.h	Fri Oct 16 16:38:33 1992
--- libg++-2.3.1/libg++/iostream/iomanip.h	Tue May 25 12:55:28 1993
***************
*** 120,127 ****
      omanip(ostream& (*f)(ostream&, TP), TP a) : _f(f), _a(a) {}
      //
      friend
!       ostream& operator>>(ostream& i, imanip<TP>& m)
! 	{ return (ostream&) m._f( i, m._a); }
  };
  
  
--- 120,127 ----
      omanip(ostream& (*f)(ostream&, TP), TP a) : _f(f), _a(a) {}
      //
      friend
!       ostream& operator<<(ostream& i, omanip<TP>& m)
! 	{ return m._f( i, m._a); }
  };
  
  
diff -c -r libg++-2.3/libg++/iostream/outfloat.C libg++-2.3.1/libg++/iostream/outfloat.C
*** libg++-2.3/libg++/iostream/outfloat.C	Wed Oct 21 17:49:57 1992
--- libg++-2.3.1/libg++/iostream/outfloat.C	Tue May 25 12:06:56 1993
***************
*** 141,147 ****
      // Calculate the width (before padding).
      int unpadded_width =
  	(print_sign != 0) + trailing_zeroes + exponent_size + show_dot
! 	    + useful_digits + (decpt > 0 ? 0 : 1 - decpt);
  
      int padding = width > unpadded_width ? width - unpadded_width : 0;
      if (padding > 0
--- 141,149 ----
      // Calculate the width (before padding).
      int unpadded_width =
  	(print_sign != 0) + trailing_zeroes + exponent_size + show_dot
! 	    + useful_digits
! 	    + (decpt > useful_digits ? decpt - useful_digits
! 	       : decpt > 0 ? 0 : 1 - decpt);
  
      int padding = width > unpadded_width ? width - unpadded_width : 0;
      if (padding > 0
diff -c -r libg++-2.3/libg++/iostream/parsestream.h libg++-2.3.1/libg++/iostream/parsestream.h
*** libg++-2.3/libg++/iostream/parsestream.h	Fri Apr 17 16:47:46 1992
--- libg++-2.3.1/libg++/iostream/parsestream.h	Tue May 25 13:08:54 1993
***************
*** 32,38 ****
  
  class parsebuf : public backupbuf {
    protected:
!     fpos_t pos_at_line_start;
      long _line_length;
      unsigned long __line_number;
      char *buf_start;
--- 32,38 ----
  
  class parsebuf : public backupbuf {
    protected:
!     _G_fpos_t pos_at_line_start;
      long _line_length;
      unsigned long __line_number;
      char *buf_start;
diff -c -r libg++-2.3/libg++/iostream/stdiostream.C libg++-2.3.1/libg++/iostream/stdiostream.C
*** libg++-2.3/libg++/iostream/stdiostream.C	Mon Nov  2 22:29:59 1992
--- libg++-2.3.1/libg++/iostream/stdiostream.C	Tue May 25 13:09:39 1993
***************
*** 62,68 ****
  	_fb._offset += n;
  }
  
! fpos_t stdiobuf::sys_seek(fpos_t offset, _seek_dir dir)
  {
      // Normally, equivalent to: fdir=dir
      int fdir =
--- 62,68 ----
  	_fb._offset += n;
  }
  
! _G_fpos_t stdiobuf::sys_seek(_G_fpos_t offset, _seek_dir dir)
  {
      // Normally, equivalent to: fdir=dir
      int fdir =
***************
*** 87,94 ****
--- 87,97 ----
      if (!(xflags() & _S_NO_WRITES))
  	if (fflush(_file))
  	    return EOF;
+ #if 0
+ 	// This loses when writing to a pipe.
      if (fseek(_file, 0, SEEK_CUR) == EOF)
  	return EOF;
+ #endif
      return 0;
  }
  
diff -c -r libg++-2.3/libg++/iostream/stdiostream.h libg++-2.3.1/libg++/iostream/stdiostream.h
*** libg++-2.3/libg++/iostream/stdiostream.h	Sun Nov  1 15:03:51 1992
--- libg++-2.3.1/libg++/iostream/stdiostream.h	Tue May 25 13:09:25 1993
***************
*** 32,38 ****
      FILE* stdiofile() const { return _file; }
      stdiobuf(FILE *f);
      virtual _G_ssize_t sys_read(char* buf, _G_size_t size);
!     virtual fpos_t sys_seek(fpos_t, _seek_dir);
      virtual _G_ssize_t sys_write(const void*, long);
      virtual int sys_close();
      virtual int sync();
--- 32,38 ----
      FILE* stdiofile() const { return _file; }
      stdiobuf(FILE *f);
      virtual _G_ssize_t sys_read(char* buf, _G_size_t size);
!     virtual _G_fpos_t sys_seek(_G_fpos_t, _seek_dir);
      virtual _G_ssize_t sys_write(const void*, long);
      virtual int sys_close();
      virtual int sync();
diff -c -r libg++-2.3/libg++/iostream/streambuf.C libg++-2.3.1/libg++/iostream/streambuf.C
*** libg++-2.3/libg++/iostream/streambuf.C	Sun Nov  1 15:03:53 1992
--- libg++-2.3.1/libg++/iostream/streambuf.C	Tue May 25 13:02:56 1993
***************
*** 603,608 ****
--- 603,609 ----
  
  int backupbuf::pbackfail(int c)
  {
+   if (_gptr <= _eback) {
      // Need to handle a filebuf in write mode (switch to read mode).  FIXME!
  
      if (have_backup() && !in_backup()) {
***************
*** 628,637 ****
  	setg(new_buf, new_buf+(new_size-old_size), new_buf+new_size);
  	_aux_limit = _gptr;
      }
!     _gptr--;
!     if (c != EOF && *_gptr != c)
! 	*_gptr = c;
!     return (unsigned char)*_gptr;
  }
  
  unsigned __adjust_column(unsigned start, const char *line, int count)
--- 629,639 ----
  	setg(new_buf, new_buf+(new_size-old_size), new_buf+new_size);
  	_aux_limit = _gptr;
      }
!   }
!   _gptr--;
!   if (c != EOF && *_gptr != c)
!     *_gptr = c;
!   return (unsigned char)*_gptr;
  }
  
  unsigned __adjust_column(unsigned start, const char *line, int count)
diff -c -r libg++-2.3/libg++/iostream/streambuf.h libg++-2.3.1/libg++/iostream/streambuf.h
*** libg++-2.3/libg++/iostream/streambuf.h	Wed Dec  9 14:49:41 1992
--- libg++-2.3.1/libg++/iostream/streambuf.h	Tue May 25 13:07:25 1993
***************
*** 26,34 ****
  #ifdef _G_NEED_STDARG_H
  #include <stdarg.h>
  #endif
- #ifndef fpos_t
- #define fpos_t _G_fpos_t
- #endif
  
  #ifndef EOF
  #define EOF (-1)
--- 26,31 ----
***************
*** 430,436 ****
  struct __file_fields {
      short _fileno;
      int _blksize;
!     fpos_t _offset;
  //    char* _save_gptr;  char* _save_egptr;
  };
  
--- 427,433 ----
  struct __file_fields {
      short _fileno;
      int _blksize;
!     _G_fpos_t _offset;
  //    char* _save_gptr;  char* _save_egptr;
  };
  
***************
*** 468,474 ****
      int do_flush() { return do_write(_pbase, _pptr-_pbase); }
      // Low-level operations (Usually invoke system calls.)
      virtual _G_ssize_t sys_read(char* buf, _G_size_t size);
!     virtual fpos_t sys_seek(fpos_t, _seek_dir);
      virtual _G_ssize_t sys_write(const void*, long);
      virtual int sys_stat(void*); // Actually, a (struct stat*)
      virtual int sys_close();
--- 465,471 ----
      int do_flush() { return do_write(_pbase, _pptr-_pbase); }
      // Low-level operations (Usually invoke system calls.)
      virtual _G_ssize_t sys_read(char* buf, _G_size_t size);
!     virtual _G_fpos_t sys_seek(_G_fpos_t, _seek_dir);
      virtual _G_ssize_t sys_write(const void*, long);
      virtual int sys_stat(void*); // Actually, a (struct stat*)
      virtual int sys_close();
diff -c -r libg++-2.3/libg++/src/ChangeLog libg++-2.3.1/libg++/src/ChangeLog
*** libg++-2.3/libg++/src/ChangeLog	Wed Dec  9 14:40:29 1992
--- libg++-2.3.1/libg++/src/ChangeLog	Tue May 25 13:21:25 1993
***************
*** 1,3 ****
--- 1,24 ----
+ Mon Apr 19 00:48:10 1993  Per Bothner  (bothner@cygnus.com)
+ 
+ 	* CursesW.h:  #undef lines to avoid clash on SCO.
+ 
+ Tue Jan  5 20:52:29 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
+ 
+ 	* Rational.cc (floor, ceil, round): Use prefix ++ and --, not
+ 	postfix, since the Integer class only has prefix defined.
+ 
+ Fri Mar  5 17:25:59 1993  Per Bothner  (bothner@rtl.cygnus.com)
+ 
+ 	* Integer.cc (Icopy_zero):  Make sure we don't trash
+ 	a STATIC_IntRep object.
+ 	* Integer.cc:  #include <math.h> after <limits.h> and <float.h>
+ 	to avoid some conflict I don't remember.
+ 
+ Mon Dec 21 18:57:41 1992  Per Bothner  (bothner@rtl.cygnus.com)
+ 
+ 	* SLList.h:  Fix typo.
+ 	* CursesW.h:  #include <_G_config.h> before testing _H_HAVE_CURSES.
+ 
  Wed Dec  9 14:36:37 1992  Per Bothner  (bothner@cygnus.com)
  
  	* gen/Bag.hP, gen/List.hP:  #undef remove, in case some
diff -c -r libg++-2.3/libg++/src/CursesW.h libg++-2.3.1/libg++/src/CursesW.h
*** libg++-2.3/libg++/src/CursesW.h	Thu Sep 10 22:54:14 1992
--- libg++-2.3.1/libg++/src/CursesW.h	Tue May 25 14:39:34 1993
***************
*** 23,33 ****
  #endif
  #define _CursesWindow_h
  
  #include   <curses.h>
  
! #if _G_HAVE_CURSES
  
! // "Convert" macros to inlines, if needed.
  #ifdef addch
  inline int (addch)(char ch)  { return addch(ch); }
  #undef addch
--- 23,39 ----
  #endif
  #define _CursesWindow_h
  
+ #include   <_G_config.h>
+ #if _G_HAVE_CURSES
  #include   <curses.h>
  
! /* SCO 3.2v4 curses.h includes term.h, which defines lines as a macro.
!    Undefine it here, because CursesWindow uses lines as a method.  */
! #ifdef lines
! #undef lines
! #endif
  
! // "Convert" Macros To Inlines, if needed.
  #ifdef addch
  inline int (addch)(char ch)  { return addch(ch); }
  #undef addch
diff -c -r libg++-2.3/libg++/src/Integer.cc libg++-2.3.1/libg++/src/Integer.cc
*** libg++-2.3/libg++/src/Integer.cc	Thu Dec  3 16:37:19 1992
--- libg++-2.3.1/libg++/src/Integer.cc	Tue May 25 12:05:07 1993
***************
*** 31,39 ****
  #include <Integer.h>
  #include <std.h>
  #include <ctype.h>
- #include <math.h>
  #include <float.h>
  #include <limits.h>
  #include <Obstack.h>
  #include <AllocRing.h>
  #include <new.h>
--- 31,39 ----
  #include <Integer.h>
  #include <std.h>
  #include <ctype.h>
  #include <float.h>
  #include <limits.h>
+ #include <math.h>
  #include <Obstack.h>
  #include <AllocRing.h>
  #include <new.h>
***************
*** 327,333 ****
  
  IntRep* Icopy_zero(IntRep* old)
  {
!   if (old == 0)
      return &_ZeroRep;
  
    old->len = 0;
--- 327,333 ----
  
  IntRep* Icopy_zero(IntRep* old)
  {
!   if (old == 0 || STATIC_IntRep(old))
      return &_ZeroRep;
  
    old->len = 0;
***************
*** 2315,2321 ****
    s >> ws;
    if (!s.good())
    {
!     s.set(_fail);
      return s;
    }
    
--- 2315,2321 ----
    s >> ws;
    if (!s.good())
    {
!     s.set(ios::failbit);
      return s;
    }
    
***************
*** 2395,2401 ****
    if (s.good())
      s.putback(ch);
    if (!got_one)
!     s.set(_fail);
  
    if (sgn == '-')
      y.negate();
--- 2395,2401 ----
    if (s.good())
      s.putback(ch);
    if (!got_one)
!     s.set(ios::failbit);
  
    if (sgn == '-')
      y.negate();
diff -c -r libg++-2.3/libg++/src/Rational.cc libg++-2.3.1/libg++/src/Rational.cc
*** libg++-2.3/libg++/src/Rational.cc	Fri Apr 17 16:50:41 1992
--- libg++-2.3.1/libg++/src/Rational.cc	Tue May 25 13:43:59 1993
***************
*** 216,229 ****
  {
    Integer r;
    divide(x.num, x.den, q, r);
!   if (sign(x.num) < 0 && sign(r) != 0) q--;
  }
  
  Integer ceil(const Rational& x) return q
  {
    Integer  r;
    divide(x.num, x.den, q, r);
!   if (sign(x.num) >= 0 && sign(r) != 0) q++;
  }
  
  Integer round(const Rational& x) return q
--- 216,229 ----
  {
    Integer r;
    divide(x.num, x.den, q, r);
!   if (sign(x.num) < 0 && sign(r) != 0) --q;
  }
  
  Integer ceil(const Rational& x) return q
  {
    Integer  r;
    divide(x.num, x.den, q, r);
!   if (sign(x.num) >= 0 && sign(r) != 0) ++q;
  }
  
  Integer round(const Rational& x) return q
***************
*** 234,242 ****
    if (ucompare(r, x.den) >= 0)
    {
      if (sign(x.num) >= 0)
!       q++;
      else
!       q--;
    }
  }
  
--- 234,242 ----
    if (ucompare(r, x.den) >= 0)
    {
      if (sign(x.num) >= 0)
!       ++q;
      else
!       --q;
    }
  }
  
***************
*** 291,297 ****
    Integer q;
    Integer r;
    divide(x.num, x.den, q, r);
!   if (sign(x.num) < 0 && sign(r) != 0) q--;
    return q;
  }
  
--- 291,297 ----
    Integer q;
    Integer r;
    divide(x.num, x.den, q, r);
!   if (sign(x.num) < 0 && sign(r) != 0) --q;
    return q;
  }
  
***************
*** 300,306 ****
    Integer q;
    Integer  r;
    divide(x.num, x.den, q, r);
!   if (sign(x.num) >= 0 && sign(r) != 0) q++;
    return q;
  }
  
--- 300,306 ----
    Integer q;
    Integer  r;
    divide(x.num, x.den, q, r);
!   if (sign(x.num) >= 0 && sign(r) != 0) ++q;
    return q;
  }
  
***************
*** 313,321 ****
    if (ucompare(r, x.den) >= 0)
    {
      if (sign(x.num) >= 0)
!       q++;
      else
!       q--;
    }
    return q;
  }
--- 313,321 ----
    if (ucompare(r, x.den) >= 0)
    {
      if (sign(x.num) >= 0)
!       ++q;
      else
!       --q;
    }
    return q;
  }
diff -c -r libg++-2.3/libg++/src/SLList.h libg++-2.3.1/libg++/src/SLList.h
*** libg++-2.3/libg++/src/SLList.h	Thu Dec  3 15:40:11 1992
--- libg++-2.3.1/libg++/src/SLList.h	Tue May 25 13:20:42 1993
***************
*** 20,26 ****
  #ifdef __GNUG__
  //#pragma interface
  #endif
! #define _LList_h 1
  
  #include <Pix.h>
  
--- 20,26 ----
  #ifdef __GNUG__
  //#pragma interface
  #endif
! #define _SLList_h 1
  
  #include <Pix.h>
  
