diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/include/ChangeLog libg++-2.5.3linux.2/include/ChangeLog
*** libg++-2.5.3/include/ChangeLog	Mon Nov 29 10:47:24 1993
--- libg++-2.5.3linux.2/include/ChangeLog	Mon Dec 20 08:54:21 1993
***************
*** 1,3 ****
--- 1,7 ----
+ Sat Dec 11 09:11:55 1993  H.J. Lu (hlu@nighthawk)
+ 
+ 	* sys/cdefs.h: new file.
+ 
  Mon Nov 29 10:43:57 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
  
  	* dis-asm.h (enum dis_insn_tyupe): Remove non-ANSI trailing comma.
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/include/sys/cdefs.h libg++-2.5.3linux.2/include/sys/cdefs.h
*** libg++-2.5.3/include/sys/cdefs.h	Wed Dec 31 19:00:00 1969
--- libg++-2.5.3linux.2/include/sys/cdefs.h	Thu Jan 27 17:43:46 1994
***************
*** 0 ****
--- 1,143 ----
+ /* Copyright (C) 1992, 1993 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ 
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+ 
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ Library General Public License for more details.
+ 
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB.  If
+ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+ Cambridge, MA 02139, USA.  */
+ 
+ #ifndef	_SYS_CDEFS_H
+ 
+ #define	_SYS_CDEFS_H	1
+ 
+ #ifdef __GNU_LIBRARY__
+ #include <features.h>
+ #endif
+ 
+ #ifdef	__GNUC__
+ 
+ #define	__P(args)	args	/* GCC can always grok prototypes.  */
+ #define	__DOTS		, ...
+ 
+ /* Figure out how to declare functions that (1) depend only on their
+    parameters and have no side effects, or (2) don't return.  */
+ 
+ #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || defined(__cplusplus)
+   /* Old GCC way. */
+ #ifndef	__CONSTVALUE
+ #define	__CONSTVALUE	__const__
+ #define	__CONSTVALUE2
+ #endif
+ #ifndef	__NORETURN
+ #define	__NORETURN	__volatile__
+ #define	__NORETURN2
+ #endif
+ #else
+   /* New GCC way. */
+ #ifndef	__CONSTVALUE
+ #define	__CONSTVALUE
+ #if defined(const) || !defined(__STDC__)
+ #define	__CONSTVALUE2	/* We don't want empty __attribute__ (()). */
+ #else
+ #define	__CONSTVALUE2	__attribute__ ((const))
+ #endif
+ #endif
+ #ifndef	__NORETURN
+ #define	__NORETURN
+ #ifdef noreturn
+ #define	__NORETURN2	/* We don't want empty __attribute__ (()). */
+ #else
+ #define	__NORETURN2	__attribute__ ((noreturn))
+ #endif
+ #endif
+ #endif
+ 
+ #else	/* Not GCC.  */
+ 
+ #define	__inline		/* No inline functions.  */
+ #define	__CONSTVALUE		/* No idempotent functions.  */
+ #define	__CONSTVALUE2
+ #define	__NORETURN		/* No functions-of-no-return.  */
+ #define	__NORETURN2
+ 
+ #if (defined (__STDC__) && __STDC__) || defined (__cplusplus)
+ 
+ #define	__P(args)	args
+ #define	__const		const
+ #define	__signed	signed
+ #define	__volatile	volatile
+ #define	__DOTS		, ...
+ 
+ #else	/* Not ANSI C or C++.  */
+ 
+ #define	__P(args)	()	/* No prototypes.  */
+ #define	__const			/* No ANSI C keywords.  */
+ #define	__signed
+ #define	__volatile
+ #define	__DOTS
+ 
+ #endif	/* ANSI C or C++.  */
+ 
+ #endif	/* GCC.  */
+ 
+ #if __GNUC__ < 2
+ /* In GCC version 2, (__extension__ EXPR) will not complain
+    about GCC extensions used in EXPR under -ansi or -pedantic.  */
+ #define	__extension__
+ #endif
+ 
+ /* For these things, GCC behaves the ANSI way normally,
+    and the non-ANSI way under -traditional.  */
+ 
+ #if defined (__STDC__) && __STDC__
+ 
+ #define	__CONCAT(x,y)	x ## y
+ #define	__STRING(x)	#x
+ 
+ /* This is not a typedef so `const __ptr_t' does the right thing.  */
+ #define __ptr_t void *
+ typedef long double __long_double_t;
+ 
+ #else
+ 
+ #define	__CONCAT(x,y)	x/**/y
+ #define	__STRING(x)	"x"
+ 
+ #define __ptr_t char *
+ typedef double __long_double_t;
+ 
+ #endif
+ 
+ /* The BSD header files use the ANSI keywords unmodified.  (This means that
+    old programs may lose if they use the new keywords as identifiers.)  We
+    define them to their __ versions, which are taken care of above.  */
+ 
+ #ifdef	__USE_BSD
+ /* __attribute__ uses const. */
+ #if 0
+ #define	const		__const
+ #endif
+ #define	signed		__signed
+ #define	volatile	__volatile
+ #endif
+ 
+ /* C++ needs to know that types and declarations are C, not C++.  */
+ #ifdef	__cplusplus
+ #define	__BEGIN_DECLS	extern "C" {
+ #define	__END_DECLS	}
+ #else
+ #define	__BEGIN_DECLS
+ #define	__END_DECLS
+ #endif
+ 
+ #endif	 /* sys/cdefs.h */
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libg++/src/BitSet.h libg++-2.5.3linux.2/libg++/src/BitSet.h
*** libg++-2.5.3/libg++/src/BitSet.h	Fri May 28 20:07:26 1993
--- libg++-2.5.3linux.2/libg++/src/BitSet.h	Thu Jan 27 22:10:28 1994
***************
*** 59,66 ****
                       BitSetBit(BitSet* v, int p);
                       BitSetBit(const BitSetBit& b);
                      ~BitSetBit();
!                      operator int();
    int                operator = (int b);
  };
  
  class BitSet
--- 59,67 ----
                       BitSetBit(BitSet* v, int p);
                       BitSetBit(const BitSetBit& b);
                      ~BitSetBit();
!                      operator int() const;
    int                operator = (int b);
+   int                operator = (const BitSetBit& b);
  };
  
  class BitSet
***************
*** 342,348 ****
  
  inline BitSetBit::~BitSetBit() {}
  
! inline BitSetBit::operator int()
  {
    return src->test(pos);
  }
--- 343,349 ----
  
  inline BitSetBit::~BitSetBit() {}
  
! inline BitSetBit::operator int() const
  {
    return src->test(pos);
  }
***************
*** 350,355 ****
--- 351,363 ----
  inline int BitSetBit::operator = (int b)
  {
    if (b) src->set(pos); else src->clear(pos); return b;
+ }
+ 
+ inline int BitSetBit::operator = (const BitSetBit& b)
+ {
+   int i = (int)b;
+   *this = i;
+   return i;
  }
  
  inline BitSetBit BitSet::operator [] (int i)
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libg++/src/ChangeLog libg++-2.5.3linux.2/libg++/src/ChangeLog
*** libg++-2.5.3/libg++/src/ChangeLog	Wed Dec 22 06:39:54 1993
--- libg++-2.5.3linux.2/libg++/src/ChangeLog	Thu Jan 27 16:48:04 1994
***************
*** 1,3 ****
--- 1,8 ----
+ Wed Dec 29 22:52:43 1993  Mike Stump  (mrs@cygnus.com)
+ 
+ 	* BitSet.h (BitSetBit): Add int operator = (const BitSetBit& b),
+ 	because the default op= would have the wrong semantics.
+ 
  Mon Dec  6 14:14:52 1993  Per Bothner  (bothner@kalessin.cygnus.com)
  
  	* math-68881.h:  Removed.
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libiberty/ChangeLog libg++-2.5.3linux.2/libiberty/ChangeLog
*** libg++-2.5.3/libiberty/ChangeLog	Wed Dec 22 06:39:56 1993
--- libg++-2.5.3linux.2/libiberty/ChangeLog	Mon Dec 20 09:11:01 1993
***************
*** 1,3 ****
--- 1,9 ----
+ Mon Dec 20 09:10:46 1993  H.J. Lu  (hjl@nighthawk)
+ 
+ 	* functions.def: add strsignal.
+ 
+ 	* strsignal.c: add ifdef NEED_strsignal.
+ 
  Fri Dec 17 12:26:07 1993  Kung Hsu  (kung@cirdan.cygnus.com)
  
  	* cplus-dem.c (demangle_arm_pt): New function.  Common code
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libiberty/functions.def libg++-2.5.3linux.2/libiberty/functions.def
*** libg++-2.5.3/libiberty/functions.def	Fri Nov 26 16:55:10 1993
--- libg++-2.5.3linux.2/libiberty/functions.def	Mon Dec 20 08:54:22 1993
***************
*** 60,63 ****
--- 60,64 ----
     if they are not found. */
  
  DEFFUNC(strerror, char*, (), NOTHING)
+ DEFFUNC(strsignal, char*, (), NOTHING)
  DEFFUNC(psignal, void, (signo, message), unsigned signo AND char *message)
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libiberty/strsignal.c libg++-2.5.3linux.2/libiberty/strsignal.c
*** libg++-2.5.3/libiberty/strsignal.c	Sat Nov 27 15:18:59 1993
--- libg++-2.5.3linux.2/libiberty/strsignal.c	Mon Dec 20 08:54:23 1993
***************
*** 388,393 ****
--- 388,395 ----
  }
  
  
+ #ifdef NEED_strsignal
+ 
  /*
  
  NAME
***************
*** 454,459 ****
--- 456,462 ----
    return (msg);
  }
  
+ #endif
  
  /*
  
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/ChangeLog libg++-2.5.3linux.2/libio/ChangeLog
*** libg++-2.5.3/libio/ChangeLog	Wed Dec 22 06:39:57 1993
--- libg++-2.5.3linux.2/libio/ChangeLog	Tue Feb 22 14:38:26 1994
***************
*** 1,3 ****
--- 1,222 ----
+ Mon Feb 21 13:18:20 1994  H.J. Lu  (hjl@jalod)
+ 
+ 	* libio.h (_IO_PENDING_OUTPUT_COUNT(_fp)): return the
+ 	  pending output count in _fp.
+ 
+ Mon Feb 14 23:48:40 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+ 
+ 	* isgetline.cc (istream& istream::getline(char* buf, int len,
+ 	  char delim)): tentative fix. may change in furure.
+ 
+ Sun Feb 13 22:32:31 1994  H.J. Lu  (hjl@jalod)
+ 
+ 	* libioP.h (CHECK_FILE): fix typos for _OLD_IO_MAGIC.
+ 
+ 	* iofread.c (CHECK_FILE):
+ 	* iofwrite.c (CHECK_FILE): return 0 if fp is invalid.
+ 
+ Fri Feb 11 11:08:01 1994  SBPM Marc GINGOLD <marc@david.saclay.cea.fr>
+ 
+ 	* iovfprintf.c (helper_vfprintf): add
+ 
+ 	  hp->_IO_file_flags = _IO_MAGIC|(_IO_IS_FILEBUF+_IO_NO_READS);
+ 
+ Mon Jan 31 09:28:34 1994  H.J. Lu  (hjl@jalod)
+ 
+ 	* fileops.c (_IO_file_underflow): remove the errno == 0
+ 	  testing introduced on Jan. 30.
+ 
+ Sun Jan 30 12:25:09 1994  H.J. Lu  (hjl@jalod)
+ 
+ 	* fileops.c (_IO_file_underflow): set the EOF flag
+ 	  if errno from read is 0, EAGAIN or EWOULDBLOCK.
+ 
+ 	* cleanup.c: check HAVE_GNU_LD instead of __linux__.
+ 
+ Sat Jan 29 23:16:14 1994  H.J. Lu  (hjl@jalod)
+ 
+ 	* fileops.c (_IO_do_write):
+ 	  (_IO_file_underflow):
+ 	  (_IO_file_xsputn):
+ 	  (_IO_default_xsgetn): change "_IO_size_t count" to
+ 	  "_IO_ssize_t count".
+ 
+ Sat Jan 29 06:52:27 1994  H.J. Lu  (hjl@jalod)
+ 
+ 	* fileops.c (_IO_file_fopen):
+ 	  (_IO_file_attach): don't return NULL if errno == ESPIPE while
+ 	  seek failes.
+ 
+ Thu Jan 20 13:48:40 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+ 
+ 	If no characters are read by fgets, ANSI C doesn't allow '\0' to
+ 	be written to the buffer, but it is requried by ANSI C++
+ 	for istream::get and istream::getline.  Both use _IO_getline ...
+ 	* iogetline.c (_IO_getline):  Don't write a '\0' at the end
+ 	of the read data.  The input buffer length does not include
+ 	space for a '\0'.
+ 	* iofgets.c, iogets.c:  Change appropriately.
+ 	Also check for _IO_ERR_SEEN, as required by ANSI.
+ 	* isgetline.cc:  Update accordingly.
+ 
+ Tue Jan 18 10:08:01 1993  H.J. Lu  (hjl@jalod)
+ 
+ 	* libioP.h: modify CHECK_FILE(FILE,RET) to check
+ 	  _IO_MAGIC_MASK.
+ 
+ 	* iofclose.c: don't clear fp->_IO_file_flags. malloc/free will
+ 	  modify it.
+ 
+ Tue Jan  4 01:32:28 1993  H.J. Lu  (hjl@jalod)
+ 
+ 	* genops.c (_IO_default_xsputn):
+ 	  (_IO_default_xsgetn):
+ 	* ioignore.c: change "_IO_size_t count" to
+ 	  "_IO_ssize_t count".
+ 	* iogetline.c: change "_IO_size_t len" to
+ 	  "_IO_ssize_t len".
+ 
+ Sat Jan  1 21:13:59 1993  H.J. Lu  (hjl@jalod)
+ 
+ 	* libioP.h: add CHECK_FILE(FILE,RET).
+ 	* iofclose.c:
+ 	* iofflush.c:
+ 	* iofgetpos.c:
+ 	* iofgets.c:
+ 	* iofprintf.c:
+ 	* iofputs.c:
+ 	* iofread.c:
+ 	* iofscanf.c:
+ 	* iofsetpos.c:
+ 	* ioftell.c:
+ 	* iofwrite.c:
+ 	* iosetbuffer.c:
+ 	* iosetvbuf.c:
+ 	* ioungetc.c: check fp with CHECK_FILE(FILE,RET).
+ 
+ Wed Dec 29 20:59:17 1993  H.J. Lu  (hjl@jalod)
+ 
+ 	* libio.h (_IO_putc): add parentheses for "_ch".
+ 
+ Tue Dec 21 13:02:48 1993  H.J. Lu  (hjl@jalod)
+ 
+ 	* libio.h: include <sys/cdefs.h>. change const to __const.
+ 
+ 	* iovfscanf.c: enforce the sequence of the conversion
+ 	  specification.
+ 
+ 	* genops.c:
+ 	* iopopen.c:
+ 	* iofopen.c:
+ 	* iofclose.c: don't include <stdlib.h> which is included
+ 	  in "libioP.h".
+ 
+ 	* iopopen.c (_IO_proc_close) : check if fp is on the list
+ 	  before close it.
+ 
+ 	* libioP.h: define CLOSED_FILEBUF_FLAGS as the one used to be
+ 	  in fileops.c.
+ 
+ 	* fileops.c: remove the definition of CLOSED_FILEBUF_FLAGS,
+ 	  which is in libioP.h now.
+ 
+ 	* fileops.c (_IO_file_fopen):
+ 	* iofdopen.c (_IO_fdopen):
+ 	* iopopen.c (_IO_proc_open): _flags |= CLOSED_FILEBUF_FLAGS
+ 	  before setting _flags.
+ 
+ 	* iovfprintf.c:
+ 	* cleanup.c:
+ 	* ioperror.c:
+ 	* iovfprintf.c:
+ 	* iovfscanf.c:
+ 	* strfile.h:
+ 	* libioP.h:
+ 	* libio.h:
+ 	* iolibio.h: replace __PARAMS with __P to be compatible with
+ 	  the GNU C library.
+ 
+ 	* iofopen.c (_IO_fopen): don't check fp == NULL after
+ 	  IO_file_init(&fp->_file).
+ 
+ 	* filedoalloc.c: include <unistd.h>.
+ 
+ 	* iolibio.h: check and define _IOLIBIO_H.
+ 
+ 	* config.shared: add $(LIBIO_CONFIG_FLAGS) to rules.
+ 
+ 	* libioP.h: include _LIBIO_CONFIG_H if defined.
+ 	  include <stdlb.h> if __STDC__ is defined.
+ 
+ 	* config/linux.mt: new files. define
+ 
+ 	  LIBIO_CONFIG_FLAGS=-D_LIBIO_CONFIG_H=\"config/linux.h\" -I./stdio
+ 
+ 	* config/linux.h: new file for linux.
+ 
+ 	* iofdopen.c (_IO_fdopen ()): call fcntl () to set up
+ 	  the currect status flag from the flag passing from
+ 	  fdopen ().
+ 
+ 	* fileops.c (_IO_file_attach ()): seek to the current R/W pointer.
+ 
+ 	* floatconv.c (_IO_strtod ()): make "+" and "-" as error.
+ 
+ 	* libioP.h (_IO_ignore):
+ 	  (_IO_least_marker):
+ 	  (_IO_switch_to_main_get_are):
+ 	  (_IO_switch_to_backup_are): 
+ 	  (_IO_syn):
+ 	  (_IO_get_column):
+ 	  (_IO_set_column):
+ 	  (_IO_str_finish):
+ 	  (IO_nobackup_pbackfail): new declaration.
+ 	  (_IO_flush_all):
+ 	  (_IO_flush_all_linebuffered): use ___P((void));
+ 
+ 	* iolibio.h (_IO_fscanf):
+ 	  (_IO_printf):
+ 	  (_IO_vfscanf):	  
+ 	  (_IO_fread): new declaration.
+ 
+ 	* cleanup.c: for linux, comment out "function_alias" and use
+ 	  text_set_element instead.
+ 
+ 	* libio.h: define _IO_uid_t and _IO_HAVE_ST_BLKSIZE
+ 	  as _G_xxxxxxxx.
+ 
+ 	* iomanip.h (template<class TP> class iapp):
+ 	  change ostream to istream.
+ 
+ 	* libioP.h:
+ 	* cleanup.c:
+ 	* filedoalloc.c: ifdef out _IO_cleanup_registration_needed
+ 	  stuff for Linux. it is handled in cleanup.c.
+ 
+ 	* configure.in (CLEAN): add tmp-params.h, dummy.C,
+ 	  dummy.o, dummy.c, dummy.out, TMP and a.out.
+ 	  add
+ 
+ 		*linux*)         my_target=linux;;
+ 
+ 	  to case "${target}" in. Also remove all libio object files
+ 	  for Linux since they are in libc.a.
+ 
+ 	* iostrerror.c: do nothing if __linux__ is defined.
+ 
+ 	* ioperror.c: add a new version for __linux__. may be 
+ 	  used with glibc.
+ 
+ 	* libioP.h: add _IO_gen_tempname ().
+ 
+ 	* iotempname.c: new file for _IO_gen_tempname (). It is
+ 	  used for the temporary filename functions.
+ 
+ 	* Makefile.in: add iotempname.o.
+ 
+ 	* ioprims.c: #include <unistd.h>. do nothing if
+ 	  __linux__ is defined. also glibc?
+ 
  Mon Dec 20 00:31:21 1993  Per Bothner  (bothner@kalessin.cygnus.com)
  
  	* config.shared (CXXINCLUDES):  Fix quoting of $(NOSTDINC).
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/Makefile.in libg++-2.5.3linux.2/libio/Makefile.in
*** libg++-2.5.3/libio/Makefile.in	Wed Dec 22 06:39:58 1993
--- libg++-2.5.3linux.2/libio/Makefile.in	Thu Jan 27 17:40:38 1994
***************
*** 17,24 ****
  
  srcdir = .
  VERSION = 0.63
- #### package, host, target, and site dependent Makefile fragments come in here.
- ##
  
  INSTALLDIR = $(libdir)
  
--- 17,22 ----
***************
*** 27,33 ****
    iovfscanf.o ioignore.o iopadn.o \
    iofgetpos.o iofread.o iofscanf.o \
    iofsetpos.o iogetline.o \
!   ioprintf.o ioseekoff.o ioseekpos.o \
    outfloat.o stdfiles.o strops.o iofclose.o iopopen.o ioungetc.o
  
  # These emulate stdio functionality, but with a different name (_IO_ungetc
--- 25,31 ----
    iovfscanf.o ioignore.o iopadn.o \
    iofgetpos.o iofread.o iofscanf.o \
    iofsetpos.o iogetline.o \
!   ioprintf.o ioseekoff.o ioseekpos.o $(EXTRA_OBJECTS) \
    outfloat.o stdfiles.o strops.o iofclose.o iopopen.o ioungetc.o
  
  # These emulate stdio functionality, but with a different name (_IO_ungetc
***************
*** 48,53 ****
--- 46,54 ----
  # They need to be changed to use name-space-clean (e.g. __read) versions
  # for each specific libc.
  OSPRIM_OBJECTS = ioprims.o iostrerror.o cleanup.o
+ 
+ #### package, host, target, and site dependent Makefile fragments come in here.
+ ##
  
  LIBIOSTREAM_OBJECTS = $(IO_OBJECTS) $(IOSTREAM_OBJECTS) $(OSPRIM_OBJECTS)
  LIBIO_OBJECTS = $(IO_OBJECTS) $(STDIO_WRAP_OBJECTS) $(OSPRIM_OBJECTS)
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/NEWS libg++-2.5.3linux.2/libio/NEWS
*** libg++-2.5.3/libio/NEWS	Wed Dec 22 06:39:58 1993
--- libg++-2.5.3linux.2/libio/NEWS	Thu Jan 20 17:49:27 1994
***************
*** 1,3 ****
--- 1,5 ----
+ * _IO_getline and streambuf::sgetline no longer write a '\0' at the end.
+ 
  *** Major changes in libio version 0.63 (released with libg++ 2.5.3):
  
  * There is a g++ bug that causes inconsistent name mangling for the
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/cleanup.c libg++-2.5.3linux.2/libio/cleanup.c
*** libg++-2.5.3/libio/cleanup.c	Tue Oct 12 02:28:18 1993
--- libg++-2.5.3linux.2/libio/cleanup.c	Sun Jan 30 14:16:02 1994
***************
*** 1,8 ****
  #include "libioP.h"
  #if _G_HAVE_ATEXIT
  #include <stdlib.h>
  
! typedef void (*voidfunc) _PARAMS((void));
  
  static void _IO_register_cleanup ()
  {
--- 1,29 ----
  #include "libioP.h"
+ 
+ #ifdef HAVE_GNU_LD
+ 
+ #include "stdio.h"
+ #include <unistd.h>
+ #include <ansidecl.h>
+ #include <gnu-stabs.h>
+ 
+ #if 1
+ function_alias(_cleanup, _IO_flush_all, void, (),
+ 		DEFUN_VOID(_cleanup))
+ #else
+ /* We don't want this since we are building the shared library.
+  * We want the shared library selfcontained. __libc_atexit will
+  * ruin it unless we take exit () out of the shared library.
+  */
+ text_set_element(__libc_atexit, _IO_flush_all);
+ #endif
+ 
+ #else
+ 
  #if _G_HAVE_ATEXIT
  #include <stdlib.h>
  
! typedef void (*voidfunc) __P((void));
  
  static void _IO_register_cleanup ()
  {
***************
*** 12,14 ****
--- 33,37 ----
  
  void (*_IO_cleanup_registration_needed)() = _IO_register_cleanup;
  #endif /* _G_HAVE_ATEXIT */
+ 
+ #endif
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/config/linux.h libg++-2.5.3linux.2/libio/config/linux.h
*** libg++-2.5.3/libio/config/linux.h	Wed Dec 31 19:00:00 1969
--- libg++-2.5.3linux.2/libio/config/linux.h	Mon Dec 20 08:54:24 1993
***************
*** 0 ****
--- 1,29 ----
+ #ifndef _CONFIG_LINUX_H
+ #define  _CONFIG_LINUX_H
+ 
+ #undef _STDIO_USES_IOSTREAM
+ #define _STDIO_USES_IOSTREAM 	1
+ 
+ #undef _IO_HAVE_ST_BLKSIZE
+ #define _IO_HAVE_ST_BLKSIZE	1
+ 
+ #define _IO_open	__open
+ #define _IO_close	__close
+ #define	_IO_fork	__fork
+ #define	_IO_fcntl	__fcntl
+ #define _IO__exit	_exit
+ #define _IO_read	__read
+ #define _IO_write	__write
+ #define _IO_lseek	__lseek
+ #define	_IO_getdtablesize	__getdtablesize
+ #define _IO_pipe	__pipe
+ #define _IO_dup2	__dup2
+ #define _IO_execl	execl
+ #define _IO_waitpid	__waitpid
+ #define _IO_stat        __stat
+ #define _IO_getpid      __getpid
+ #define _IO_geteuid     __geteuid
+ #define _IO_getegid     __getegid
+ #define _IO_fstat	__fstat
+ 
+ #endif /* _CONFIG_LINUX_H */
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/config/linux.mt libg++-2.5.3linux.2/libio/config/linux.mt
*** libg++-2.5.3/libio/config/linux.mt	Wed Dec 31 19:00:00 1969
--- libg++-2.5.3linux.2/libio/config/linux.mt	Mon Dec 20 08:54:24 1993
***************
*** 0 ****
--- 1,3 ----
+ # Linux defines those system dependent macros in libio/config/linux.h.
+ LIBIO_CONFIG_FLAGS=-D_LIBIO_CONFIG_H=\"config/linux.h\" -I./stdio
+ 
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/config.shared libg++-2.5.3linux.2/libio/config.shared
*** libg++-2.5.3/libio/config.shared	Wed Dec 22 06:39:58 1993
--- libg++-2.5.3linux.2/libio/config.shared	Thu Jan 27 21:59:39 1994
***************
*** 181,187 ****
  if test -n "${CXXINCLUDES}" ; then
    echo "CXXINCLUDES = ${CXXINCLUDES}" '$(XTRAFLAGS)'
  elif test "${DOING_LIBGXX}" = "true" ; then
!   echo 'CXXINCLUDES = $(NOSTDINC)'" -I. -I${TO_TOPDIR}libio"' -I$(srcdir) -I$(srcdir)/'"${TOLIBGXX}"'$(IO_DIR) -I$(srcdir)/'"${TOLIBGXX}src"' $(WRAP_C_INCLUDES) $(XTRAFLAGS)'
  fi
  if test -n "${CINCLUDES}" ; then
    echo "CINCLUDES = ${CINCLUDES}" '$(XTRAFLAGS)'
--- 181,187 ----
  if test -n "${CXXINCLUDES}" ; then
    echo "CXXINCLUDES = ${CXXINCLUDES}" '$(XTRAFLAGS)'
  elif test "${DOING_LIBGXX}" = "true" ; then
!   echo 'CXXINCLUDES = $(NOSTDINC)'" -I. -I${TO_TOPDIR}libio"' -I$(srcdir) -I$(srcdir)/'"${TOLIBGXX}"'$(IO_DIR) -I$(srcdir)/'"${TOLIBGXX}src -I${TO_TOPDIR}include"' $(WRAP_C_INCLUDES) $(XTRAFLAGS)'
  fi
  if test -n "${CINCLUDES}" ; then
    echo "CINCLUDES = ${CINCLUDES}" '$(XTRAFLAGS)'
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/configure.in libg++-2.5.3linux.2/libio/configure.in
*** libg++-2.5.3/libio/configure.in	Thu Oct 14 17:57:54 1993
--- libg++-2.5.3linux.2/libio/configure.in	Fri Jan 28 12:59:27 1994
***************
*** 11,18 ****
--- 11,36 ----
  
  # per-target:
  
+ : >${package_makefile_frag}
+ 
  case "${target}" in
    *-*-hpux*)       my_target=hpux ;;
+   *linux*)
+  	my_target=linux
+ cat > ${package_makefile_frag} <<!EOF!
+ # Linux has them in libc.a.
+ IO_OBJECTS=
+ 
+ # Linux has them in libc.a.
+ STDIO_WRAP_OBJECTS=
+ 
+ # Linux has them in libc.a.
+ OSPRIM_OBJECTS=
+ 
+ EXTRA_OBJECTS = iotempname.o
+ 
+ !EOF!
+ 	;;
    *-*-sco3.2v4*)   my_target=sco4 ;;
    *-*-isc*)        my_target=isc ;;
    *-*-*)           my_target=${target_cpu}
***************
*** 24,35 ****
  
  TO_TOPDIR=../
  ALL='_G_config.h libio.a libiostream.a $(OSPRIM_OBJECTS)'
! CINCLUDES='-I. -I$(srcdir)'
! CXXINCLUDES='-I. -I$(srcdir)'
  MOSTLYCLEAN='*.o core iostream.list'
! CLEAN='_G_config.h *.a'
  INFO_FILES=iostream
! (. ${srcdir}/config.shared) >${package_makefile_frag}
  
  # post-target:
  
--- 42,53 ----
  
  TO_TOPDIR=../
  ALL='_G_config.h libio.a libiostream.a $(OSPRIM_OBJECTS)'
! CINCLUDES='-I. -I$(srcdir) -I$(srcdir)/../include'
! CXXINCLUDES='-I. -I$(srcdir) -I$(srcdir)/../include'
  MOSTLYCLEAN='*.o core iostream.list'
! CLEAN='tmp-params.h dummy.C dummy.o dummy.c dummy.out TMP a.out _G_config.h *.a'
  INFO_FILES=iostream
! (. ${srcdir}/config.shared) >>${package_makefile_frag}
  
  # post-target:
  
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/filedoalloc.c libg++-2.5.3linux.2/libio/filedoalloc.c
*** libg++-2.5.3/libio/filedoalloc.c	Wed Dec 22 06:39:58 1993
--- libg++-2.5.3linux.2/libio/filedoalloc.c	Fri Jan 28 15:58:25 1994
***************
*** 43,56 ****
--- 43,59 ----
  
  #define _POSIX_SOURCE
  #include "libioP.h"
+ #include <unistd.h>
  #include <sys/types.h>
  #include <sys/stat.h>
  
+ #ifndef __linux__
  /* If this function pointer is non-zero, we should call it.
     It's supposed to make sure _IO_flush_all gets called on exit.
     We call it from _IO_file_doallocate, since that is likely
     to get called by any program that does buffered I/O. */
  void (*_IO_cleanup_registration_needed)();
+ #endif
  
  /*
   * Allocate a file buffer, or switch to unbuffered I/O.
***************
*** 69,77 ****
    register char *p;
    struct stat st;
  
    if (_IO_cleanup_registration_needed)
      (*_IO_cleanup_registration_needed)();
!   
    if (fp->_fileno < 0 || fp->_jumps->__stat(fp, &st) < 0)
      {
        couldbetty = 0;
--- 72,82 ----
    register char *p;
    struct stat st;
  
+ #ifndef __linux__
    if (_IO_cleanup_registration_needed)
      (*_IO_cleanup_registration_needed)();
! #endif
! 
    if (fp->_fileno < 0 || fp->_jumps->__stat(fp, &st) < 0)
      {
        couldbetty = 0;
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/fileops.c libg++-2.5.3linux.2/libio/fileops.c
*** libg++-2.5.3/libio/fileops.c	Fri Dec  3 02:23:20 1993
--- libg++-2.5.3linux.2/libio/fileops.c	Mon Jan 31 09:26:09 1994
***************
*** 79,88 ****
     If a filebuf is unbuffered(), the _shortbuf[1] is used as the buffer.
  */
  
- #define CLOSED_FILEBUF_FLAGS \
-   (_IO_IS_FILEBUF+_IO_NO_READS+_IO_NO_WRITES+_IO_TIED_PUT_GET)
- 
- 
  void
  _IO_file_init(fp)
       register _IO_FILE *fp;
--- 79,84 ----
***************
*** 109,115 ****
    _IO_unsave_markers(fp);
  
    status = fp->_jumps->__close(fp);
!   
    /* Free buffer. */
    _IO_setb(fp, NULL, NULL, 0);
    _IO_setg(fp, NULL, NULL, NULL);
--- 105,111 ----
    _IO_unsave_markers(fp);
  
    status = fp->_jumps->__close(fp);
! 
    /* Free buffer. */
    _IO_setb(fp, NULL, NULL, 0);
    _IO_setg(fp, NULL, NULL, NULL);
***************
*** 170,179 ****
    if (fdesc < 0)
      return NULL;
    fp->_fileno = fdesc;
    fp->_IO_file_flags = 
      _IO_mask_flags(fp, read_write,_IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING);
    if (read_write & _IO_IS_APPENDING)
!     if (fp->_jumps->__seekoff(fp, (_IO_off_t)0, _IO_seek_end) == _IO_pos_BAD)
        return NULL;
    _IO_link_in(fp);
    return fp;
--- 166,177 ----
    if (fdesc < 0)
      return NULL;
    fp->_fileno = fdesc;
+   fp->_IO_file_flags |= CLOSED_FILEBUF_FLAGS;
    fp->_IO_file_flags = 
      _IO_mask_flags(fp, read_write,_IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING);
    if (read_write & _IO_IS_APPENDING)
!     if (fp->_jumps->__seekoff(fp, (_IO_off_t)0, _IO_seek_end)
! 	== _IO_pos_BAD && errno != ESPIPE)
        return NULL;
    _IO_link_in(fp);
    return fp;
***************
*** 184,194 ****
--- 182,209 ----
       _IO_FILE *fp;
       int fd;
  {
+ #if 1
+   struct stat st;
+ #endif
+ 
    if (_IO_file_is_open(fp))
      return NULL;
    fp->_fileno = fd;
    fp->_flags &= ~(_IO_NO_READS+_IO_NO_WRITES);
+ 
+ #if 1
+   /* Get the current position of the file. */
+   if (fp->_jumps->__stat(fp, &st) == 0 && S_ISREG(st.st_mode))
+   {
+     fp->_offset = _IO_pos_BAD;
+     if (fp->_jumps->__seekoff(fp, (_IO_off_t) 0, _IO_seek_cur)
+          == _IO_pos_BAD && errno != ESPIPE)
+     return NULL;
+   }
+ #else
    fp->_offset = _IO_pos_BAD;
+ #endif
+ 
    return fp;
  }
  
***************
*** 214,220 ****
       const char* data;
       _IO_size_t to_do;
  {
!   _IO_size_t count;
    if (to_do == 0)
      return 0;
    if (fp->_flags & _IO_IS_APPENDING)
--- 229,235 ----
       const char* data;
       _IO_size_t to_do;
  {
!   _IO_ssize_t count;
    if (to_do == 0)
      return 0;
    if (fp->_flags & _IO_IS_APPENDING)
***************
*** 245,251 ****
  _IO_file_underflow(fp)
       register _IO_FILE *fp;
  {
!   _IO_size_t count;
  #if 0
    /* SysV does not make this test; take it out for compatibility */
    if (fp->_flags & _IO_EOF_SEEN)
--- 260,266 ----
  _IO_file_underflow(fp)
       register _IO_FILE *fp;
  {
!   _IO_ssize_t count;
  #if 0
    /* SysV does not make this test; take it out for compatibility */
    if (fp->_flags & _IO_EOF_SEEN)
***************
*** 271,280 ****
--- 286,326 ----
  			     fp->_IO_buf_end - fp->_IO_buf_base);
    if (count <= 0)
      {
+ #if 1
+       /* errno may be changed by the signal handler. when we see
+        * errno == 0, we assume the signal is benign :-(.
+        *
+        * We don't need it any more. H.J.
+        */
+ #if 1
+ #define	CHECK_ZERO_ERRNO
+ #else
+ #define	CHECK_ZERO_ERRNO	|| errno == 0
+ #endif
+ #ifdef EAGAIN
+ #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
+       if (count == 0 CHECK_ZERO_ERRNO || errno == EAGAIN
+ 	|| errno == EWOULDBLOCK)
+ #else
+       if (count == 0 CHECK_ZERO_ERRNO || errno == EAGAIN)
+ #endif
+ #else
+ #ifdef EWOULDBLOCK
+       if (count == 0 CHECK_ZERO_ERRNO || errno == EWOULDBLOCK)
+ #else
+       if (count == 0 CHECK_ZERO_ERRNO)
+ #endif
+ #endif
+ 	fp->_flags |= _IO_EOF_SEEN;
+       else
+         fp->_flags |= _IO_ERR_SEEN;
+       count = 0;
+ #else
        if (count == 0)
  	fp->_flags |= _IO_EOF_SEEN;
        else
  	fp->_flags |= _IO_ERR_SEEN, count = 0;
+ #endif
    }
    fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_buf_base;
    fp->_IO_read_end = fp->_IO_buf_base + count;
***************
*** 575,581 ****
    register const char *s = data;
    _IO_size_t to_do = n;
    int must_flush = 0;
!   _IO_size_t count;
  
    if (n <= 0)
      return 0;
--- 621,627 ----
    register const char *s = data;
    _IO_size_t to_do = n;
    int must_flush = 0;
!   _IO_ssize_t count;
  
    if (n <= 0)
      return 0;
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/floatconv.c libg++-2.5.3linux.2/libio/floatconv.c
*** libg++-2.5.3/libio/floatconv.c	Fri Nov 26 21:58:45 1993
--- libg++-2.5.3linux.2/libio/floatconv.c	Mon Dec 20 08:54:25 1993
***************
*** 1111,1116 ****
--- 1111,1118 ----
                                  goto break2;
                          /* no break */
                  case 0:
+ 			/* "+" and "-" should be reported as an error? */
+ 			sign = 0;
  			s = s00;
                          goto ret;
                  case '\t':
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/genops.c libg++-2.5.3linux.2/libio/genops.c
*** libg++-2.5.3/libio/genops.c	Wed Dec 22 06:39:59 1993
--- libg++-2.5.3linux.2/libio/genops.c	Tue Jan 18 11:23:36 1994
***************
*** 25,31 ****
  /* Generic or default I/O operations. */
  
  #include "libioP.h"
- #include <stdlib.h>
  #include <string.h>
  
  void _IO_un_link(fp)
--- 25,30 ----
***************
*** 283,289 ****
      return 0;
    for (;;)
      {
!       _IO_size_t count = f->_IO_write_end - f->_IO_write_ptr; /* Space available. */
        if (count > 0)
  	{
  	  if (count > more)
--- 282,288 ----
      return 0;
    for (;;)
      {
!       _IO_ssize_t count = f->_IO_write_end - f->_IO_write_ptr; /* Space available. */
        if (count > 0)
  	{
  	  if (count > more)
***************
*** 332,338 ****
    register char *s = data;
    for (;;)
      {
!       _IO_size_t count = fp->_IO_read_end - fp->_IO_read_ptr; /* Data available. */
        if (count > 0)
  	{
  	  if (count > more)
--- 331,337 ----
    register char *s = data;
    for (;;)
      {
!       _IO_ssize_t count = fp->_IO_read_end - fp->_IO_read_ptr; /* Data available. */
        if (count > 0)
  	{
  	  if (count > more)
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofclose.c libg++-2.5.3linux.2/libio/iofclose.c
*** libg++-2.5.3/libio/iofclose.c	Fri Dec  3 02:23:21 1993
--- libg++-2.5.3linux.2/libio/iofclose.c	Sun Feb 13 22:29:51 1994
***************
*** 23,35 ****
  the executable file might be covered by the GNU General Public License. */
  
  #include "libioP.h"
- #include <stdlib.h>
  
  int
  _IO_fclose(fp)
       register _IO_FILE *fp;
  {
    int status = 0;
    COERCE_FILE(fp);
    if (fp->_IO_file_flags & _IO_IS_FILEBUF)
      status = _IO_file_close_it(fp);
--- 23,35 ----
  the executable file might be covered by the GNU General Public License. */
  
  #include "libioP.h"
  
  int
  _IO_fclose(fp)
       register _IO_FILE *fp;
  {
    int status = 0;
+   CHECK_FILE(fp, EOF);
    COERCE_FILE(fp);
    if (fp->_IO_file_flags & _IO_IS_FILEBUF)
      status = _IO_file_close_it(fp);
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofdopen.c libg++-2.5.3linux.2/libio/iofdopen.c
*** libg++-2.5.3/libio/iofdopen.c	Fri Nov 26 21:58:48 1993
--- libg++-2.5.3linux.2/libio/iofdopen.c	Mon Dec 20 08:54:26 1993
***************
*** 23,28 ****
--- 23,33 ----
  the executable file might be covered by the GNU General Public License. */
  
  #include "libioP.h"
+ #include <fcntl.h>
+ 
+ #ifndef _IO_fcntl
+ #define _IO_fcntl fcntl
+ #endif
  
  _IO_FILE *
  _IO_fdopen (fd, mode)
***************
*** 30,35 ****
--- 35,42 ----
       const char *mode;
  {
    int read_write;
+   int posix_mode = 0;
+   int status_flag;
    struct _IO_FILE_plus *fp;
  
    switch (*mode++)
***************
*** 41,46 ****
--- 48,54 ----
        read_write = _IO_NO_READS;
        break;
      case 'a':
+       posix_mode = O_APPEND;
        read_write = _IO_NO_READS|_IO_IS_APPENDING;
        break;
      default:
***************
*** 65,75 ****
--- 73,107 ----
        free (fp);
        return NULL;
      }
+   fp->_file._flags |= CLOSED_FILEBUF_FLAGS;
    fp->_file._flags &= ~_IO_DELETE_DONT_CLOSE;
  
    fp->_file._IO_file_flags = 
      _IO_mask_flags(&fp->_file, read_write,
  		   _IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING);
  
+ #ifdef F_GETFL
+   status_flag = _IO_fcntl (fp->_file._fileno, F_GETFL);
+   if (status_flag == -1)
+   {
+     _IO_un_link(&fp->_file);
+     free (fp);
+     return NULL;
+   }
+   /* check if we need to change the status flag. */
+   if ((status_flag & O_APPEND) != posix_mode)
+   {
+     /* Set new status flag. */
+     status_flag = (status_flag & ~O_APPEND) | posix_mode;
+     if (_IO_fcntl (fp->_file._fileno, F_SETFL, status_flag) == -1)
+     {
+       _IO_un_link(&fp->_file);
+       free (fp);
+       return NULL;
+     }
+   }
+ #else
+ #error "I don't know what you have for F_GETFL."
+ #endif
    return (_IO_FILE*)fp;
  }
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofflush.c libg++-2.5.3linux.2/libio/iofflush.c
*** libg++-2.5.3/libio/iofflush.c	Fri Aug 20 04:18:06 1993
--- libg++-2.5.3linux.2/libio/iofflush.c	Sun Feb 13 22:30:10 1994
***************
*** 32,37 ****
--- 32,38 ----
      return _IO_flush_all();
    else
      {
+       CHECK_FILE(fp, EOF);
        COERCE_FILE(fp);
        return fp->_jumps->__sync(fp) ? EOF : 0;
      }
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofgetpos.c libg++-2.5.3linux.2/libio/iofgetpos.c
*** libg++-2.5.3/libio/iofgetpos.c	Mon Sep 27 17:46:25 1993
--- libg++-2.5.3linux.2/libio/iofgetpos.c	Sun Feb 13 22:30:23 1994
***************
*** 32,37 ****
--- 32,38 ----
       _IO_fpos_t *posp;
  {
    _IO_fpos_t pos;
+   CHECK_FILE(fp, EOF);
    COERCE_FILE(fp);
    pos = _IO_seekoff(fp, 0, _IO_seek_cur|_IO_seek_not_in|_IO_seek_not_out);
    if (pos == _IO_pos_BAD)
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofgets.c libg++-2.5.3linux.2/libio/iofgets.c
*** libg++-2.5.3/libio/iofgets.c	Fri Aug 20 04:18:07 1993
--- libg++-2.5.3linux.2/libio/iofgets.c	Mon Feb 14 09:52:18 1994
***************
*** 30,39 ****
       int n;
       _IO_FILE* fp;
  {
!   long count;
    COERCE_FILE(fp);
!   count = _IO_getline(fp, buf, n, '\n', 1);
!   if (count <= 0)
      return NULL;
    return buf;
  }
--- 30,43 ----
       int n;
       _IO_FILE* fp;
  {
!   _IO_size_t count;
!   CHECK_FILE(fp, NULL);
    COERCE_FILE(fp);
!   if (n <= 0)
      return NULL;
+   count = _IO_getline(fp, buf, n - 1, '\n', 1);
+   if (count == 0 || (fp->_IO_file_flags & _IO_ERR_SEEN))
+     return NULL;
+   buf[count] = 0;
    return buf;
  }
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofopen.c libg++-2.5.3linux.2/libio/iofopen.c
*** libg++-2.5.3/libio/iofopen.c	Fri Nov 26 17:01:56 1993
--- libg++-2.5.3linux.2/libio/iofopen.c	Mon Dec 20 08:54:27 1993
***************
*** 23,29 ****
  the executable file might be covered by the GNU General Public License. */
  
  #include "libioP.h"
- #include <stdlib.h>
  
  _IO_FILE *
  _IO_fopen (filename, mode)
--- 23,28 ----
***************
*** 37,44 ****
    _IO_init(&fp->_file, 0);
    fp->_file._jumps = &_IO_file_jumps;
    _IO_file_init(&fp->_file);
-   if (fp == NULL)
-     return NULL;
    fp->_vtable = NULL;
    if (_IO_file_fopen(&fp->_file, filename, mode) != NULL)
          return (_IO_FILE*)fp;
--- 36,41 ----
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofprintf.c libg++-2.5.3linux.2/libio/iofprintf.c
*** libg++-2.5.3/libio/iofprintf.c	Tue Oct  5 13:39:41 1993
--- libg++-2.5.3linux.2/libio/iofprintf.c	Mon Feb 14 09:59:35 1994
***************
*** 40,45 ****
--- 40,46 ----
  {
    int ret;
    va_list args;
+   CHECK_FILE(fp, -1);
    COERCE_FILE(fp);
    _IO_va_start(args, format);
    ret = _IO_vfprintf(fp, format, args);
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofputs.c libg++-2.5.3linux.2/libio/iofputs.c
*** libg++-2.5.3/libio/iofputs.c	Fri Nov 26 17:01:57 1993
--- libg++-2.5.3linux.2/libio/iofputs.c	Mon Feb 14 09:59:47 1994
***************
*** 30,35 ****
--- 30,36 ----
       _IO_FILE *fp;
  {
    _IO_size_t len = strlen(str);
+   CHECK_FILE(fp, EOF);
    COERCE_FILE(fp);
    if (_IO_sputn(fp, str, len) != len)
      return EOF;
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofread.c libg++-2.5.3linux.2/libio/iofread.c
*** libg++-2.5.3/libio/iofread.c	Wed Dec 22 06:39:59 1993
--- libg++-2.5.3linux.2/libio/iofread.c	Mon Feb 14 10:09:53 1994
***************
*** 33,38 ****
--- 33,39 ----
  {
    _IO_size_t bytes_requested = size*count;
    _IO_size_t bytes_read;
+   CHECK_FILE(fp, 0);
    COERCE_FILE(fp);
    if (bytes_requested == 0)
      return 0;
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofscanf.c libg++-2.5.3linux.2/libio/iofscanf.c
*** libg++-2.5.3/libio/iofscanf.c	Wed Nov  3 14:59:49 1993
--- libg++-2.5.3linux.2/libio/iofscanf.c	Mon Feb 14 10:02:22 1994
***************
*** 40,45 ****
--- 40,46 ----
  {
    int ret;
    va_list args;
+   CHECK_FILE(fp, EOF);
    COERCE_FILE(fp);
    _IO_va_start(args, format);
    ret = _IO_vfscanf(fp, format, args, NULL);
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofsetpos.c libg++-2.5.3linux.2/libio/iofsetpos.c
*** libg++-2.5.3/libio/iofsetpos.c	Wed Dec 22 06:40:00 1993
--- libg++-2.5.3linux.2/libio/iofsetpos.c	Sun Feb 13 22:31:02 1994
***************
*** 30,35 ****
--- 30,36 ----
       _IO_FILE* fp;
       const _IO_fpos_t *posp;
  {
+   CHECK_FILE(fp, EOF);
    COERCE_FILE(fp);
    if (_IO_seekpos(fp, *posp, 0) == _IO_pos_BAD)
      {
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/ioftell.c libg++-2.5.3linux.2/libio/ioftell.c
*** libg++-2.5.3/libio/ioftell.c	Fri Aug 20 04:18:11 1993
--- libg++-2.5.3linux.2/libio/ioftell.c	Sun Feb 13 22:26:42 1994
***************
*** 31,36 ****
--- 31,37 ----
       _IO_FILE* fp;
  {
    _IO_pos_t pos;
+   CHECK_FILE(fp, -1L);
    COERCE_FILE(fp);
    pos = _IO_seekoff(fp, 0, _IO_seek_cur|_IO_seek_not_in|_IO_seek_not_out);
    if (pos == _IO_pos_BAD)
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofwrite.c libg++-2.5.3linux.2/libio/iofwrite.c
*** libg++-2.5.3/libio/iofwrite.c	Wed Dec 22 06:40:00 1993
--- libg++-2.5.3linux.2/libio/iofwrite.c	Mon Feb 14 10:10:02 1994
***************
*** 33,38 ****
--- 33,39 ----
  {
    _IO_size_t request = size*count;
    _IO_size_t written;
+   CHECK_FILE(fp, 0);
    COERCE_FILE(fp);
    if (request == 0)
      return 0;
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iogetline.c libg++-2.5.3linux.2/libio/iogetline.c
*** libg++-2.5.3/libio/iogetline.c	Mon Nov 15 16:32:49 1993
--- libg++-2.5.3linux.2/libio/iogetline.c	Thu Jan 27 16:50:06 1994
***************
*** 28,34 ****
  /* Algorithm based on that used by Berkeley pre-4.4 fgets implementation.
  
     Read chars into buf (of size n), until delim is seen.
!    Return number of chars read (at most n-1).
     If extract_delim < 0, leave delimiter unread.
     If extract_delim > 0, insert delim in output. */
  
--- 28,35 ----
  /* Algorithm based on that used by Berkeley pre-4.4 fgets implementation.
  
     Read chars into buf (of size n), until delim is seen.
!    Return number of chars read (at most n).
!    Does not put a terminating '\0' in buf.
     If extract_delim < 0, leave delimiter unread.
     If extract_delim > 0, insert delim in output. */
  
***************
*** 41,52 ****
       int extract_delim;
  {
    register char *ptr = buf;
-   if (n <= 0)
-     return EOF;
-   n--; /* Leave space for final '\0'. */
    do
      {
!       _IO_size_t len = fp->_IO_read_end - fp->_IO_read_ptr;
        char *t;
        if (len <= 0)
  	if (__underflow(fp) == EOF)
--- 42,50 ----
       int extract_delim;
  {
    register char *ptr = buf;
    do
      {
!       _IO_ssize_t len = fp->_IO_read_end - fp->_IO_read_ptr;
        char *t;
        if (len <= 0)
  	if (__underflow(fp) == EOF)
***************
*** 63,74 ****
  	  if (extract_delim >= 0)
  	    {
  	      t++;
- 	      old_len++;
  	      if (extract_delim > 0)
  		len++;
  	    }
  	  memcpy((void*)ptr, (void*)fp->_IO_read_ptr, len);
- 	  ptr[len] = 0;
  	  fp->_IO_read_ptr = t;
  	  return old_len + len;
  	}
--- 61,70 ----
***************
*** 77,82 ****
        ptr += len;
        n -= len;
      } while (n != 0);
-   *ptr = 0;
    return ptr - buf;
  }
--- 73,77 ----
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iogets.c libg++-2.5.3linux.2/libio/iogets.c
*** libg++-2.5.3/libio/iogets.c	Mon Sep 27 17:46:27 1993
--- libg++-2.5.3linux.2/libio/iogets.c	Thu Jan 27 16:50:06 1994
***************
*** 29,36 ****
  _IO_gets(buf)
       char* buf;
  {
!   long count = _IO_getline(_IO_stdin, buf, INT_MAX, '\n', 0);
!   if (count <= 0)
      return NULL;
    return buf;
  }
--- 29,48 ----
  _IO_gets(buf)
       char* buf;
  {
!   _IO_size_t count;
!   int ch = _IO_getc (_IO_stdin);
!   if (ch == EOF)
      return NULL;
+   if (ch == '\n')
+     count = 0;
+   else
+     {
+       buf[0] = (char)ch;
+       count = _IO_getline(_IO_stdin, buf + 1, INT_MAX, '\n', 0) + 1;
+       if (_IO_stdin->_IO_file_flags & _IO_ERR_SEEN)
+ 	return NULL;
+     }
+   buf[count] = 0;
    return buf;
  }
+ 
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/ioignore.c libg++-2.5.3linux.2/libio/ioignore.c
*** libg++-2.5.3/libio/ioignore.c	Wed Nov  3 14:59:53 1993
--- libg++-2.5.3linux.2/libio/ioignore.c	Tue Jan 18 11:23:36 1994
***************
*** 32,38 ****
    register _IO_size_t more = n;
    for (;;)
      {
!       _IO_size_t count = fp->_IO_read_end - fp->_IO_read_ptr;
        if (count > 0)
  	{
  	  if (count > more)
--- 32,38 ----
    register _IO_size_t more = n;
    for (;;)
      {
!       _IO_ssize_t count = fp->_IO_read_end - fp->_IO_read_ptr;
        if (count > 0)
  	{
  	  if (count > more)
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iolibio.h libg++-2.5.3linux.2/libio/iolibio.h
*** libg++-2.5.3/libio/iolibio.h	Fri Nov 26 21:58:50 1993
--- libg++-2.5.3linux.2/libio/iolibio.h	Mon Dec 20 08:54:27 1993
***************
*** 1,31 ****
  #include "libio.h"
  
  /* These emulate stdio functionality, but with a different name
     (_IO_ungetc instead of ungetc), and using _IO_FILE instead of FILE. */
  
! extern int _IO_fclose _PARAMS((_IO_FILE*));
! extern _IO_FILE *_IO_fdopen _PARAMS((int, const char*));
! extern int _IO_fflush _PARAMS((_IO_FILE*));
! extern int _IO_fgetpos _PARAMS((_IO_FILE*, _IO_fpos_t*));
! extern char* _IO_fgets _PARAMS((char*, int, _IO_FILE*));
! extern _IO_FILE *_IO_fopen _PARAMS((const char*, const char*));
! extern int _IO_fprintf _PARAMS((_IO_FILE*, const char*, ...));
! extern int _IO_fputs _PARAMS((const char*, _IO_FILE*));
! extern int _IO_fsetpos _PARAMS((_IO_FILE*, const _IO_fpos_t *));
! extern long int _IO_ftell _PARAMS((_IO_FILE*));
! extern _IO_size_t _IO_fwrite _PARAMS((const void*,
  				      _IO_size_t, _IO_size_t, _IO_FILE*));
! extern char* _IO_gets _PARAMS((char*));
! extern void _IO_perror _PARAMS((const char*));
! extern int _IO_puts _PARAMS((const char*));
! extern int _IO_scanf _PARAMS((const char*, ...));
! extern void _IO_setbuffer _PARAMS((_IO_FILE *, char*, _IO_size_t));
! extern int _IO_setvbuf _PARAMS((_IO_FILE*, char*, int, _IO_size_t));
! extern int _IO_sscanf _PARAMS((const char*, const char*, ...));
! extern int _IO_sprintf _PARAMS((char *, const char*, ...));
! extern int _IO_ungetc _PARAMS((int, _IO_FILE*));
! extern int _IO_vsscanf _PARAMS((const char *, const char *, _IO_va_list));
! extern int _IO_vsprintf _PARAMS((char*, const char*, _IO_va_list));
  #ifndef _IO_pos_BAD
  #define _IO_pos_BAD ((_IO_fpos_t)(-1))
  #endif
--- 1,40 ----
+ #ifndef _IOLIBIO_H
+ #define _IOLIBIO_H
+ 
  #include "libio.h"
  
  /* These emulate stdio functionality, but with a different name
     (_IO_ungetc instead of ungetc), and using _IO_FILE instead of FILE. */
  
! extern int _IO_fclose __P((_IO_FILE*));
! extern _IO_FILE *_IO_fdopen __P((int, const char*));
! extern int _IO_fflush __P((_IO_FILE*));
! extern int _IO_fgetpos __P((_IO_FILE*, _IO_fpos_t*));
! extern char* _IO_fgets __P((char*, int, _IO_FILE*));
! extern _IO_FILE *_IO_fopen __P((const char*, const char*));
! extern int _IO_fprintf __P((_IO_FILE*, const char*, ...));
! extern int _IO_fputs __P((const char*, _IO_FILE*));
! extern _IO_size_t _IO_fread __P((void *,
! 				      _IO_size_t, _IO_size_t, _IO_FILE*));
! extern int _IO_fscanf __P((_IO_FILE *, const char *, ...));
! extern int _IO_fsetpos __P((_IO_FILE*, const _IO_fpos_t *));
! extern long int _IO_ftell __P((_IO_FILE*));
! extern _IO_size_t _IO_fwrite __P((const void*,
  				      _IO_size_t, _IO_size_t, _IO_FILE*));
! extern char* _IO_gets __P((char*));
! extern void _IO_perror __P((const char*));
! extern int _IO_printf  __P((const char *, ...));
! extern int _IO_puts __P((const char*));
! extern int _IO_scanf __P((const char*, ...));
! extern void _IO_setbuffer __P((_IO_FILE *, char*, _IO_size_t));
! extern int _IO_setvbuf __P((_IO_FILE*, char*, int, _IO_size_t));
! extern int _IO_sscanf __P((const char*, const char*, ...));
! extern int _IO_sprintf __P((char *, const char*, ...));
! extern int _IO_ungetc __P((int, _IO_FILE*));
! extern int _IO_vfscanf __P((_IO_FILE *, const char *, _IO_va_list,
! 				int *__errp));
! extern int _IO_vsscanf __P((const char *, const char *, _IO_va_list));
! extern int _IO_vsprintf __P((char*, const char*, _IO_va_list));
  #ifndef _IO_pos_BAD
  #define _IO_pos_BAD ((_IO_fpos_t)(-1))
  #endif
***************
*** 39,46 ****
  #define _IO_freopen(FILENAME, MODE, FP) \
    (_IO_file_close_it(FP), _IO_file_fopen(FP, FILENAME, MODE))
  #define _IO_fileno(FP) ((FP)->_fileno)
! extern _IO_FILE* _IO_popen _PARAMS((const char*, const char*));
  #define _IO_pclose _IO_fclose
  #define _IO_setbuf(_FP, _BUF) _IO_setbuffer(_FP, _BUF, _IO_BUFSIZ)
  #define _IO_setlinebuf(_FP) _IO_setvbuf(_FP, NULL, 1, 0)
  
--- 48,56 ----
  #define _IO_freopen(FILENAME, MODE, FP) \
    (_IO_file_close_it(FP), _IO_file_fopen(FP, FILENAME, MODE))
  #define _IO_fileno(FP) ((FP)->_fileno)
! extern _IO_FILE* _IO_popen __P((const char*, const char*));
  #define _IO_pclose _IO_fclose
  #define _IO_setbuf(_FP, _BUF) _IO_setbuffer(_FP, _BUF, _IO_BUFSIZ)
  #define _IO_setlinebuf(_FP) _IO_setvbuf(_FP, NULL, 1, 0)
  
+ #endif /* _IOLIBIO_H */
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iomanip.h libg++-2.5.3linux.2/libio/iomanip.h
*** libg++-2.5.3/libio/iomanip.h	Fri Oct 22 00:54:27 1993
--- libg++-2.5.3linux.2/libio/iomanip.h	Mon Dec 20 08:54:28 1993
***************
*** 82,88 ****
  template<class TP> class iapp {
      istream& (*_f)(istream&, TP);
  public: 
!     iapp(ostream& (*f)(istream&,TP)) : _f(f) {}
      //
      imanip<TP> operator()(TP a)
         { return imanip<TP>(_f, a); }
--- 82,88 ----
  template<class TP> class iapp {
      istream& (*_f)(istream&, TP);
  public: 
!     iapp(istream& (*f)(istream&,TP)) : _f(f) {}
      //
      imanip<TP> operator()(TP a)
         { return imanip<TP>(_f, a); }
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/ioperror.c libg++-2.5.3linux.2/libio/ioperror.c
*** libg++-2.5.3/libio/ioperror.c	Tue Oct  5 22:12:50 1993
--- libg++-2.5.3linux.2/libio/ioperror.c	Mon Dec 20 08:54:28 1993
***************
*** 1,12 ****
  #include "libioP.h"
  #include <errno.h>
- #include <string.h>
  #ifndef errno
  extern int errno;
  #endif
  
  #ifndef _IO_strerror
! extern char* _IO_strerror _PARAMS((int));
  #endif
  
  void
--- 1,58 ----
+ /* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ 
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+ 
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ Library General Public License for more details.
+ 
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB.  If
+ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+ Cambridge, MA 02139, USA.  */
+ 
+ #include <ansidecl.h>
+ 
  #include "libioP.h"
  #include <errno.h>
  #ifndef errno
  extern int errno;
  #endif
  
+ /* Also glibc? */
+ #ifdef __linux__
+ 
+ /* Print a line on stderr consisting of the text in S, a colon, a space,
+    a message describing the meaning of the contents of `errno' and a newline.
+    If S is NULL or "", the colon and space are omitted.  */
+ void
+ DEFUN(_IO_perror, (s), register CONST char *s)
+ {
+   int errnum = errno;
+   CONST char *colon;
+ 
+   if (s == NULL || *s == '\0')
+     s = colon = "";
+   else
+     colon = ": ";
+ 
+   if (errnum >= 0 && errnum < _sys_nerr)
+     (void) _IO_fprintf(_IO_stderr, "%s%s%s\n", s, colon, _sys_errlist[errnum]);
+   else
+     (void) _IO_fprintf(_IO_stderr, "%s%sUnknown error %d\n", s, colon, errnum);
+ }
+ 
+ #else
+ 
+ #include <string.h>
+ 
  #ifndef _IO_strerror
! extern char* _IO_strerror __P((int));
  #endif
  
  void
***************
*** 20,22 ****
--- 66,70 ----
  
    _IO_fprintf (_IO_stderr, "%s\n", error ? error : "");
  }
+ 
+ #endif
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iopopen.c libg++-2.5.3linux.2/libio/iopopen.c
*** libg++-2.5.3/libio/iopopen.c	Fri Nov 26 18:50:41 1993
--- libg++-2.5.3linux.2/libio/iopopen.c	Mon Dec 20 08:54:28 1993
***************
*** 29,38 ****
  #if _IO_HAVE_SYS_WAIT
  #include <signal.h>
  #include <unistd.h>
- #ifdef __STDC__
- /* This is now provided by gcc's fixproto. */
- #include <stdlib.h>
- #endif
  #include <errno.h>
  #ifndef errno
  extern int errno;
--- 29,34 ----
***************
*** 139,144 ****
--- 135,141 ----
    ((_IO_proc_file*)fp)->_next = proc_file_chain;
    proc_file_chain = (_IO_proc_file*)fp;
  
+   fp->_IO_file_flags |= CLOSED_FILEBUF_FLAGS;
    fp->_IO_file_flags
      = read_or_write | (fp->_IO_file_flags & ~(_IO_NO_READS|_IO_NO_WRITES));
    return fp;
***************
*** 175,194 ****
    int wstatus;
    _IO_proc_file **ptr = &proc_file_chain;
    _IO_pid_t wait_pid;
!   int status = _IO_close(_IO_fileno(fp));
  
    /* Unlink from proc_file_chain. */
!   for ( ; *ptr != NULL; ptr = &(*ptr)->_next)
      {
!       if (*ptr == (_IO_proc_file*)fp)
! 	{
! 	  *ptr = (*ptr)->_next;
! 	  break;
! 	}
      }
  
!   if (status < 0)
!     return status;
    /* POSIX.2 Rationale:  "Some historical implementations either block
       or ignore the signals SIGINT, SIGQUIT, and SIGHUP while waiting
       for the child process to terminate.  Since this behavior is not
--- 172,192 ----
    int wstatus;
    _IO_proc_file **ptr = &proc_file_chain;
    _IO_pid_t wait_pid;
!   int status = -1;
  
    /* Unlink from proc_file_chain. */
!   for (; *ptr; ptr = &((*ptr)->_next))
!   {
!     if (*ptr == (_IO_proc_file*)fp)
      {
!       *ptr = (*ptr)->_next;
!       status = 0;
!       break;
      }
+   }
  
!   if (status < 0 || _IO_close(_IO_fileno(fp)) < 0)
!     return -1;
    /* POSIX.2 Rationale:  "Some historical implementations either block
       or ignore the signals SIGINT, SIGQUIT, and SIGHUP while waiting
       for the child process to terminate.  Since this behavior is not
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/ioprims.c libg++-2.5.3linux.2/libio/ioprims.c
*** libg++-2.5.3/libio/ioprims.c	Tue Aug 17 21:27:04 1993
--- libg++-2.5.3linux.2/libio/ioprims.c	Mon Dec 20 08:54:28 1993
***************
*** 28,34 ****
--- 28,37 ----
     (in which case read would be defined in terms of _IO_read,
     rather than vice versa). */
  
+ #ifndef __linux__
+ 
  #include "libioP.h"
+ #include <unistd.h>
  #include <sys/types.h>
  #include <sys/stat.h>
  
***************
*** 77,79 ****
--- 80,84 ----
  {
    return fstat (fildes, buf);
  }
+ 
+ #endif
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iosetbuffer.c libg++-2.5.3linux.2/libio/iosetbuffer.c
*** libg++-2.5.3/libio/iosetbuffer.c	Mon Oct  4 20:26:21 1993
--- libg++-2.5.3linux.2/libio/iosetbuffer.c	Sun Feb 13 22:31:20 1994
***************
*** 30,35 ****
--- 30,36 ----
       char *buf;
       _IO_size_t size;
  {
+   CHECK_FILE(fp, );
    COERCE_FILE(fp);
    fp->_flags &= ~_IO_LINE_BUF;
    if (buf)
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iosetvbuf.c libg++-2.5.3linux.2/libio/iosetvbuf.c
*** libg++-2.5.3/libio/iosetvbuf.c	Mon Oct  4 20:26:28 1993
--- libg++-2.5.3linux.2/libio/iosetvbuf.c	Sun Feb 13 22:31:30 1994
***************
*** 35,40 ****
--- 35,41 ----
       int mode;
       _IO_size_t size;
  {
+   CHECK_FILE(fp, EOF);
    COERCE_FILE(fp);
    switch (mode)
      {
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iostrerror.c libg++-2.5.3linux.2/libio/iostrerror.c
*** libg++-2.5.3/libio/iostrerror.c	Mon Oct 11 23:49:53 1993
--- libg++-2.5.3linux.2/libio/iostrerror.c	Mon Dec 20 08:54:29 1993
***************
*** 1,3 ****
--- 1,5 ----
+ #ifndef __linux__
+ 
  /* This should be replaced by whatever namespace-clean
     version of strerror you have available. */
  
***************
*** 9,11 ****
--- 11,15 ----
  {
    return strerror(errnum);
  }
+ 
+ #endif
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iotempname.c libg++-2.5.3linux.2/libio/iotempname.c
*** libg++-2.5.3/libio/iotempname.c	Wed Dec 31 19:00:00 1969
--- libg++-2.5.3linux.2/libio/iotempname.c	Mon Dec 20 08:54:30 1993
***************
*** 0 ****
--- 1,238 ----
+ /* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ 
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+ 
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ Library General Public License for more details.
+ 
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB.  If
+ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+ Cambridge, MA 02139, USA.  */
+ 
+ #include <ansidecl.h>
+ #include <errno.h>
+ #ifdef __STDC__
+ #include <stddef.h>
+ #endif
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include "libioP.h"
+ #include "stdio.h"
+ 
+ #ifndef _IO_open
+ #define _IO_open open
+ #endif
+ 
+ #ifndef _IO_close
+ #define _IO_close close
+ #endif
+ 
+ #ifndef _IO_stat
+ #define _IO_stat stat
+ #endif
+ 
+ #ifndef _IO_getpid
+ #define _IO_getpid getpid
+ #endif
+ 
+ #ifndef _IO_geteuid
+ #define _IO_geteuid geteuid
+ #endif
+ 
+ /* Return nonzero if DIR is an existent directory.  */
+ static int
+ DEFUN(diraccess, (dir), CONST char *dir)
+ {
+   struct stat buf;
+   _IO_uid_t euid;
+ 
+   if (_IO_stat(dir, &buf) != 0 || !S_ISDIR(buf.st_mode)) return 0;
+ 
+   /* That is going to be tough. */
+ 
+   euid = _IO_geteuid ();
+   
+   /* super user */
+   if (!euid) return 1;
+ 
+   if (euid == buf.st_uid)
+     return ((buf.st_mode & S_IWUSR) && (buf.st_mode & S_IXUSR));
+ 
+   if (_IO_getegid () == buf.st_gid)
+     return ((buf.st_mode & S_IWGRP) && (buf.st_mode & S_IXGRP));
+ 
+   return ((buf.st_mode & S_IWOTH) && (buf.st_mode & S_IXOTH));
+ }
+ 
+ 
+ /* Return nonzero if FILE exists.  */
+ static int
+ DEFUN(exists, (file), CONST char *file)
+ {
+   /* We can stat the file even if we can't read its data.  */
+   struct stat st;
+   int save = errno;
+   if (_IO_stat (file, &st) == 0)
+     return 1;
+   else
+     {
+       /* We report that the file exists if stat failed for a reason other
+ 	 than nonexistence.  In this case, it may or may not exist, and we
+ 	 don't know; but reporting that it does exist will never cause any
+ 	 trouble, while reporting that it doesn't exist when it does would
+ 	 violate the interface of __stdio_gen_tempname.  */
+       int exists = errno != ENOENT;
+       errno = save;
+       return exists;
+     }
+ }
+ 
+ 
+ /* These are the characters used in temporary filenames.  */
+ static CONST char letters[] =
+   "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
+ 
+ /* Generate a temporary filename and return it (in a static buffer).  If
+    STREAMPTR is not NULL, open a stream "w+b" on the file and set
+    *STREAMPTR to it.  If DIR_SEARCH is nonzero, DIR and PFX are used as
+    described for tempnam.  If not, a temporary filename in P_tmpdir with no
+    special prefix is generated.  If LENPTR is not NULL, *LENPTR is set the
+    to length (including the terminating '\0') of the resultant filename,
+    which is returned.  This goes through a cyclic pattern of all possible
+    filenames consisting of five decimal digits of the current pid and three
+    of the characters in `letters'.  Data for tempnam and tmpnam is kept
+    separate, but when tempnam is using P_tmpdir and no prefix (i.e, it is
+    identical to tmpnam), the same data is used.  Each potential filename is
+    tested for an already-existing file of the same name, and no name of an
+    existing file will be returned.  When the cycle reaches its end
+    (12345ZZZ), NULL is returned.  */
+ char *
+ DEFUN(_IO_gen_tempname, (dir, pfx, dir_search, lenptr, streamptr),
+       CONST char *dir AND CONST char *pfx AND
+       int dir_search AND _IO_size_t *lenptr AND
+       _IO_FILE **streamptr)
+ {
+   int saverrno = errno;
+   static CONST char tmpdir[] = P_tmpdir;
+   static struct
+     {
+       unsigned char digits [4];
+     } infos[2], *info;
+   static char buf[FILENAME_MAX];
+   static _IO_pid_t oldpid = (pid_t) 0;
+   _IO_pid_t pid = _IO_getpid();
+   register _IO_size_t len, plen, dlen;
+   int i, carry;
+ 
+   if (dir_search)
+     {
+       register CONST char *d = getenv("TMPDIR");
+       if (d != NULL && !diraccess(d))
+ 	d = NULL;
+       if (d == NULL && dir != NULL && diraccess(dir))
+ 	d = dir;
+       if (d == NULL && diraccess(tmpdir))
+ 	d = tmpdir;
+       if (d == NULL && diraccess("/tmp"))
+ 	d = "/tmp";
+       if (d == NULL)
+ 	{
+ 	  errno = ENOENT;
+ 	  return NULL;
+ 	}
+       dir = d;
+     }
+   else
+     dir = tmpdir;
+ 
+   dlen = strlen (dir);
+ 
+   /* Remove trailing slashes from the directory name.  */
+   while (dlen > 1 && dir[dlen - 1] == '/')
+     --dlen;
+ 
+   if (pfx != NULL && *pfx != '\0')
+     {
+       plen = strlen(pfx);
+       if (plen > 5)
+ 	plen = 5;
+     }
+   else
+     plen = 0;
+ 
+   if (dir != tmpdir && !strcmp(dir, tmpdir))
+     dir = tmpdir;
+   info = &infos[(plen == 0 && dir == tmpdir) ? 1 : 0];
+ 
+   if (pid != oldpid)
+     {
+       oldpid = pid;
+       for (i = 0; i < sizeof (info->digits); i++)
+ 	infos[0].digits[i] = infos[1].digits[i] = 0;
+     }
+ 
+   len = dlen + 1 + plen + 5;
+   for (;;)
+     {
+       if (info->digits [sizeof (info->digits) - 1])
+ 	{
+ 	  errno = EEXIST;
+ 	  return NULL;
+ 	}
+ 
+       if ((sizeof (buf) - sizeof (info->digits)) < len ||
+ 		sprintf(buf, "%.*s/%.*s%.5d", (int) dlen, dir,
+ 		(int) plen, pfx, pid % 100000) != (int) len)
+ 	return NULL;
+ 
+       /* Get the last part of string */
+       for (i = 0; i < sizeof (info->digits) - 1; i++)
+         buf [len++] = letters [info->digits [i]];
+       buf [len] = '\0';
+ 
+       /* Always return a unique string.  */
+       carry = ++info->digits [0] / (sizeof (letters) - 1);
+       info->digits [0] %= (sizeof (letters) - 1);
+       for (i = 1; i < sizeof (info->digits); i++) {
+ 	  info->digits [i] += carry;
+ 	  carry = info->digits [i] / (sizeof (letters) - 1);
+ 	  info->digits [i] %= (sizeof (letters) - 1);
+       }
+ 
+       if (streamptr != NULL)
+ 	{
+ 	  int fd = _IO_open (buf, O_RDWR|O_CREAT|O_EXCL, 0666);
+ 	  if (fd >= 0)
+ 	    {
+ 	      *streamptr = _IO_fdopen (fd, "w+b");
+ 	      if (*streamptr == NULL)
+ 		{
+ 		  int save = errno;
+ 		  (void) _IO_close (fd);
+ 		  errno = save;
+ 		  return NULL;
+ 		}
+ 	      break;
+ 	    }
+ 	}
+       else if (!exists (buf))
+ 	break;
+     }
+ 
+   errno = saverrno;
+ 
+   if (lenptr != NULL)
+     *lenptr = len + 1;
+   return buf;
+ }
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/ioungetc.c libg++-2.5.3linux.2/libio/ioungetc.c
*** libg++-2.5.3/libio/ioungetc.c	Mon Sep 27 17:46:35 1993
--- libg++-2.5.3linux.2/libio/ioungetc.c	Mon Feb 14 10:06:16 1994
***************
*** 29,34 ****
--- 29,35 ----
       int c;
       _IO_FILE *fp;
  {
+   CHECK_FILE(fp, EOF);
    COERCE_FILE(fp);
    if (c == EOF)
      return EOF;
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iovfprintf.c libg++-2.5.3linux.2/libio/iovfprintf.c
*** libg++-2.5.3/libio/iovfprintf.c	Wed Dec 22 06:40:01 1993
--- libg++-2.5.3linux.2/libio/iovfprintf.c	Mon Feb 14 10:39:04 1994
***************
*** 129,134 ****
--- 129,138 ----
    hp->_IO_write_base = buf;
    hp->_IO_write_ptr = buf;
    hp->_IO_write_end = buf+_IO_BUFSIZ;
+ 
+   /* TG: add because of Checker */
+   hp->_IO_file_flags = _IO_MAGIC|(_IO_IS_FILEBUF+_IO_NO_READS);
+ 
    hp->_jumps = &_IO_helper_jumps;
    
    /* Now print to helper instead. */
***************
*** 148,154 ****
  #include "floatio.h"
  #define	BUF		(MAXEXP+MAXFRACT+1)	/* + decimal point */
  #define	DEFPREC		6
! extern double modf _PARAMS((double, double*));
  
  #else /* no FLOATING_POINT */
  
--- 152,158 ----
  #include "floatio.h"
  #define	BUF		(MAXEXP+MAXFRACT+1)	/* + decimal point */
  #define	DEFPREC		6
! extern double modf __P((double, double*));
  
  #else /* no FLOATING_POINT */
  
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iovfscanf.c libg++-2.5.3linux.2/libio/iovfscanf.c
*** libg++-2.5.3/libio/iovfscanf.c	Wed Dec 22 06:40:01 1993
--- libg++-2.5.3linux.2/libio/iovfscanf.c	Mon Dec 20 08:54:30 1993
***************
*** 74,79 ****
--- 74,80 ----
  #define	SUPPRESS	0x08	/* suppress assignment */
  #define	POINTER		0x10	/* weird %p pointer (`fake hex') */
  #define	NOSKIP		0x20	/* do not skip blanks */
+ #define	WIDTH		0x40	/* width */
  
  /*
   * The following are used in numeric conversions only:
***************
*** 101,109 ****
  #define u_char unsigned char
  #define u_long unsigned long
  
! extern u_long strtoul _PARAMS((const char*, char**, int));
! extern long strtol _PARAMS((const char*, char**, int));
! static const u_char *__sccl _PARAMS((char *tab, const u_char *fmt));
  #ifndef USE_DTOA
  extern double atof();
  #endif
--- 102,110 ----
  #define u_char unsigned char
  #define u_long unsigned long
  
! extern u_long strtoul __P((const char*, char**, int));
! extern long strtol __P((const char*, char**, int));
! static const u_char *__sccl __P((char *tab, const u_char *fmt));
  #ifndef USE_DTOA
  extern double atof();
  #endif
***************
*** 123,135 ****
  	register _IO_ssize_t width;	/* field width, or 0 */
  	register char *p;	/* points into all kinds of strings */
  	register int n;		/* handy integer */
! 	register int flags;	/* flags as defined above */
  	register char *p0;	/* saves original value of p when necessary */
  	int nassigned;		/* number of fields assigned */
  	int nread;		/* number of characters consumed from fp */
  	/* Assignments to base and ccfn are just to suppress warnings from gcc.*/
  	int base = 0;		/* base argument to strtol/strtoul */
! 	typedef u_long (*strtoulfn) _PARAMS((const char*, char**, int));
  	strtoulfn ccfn = 0;
  	/* conversion function (strtol/strtoul) */
  	char ccltab[256];	/* character class table for %[...] */
--- 124,136 ----
  	register _IO_ssize_t width;	/* field width, or 0 */
  	register char *p;	/* points into all kinds of strings */
  	register int n;		/* handy integer */
! 	register int flags = 0;	/* flags as defined above */
  	register char *p0;	/* saves original value of p when necessary */
  	int nassigned;		/* number of fields assigned */
  	int nread;		/* number of characters consumed from fp */
  	/* Assignments to base and ccfn are just to suppress warnings from gcc.*/
  	int base = 0;		/* base argument to strtol/strtoul */
! 	typedef u_long (*strtoulfn) __P((const char*, char**, int));
  	strtoulfn ccfn = 0;
  	/* conversion function (strtol/strtoul) */
  	char ccltab[256];	/* character class table for %[...] */
***************
*** 149,157 ****
  		if (isspace(c)) {
  			for (;;) {
  			        c = _IO_getc(fp);
! 				if (c == EOF) {
! 				  seen_eof++;
! 				  break;
  				}
  				if (!isspace(c)) {
  				    _IO_ungetc (c, fp);
--- 150,159 ----
  		if (isspace(c)) {
  			for (;;) {
  			        c = _IO_getc(fp);
! 				if (c == EOF)
! 				{
! 				   seen_eof++;
! 				   break;
  				}
  				if (!isspace(c)) {
  				    _IO_ungetc (c, fp);
***************
*** 184,203 ****
  			continue;
  
  		case '*':
! 			flags |= SUPPRESS;
  			goto again;
  		case 'l':
  			flags |= LONG;
  			goto again;
  		case 'L':
  			flags |= LONGDBL;
  			goto again;
  		case 'h':
  			flags |= SHORT;
  			goto again;
  
  		case '0': case '1': case '2': case '3': case '4':
  		case '5': case '6': case '7': case '8': case '9':
  			width = width * 10 + c - '0';
  			goto again;
  
--- 186,211 ----
  			continue;
  
  		case '*':
! 			if (flags) goto control_failure;
! 			flags = SUPPRESS;
  			goto again;
  		case 'l':
+ 			if (flags & ~(SUPPRESS | WIDTH)) goto control_failure;
  			flags |= LONG;
  			goto again;
  		case 'L':
+ 			if (flags & ~(SUPPRESS | WIDTH)) goto control_failure;
  			flags |= LONGDBL;
  			goto again;
  		case 'h':
+ 			if (flags & ~(SUPPRESS | WIDTH)) goto control_failure;
  			flags |= SHORT;
  			goto again;
  
  		case '0': case '1': case '2': case '3': case '4':
  		case '5': case '6': case '7': case '8': case '9':
+ 			if (flags & ~(SUPPRESS | WIDTH)) goto control_failure;
+ 			flags |= WIDTH;
  			width = width * 10 + c - '0';
  			goto again;
  
***************
*** 666,671 ****
--- 674,680 ----
  	}
  eof_failure:
  	seen_eof++;
+ control_failure:
  input_failure:
  	if (nassigned == 0)
  	    nassigned = -1;
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/isgetline.cc libg++-2.5.3linux.2/libio/isgetline.cc
*** libg++-2.5.3/libio/isgetline.cc	Fri Oct 22 00:54:32 1993
--- libg++-2.5.3linux.2/libio/isgetline.cc	Tue Feb 22 14:33:30 1994
***************
*** 29,66 ****
  istream& istream::getline(char* buf, int len, char delim)
  {
    _gcount = 0;
    if (ipfx1())
      {
        streambuf *sb = rdbuf();
!       long count = _IO_getline(sb, buf, len, delim, -1);
!       if (count == len-1)
! 	set(ios::failbit);
!       else {
! 	int ch = sb->sbumpc();
! 	if (ch == EOF)
! 	  set(ios::failbit|ios::eofbit);
! 	else if (ch == (unsigned char)delim)
! 	  count++;
! 	else
  	  sb->sungetc(); // Leave delimiter unread.
!       }
        _gcount = count;
      }
    return *this;
  }
  
  istream& istream::get(char* buf, int len, char delim)
  {
    _gcount = 0;
    if (ipfx1())
      {
        streambuf *sbuf = rdbuf();
!       long count = _IO_getline(sbuf, buf, len, delim, -1);
!       if (count < 0 || (count == 0 && sbuf->sgetc() == EOF))
  	set(ios::failbit|ios::eofbit);
        else
  	_gcount = count;
      }
    return *this;
  }
  
--- 29,75 ----
  istream& istream::getline(char* buf, int len, char delim)
  {
    _gcount = 0;
+   if (len <= 0)
+     {
+       set(ios::failbit);
+       return *this;
+     }
    if (ipfx1())
      {
        streambuf *sb = rdbuf();
!       _IO_size_t count = _IO_getline(sb, buf, len - 1, delim, -1);
!       int ch = sb->sbumpc();
!       if (ch == EOF)
! 	set(ios::failbit|ios::eofbit);
!       else if (ch != (unsigned char)delim)
! 	{
! 	  set(ios::failbit);
  	  sb->sungetc(); // Leave delimiter unread.
! 	}
        _gcount = count;
      }
+   buf[_gcount] = '\0';
    return *this;
  }
  
  istream& istream::get(char* buf, int len, char delim)
  {
    _gcount = 0;
+   if (len <= 0)
+     {
+       set(ios::failbit);
+       return *this;
+     }
    if (ipfx1())
      {
        streambuf *sbuf = rdbuf();
!       long count = _IO_getline(sbuf, buf, len - 1, delim, -1);
!       if (count == 0 && sbuf->sgetc() == EOF)
  	set(ios::failbit|ios::eofbit);
        else
  	_gcount = count;
      }
+   buf[_gcount] = '\0';
    return *this;
  }
  
***************
*** 75,87 ****
  
  char *_sb_readline (streambuf *sb, long& total, char terminator) 
  {
!     char buf[CHUNK_SIZE+1];
      char *ptr;
      int ch;
      
!     long count = sb->sgetline(buf, CHUNK_SIZE+1, terminator, -1);
!     if (count == EOF)
! 	return NULL;
      ch = sb->sbumpc();
      long old_total = total;
      total += count;
--- 84,94 ----
  
  char *_sb_readline (streambuf *sb, long& total, char terminator) 
  {
!     char buf[CHUNK_SIZE];
      char *ptr;
      int ch;
      
!     _IO_size_t count = _IO_getline(sb, buf, CHUNK_SIZE, terminator, -1);
      ch = sb->sbumpc();
      long old_total = total;
      total += count;
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/libio.h libg++-2.5.3linux.2/libio/libio.h
*** libg++-2.5.3/libio/libio.h	Fri Nov 26 17:05:49 1993
--- libg++-2.5.3linux.2/libio/libio.h	Tue Feb 22 14:38:26 1994
***************
*** 39,45 ****
--- 39,47 ----
  #define _IO_ssize_t _G_ssize_t
  #define _IO_off_t _G_off_t
  #define _IO_pid_t _G_pid_t
+ #define _IO_uid_t _G_uid_t
  #define _IO_HAVE_SYS_WAIT _G_HAVE_SYS_WAIT
+ #define _IO_HAVE_ST_BLKSIZE _G_HAVE_ST_BLKSIZE
  #define _IO_BUFSIZ _G_BUFSIZ
  #define _IO_va_list _G_va_list
  
***************
*** 58,73 ****
  typedef _IO_fpos_t _IO_pos_t;
  #endif
  
! #ifndef _PARAMS
! #ifdef __STDC__
! #define _PARAMS(paramlist) paramlist
! #else
! #define _PARAMS(paramlist) ()
! #endif
! #endif /*!_PARAMS*/
! #ifndef __STDC__
! #define const
! #endif
  #define USE_DTOA
  
  #if 0
--- 60,67 ----
  typedef _IO_fpos_t _IO_pos_t;
  #endif
  
! #include <sys/cdefs.h>
! 
  #define USE_DTOA
  
  #if 0
***************
*** 213,219 ****
  
  struct _IO_FILE_plus {
    _IO_FILE _file;
!   const void *_vtable;
  };
  
  extern struct _IO_FILE_plus _IO_stdin_, _IO_stdout_, _IO_stderr_;
--- 207,213 ----
  
  struct _IO_FILE_plus {
    _IO_FILE _file;
!   __const void *_vtable;
  };
  
  extern struct _IO_FILE_plus _IO_stdin_, _IO_stdout_, _IO_stderr_;
***************
*** 225,234 ****
  extern "C" {
  #endif
  
! extern int __underflow _PARAMS((_IO_FILE*));
! extern int __overflow _PARAMS((_IO_FILE*, int));
  
! extern unsigned __adjust_column _PARAMS((unsigned start, const char *line, int count));
  
  #define _IO_getc(_fp) \
         ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end \
--- 219,228 ----
  extern "C" {
  #endif
  
! extern int __underflow __P((_IO_FILE*));
! extern int __overflow __P((_IO_FILE*, int));
  
! extern unsigned __adjust_column __P((unsigned start, __const char *line, int count));
  
  #define _IO_getc(_fp) \
         ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end \
***************
*** 241,255 ****
  
  #define _IO_putc(_ch, _fp) \
     (((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end) \
!     ? __overflow(_fp, (unsigned char)_ch) \
!     : (unsigned char)(*(_fp)->_IO_write_ptr++ = _ch))
  
! extern int _IO_vfscanf _PARAMS((_IO_FILE*, const char*, _IO_va_list, int*));
! extern int _IO_vfprintf _PARAMS((_IO_FILE*, const char*, _IO_va_list));
! extern _IO_ssize_t _IO_padn _PARAMS((_IO_FILE *, int, _IO_ssize_t));
! extern _IO_size_t _IO_sgetn _PARAMS((_IO_FILE *, void*, _IO_size_t));
  
! extern void _IO_free_backup_area _PARAMS((_IO_FILE*));
  
  #ifdef __cplusplus
  }
--- 235,253 ----
  
  #define _IO_putc(_ch, _fp) \
     (((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end) \
!     ? __overflow(_fp, (unsigned char)(_ch)) \
!     : (unsigned char)(*(_fp)->_IO_write_ptr++ = (_ch)))
  
! /* This one is for Emacs. */
! #define _IO_PENDING_OUTPUT_COUNT(_fp)	\
! 	((_fp)->_IO_write_ptr - (_fp)->_IO_write_base)
! 
! extern int _IO_vfscanf __P((_IO_FILE*, __const char*, _IO_va_list, int*));
! extern int _IO_vfprintf __P((_IO_FILE*, __const char*, _IO_va_list));
! extern _IO_ssize_t _IO_padn __P((_IO_FILE *, int, _IO_ssize_t));
! extern _IO_size_t _IO_sgetn __P((_IO_FILE *, void*, _IO_size_t));
  
! extern void _IO_free_backup_area __P((_IO_FILE*));
  
  #ifdef __cplusplus
  }
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/libioP.h libg++-2.5.3linux.2/libio/libioP.h
*** libg++-2.5.3/libio/libioP.h	Wed Dec 22 06:40:01 1993
--- libg++-2.5.3linux.2/libio/libioP.h	Sun Feb 13 22:03:08 1994
***************
*** 29,34 ****
--- 29,44 ----
  
  #include "iolibio.h"
  
+ /* Include those system dependent file. */
+ 
+ #ifdef _LIBIO_CONFIG_H
+ #include _LIBIO_CONFIG_H
+ #endif
+ 
+ #ifdef __STDC__
+ #include <stdlib.h>
+ #endif
+ 
  #ifdef __cplusplus
  extern "C" {
  #endif
***************
*** 42,68 ****
       read and write positions. */
    _IO_seek_not_in = 4,	/* Don't move read posistion. */
    _IO_seek_not_out = 8,	/* Don't move write posistion. */
!   _IO_seek_pos_ignored = 16 /* Result is ignored (except EOF) */
  } _IO_seekflags;
  
! typedef int (*_IO_overflow_t) _PARAMS((_IO_FILE*, int));
! typedef int (*_IO_underflow_t) _PARAMS((_IO_FILE*));
! typedef _IO_size_t (*_IO_xsputn_t) _PARAMS((_IO_FILE*,const void*,_IO_size_t));
! typedef _IO_size_t (*_IO_xsgetn_t) _PARAMS((_IO_FILE*, void*, _IO_size_t));
! typedef _IO_ssize_t (*_IO_read_t) _PARAMS((_IO_FILE*, void*, _IO_ssize_t));
! typedef _IO_ssize_t (*_IO_write_t) _PARAMS((_IO_FILE*,const void*,_IO_ssize_t));
! typedef int (*_IO_stat_t) _PARAMS((_IO_FILE*, void*));
! typedef _IO_fpos_t (*_IO_seek_t) _PARAMS((_IO_FILE*, _IO_off_t, int));
! typedef int (*_IO_doallocate_t) _PARAMS((_IO_FILE*));
! typedef int (*_IO_pbackfail_t) _PARAMS((_IO_FILE*, int));
! typedef int (*_IO_setbuf_t) _PARAMS((_IO_FILE*, char *, _IO_ssize_t));
! typedef int (*_IO_sync_t) _PARAMS((_IO_FILE*));
! typedef void (*_IO_finish_t) _PARAMS((_IO_FILE*)); /* finalize */
! typedef int (*_IO_close_t) _PARAMS((_IO_FILE*)); /* finalize */
! typedef _IO_fpos_t (*_IO_seekoff_t) _PARAMS((_IO_FILE*, _IO_off_t, _IO_seekflags));
  
  /* The _IO_seek_cur and _IO_seek_end options are not allowed. */
! typedef _IO_fpos_t (*_IO_seekpos_t) _PARAMS((_IO_FILE*, _IO_fpos_t, _IO_seekflags));
  
  struct _IO_jump_t {
      _IO_overflow_t __overflow;
--- 52,78 ----
       read and write positions. */
    _IO_seek_not_in = 4,	/* Don't move read posistion. */
    _IO_seek_not_out = 8,	/* Don't move write posistion. */
!   _IO_seek_pos_ignored = 16, /* Result is ignored (except EOF) */
  } _IO_seekflags;
  
! typedef int (*_IO_overflow_t) __P((_IO_FILE*, int));
! typedef int (*_IO_underflow_t) __P((_IO_FILE*));
! typedef _IO_size_t (*_IO_xsputn_t) __P((_IO_FILE*,const void*,_IO_size_t));
! typedef _IO_size_t (*_IO_xsgetn_t) __P((_IO_FILE*, void*, _IO_size_t));
! typedef _IO_ssize_t (*_IO_read_t) __P((_IO_FILE*, void*, _IO_ssize_t));
! typedef _IO_ssize_t (*_IO_write_t) __P((_IO_FILE*,const void*,_IO_ssize_t));
! typedef int (*_IO_stat_t) __P((_IO_FILE*, void*));
! typedef _IO_fpos_t (*_IO_seek_t) __P((_IO_FILE*, _IO_off_t, int));
! typedef int (*_IO_doallocate_t) __P((_IO_FILE*));
! typedef int (*_IO_pbackfail_t) __P((_IO_FILE*, int));
! typedef int (*_IO_setbuf_t) __P((_IO_FILE*, char *, _IO_ssize_t));
! typedef int (*_IO_sync_t) __P((_IO_FILE*));
! typedef void (*_IO_finish_t) __P((_IO_FILE*)); /* finalize */
! typedef int (*_IO_close_t) __P((_IO_FILE*)); /* finalize */
! typedef _IO_fpos_t (*_IO_seekoff_t) __P((_IO_FILE*, _IO_off_t, _IO_seekflags));
  
  /* The _IO_seek_cur and _IO_seek_end options are not allowed. */
! typedef _IO_fpos_t (*_IO_seekpos_t) __P((_IO_FILE*, _IO_fpos_t, _IO_seekflags));
  
  struct _IO_jump_t {
      _IO_overflow_t __overflow;
***************
*** 89,141 ****
  
  /* Generic functions */
  
! extern _IO_fpos_t _IO_seekoff _PARAMS((_IO_FILE*, _IO_off_t, _IO_seekflags));
! extern _IO_fpos_t _IO_seekpos _PARAMS((_IO_FILE*, _IO_fpos_t, _IO_seekflags));
  
! extern int _IO_switch_to_get_mode _PARAMS((_IO_FILE*));
! extern void _IO_init _PARAMS((_IO_FILE*, int));
! extern int _IO_sputbackc _PARAMS((_IO_FILE*, int));
! extern int _IO_sungetc _PARAMS((_IO_FILE*));
! extern void _IO_un_link _PARAMS((_IO_FILE*));
! extern void _IO_link_in _PARAMS((_IO_FILE *));
! extern void _IO_doallocbuf _PARAMS((_IO_FILE*));
! extern void _IO_unsave_markers _PARAMS((_IO_FILE*));
! extern void _IO_setb _PARAMS((_IO_FILE*, char*, char*, int));
! extern unsigned _IO_adjust_column _PARAMS((unsigned, const char *, int));
  #define _IO_sputn(__fp, __s, __n) (__fp->_jumps->__xsputn(__fp, __s, __n))
  
  /* Marker-related function. */
  
! extern void _IO_init_marker _PARAMS((struct _IO_marker *, _IO_FILE *));
! extern void _IO_remove_marker _PARAMS((struct _IO_marker*));
! extern int _IO_marker_difference _PARAMS((struct _IO_marker *, struct _IO_marker *));
! extern int _IO_marker_delta _PARAMS((struct _IO_marker *));
! extern int _IO_seekmark _PARAMS((_IO_FILE *, struct _IO_marker *, int));
  
  /* Default jumptable functions. */
  
! extern int _IO_default_underflow _PARAMS((_IO_FILE*));
! extern int _IO_default_doallocate _PARAMS((_IO_FILE*));
! extern void _IO_default_finish _PARAMS((_IO_FILE *));
! extern int _IO_default_pbackfail _PARAMS((_IO_FILE*, int));
! extern int _IO_default_setbuf _PARAMS((_IO_FILE *, char*, _IO_ssize_t));
! extern _IO_size_t _IO_default_xsputn _PARAMS((_IO_FILE *, const void*, _IO_size_t));
! extern _IO_size_t _IO_default_xsgetn _PARAMS((_IO_FILE *, void*, _IO_size_t));
! extern _IO_fpos_t _IO_default_seekoff _PARAMS((_IO_FILE*, _IO_off_t, _IO_seekflags));
! extern _IO_fpos_t _IO_default_seekpos _PARAMS((_IO_FILE*, _IO_fpos_t, _IO_seekflags));
! extern _IO_ssize_t _IO_default_write _PARAMS((_IO_FILE*,const void*,_IO_ssize_t));
! extern _IO_ssize_t _IO_default_read _PARAMS((_IO_FILE*, void*, _IO_ssize_t));
! extern int _IO_default_stat _PARAMS((_IO_FILE*, void*));
! extern _IO_fpos_t _IO_default_seek _PARAMS((_IO_FILE*, _IO_off_t, int));
! extern int _IO_default_sync _PARAMS((_IO_FILE*));
  #define _IO_default_close ((_IO_close_t)_IO_default_sync)
  
  extern struct _IO_jump_t _IO_file_jumps;
  extern struct _IO_jump_t _IO_proc_jumps;
  extern struct _IO_jump_t _IO_str_jumps;
! extern int _IO_do_write _PARAMS((_IO_FILE*, const char*, _IO_size_t));
! extern int _IO_flush_all _PARAMS(());
! extern void _IO_flush_all_linebuffered _PARAMS(());
  
  #define _IO_do_flush(_f) \
    _IO_do_write(_f, _f->_IO_write_base, _f->_IO_write_ptr-_f->_IO_write_base)
--- 99,160 ----
  
  /* Generic functions */
  
! extern _IO_fpos_t _IO_seekoff __P((_IO_FILE*, _IO_off_t, _IO_seekflags));
! extern _IO_fpos_t _IO_seekpos __P((_IO_FILE*, _IO_fpos_t, _IO_seekflags));
  
! extern int _IO_switch_to_get_mode __P((_IO_FILE*));
! extern void _IO_init __P((_IO_FILE*, int));
! extern int _IO_sputbackc __P((_IO_FILE*, int));
! extern int _IO_sungetc __P((_IO_FILE*));
! extern void _IO_un_link __P((_IO_FILE*));
! extern void _IO_link_in __P((_IO_FILE *));
! extern void _IO_doallocbuf __P((_IO_FILE*));
! extern void _IO_unsave_markers __P((_IO_FILE*));
! extern void _IO_setb __P((_IO_FILE*, char*, char*, int));
! extern unsigned _IO_adjust_column __P((unsigned, const char *, int));
  #define _IO_sputn(__fp, __s, __n) (__fp->_jumps->__xsputn(__fp, __s, __n))
  
+ extern int _IO_ignore __P((_IO_FILE *, _IO_size_t));
+ extern void _IO_switch_to_main_get_area __P((_IO_FILE *));
+ extern void _IO_switch_to_backup_area  __P((_IO_FILE *));
+ extern int _IO_sync __P((_IO_FILE *));
+ extern int _IO_get_column __P((_IO_FILE *));
+ extern int _IO_set_column __P((_IO_FILE *, int));
+ extern int _IO_nobackup_pbackfail __P((_IO_FILE *, int));
+ 
  /* Marker-related function. */
  
! extern void _IO_init_marker __P((struct _IO_marker *, _IO_FILE *));
! extern void _IO_remove_marker __P((struct _IO_marker*));
! extern int _IO_marker_difference __P((struct _IO_marker *, struct _IO_marker *));
! extern int _IO_marker_delta __P((struct _IO_marker *));
! extern int _IO_seekmark __P((_IO_FILE *, struct _IO_marker *, int));
! extern _IO_size_t _IO_least_marker __P((_IO_FILE *));
  
  /* Default jumptable functions. */
  
! extern int _IO_default_underflow __P((_IO_FILE*));
! extern int _IO_default_doallocate __P((_IO_FILE*));
! extern void _IO_default_finish __P((_IO_FILE *));
! extern int _IO_default_pbackfail __P((_IO_FILE*, int));
! extern int _IO_default_setbuf __P((_IO_FILE *, char*, _IO_ssize_t));
! extern _IO_size_t _IO_default_xsputn __P((_IO_FILE *, const void*, _IO_size_t));
! extern _IO_size_t _IO_default_xsgetn __P((_IO_FILE *, void*, _IO_size_t));
! extern _IO_fpos_t _IO_default_seekoff __P((_IO_FILE*, _IO_off_t, _IO_seekflags));
! extern _IO_fpos_t _IO_default_seekpos __P((_IO_FILE*, _IO_fpos_t, _IO_seekflags));
! extern _IO_ssize_t _IO_default_write __P((_IO_FILE*,const void*,_IO_ssize_t));
! extern _IO_ssize_t _IO_default_read __P((_IO_FILE*, void*, _IO_ssize_t));
! extern int _IO_default_stat __P((_IO_FILE*, void*));
! extern _IO_fpos_t _IO_default_seek __P((_IO_FILE*, _IO_off_t, int));
! extern int _IO_default_sync __P((_IO_FILE*));
  #define _IO_default_close ((_IO_close_t)_IO_default_sync)
  
  extern struct _IO_jump_t _IO_file_jumps;
  extern struct _IO_jump_t _IO_proc_jumps;
  extern struct _IO_jump_t _IO_str_jumps;
! extern int _IO_do_write __P((_IO_FILE*, const char*, _IO_size_t));
! extern int _IO_flush_all __P((void));
! extern void _IO_flush_all_linebuffered __P((void));
  
  #define _IO_do_flush(_f) \
    _IO_do_write(_f, _f->_IO_write_base, _f->_IO_write_ptr-_f->_IO_write_base)
***************
*** 153,205 ****
  
  /* Jumptable functions for files. */
  
! extern int _IO_file_doallocate _PARAMS((_IO_FILE*));
! extern int _IO_file_setbuf _PARAMS((_IO_FILE *, char*, _IO_ssize_t));
! extern _IO_fpos_t _IO_file_seekoff _PARAMS((_IO_FILE*, _IO_off_t, _IO_seekflags));
! extern _IO_size_t _IO_file_xsputn _PARAMS((_IO_FILE*,const void*,_IO_size_t));
! extern int _IO_file_stat _PARAMS((_IO_FILE*, void*));
! extern int _IO_file_close _PARAMS((_IO_FILE*));
! extern int _IO_file_underflow _PARAMS((_IO_FILE *));
! extern int _IO_file_overflow _PARAMS((_IO_FILE *, int));
  #define _IO_file_is_open(__fp) ((__fp)->_fileno >= 0)
! extern void _IO_file_init _PARAMS((_IO_FILE*));
! extern _IO_FILE* _IO_file_attach _PARAMS((_IO_FILE*, int));
! extern _IO_FILE* _IO_file_fopen _PARAMS((_IO_FILE*, const char*, const char*));
! extern _IO_ssize_t _IO_file_write _PARAMS((_IO_FILE*,const void*,_IO_ssize_t));
! extern _IO_ssize_t _IO_file_read _PARAMS((_IO_FILE*, void*, _IO_ssize_t));
! extern int _IO_file_sync _PARAMS((_IO_FILE*));
! extern int _IO_file_close_it _PARAMS((_IO_FILE*));
! extern _IO_fpos_t _IO_file_seek _PARAMS((_IO_FILE *, _IO_off_t, int));
! extern void _IO_file_finish _PARAMS((_IO_FILE*));
  
  /* Other file functions. */
! extern _IO_FILE* _IO_file_attach _PARAMS((_IO_FILE *, int));
  
  /* Jumptable functions for proc_files. */
! extern _IO_FILE* _IO_proc_open _PARAMS((_IO_FILE*, const char*, const char *));
! extern int _IO_proc_close _PARAMS((_IO_FILE*));
  
  /* Jumptable functions for strfiles. */
! extern int _IO_str_underflow _PARAMS((_IO_FILE*));
! extern int _IO_str_overflow _PARAMS((_IO_FILE *, int));
! extern int _IO_str_pbackfail _PARAMS((_IO_FILE*, int));
! extern _IO_fpos_t _IO_str_seekoff _PARAMS((_IO_FILE*,_IO_off_t,_IO_seekflags));
  
  /* Other strfile functions */
! extern void _IO_str_init_static _PARAMS((_IO_FILE *, char*, int, char*));
! extern void _IO_str_init_readonly _PARAMS((_IO_FILE *, const char*, int));
! extern _IO_ssize_t _IO_str_count _PARAMS ((_IO_FILE*));
! 
! extern _IO_size_t _IO_getline _PARAMS((_IO_FILE*,char*,_IO_size_t,int,int));
! extern double _IO_strtod _PARAMS((const char *, char **));
! extern char * _IO_dtoa _PARAMS((double __d, int __mode, int __ndigits,
  				int *__decpt, int *__sign, char **__rve));
! extern int _IO_outfloat _PARAMS((double __value, _IO_FILE *__sb, int __type,
  				 int __width, int __precision, int __flags,
  				 int __sign_mode, int __fill));
  
  extern _IO_FILE *_IO_list_all;
  extern void (*_IO_cleanup_registration_needed)();
  
  #ifndef EOF
  #define EOF (-1)
--- 172,232 ----
  
  /* Jumptable functions for files. */
  
! extern int _IO_file_doallocate __P((_IO_FILE*));
! extern int _IO_file_setbuf __P((_IO_FILE *, char*, _IO_ssize_t));
! extern _IO_fpos_t _IO_file_seekoff __P((_IO_FILE*, _IO_off_t, _IO_seekflags));
! extern _IO_size_t _IO_file_xsputn __P((_IO_FILE*,const void*,_IO_size_t));
! extern int _IO_file_stat __P((_IO_FILE*, void*));
! extern int _IO_file_close __P((_IO_FILE*));
! extern int _IO_file_underflow __P((_IO_FILE *));
! extern int _IO_file_overflow __P((_IO_FILE *, int));
  #define _IO_file_is_open(__fp) ((__fp)->_fileno >= 0)
! extern void _IO_file_init __P((_IO_FILE*));
! extern _IO_FILE* _IO_file_attach __P((_IO_FILE*, int));
! extern _IO_FILE* _IO_file_fopen __P((_IO_FILE*, const char*, const char*));
! extern _IO_ssize_t _IO_file_write __P((_IO_FILE*,const void*,_IO_ssize_t));
! extern _IO_ssize_t _IO_file_read __P((_IO_FILE*, void*, _IO_ssize_t));
! extern int _IO_file_sync __P((_IO_FILE*));
! extern int _IO_file_close_it __P((_IO_FILE*));
! extern _IO_fpos_t _IO_file_seek __P((_IO_FILE *, _IO_off_t, int));
! extern void _IO_file_finish __P((_IO_FILE*));
  
  /* Other file functions. */
! extern _IO_FILE* _IO_file_attach __P((_IO_FILE *, int));
  
  /* Jumptable functions for proc_files. */
! extern _IO_FILE* _IO_proc_open __P((_IO_FILE*, const char*, const char *));
! extern int _IO_proc_close __P((_IO_FILE*));
  
  /* Jumptable functions for strfiles. */
! extern int _IO_str_underflow __P((_IO_FILE*));
! extern int _IO_str_overflow __P((_IO_FILE *, int));
! extern int _IO_str_pbackfail __P((_IO_FILE*, int));
! extern _IO_fpos_t _IO_str_seekoff __P((_IO_FILE*,_IO_off_t,_IO_seekflags));
  
  /* Other strfile functions */
! extern void _IO_str_init_static __P((_IO_FILE *, char*, int, char*));
! extern void _IO_str_init_readonly __P((_IO_FILE *, const char*, int));
! extern _IO_ssize_t _IO_str_count __P ((_IO_FILE*));
! extern void _IO_str_finish __P((_IO_FILE *));
! 
! extern _IO_size_t _IO_getline __P((_IO_FILE*,char*,_IO_size_t,int,int));
! extern double _IO_strtod __P((const char *, char **));
! extern char * _IO_dtoa __P((double __d, int __mode, int __ndigits,
  				int *__decpt, int *__sign, char **__rve));
! extern int _IO_outfloat __P((double __value, _IO_FILE *__sb, int __type,
  				 int __width, int __precision, int __flags,
  				 int __sign_mode, int __fill));
  
+ extern char *_IO_gen_tempname __P ((const char *__dir,
+ 				 const char *__pfx, int __dir_search,
+ 				 _IO_size_t * __lenptr,
+ 				 _IO_FILE **__streamptr));
+  
  extern _IO_FILE *_IO_list_all;
+ #ifndef __linux__
  extern void (*_IO_cleanup_registration_needed)();
+ #endif
  
  #ifndef EOF
  #define EOF (-1)
***************
*** 219,229 ****
  #define OS_FSTAT fstat
  #endif
  struct stat;
! extern _IO_ssize_t _IO_read _PARAMS((int, void*, _IO_size_t));
! extern _IO_ssize_t _IO_write _PARAMS((int, const void*, _IO_size_t));
! extern _IO_off_t _IO_lseek _PARAMS((int, _IO_off_t, int));
! extern int _IO_close _PARAMS((int));
! extern int _IO_fstat _PARAMS((int, struct stat *));
  
  /* Operations on _IO_fpos_t.
     Normally, these are trivial, but we provide hooks for configurations
--- 246,256 ----
  #define OS_FSTAT fstat
  #endif
  struct stat;
! extern _IO_ssize_t _IO_read __P((int, void*, _IO_size_t));
! extern _IO_ssize_t _IO_write __P((int, const void*, _IO_size_t));
! extern _IO_off_t _IO_lseek __P((int, _IO_off_t, int));
! extern int _IO_close __P((int));
! extern int _IO_fstat __P((int, struct stat *));
  
  /* Operations on _IO_fpos_t.
     Normally, these are trivial, but we provide hooks for configurations
***************
*** 257,262 ****
--- 284,320 ----
  #define _IO_va_start(args, last) va_start(args)
  #endif
  
+ /* Just do a sanity check. We assume no one uses old stdio. It
+  * won't work all the time.
+  */
+ #if 1
+ #ifdef EIO
+ #define CHECK_FILE(FILE,RET) \
+ 	if ((FILE) == NULL || \
+ 		((FILE)->_IO_file_flags & _IO_MAGIC_MASK) != _IO_MAGIC) \
+ 	{ errno = EIO; return RET; }
+ #else
+ #define CHECK_FILE(FILE,RET) \
+ 	if ((FILE) == NULL || \
+ 		((FILE)->_IO_file_flags & _IO_MAGIC_MASK) != _IO_MAGIC) \
+ 	{ return RET; }
+ #endif
+ #else
+ #ifdef EIO
+ #define CHECK_FILE(FILE,RET) \
+ 	if ((FILE) == NULL || ( \
+ 		((FILE)->_IO_file_flags & _IO_MAGIC_MASK) != _IO_MAGIC \
+ 		&& ((FILE)->_IO_file_flags & _IO_MAGIC_MASK) != _OLD_IO_MAGIC)) \
+ 	{ errno = EIO; return RET; }
+ #else
+ #define CHECK_FILE(FILE,RET) \
+ 	if ((FILE) == NULL || ( \
+ 		((FILE)->_IO_file_flags & _IO_MAGIC_MASK) != _IO_MAGIC \
+ 		&& ((FILE)->_IO_file_flags & _IO_MAGIC_MASK) != _OLD_IO_MAGIC)) \
+ 	{ return RET; }
+ #endif
+ #endif
+ 
  #if 1
  #define COERCE_FILE(FILE) /* Nothing */
  #else
***************
*** 265,267 ****
--- 323,328 ----
    (((FILE)->_IO_file_flags & _IO_MAGIC_MASK) == _OLD_MAGIC_MASK \
      && (FILE) = *(FILE**)&((int*)fp)[1])
  #endif
+ 
+ #define CLOSED_FILEBUF_FLAGS \
+   (_IO_IS_FILEBUF+_IO_NO_READS+_IO_NO_WRITES+_IO_TIED_PUT_GET)
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/procbuf.h libg++-2.5.3linux.2/libio/procbuf.h
*** libg++-2.5.3/libio/procbuf.h	Fri Oct 22 00:54:38 1993
--- libg++-2.5.3linux.2/libio/procbuf.h	Mon Dec 20 08:54:32 1993
***************
*** 29,34 ****
--- 29,35 ----
  class procbuf : public filebuf {
      /* Following fields must match those in struct _IO_proc_file */
      _IO_pid_t _pid;
+     struct _IO_proc_file *_next;
    public:
      procbuf() : filebuf() { }
      procbuf(const char *command, int mode);
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/ChangeLog libg++-2.5.3linux.2/libio/stdio/ChangeLog
*** libg++-2.5.3/libio/stdio/ChangeLog	Fri Nov 26 21:48:20 1993
--- libg++-2.5.3linux.2/libio/stdio/ChangeLog	Mon Feb 14 10:09:18 1994
***************
*** 1,3 ****
--- 1,66 ----
+ Sat Jan  1 21:13:59 1994  H.J. Lu (hlu@nighthawk)
+ 
+ 	* clearerr.c:
+ 	* feof.c:
+ 	* ferror.c:
+ 	* fgetc.c:
+ 	* fileno.c:
+ 	* fputc.c:
+ 	* freopen.c:
+ 	* fseek.c:
+ 	* getw.c:
+ 	* putw.c:
+ 	* rewind.c:
+ 	* setfileno.c:
+ 	* vfprintf.c:
+ 	* vfscanf.c: check fp with CHECK_FILE(FILE,RET).
+ 
+ Sun Dec 19 12:36:10 1993  H.J. Lu (hlu@nighthawk)
+ 
+         * stdio.h: don't define __P since it is taken care of
+ 	  in libio.h. change const to __const.
+ 		   
+ Thu Dec  2 22:25:31 1993  H.J. Lu (hlu@nighthawk)
+ 
+ 	* Makefile.in (STDIO_OBJECTS): add stdio.o, remove.o, tmpfile.o
+ 	  and tmpnam.o.  change popen.o to pclose.o.
+ 
+ 	* stdio.h: include <features.h> if __linux__ is defined.
+ 	  <features.h> should be copied from glibc to help put libio
+ 	  into glibc.
+ 	  change _ARGS to __P.
+ 	  check if __P is already defined.
+ 	  declare psignal (), _sys_errlist, _sys_siglist if
+ 	  __GNU_LIBRARY__ is defined.
+ 	  add getw () and putw ().
+ 	  (getc, getchar, putc, putchar): new declaration. move macros after
+ 	  the declaration.
+ 	  (tempnam): new declaration.
+ 	  define TMP_MAX as 238328. see ../iotempname.c.
+ 
+ 	* popen.c: removed.
+ 
+ 	* pclose.c: renamed from popen.c.
+ 
+ 	* stdio.c: new file for stdin, stdout and stderr.
+ 
+ 	* vfprintf.c:
+ 	* fdopen.c: add alias for Linux.
+ 
+ 	* remove.c: new file for remove ().
+ 
+ 	* tempnam.c: new file for tempnam ().
+ 
+ 	* tmpfile.c: new file for tmpfile ().
+ 
+ 	* tmpnam.c: new file for tmpnam ().
+ 
+ 	* configure.in: Linux uses aliases instead of
+ 	  -D_IO_foo=foo. Move #define _HAVE_GNU_LD to the
+ 	  first line.
+ 	  remove the TODO list. rename () should be a system call.
+ 	  (stdio_renames): add popen if __linux__ is defined.
+ 
  Fri Nov 26 13:26:35 1993  Per Bothner  (bothner@kalessin.cygnus.com)
  
  	Bunch of little changes, many from H.J. Lu <hjl@nynexst.com>.
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/Makefile.in libg++-2.5.3linux.2/libio/stdio/Makefile.in
*** libg++-2.5.3/libio/stdio/Makefile.in	Fri Nov 26 21:48:21 1993
--- libg++-2.5.3linux.2/libio/stdio/Makefile.in	Mon Dec 20 08:54:32 1993
***************
*** 9,17 ****
  STDIO_OBJECTS = $(STDIO_RENAMED_OBJECTS) \
    clearerr.o fdopen.o feof.o ferror.o fgetc.o fileno.o \
    fputc.o freopen.o fseek.o getc.o getchar.o getw.o \
!   popen.o putc.o putchar.o putw.o rewind.o \
    setbuf.c setfileno.o setlinebuf.o \
!   vfprintf.o vfscanf.o vprintf.o vscanf.o
  
  CC_FOR_STDIO=$(CC)
  CINCLUDES = -I. -I$(srcdir) -I.. -I$(srcdir)/..
--- 9,18 ----
  STDIO_OBJECTS = $(STDIO_RENAMED_OBJECTS) \
    clearerr.o fdopen.o feof.o ferror.o fgetc.o fileno.o \
    fputc.o freopen.o fseek.o getc.o getchar.o getw.o \
!   pclose.o putc.o putchar.o putw.o rewind.o \
    setbuf.c setfileno.o setlinebuf.o \
!   vfprintf.o vfscanf.o vprintf.o vscanf.o \
!   remove.o tmpfile.o tmpnam.o stdio.o
  
  CC_FOR_STDIO=$(CC)
  CINCLUDES = -I. -I$(srcdir) -I.. -I$(srcdir)/..
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/clearerr.c libg++-2.5.3linux.2/libio/stdio/clearerr.c
*** libg++-2.5.3/libio/stdio/clearerr.c	Mon Oct  4 20:39:42 1993
--- libg++-2.5.3linux.2/libio/stdio/clearerr.c	Tue Jan 18 11:20:58 1994
***************
*** 5,10 ****
--- 5,11 ----
  clearerr(fp)
       FILE* fp;
  {
+   CHECK_FILE(fp, );
    COERCE_FILE(fp);
    _IO_clearerr(fp);
  }
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/configure.in libg++-2.5.3linux.2/libio/stdio/configure.in
*** libg++-2.5.3/libio/stdio/configure.in	Thu Oct 14 19:13:08 1993
--- libg++-2.5.3linux.2/libio/stdio/configure.in	Mon Dec 20 08:54:33 1993
***************
*** 24,43 ****
  # NOTE: We assume a C compiler that where -o with -c works.
  # But these files are not built by default anyway ...
  
- # TODO: remove rename tmpfile tmpnam
- 
  stdio_renames="fclose fflush fgetpos fgets fopen fprintf fputs fread \
    fscanf fsetpos ftell fwrite gets perror printf puts \
    scanf setbuffer setvbuf sprintf sscanf ungetc vsprintf vsscanf"
  stdio_objects=""
  
! for file in $stdio_renames ; do
!   cat >>Makefile <<EOF
  $file.o: \$(srcdir)/../io$file.c
  	\$(CC_FOR_STDIO) \$(CFLAGS) \$(CINCLUDES) -c \\
  	  \$(srcdir)/../io$file.c -D_IO_$file=$file -o $file.o
  EOF
!   stdio_objects="$stdio_objects $file.o"
! done
  sed -e "/STDIO_RENAMED_OBJECTS =/s/=.*/=${stdio_objects}/" <Makefile >tmp
  mv -f tmp Makefile
--- 24,62 ----
  # NOTE: We assume a C compiler that where -o with -c works.
  # But these files are not built by default anyway ...
  
  stdio_renames="fclose fflush fgetpos fgets fopen fprintf fputs fread \
    fscanf fsetpos ftell fwrite gets perror printf puts \
    scanf setbuffer setvbuf sprintf sscanf ungetc vsprintf vsscanf"
  stdio_objects=""
  
! case "${target}" in
! *linux*)
!   # Linux uses aliases.
!   stdio_renames="$stdio_renames popen"
!   for file in $stdio_renames ; do
!     cat >>Makefile <<EOF
! $file.o:
! 	echo "#undef HAVE_GNU_LD" > $file.c
! 	echo "#define HAVE_GNU_LD" >> $file.c
! 	echo "#include <gnu-stabs.h>" >> $file.c
! 	echo "#undef $file" >> $file.c
! 	echo "symbol_alias (_IO_$file, $file);" >> $file.c
! 	\$(CC_FOR_STDIO) \$(CFLAGS) \$(CINCLUDES) -c $file.c
! 	/bin/rm -f $file.c
! EOF
!     stdio_objects="$stdio_objects $file.o"
!   done
!   ;;
! 
! *-*-*)
!   for file in $stdio_renames ; do
!     cat >>Makefile <<EOF
  $file.o: \$(srcdir)/../io$file.c
  	\$(CC_FOR_STDIO) \$(CFLAGS) \$(CINCLUDES) -c \\
  	  \$(srcdir)/../io$file.c -D_IO_$file=$file -o $file.o
  EOF
!     stdio_objects="$stdio_objects $file.o"
!   done
! esac
  sed -e "/STDIO_RENAMED_OBJECTS =/s/=.*/=${stdio_objects}/" <Makefile >tmp
  mv -f tmp Makefile
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/fdopen.c libg++-2.5.3linux.2/libio/stdio/fdopen.c
*** libg++-2.5.3/libio/stdio/fdopen.c	Fri Aug 20 01:59:58 1993
--- libg++-2.5.3linux.2/libio/stdio/fdopen.c	Mon Dec 20 08:54:33 1993
***************
*** 1,5 ****
--- 1,15 ----
  #include "libioP.h"
  
+ #ifdef __linux__
+  
+ #undef HAVE_GNU_LD
+ #define HAVE_GNU_LD
+ #include <gnu-stabs.h>
+   
+ symbol_alias (_IO_fdopen, fdopen);
+    
+ #else
+ 
  _IO_FILE *
  fdopen (fd, mode)
       int fd;
***************
*** 7,9 ****
--- 17,21 ----
  {
    return _IO_fdopen (fd, mode);
  }
+ 
+ #endif
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/feof.c libg++-2.5.3linux.2/libio/stdio/feof.c
*** libg++-2.5.3/libio/stdio/feof.c	Fri Nov 26 21:48:22 1993
--- libg++-2.5.3linux.2/libio/stdio/feof.c	Tue Jan 18 11:20:58 1994
***************
*** 29,34 ****
--- 29,35 ----
  feof(fp)
       _IO_FILE* fp;
  {
+   CHECK_FILE(fp, EOF);
    COERCE_FILE(fp);
    return _IO_feof(fp);
  }
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/ferror.c libg++-2.5.3linux.2/libio/stdio/ferror.c
*** libg++-2.5.3/libio/stdio/ferror.c	Sat Nov 27 01:34:24 1993
--- libg++-2.5.3linux.2/libio/stdio/ferror.c	Tue Jan 18 11:20:58 1994
***************
*** 5,10 ****
--- 5,11 ----
  ferror(fp)
       FILE* fp;
  {
+   CHECK_FILE(fp, EOF);
    COERCE_FILE(fp);
    return _IO_ferror(fp);
  }
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/fgetc.c libg++-2.5.3linux.2/libio/stdio/fgetc.c
*** libg++-2.5.3/libio/stdio/fgetc.c	Mon Oct  4 20:39:48 1993
--- libg++-2.5.3linux.2/libio/stdio/fgetc.c	Mon Feb 14 10:07:38 1994
***************
*** 5,10 ****
--- 5,11 ----
  fgetc(fp)
       FILE *fp;
  {
+   CHECK_FILE(fp, EOF);
    COERCE_FILE(fp);
    return _IO_getc(fp);
  }
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/fileno.c libg++-2.5.3linux.2/libio/stdio/fileno.c
*** libg++-2.5.3/libio/stdio/fileno.c	Fri Nov 26 21:48:23 1993
--- libg++-2.5.3linux.2/libio/stdio/fileno.c	Tue Jan 18 11:20:58 1994
***************
*** 5,10 ****
--- 5,11 ----
  fileno(fp)
       _IO_FILE* fp;
  {
+   CHECK_FILE(fp, EOF);
    COERCE_FILE(fp);
    if (!(fp->_flags & _IO_IS_FILEBUF))
      return EOF;
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/fputc.c libg++-2.5.3linux.2/libio/stdio/fputc.c
*** libg++-2.5.3/libio/stdio/fputc.c	Fri Nov 26 21:48:23 1993
--- libg++-2.5.3linux.2/libio/stdio/fputc.c	Mon Feb 14 10:07:48 1994
***************
*** 6,11 ****
--- 6,12 ----
       int c;
       FILE *fp;
  {
+   CHECK_FILE(fp, EOF);
    COERCE_FILE(fp);
    return _IO_putc(c, fp);
  }
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/freopen.c libg++-2.5.3linux.2/libio/stdio/freopen.c
*** libg++-2.5.3/libio/stdio/freopen.c	Mon Oct  4 20:39:54 1993
--- libg++-2.5.3linux.2/libio/stdio/freopen.c	Sun Feb 13 22:23:04 1994
***************
*** 7,12 ****
--- 7,13 ----
       const char* mode;
       FILE* fp;
  {
+   CHECK_FILE(fp, NULL);
    COERCE_FILE(fp);
    if (!(fp->_flags & _IO_IS_FILEBUF))
      return NULL;
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/fseek.c libg++-2.5.3linux.2/libio/stdio/fseek.c
*** libg++-2.5.3/libio/stdio/fseek.c	Fri Nov 26 21:48:24 1993
--- libg++-2.5.3linux.2/libio/stdio/fseek.c	Sun Feb 13 22:24:04 1994
***************
*** 7,12 ****
--- 7,13 ----
       long int offset;
       int whence;
  {
+   CHECK_FILE(fp, -1);
    COERCE_FILE(fp);
    return _IO_fseek(fp, offset, whence);
  }
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/getw.c libg++-2.5.3linux.2/libio/stdio/getw.c
*** libg++-2.5.3/libio/stdio/getw.c	Fri Nov 26 21:48:27 1993
--- libg++-2.5.3linux.2/libio/stdio/getw.c	Mon Feb 14 10:08:08 1994
***************
*** 7,12 ****
--- 7,13 ----
  {
    int w;
    _IO_size_t bytes_read;
+   CHECK_FILE(fp, EOF);
    COERCE_FILE(fp);
    bytes_read = _IO_sgetn (fp, (char*)&w, sizeof(w));
    return sizeof(w) == bytes_read ? w : EOF;
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/pclose.c libg++-2.5.3linux.2/libio/stdio/pclose.c
*** libg++-2.5.3/libio/stdio/pclose.c	Wed Dec 31 19:00:00 1969
--- libg++-2.5.3linux.2/libio/stdio/pclose.c	Mon Dec 20 08:54:33 1993
***************
*** 0 ****
--- 1,27 ----
+ #include "libioP.h"
+ #include "stdio.h"
+ #include <errno.h>
+ 
+ #ifndef __linux__
+ 
+ FILE *
+ popen(command, mode)
+      const char *command; const char *mode;
+ {
+   return _IO_popen(command, mode);
+ }
+ 
+ #endif
+ 
+ int
+ pclose(fp)
+      FILE *fp;
+ {
+ #if 0
+   /* Does not actually test that stream was created by popen(). Instead,
+      it depends on the filebuf::sys_close() virtual to Do The Right Thing. */
+   if (fp is not a proc_file)
+     return -1;
+ #endif
+   return _IO_fclose(fp);
+ }
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/popen.c libg++-2.5.3linux.2/libio/stdio/popen.c
*** libg++-2.5.3/libio/stdio/popen.c	Fri Nov 26 21:48:28 1993
--- libg++-2.5.3linux.2/libio/stdio/popen.c	Mon Dec 20 08:54:34 1993
***************
*** 1,23 ****
- #include "libioP.h"
- #include "stdio.h"
- #include <errno.h>
- 
- FILE *
- popen(command, mode)
-      const char *command; const char *mode;
- {
-   return _IO_popen(command, mode);
- }
- 
- int
- pclose(fp)
-      FILE *fp;
- {
- #if 0
-   /* Does not actually test that stream was created by popen(). Instead,
-      it depends on the filebuf::sys_close() virtual to Do The Right Thing. */
-   if (fp is not a proc_file)
-     return -1;
- #endif
-   return _IO_fclose(fp);
- }
--- 0 ----
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/putw.c libg++-2.5.3linux.2/libio/stdio/putw.c
*** libg++-2.5.3/libio/stdio/putw.c	Fri Nov 26 21:48:30 1993
--- libg++-2.5.3linux.2/libio/stdio/putw.c	Mon Feb 14 10:08:54 1994
***************
*** 9,14 ****
--- 9,15 ----
       FILE *fp;
  {
    _IO_size_t written;
+   CHECK_FILE(fp, EOF);
    COERCE_FILE(fp);
    written = _IO_sputn(fp, (const char *)&w, sizeof(w));
    return written == sizeof(w) ? 0 : EOF;
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/remove.c libg++-2.5.3linux.2/libio/stdio/remove.c
*** libg++-2.5.3/libio/stdio/remove.c	Wed Dec 31 19:00:00 1969
--- libg++-2.5.3linux.2/libio/stdio/remove.c	Mon Dec 20 08:54:34 1993
***************
*** 0 ****
--- 1,39 ----
+ /* Copyright (C) 1991 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ 
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+ 
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ Library General Public License for more details.
+ 
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB.  If
+ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+ Cambridge, MA 02139, USA.  */
+ 
+ #include "libioP.h"
+ #include "stdio.h"
+ #include <unistd.h>
+ 
+ #ifdef __GNU_LIBRARY__
+ #include <ansidecl.h>
+ #include <gnu-stabs.h>
+ 
+ function_alias(remove, __unlink, int, (file),
+ 	       DEFUN(remove, (file), CONST char *file))
+ 
+ #else
+ 
+ int
+ remove (file)
+   const char *file;
+ {
+   return unlink (file);
+ }
+ 
+ #endif
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/rewind.c libg++-2.5.3linux.2/libio/stdio/rewind.c
*** libg++-2.5.3/libio/stdio/rewind.c	Fri Nov 26 21:48:31 1993
--- libg++-2.5.3linux.2/libio/stdio/rewind.c	Tue Jan 18 11:20:59 1994
***************
*** 5,10 ****
--- 5,11 ----
  rewind(fp)
       _IO_FILE* fp;
  {
+   CHECK_FILE(fp, );
    COERCE_FILE(fp);
    _IO_rewind(fp);
  }
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/setfileno.c libg++-2.5.3linux.2/libio/stdio/setfileno.c
*** libg++-2.5.3/libio/stdio/setfileno.c	Fri Nov 26 21:48:33 1993
--- libg++-2.5.3linux.2/libio/stdio/setfileno.c	Tue Jan 18 11:20:59 1994
***************
*** 11,16 ****
--- 11,17 ----
       _IO_FILE* fp;
       int fd;
  {
+   CHECK_FILE(fp, );
    COERCE_FILE(fp);
    if ((fp->_flags & _IO_IS_FILEBUF) != 0)
      fp->_fileno = fd;
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/stdio.c libg++-2.5.3linux.2/libio/stdio/stdio.c
*** libg++-2.5.3/libio/stdio/stdio.c	Wed Dec 31 19:00:00 1969
--- libg++-2.5.3linux.2/libio/stdio/stdio.c	Mon Dec 20 08:54:34 1993
***************
*** 0 ****
--- 1,12 ----
+ #include "libioP.h"
+ #include "stdio.h"
+ 
+ /* Define non-macro versions of stdin/stdout/stderr,
+  * for use by debuggers. */
+ 
+ #undef stdin
+ #undef stdout
+ #undef stderr
+ FILE* stdin = &_IO_stdin_._file;
+ FILE* stdout = &_IO_stdout_._file;
+ FILE* stderr = &_IO_stderr_._file;
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/stdio.h libg++-2.5.3linux.2/libio/stdio/stdio.h
*** libg++-2.5.3/libio/stdio/stdio.h	Mon Oct  4 20:40:07 1993
--- libg++-2.5.3linux.2/libio/stdio/stdio.h	Mon Dec 20 08:58:12 1993
***************
*** 19,25 ****
  */
  #ifndef _STDIO_H
  #define _STDIO_H
! #define _STDIO_USES_IOSTREAM
  
  #include <libio.h>
  
--- 19,30 ----
  */
  #ifndef _STDIO_H
  #define _STDIO_H
! #undef _STDIO_USES_IOSTREAM
! #define _STDIO_USES_IOSTREAM 1
! 
! #ifdef __linux__
! #include <features.h>
! #endif
  
  #include <libio.h>
  
***************
*** 68,74 ****
  
  #define FOPEN_MAX     _G_FOPEN_MAX
  #define FILENAME_MAX _G_FILENAME_MAX
! #define TMP_MAX 999 /* Only limited by filename length */
  
  #define L_ctermid     9
  #define L_cuserid     9
--- 73,82 ----
  
  #define FOPEN_MAX     _G_FOPEN_MAX
  #define FILENAME_MAX _G_FILENAME_MAX
! 
! /* limited by the number of possible unique combinations. see
!  * libio/iotempname.c for details. */
! #define TMP_MAX 238328
  
  #define L_ctermid     9
  #define L_cuserid     9
***************
*** 82,154 ****
  #define stdout _IO_stdout
  #define stderr _IO_stderr
  
! #define getc(fp) _IO_getc(fp)
! #define putc(c, fp) _IO_putc(c, fp)
! #define putchar(c) putc(c, stdout)
! #define getchar() getc(stdin)
  
! #ifdef __cplusplus
! extern "C" {
! #endif
  
! #if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
! #define _ARGS(args) args
! #else
! #define _ARGS(args) ()
  #endif
  
! extern void clearerr _ARGS((FILE*));
! extern int fclose _ARGS((FILE*));
! extern int feof _ARGS((FILE*));
! extern int ferror _ARGS((FILE*));
! extern int fflush _ARGS((FILE*));
! extern int fgetc _ARGS((FILE *));
! extern int fgetpos _ARGS((FILE* fp, fpos_t *pos));
! extern char* fgets _ARGS((char*, int, FILE*));
! extern FILE* fopen _ARGS((const char*, const char*));
! extern int fprintf _ARGS((FILE*, const char* format, ...));
! extern int fputc _ARGS((int, FILE*));
! extern int fputs _ARGS((const char *str, FILE *fp));
! extern size_t fread _ARGS((void*, size_t, size_t, FILE*));
! extern FILE* freopen _ARGS((const char*, const char*, FILE*));
! extern int fscanf _ARGS((FILE *fp, const char* format, ...));
! extern int fseek _ARGS((FILE* fp, long int offset, int whence));
! extern int fsetpos _ARGS((FILE* fp, const fpos_t *pos));
! extern long int ftell _ARGS((FILE* fp));
! extern size_t fwrite _ARGS((const void*, size_t, size_t, FILE*));
! extern char* gets _ARGS((char*));
! extern void perror _ARGS((const char *));
! extern int printf _ARGS((const char* format, ...));
! extern int puts _ARGS((const char *str));
! extern int remove _ARGS((const char*));
! extern int rename _ARGS((const char* _old, const char* _new));
! extern void rewind _ARGS((FILE*));
! extern int scanf _ARGS((const char* format, ...));
! extern void setbuf _ARGS((FILE*, char*));
! extern void setlinebuf _ARGS((FILE*));
! extern void setbuffer _ARGS((FILE*, char*, int));
! extern int setvbuf _ARGS((FILE*, char*, int mode, size_t size));
! extern int sprintf _ARGS((char*, const char* format, ...));
! extern int sscanf _ARGS((const char* string, const char* format, ...));
! extern FILE* tmpfile _ARGS((void));
! extern char* tmpnam _ARGS((char*));
! extern int ungetc _ARGS((int c, FILE* fp));
! extern int vfprintf _ARGS((FILE *fp, char const *fmt0, _G_va_list));
! extern int vprintf _ARGS((char const *fmt, _G_va_list));
! extern int vsprintf _ARGS((char* string, const char* format, _G_va_list));
  
! #if !defined(__STRICT_ANSI__) || defined(_POSIX_SOURCE)
! extern FILE *fdopen _ARGS((int, const char *));
! extern int fileno _ARGS((FILE*));
! extern FILE* popen _ARGS((const char*, const char*));
! extern int pclose _ARGS((FILE*));
! #endif
  
- extern int __underflow _ARGS((struct _IO_FILE*));
- extern int __overflow _ARGS((struct _IO_FILE*, int));
  
! #ifdef __cplusplus
! }
  #endif
  
  #endif /*!_STDIO_H*/
--- 90,183 ----
  #define stdout _IO_stdout
  #define stderr _IO_stderr
  
! __BEGIN_DECLS
  
! extern void clearerr __P((FILE*));
! extern int fclose __P((FILE*));
! extern int feof __P((FILE*));
! extern int ferror __P((FILE*));
! extern int fflush __P((FILE*));
! extern int fgetc __P((FILE *));
! extern int fgetpos __P((FILE* fp, fpos_t *pos));
! extern char* fgets __P((char*, int, FILE*));
! extern FILE* fopen __P((__const char*, __const char*));
! extern int fprintf __P((FILE*, __const char* format, ...));
! extern int fputc __P((int, FILE*));
! extern int fputs __P((__const char *str, FILE *fp));
! extern size_t fread __P((void*, size_t, size_t, FILE*));
! extern FILE* freopen __P((__const char*, __const char*, FILE*));
! extern int fscanf __P((FILE *fp, __const char* format, ...));
! extern int fseek __P((FILE* fp, long int offset, int whence));
! extern int fsetpos __P((FILE* fp, __const fpos_t *pos));
! extern long int ftell __P((FILE* fp));
! extern size_t fwrite __P((__const void*, size_t, size_t, FILE*));
! extern int getc __P((FILE *));
! extern int getchar __P((void));
! extern char* gets __P((char*));
! extern void perror __P((__const char *));
! extern int printf __P((__const char* format, ...));
! extern int putc __P((int, FILE *));
! extern int putchar __P((int));
! extern int puts __P((__const char *str));
! extern int remove __P((__const char*));
! extern int rename __P((__const char* _old, __const char* _new));
! extern void rewind __P((FILE*));
! extern int scanf __P((__const char* format, ...));
! extern void setbuf __P((FILE*, char*));
! extern void setlinebuf __P((FILE*));
! extern void setbuffer __P((FILE*, char*, int));
! extern int setvbuf __P((FILE*, char*, int mode, size_t size));
! extern int sprintf __P((char*, __const char* format, ...));
! extern int sscanf __P((__const char* string, __const char* format, ...));
! extern FILE* tmpfile __P((void));
! extern char* tmpnam __P((char*));
! extern int ungetc __P((int c, FILE* fp));
! extern int vfprintf __P((FILE *fp, char __const *fmt0, _G_va_list));
! extern int vprintf __P((char __const *fmt, _G_va_list));
! extern int vsprintf __P((char* string, __const char* format, _G_va_list));
  
! #if !defined(__STRICT_ANSI__) || defined(_POSIX_SOURCE)
! extern FILE *fdopen __P((int, __const char *));
! extern int fileno __P((FILE*));
! extern FILE* popen __P((__const char*, __const char*));
! extern int pclose __P((FILE*));
  #endif
  
! #if !defined(__STRICT_ANSI__)
! extern int getw __P((FILE*));
! extern int putw __P((int, FILE*));
  
! extern char* tempnam __P((__const char *__dir, __const char *__pfx));
  
  
! #ifdef __GNU_LIBRARY__
! 
! #ifdef  __USE_BSD
! extern int sys_nerr;
! extern char *sys_errlist[];
! #endif
! #ifdef  __USE_GNU
! extern int _sys_nerr;
! extern char *_sys_errlist[];
  #endif
+  
+ #ifdef  __USE_MISC
+ /* Print a message describing the meaning of the given signal number. */
+ extern void psignal __P ((int __sig, __const char *__s));
+ #endif /* Non strict ANSI and not POSIX only.  */
+ 
+ #endif /* __GNU_LIBRARY__ */
+ 
+ #endif /* __STRICT_ANSI__ */
+ 
+ extern int __underflow __P((struct _IO_FILE*));
+ extern int __overflow __P((struct _IO_FILE*, int));
+ 
+ #define getc(fp) _IO_getc(fp)
+ #define putc(c, fp) _IO_putc(c, fp)
+ #define putchar(c) putc(c, stdout)
+ #define getchar() getc(stdin)
+ 
+ __END_DECLS
  
  #endif /*!_STDIO_H*/
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/tempnam.c libg++-2.5.3linux.2/libio/stdio/tempnam.c
*** libg++-2.5.3/libio/stdio/tempnam.c	Wed Dec 31 19:00:00 1969
--- libg++-2.5.3linux.2/libio/stdio/tempnam.c	Mon Dec 20 08:54:35 1993
***************
*** 0 ****
--- 1,51 ----
+ /* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ 
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+ 
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ Library General Public License for more details.
+ 
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB.  If
+ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+ Cambridge, MA 02139, USA.  */
+ 
+ #include <ansidecl.h>
+ #include <errno.h>
+ #include <stddef.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include "libioP.h"
+ #include "stdio.h"
+ 
+ 
+ /* Generate a unique temporary filename using up to five characters of PFX
+    if it is not NULL.  The directory to put this file in is searched for
+    as follows: First the environment variable "TMPDIR" is checked.
+    If it contains the name of a writable directory, that directory is used.
+    If not and if DIR is not NULL, that value is checked.  If that fails,
+    P_tmpdir is tried and finally "/tmp".  The storage for the filename
+    is allocated by `malloc'.  */
+ char *
+ DEFUN(tempnam, (dir, pfx), CONST char *dir AND CONST char *pfx)
+ {
+   _IO_size_t len;
+   register char *s;
+   register char *t = _IO_gen_tempname(dir, pfx, 1, &len, (_IO_FILE **) NULL);
+ 
+   if (t == NULL)
+     return NULL;
+ 
+   s = (char *) malloc(len);
+   if (s == NULL)
+     return NULL;
+ 
+   (void) memcpy(s, t, len);
+   return s;
+ }
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/tmpfile.c libg++-2.5.3linux.2/libio/stdio/tmpfile.c
*** libg++-2.5.3/libio/stdio/tmpfile.c	Wed Dec 31 19:00:00 1969
--- libg++-2.5.3linux.2/libio/stdio/tmpfile.c	Mon Dec 20 08:54:35 1993
***************
*** 0 ****
--- 1,44 ----
+ /* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ 
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+ 
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ Library General Public License for more details.
+ 
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB.  If
+ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+ Cambridge, MA 02139, USA.  */
+ 
+ #include <ansidecl.h>
+ #include "stdio.h"
+ #include "libioP.h"
+ 
+ 
+ /* This returns a new stream opened on a temporary file (generated
+    by tmpnam) The file is opened with mode "w+b" (binary read/write).
+    If we couldn't generate a unique filename or the file couldn't
+    be opened, NULL is returned.  */
+ FILE *
+ DEFUN_VOID(tmpfile)
+ {
+   char *filename;
+   _IO_FILE *f;
+ 
+   filename = _IO_gen_tempname((char *) NULL, "tmpf", 0,
+ 			      (_IO_size_t *) NULL, &f);
+   if (filename == NULL)
+     return NULL;
+ 
+   /* Note that this relies on the Unix semantics that
+      a file is not really removed until it is closed.  */
+   (void) remove (filename);
+ 
+   return f;
+ }
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/tmpnam.c libg++-2.5.3linux.2/libio/stdio/tmpnam.c
*** libg++-2.5.3/libio/stdio/tmpnam.c	Wed Dec 31 19:00:00 1969
--- libg++-2.5.3linux.2/libio/stdio/tmpnam.c	Mon Dec 20 08:54:36 1993
***************
*** 0 ****
--- 1,46 ----
+ /* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ 
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+ 
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ Library General Public License for more details.
+ 
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB.  If
+ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+ Cambridge, MA 02139, USA.  */
+ 
+ #include <ansidecl.h>
+ #ifdef __STDC__
+ #include <stddef.h>
+ #endif
+ #include "stdio.h"
+ #include "libioP.h"
+ #include <string.h>
+ 
+ 
+ /* Generate a unique filename in P_tmpdir.  */
+ char *
+ DEFUN(tmpnam, (s), register char *s)
+ {
+   register char *t = _IO_gen_tempname((CONST char *) NULL,
+ 					  (CONST char *) NULL, 0,
+ 					  (_IO_size_t *) NULL,
+ 				          (_IO_FILE **) NULL);
+ 
+   if (t == NULL)
+     return NULL;
+ 
+   if (s != NULL)
+     (void) strcpy(s, t);
+   else
+     s = t;
+ 
+   return s;
+ }
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/vfprintf.c libg++-2.5.3linux.2/libio/stdio/vfprintf.c
*** libg++-2.5.3/libio/stdio/vfprintf.c	Fri Aug 20 02:00:01 1993
--- libg++-2.5.3linux.2/libio/stdio/vfprintf.c	Mon Feb 14 10:09:06 1994
***************
*** 22,27 ****
--- 22,37 ----
  This exception does not however invalidate any other reasons why
  the executable file might be covered by the GNU General Public License. */
  
+ #ifdef __linux__
+ 
+ #undef HAVE_GNU_LD
+ #define HAVE_GNU_LD
+ #include <gnu-stabs.h>
+ 
+ symbol_alias (_IO_vfprintf, vfprintf);
+ 
+ #else
+ 
  #include "libioP.h"
  
  int
***************
*** 30,35 ****
--- 40,48 ----
       char const *format;
       _IO_va_list args;
  {
+   CHECK_FILE(fp, -1);
    COERCE_FILE(fp);
    return _IO_vfprintf(fp, format, args);
  }
+ 
+ #endif
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/vfscanf.c libg++-2.5.3linux.2/libio/stdio/vfscanf.c
*** libg++-2.5.3/libio/stdio/vfscanf.c	Fri Nov 26 16:27:21 1993
--- libg++-2.5.3linux.2/libio/stdio/vfscanf.c	Mon Feb 14 10:09:14 1994
***************
*** 31,36 ****
--- 31,37 ----
       const char *format;
       _IO_va_list args;
  {
+   CHECK_FILE(fp, EOF);
    COERCE_FILE(fp);
    return _IO_vfscanf(fp, format, args, NULL);
  }
diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/strfile.h libg++-2.5.3linux.2/libio/strfile.h
*** libg++-2.5.3/libio/strfile.h	Wed Nov  3 15:00:05 1993
--- libg++-2.5.3linux.2/libio/strfile.h	Mon Dec 20 08:54:36 1993
***************
*** 27,34 ****
  Merge into  libio.h ?
  #endif
  
! typedef void *(*_IO_alloc_type) _PARAMS((_IO_size_t));
! typedef void (*_IO_free_type) _PARAMS((void*));
  
  struct _IO_str_fields
  {
--- 27,34 ----
  Merge into  libio.h ?
  #endif
  
! typedef void *(*_IO_alloc_type) __P((_IO_size_t));
! typedef void (*_IO_free_type) __P((void*));
  
  struct _IO_str_fields
  {
