aboutsummaryrefslogtreecommitdiff
path: root/contrib/libio/stdio
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2002-06-18 18:13:14 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2002-06-18 18:13:14 +0000
commitc3a1a84ac4ab349cae4edd4ea4916d441e5592d2 (patch)
tree73dad42ab84d2e1f7ae89fca2652ee78b01649af /contrib/libio/stdio
parent1b5c321d3f5e74248a590fd7e644c832368dda9d (diff)
FreeBSD is one of the OS's that does not require the use of libio with Gcc 3.1.
Notes
Notes: svn path=/head/; revision=98396
Diffstat (limited to 'contrib/libio/stdio')
-rw-r--r--contrib/libio/stdio/ChangeLog153
-rw-r--r--contrib/libio/stdio/Makefile.in35
-rw-r--r--contrib/libio/stdio/clearerr.c30
-rw-r--r--contrib/libio/stdio/clearerr_u.c28
-rw-r--r--contrib/libio/stdio/configure.in49
-rw-r--r--contrib/libio/stdio/fdopen.c9
-rw-r--r--contrib/libio/stdio/feof.c43
-rw-r--r--contrib/libio/stdio/feof_u.c37
-rw-r--r--contrib/libio/stdio/ferror.c43
-rw-r--r--contrib/libio/stdio/ferror_u.c37
-rw-r--r--contrib/libio/stdio/fgetc.c40
-rw-r--r--contrib/libio/stdio/fileno.c49
-rw-r--r--contrib/libio/stdio/fputc.c41
-rw-r--r--contrib/libio/stdio/fputc_u.c38
-rw-r--r--contrib/libio/stdio/freopen.c44
-rw-r--r--contrib/libio/stdio/fseek.c42
-rw-r--r--contrib/libio/stdio/getc.c48
-rw-r--r--contrib/libio/stdio/getc_u.c37
-rw-r--r--contrib/libio/stdio/getchar.c40
-rw-r--r--contrib/libio/stdio/getchar_u.c35
-rw-r--r--contrib/libio/stdio/getline.c13
-rw-r--r--contrib/libio/stdio/getw.c13
-rw-r--r--contrib/libio/stdio/obprintf.c168
-rw-r--r--contrib/libio/stdio/popen.c23
-rw-r--r--contrib/libio/stdio/putc.c42
-rw-r--r--contrib/libio/stdio/putc_u.c31
-rw-r--r--contrib/libio/stdio/putchar.c35
-rw-r--r--contrib/libio/stdio/putchar_u.c30
-rw-r--r--contrib/libio/stdio/putw.c15
-rw-r--r--contrib/libio/stdio/rewind.c38
-rw-r--r--contrib/libio/stdio/setbuf.c35
-rw-r--r--contrib/libio/stdio/setfileno.c17
-rw-r--r--contrib/libio/stdio/setlinebuf.c36
-rw-r--r--contrib/libio/stdio/snprintf.c51
-rw-r--r--contrib/libio/stdio/stdio.h219
-rw-r--r--contrib/libio/stdio/vasprintf.c72
-rw-r--r--contrib/libio/stdio/vfprintf.c35
-rw-r--r--contrib/libio/stdio/vfscanf.c36
-rw-r--r--contrib/libio/stdio/vprintf.c33
-rw-r--r--contrib/libio/stdio/vscanf.c41
-rw-r--r--contrib/libio/stdio/vsnprintf.c136
41 files changed, 0 insertions, 1997 deletions
diff --git a/contrib/libio/stdio/ChangeLog b/contrib/libio/stdio/ChangeLog
deleted file mode 100644
index 8ef9dcc0b3ce..000000000000
--- a/contrib/libio/stdio/ChangeLog
+++ /dev/null
@@ -1,153 +0,0 @@
-Fri Mar 16 12:46:19 GMT 2001 Bernd Schmidt (bernds@redhat.com)
-
- * gcc-2.95.3 Released.
-
-Sun Oct 24 23:54:10 PDT 1999 Jeff Law (law@cygnus.com)
-
- * gcc-2.95.2 Released.
-
-Mon Aug 16 01:29:24 PDT 1999 Jeff Law (law@cygnus.com)
-
- * gcc-2.95.1 Released.
-
-Wed Jul 28 21:39:31 PDT 1999 Jeff Law (law@cygnus.com)
-
- * gcc-2.95 Released.
-
-Sun Jul 25 23:40:51 PDT 1999 Jeff Law (law@cygnus.com)
-
- * gcc-2.95 Released.
-
-1997-09-04 16:11 Ulrich Drepper <drepper@cygnus.com>
-
- * Makefile.in (STDIO_OBJECTS): Lose feof.o and ferror.o. Add getc.o
- and putc.o.
- (stmp-libio, stmp-libiostream, stmp-io, stmp-streamlib): New rules.
-
- (iostream.list): Depend upon stmp-stdio. Add the entries
- from stdio.list to iostream.list.
- (stmp-stdio): New name for what was the stdio/stdio.list rule.
- All it now does is cd down into stdio and build stdio.list.
-
- * clearerr.c: Add copyright and lock stream before use.
- * feof.c: Likewise.
- * ferror.c: Likewise.
- * fgetc.c: Likewise.
- * fputc.c: Likewise.
- * freopen.c: Likewise.
- * fseek.c: Likewise.
- * getc.c: Likewise.
- * getchar.c: Likewise.
- * putc.c: Likewise.
- * putchar.c: Likewise.
- * rewind.c: Likewise.
-
- * setbuf.c: Update copyright.
- * setlinebuf.c: Likewise.
- * vscanf.c: Likewise.
-
- * fileno.c: Define alias fileno_unlocked. Update copyright.
-
- * clearerr_u.c: New file. Implement clearerr_unlocked function.
- * feof_u.c: New file. Implement feof_unlocked function.
- * ferror_u.c: New file. Implement ferror_unlocked function.
- * fputc_u.c: New file. Implement fputc_unlocked function.
- * getc_u.c: New file. Implement getc_unclocked function.
- * getchar_u.c: New file. Implement getchar_unclocked function.
- * putc_u.c: New file. Implement putc_unclocked function.
- * putchar_u.c: New file. Implement putchar_unclocked function.
-
- * vsnprintf.c: Rewrite according to ISO C 9X draft.
-
-Thu May 1 11:03:45 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
-
- * stdio.h (TMP_MAX): Wrap it with #ifndef for now, since it can
- get defined by <limits.h> (e.g., HP/UX and AIX).
-
-Wed Mar 12 08:51:37 1997 Gavin Koch <gavin@cygnus.com>
-
- * stdio.h: Use _IO_va_list rather than _G_va_list.
-
-Wed Jun 14 21:41:50 1995 Jason Merrill <jason@python.cygnus.com>
-
- * configure.in (LIBDIR): Set.
- (MOSTLYCLEAN): Remove pic and stamp-picdir.
- (stdio_objects): Also compile pic version.
-
- * Makefile.in (STDIO_OBJECTS): Remove getdelim.o.
-
-Wed May 10 03:05:53 1995 Jason Merrill <jason@python.cygnus.com>
-
- * vsnprintf.c (vsnprintf): Update to use _IO_JUMPS.
-
- * Makefile.in (STDIO_OBJECTS): Fix typo.
-
-Tue Oct 18 17:15:09 1994 Per Bothner <bothner@kalessin.cygnus.com>
-
- * getline.c, snprintf.c, vsnprintf.c: New files, providing
- functionality of the GNU C library.
- * Makefile.in (STDIO_OBJECTS), configure.in: Add new files.
- * stdio.h: Add new functions.
-
-Fri Oct 14 15:56:27 1994 Per Bothner (bothner@kalessin.cygnus.com)
-
- * stdio.h: Added vfscanf, vscanf, vsscanf, #ifndef __STRICT_ANSI__.
-
-Tue Aug 23 16:17:25 1994 Per Bothner (bothner@kalessin.cygnus.com)
-
- * stdio.h: Added comment, at hjl's request.
-
-Sun Aug 7 13:28:12 1994 H.J. Lu (hjl@nynexst.com)
-
- * stdio.h (getc, getchar, putc, putchar): New declarations.
- Move macros after the declarations.
-
-Fri Aug 5 18:27:21 1994 H.J. Lu (hjl@nynexst.com)
-
- * clearerr.c, rewind.c, setfileno.c:
- Add CHECK_FILE(fp, ) and remove COERCE_FILE(fp).
- * feof.c, ferror.c, fgetc.c, fileno.c, fputc.c, getw.c, putw.c,
- vfscanf.c: Add CHECK_FILE(fp, EOF) and remove COERCE_FILE(fp).
- * freopen.c: Add CHECK_FILE(fp, NULL) and remove COERCE_FILE(fp).
- * fseek.c, vfprintf.c:
- Add CHECK_FILE(fp, -1) and remove COERCE_FILE(fp).
-
-Fri May 20 13:11:58 1994 Per Bothner (bothner@kalessin.cygnus.com)
-
- * stdio.h: Rename _ARGS macro to __P for better gnlibc and
- BSD compatibility.
-
-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>.
- * feof.c, setbuf.c, vprintf.c, vcanf.c: #include <stdio.h>,
- for error checking.
- * fileno.c: #include libioP.h, not just libio.h.
- * fputc.c: Fix typo.
- * fseek.c, rewind.c: Use #include "...", not <...> ,for local files.
- * getc.c, getchar.c, putc.c, putchar.c: New files, providing
- non-macro versions of the standard macros.
- * getw.c, putw.c, setfileno.c, setlinebuf.c: New files.
- * Makefile.in (STDIO_OBJECTS): Add new files.
- * vfscanf.c: Add missing new 4th arg to _IO_vfscanf call.
-
-Thu Oct 14 16:12:07 1993 Karen Christiansen (karen@deneb.cygnus.com)
-
- * configure.in: changed mv to mv -f
-
-Mon Oct 4 17:29:23 1993 Per Bothner (bothner@kalessin.cygnus.com)
-
- * configure.in (stdio_renames): Add fgetpos, fsetpos, gets,
- perror, setbuffer, ungetc.
- * clearerr.c, ferror.c, fgetc.c, fileno.c, fputc.c, freopen.c,
- fseek.c, popen.c, rewind.c, setbuf.c: New files.
- * Makefile.in (STDIO_OBJECTS): Add new files.
- * stdio.h: Use _IO_XXX instead of _G_XXX many places.
- #include <libio.h> instead of <_stdio.h>, to get useful defs.
-
-Fri Aug 20 00:28:28 1993 Per Bothner (bothner@kalessin.cygnus.com)
-
- * feof.c, vprintf.c, vscanf.c: Converted stub functions.
- * configure.in (stdio_renamed): Removed feof.
- Added sprintf sscanf vsscanf.
- * ChangeLog.old: Copy of old libg++/iostream/stdio/ChangeLog.
diff --git a/contrib/libio/stdio/Makefile.in b/contrib/libio/stdio/Makefile.in
deleted file mode 100644
index 680c8a497a41..000000000000
--- a/contrib/libio/stdio/Makefile.in
+++ /dev/null
@@ -1,35 +0,0 @@
-srcdir = .
-
-#### package, host, target, and site dependent Makefile fragments come in here.
-##
-
-# These are compiled from the corresponding ../ioFOO.c files.
-STDIO_RENAMED_OBJECTS = ... filled in by configure ...
-# These are the files that a libc would want.
-STDIO_OBJECTS = $(STDIO_RENAMED_OBJECTS) \
- clearerr.o fdopen.o fgetc.o fileno.o \
- fputc.o freopen.o fseek.o getchar.o getline.o getw.o \
- popen.o putchar.o putw.o rewind.o \
- setbuf.o setfileno.o setlinebuf.o snprintf.o \
- vfprintf.o vfscanf.o vprintf.o vscanf.o vsnprintf.o
-
-CC_FOR_STDIO=$(CC)
-CINCLUDES = -I. -I$(srcdir) -I.. -I$(srcdir)/.. -D__USE_GNU
-
-nothing:
-
-stmp-libio: stdio.list stamp-io
-
-stamp-io:
- $(AR) $(AR_FLAGS) ../libio.a $(STDIO_OBJECTS)
- touch stmp-io
-
-stmp-libiostream: stdio.list stamp-streamlib
-
-stamp-streamlib:
- $(AR) $(AR_FLAGS) ../libiostream.a $(STDIO_OBJECTS)
- touch stmp-streamlib
-
-stdio.list: stamp-picdir $(STDIO_OBJECTS)
- @echo "$(STDIO_OBJECTS)" >stdio.list
-
diff --git a/contrib/libio/stdio/clearerr.c b/contrib/libio/stdio/clearerr.c
deleted file mode 100644
index 4776250ff8d9..000000000000
--- a/contrib/libio/stdio/clearerr.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 1995, 1996, 1997 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., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-void
-clearerr (fp)
- FILE *fp;
-{
- CHECK_FILE (fp, /*nothing*/);
- _IO_flockfile (fp);
- _IO_clearerr (fp);
- _IO_funlockfile (fp);
-}
diff --git a/contrib/libio/stdio/clearerr_u.c b/contrib/libio/stdio/clearerr_u.c
deleted file mode 100644
index 2a1ba7070bb7..000000000000
--- a/contrib/libio/stdio/clearerr_u.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright (C) 1995, 1996, 1997 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., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-void
-clearerr_unlocked (fp)
- FILE *fp;
-{
- CHECK_FILE (fp, /*nothing*/);
- _IO_clearerr (fp);
-}
diff --git a/contrib/libio/stdio/configure.in b/contrib/libio/stdio/configure.in
deleted file mode 100644
index 83cac17ebc7c..000000000000
--- a/contrib/libio/stdio/configure.in
+++ /dev/null
@@ -1,49 +0,0 @@
-# This file is a shell script fragment that supplies the information
-# necessary for a configure script to process the program in
-# this directory. For more information, look at ../configure.
-
-configdirs=
-srctrigger=stdio.h
-srcname="libio/stdio"
-package_makefile_frag=../Make.pack
-package_makefile_rules_frag=../Make.pack.r
-
-# per-host:
-
-# per-target:
-
-LIBDIR=yes
-TO_TOPDIR=../../
-ALL=nothing
-MOSTLYCLEAN='*.o pic stamp-picdir core stdio.list'
-(. ${srcdir}/../config.shared) >${package_makefile_frag} 2>${package_makefile_rules_frag}
-
-# post-target:
-
-# Certain files that are used to build a C library (such as fprintf.o)
-# are compled from the same sources as the ioXXX versions (such as ioprintf.c).
-# These lines add the appropriate rules.
-# 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 getdelim 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
- if [ -n "\$(PICFLAG)" ]; then \\
- \$(CC_FOR_STDIO) \$(CFLAGS) \$(CINCLUDES) \$(PICFLAG) -c \\
- \$(srcdir)/../io$file.c -D_IO_$file=$file -o pic/$file.o; \\
- fi
- \$(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
diff --git a/contrib/libio/stdio/fdopen.c b/contrib/libio/stdio/fdopen.c
deleted file mode 100644
index 83e026ec7f76..000000000000
--- a/contrib/libio/stdio/fdopen.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include "libioP.h"
-
-_IO_FILE *
-fdopen (fd, mode)
- int fd;
- const char *mode;
-{
- return _IO_fdopen (fd, mode);
-}
diff --git a/contrib/libio/stdio/feof.c b/contrib/libio/stdio/feof.c
deleted file mode 100644
index d06de044fba5..000000000000
--- a/contrib/libio/stdio/feof.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU IO Library.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This 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
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this library; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- As a special exception, if you link this library with files
- compiled with a GNU compiler to produce an executable, this does
- not cause the resulting executable to be covered by the GNU General
- Public License. This exception does not however invalidate any
- other reasons why the executable file might be covered by the GNU
- General Public License. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-int
-_IO_feof (fp)
- _IO_FILE* fp;
-{
- int result;
- CHECK_FILE (fp, EOF);
- _IO_flockfile (fp);
- result = _IO_feof_unlocked (fp);
- _IO_funlockfile (fp);
- return result;
-}
-
-#ifdef weak_alias
-weak_alias (_IO_feof, feof)
-#endif
diff --git a/contrib/libio/stdio/feof_u.c b/contrib/libio/stdio/feof_u.c
deleted file mode 100644
index 4773599012dd..000000000000
--- a/contrib/libio/stdio/feof_u.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU IO Library.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This 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
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this library; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- As a special exception, if you link this library with files
- compiled with a GNU compiler to produce an executable, this does
- not cause the resulting executable to be covered by the GNU General
- Public License. This exception does not however invalidate any
- other reasons why the executable file might be covered by the GNU
- General Public License. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-#undef feof_unlocked
-
-int
-feof_unlocked (fp)
- _IO_FILE* fp;
-{
- CHECK_FILE (fp, EOF);
- return _IO_feof_unlocked (fp);
-}
diff --git a/contrib/libio/stdio/ferror.c b/contrib/libio/stdio/ferror.c
deleted file mode 100644
index 855627ade66d..000000000000
--- a/contrib/libio/stdio/ferror.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU IO Library.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This 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
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this library; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- As a special exception, if you link this library with files
- compiled with a GNU compiler to produce an executable, this does
- not cause the resulting executable to be covered by the GNU General
- Public License. This exception does not however invalidate any
- other reasons why the executable file might be covered by the GNU
- General Public License. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-int
-_IO_ferror (fp)
- _IO_FILE* fp;
-{
- int result;
- CHECK_FILE (fp, EOF);
- _IO_flockfile (fp);
- result = _IO_ferror_unlocked (fp);
- _IO_funlockfile (fp);
- return result;
-}
-
-#ifdef weak_alias
-weak_alias (_IO_ferror, ferror)
-#endif
diff --git a/contrib/libio/stdio/ferror_u.c b/contrib/libio/stdio/ferror_u.c
deleted file mode 100644
index 6e13e53ddc00..000000000000
--- a/contrib/libio/stdio/ferror_u.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU IO Library.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This 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
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this library; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- As a special exception, if you link this library with files
- compiled with a GNU compiler to produce an executable, this does
- not cause the resulting executable to be covered by the GNU General
- Public License. This exception does not however invalidate any
- other reasons why the executable file might be covered by the GNU
- General Public License. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-#undef ferror_unlocked
-
-int
-ferror_unlocked (fp)
- _IO_FILE* fp;
-{
- CHECK_FILE (fp, EOF);
- return _IO_ferror_unlocked (fp);
-}
diff --git a/contrib/libio/stdio/fgetc.c b/contrib/libio/stdio/fgetc.c
deleted file mode 100644
index 174e60fa3fd2..000000000000
--- a/contrib/libio/stdio/fgetc.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
- This file is part of the GNU IO Library.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This 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
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this library; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- As a special exception, if you link this library with files
- compiled with a GNU compiler to produce an executable, this does
- not cause the resulting executable to be covered by the GNU General
- Public License. This exception does not however invalidate any
- other reasons why the executable file might be covered by the GNU
- General Public License. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-int
-fgetc (fp)
- FILE *fp;
-{
- int result;
- CHECK_FILE (fp, EOF);
- _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
- _IO_flockfile (fp);
- result = _IO_getc_unlocked (fp);
- _IO_cleanup_region_end (1);
- return result;
-}
diff --git a/contrib/libio/stdio/fileno.c b/contrib/libio/stdio/fileno.c
deleted file mode 100644
index 7ff93e6a8138..000000000000
--- a/contrib/libio/stdio/fileno.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU IO Library.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This 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
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this library; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- As a special exception, if you link this library with files
- compiled with a GNU compiler to produce an executable, this does
- not cause the resulting executable to be covered by the GNU General
- Public License. This exception does not however invalidate any
- other reasons why the executable file might be covered by the GNU
- General Public License. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-int
-fileno (fp)
- _IO_FILE* fp;
-{
- CHECK_FILE (fp, EOF);
-
- if (!(fp->_flags & _IO_IS_FILEBUF))
- return EOF;
-
- return _IO_fileno (fp);
-}
-
-#ifdef _IO_MTSAFE_IO
-#ifdef weak_alias
-/* The fileno implementation for libio does not require locking because
- it only accesses once a single variable and this is already atomic
- (at least at thread level). */
-
-weak_alias (fileno, fileno_unlocked)
-#endif
-#endif
diff --git a/contrib/libio/stdio/fputc.c b/contrib/libio/stdio/fputc.c
deleted file mode 100644
index 22cdfab9a844..000000000000
--- a/contrib/libio/stdio/fputc.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU IO Library.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This 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
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this library; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- As a special exception, if you link this library with files
- compiled with a GNU compiler to produce an executable, this does
- not cause the resulting executable to be covered by the GNU General
- Public License. This exception does not however invalidate any
- other reasons why the executable file might be covered by the GNU
- General Public License. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-int
-fputc (c, fp)
- int c;
- _IO_FILE *fp;
-{
- int result;
- CHECK_FILE (fp, EOF);
- _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
- _IO_flockfile (fp);
- result = _IO_putc_unlocked (c, fp);
- _IO_cleanup_region_end (1);
- return result;
-}
diff --git a/contrib/libio/stdio/fputc_u.c b/contrib/libio/stdio/fputc_u.c
deleted file mode 100644
index 48701e1d6cb5..000000000000
--- a/contrib/libio/stdio/fputc_u.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU IO Library.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This 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
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this library; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- As a special exception, if you link this library with files
- compiled with a GNU compiler to produce an executable, this does
- not cause the resulting executable to be covered by the GNU General
- Public License. This exception does not however invalidate any
- other reasons why the executable file might be covered by the GNU
- General Public License. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-#undef fputc_unlocked
-
-int
-fputc_unlocked (c, fp)
- int c;
- _IO_FILE *fp;
-{
- CHECK_FILE (fp, EOF);
- return _IO_putc_unlocked (c, fp);
-}
diff --git a/contrib/libio/stdio/freopen.c b/contrib/libio/stdio/freopen.c
deleted file mode 100644
index ff57d6033dc1..000000000000
--- a/contrib/libio/stdio/freopen.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU IO Library.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This 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
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this library; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- As a special exception, if you link this library with files
- compiled with a GNU compiler to produce an executable, this does
- not cause the resulting executable to be covered by the GNU General
- Public License. This exception does not however invalidate any
- other reasons why the executable file might be covered by the GNU
- General Public License. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-FILE*
-freopen (filename, mode, fp)
- const char* filename;
- const char* mode;
- FILE* fp;
-{
- FILE *result;
- CHECK_FILE (fp, NULL);
- if (!(fp->_flags & _IO_IS_FILEBUF))
- return NULL;
- _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
- _IO_flockfile (fp);
- result = _IO_freopen (filename, mode, fp);
- _IO_cleanup_region_end (1);
- return result;
-}
diff --git a/contrib/libio/stdio/fseek.c b/contrib/libio/stdio/fseek.c
deleted file mode 100644
index f2563d33f28f..000000000000
--- a/contrib/libio/stdio/fseek.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU IO Library.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This 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
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this library; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- As a special exception, if you link this library with files
- compiled with a GNU compiler to produce an executable, this does
- not cause the resulting executable to be covered by the GNU General
- Public License. This exception does not however invalidate any
- other reasons why the executable file might be covered by the GNU
- General Public License. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-int
-fseek (fp, offset, whence)
- _IO_FILE* fp;
- long int offset;
- int whence;
-{
- int result;
- CHECK_FILE (fp, -1);
- _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
- _IO_flockfile (fp);
- result = _IO_fseek (fp, offset, whence);
- _IO_cleanup_region_end (1);
- return result;
-}
diff --git a/contrib/libio/stdio/getc.c b/contrib/libio/stdio/getc.c
deleted file mode 100644
index 1dc53b5ed651..000000000000
--- a/contrib/libio/stdio/getc.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU IO Library.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This 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
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this library; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- As a special exception, if you link this library with files
- compiled with a GNU compiler to produce an executable, this does
- not cause the resulting executable to be covered by the GNU General
- Public License. This exception does not however invalidate any
- other reasons why the executable file might be covered by the GNU
- General Public License. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-#undef _IO_getc
-
-int
-_IO_getc (fp)
- FILE *fp;
-{
- int result;
- CHECK_FILE (fp, EOF);
- _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
- _IO_flockfile (fp);
- result = _IO_getc_unlocked (fp);
- _IO_cleanup_region_end (1);
- return result;
-}
-
-#undef getc
-
-#ifdef weak_alias
-weak_alias (_IO_getc, getc)
-#endif
diff --git a/contrib/libio/stdio/getc_u.c b/contrib/libio/stdio/getc_u.c
deleted file mode 100644
index f07442744661..000000000000
--- a/contrib/libio/stdio/getc_u.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU IO Library.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This 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
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this library; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- As a special exception, if you link this library with files
- compiled with a GNU compiler to produce an executable, this does
- not cause the resulting executable to be covered by the GNU General
- Public License. This exception does not however invalidate any
- other reasons why the executable file might be covered by the GNU
- General Public License. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-#undef getc_unlocked
-
-int
-getc_unlocked (fp)
- FILE *fp;
-{
- CHECK_FILE (fp, EOF);
- return _IO_getc_unlocked (fp);
-}
diff --git a/contrib/libio/stdio/getchar.c b/contrib/libio/stdio/getchar.c
deleted file mode 100644
index 93194b3912d9..000000000000
--- a/contrib/libio/stdio/getchar.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU IO Library.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This 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
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this library; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- As a special exception, if you link this library with files
- compiled with a GNU compiler to produce an executable, this does
- not cause the resulting executable to be covered by the GNU General
- Public License. This exception does not however invalidate any
- other reasons why the executable file might be covered by the GNU
- General Public License. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-#undef getchar
-
-int
-getchar ()
-{
- int result;
- _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, stdin);
- _IO_flockfile (stdin);
- result = _IO_getc_unlocked (stdin);
- _IO_cleanup_region_end (1);
- return result;
-}
diff --git a/contrib/libio/stdio/getchar_u.c b/contrib/libio/stdio/getchar_u.c
deleted file mode 100644
index bfbe56b30c09..000000000000
--- a/contrib/libio/stdio/getchar_u.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU IO Library.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This 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
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this library; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- As a special exception, if you link this library with files
- compiled with a GNU compiler to produce an executable, this does
- not cause the resulting executable to be covered by the GNU General
- Public License. This exception does not however invalidate any
- other reasons why the executable file might be covered by the GNU
- General Public License. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-#undef getchar_unlocked
-
-int
-getchar_unlocked ()
-{
- return _IO_getc_unlocked (stdin);
-}
diff --git a/contrib/libio/stdio/getline.c b/contrib/libio/stdio/getline.c
deleted file mode 100644
index 6f4b677086e8..000000000000
--- a/contrib/libio/stdio/getline.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "libioP.h"
-#include "stdio.h"
-
-/* NOTE: This geline function is different from _IO_getline. */
-
-_IO_ssize_t
-getline (lineptr, linelen, fp)
- char** lineptr;
- size_t* linelen;
- FILE* fp;
-{
- return _IO_getdelim (lineptr, linelen, '\n', fp);
-}
diff --git a/contrib/libio/stdio/getw.c b/contrib/libio/stdio/getw.c
deleted file mode 100644
index 1dfafbc1d4f4..000000000000
--- a/contrib/libio/stdio/getw.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "libioP.h"
-#include "stdio.h"
-
-int
-getw(fp)
- FILE *fp;
-{
- int w;
- _IO_size_t bytes_read;
- CHECK_FILE(fp, EOF);
- bytes_read = _IO_sgetn (fp, (char*)&w, sizeof(w));
- return sizeof(w) == bytes_read ? w : EOF;
-}
diff --git a/contrib/libio/stdio/obprintf.c b/contrib/libio/stdio/obprintf.c
deleted file mode 100644
index 6b959e455a8d..000000000000
--- a/contrib/libio/stdio/obprintf.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/* Print output of stream to given obstack.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
-
- 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., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-
-#ifdef __STDC__
-#include <stdlib.h>
-#endif
-#include "libioP.h"
-#include <string.h>
-#include <errno.h>
-#include <obstack.h>
-#include <stdarg.h>
-
-
-struct _IO_obstack_file
-{
- struct _IO_FILE file;
- const void *vtable;
- struct obstack *obstack;
-};
-
-
-static int
-_IO_obstack_overflow (_IO_FILE *fp, int c)
-{
- struct obstack *obstack = ((struct _IO_obstack_file *) fp)->obstack;
-
- /* Make room for another character. This might as well allocate a
- new chunk a memory and moves the old contents over. */
- if (c != EOF)
- obstack_1grow (obstack, c);
-
- /* Setup the buffer pointers again. */
- fp->_IO_write_base = obstack_base (obstack);
- fp->_IO_write_ptr = obstack_next_free (obstack);
- fp->_IO_write_end = fp->_IO_write_base + obstack_room (obstack);
- /* Now allocate the rest of the current chunk. */
- obstack_blank_fast (obstack, fp->_IO_write_end - fp->_IO_write_ptr);
-
- return c;
-}
-
-
-static _IO_size_t
-_IO_obstack_xsputn (_IO_FILE *fp, const void *data, _IO_size_t n)
-{
- struct obstack *obstack = ((struct _IO_obstack_file *) fp)->obstack;
-
- if (fp->_IO_write_ptr + n > fp->_IO_write_end)
- {
- /* We need some more memory. First shrink the buffer to the
- space we really currently need. */
- obstack_blank (obstack, fp->_IO_write_ptr - fp->_IO_write_end);
-
- /* Now grow for N bytes. */
- obstack_blank (obstack, n);
-
- /* Setup the buffer pointers again. */
- fp->_IO_write_base = obstack_base (obstack);
- fp->_IO_write_ptr = obstack_next_free (obstack);
- fp->_IO_write_end = (fp->_IO_write_base + obstack_room (obstack));
- /* Now allocate the rest of the current chunk. */
- obstack_blank_fast (obstack, fp->_IO_write_end - fp->_IO_write_ptr);
- }
- else
- {
- memcpy (fp->_IO_write_ptr, data, n);
- fp->_IO_write_ptr += n;
- }
-
- return n;
-}
-
-
-/* the jump table. */
-static struct _IO_jump_t _IO_obstack_jumps =
-{
- JUMP_INIT_DUMMY,
- JUMP_INIT(finish, NULL),
- JUMP_INIT(overflow, _IO_obstack_overflow),
- JUMP_INIT(underflow, NULL),
- JUMP_INIT(uflow, NULL),
- JUMP_INIT(pbackfail, NULL),
- JUMP_INIT(xsputn, _IO_obstack_xsputn),
- JUMP_INIT(xsgetn, NULL),
- JUMP_INIT(seekoff, NULL),
- JUMP_INIT(seekpos, NULL),
- JUMP_INIT(setbuf, NULL),
- JUMP_INIT(sync, NULL),
- JUMP_INIT(doallocate, NULL),
- JUMP_INIT(read, NULL),
- JUMP_INIT(write, NULL),
- JUMP_INIT(seek, NULL),
- JUMP_INIT(close, NULL),
- JUMP_INIT(stat, NULL)
-};
-
-
-int
-_IO_obstack_vprintf (struct obstack *obstack, const char *format, va_list args)
-{
- struct obstack_FILE
- {
- struct _IO_obstack_file ofile;
-#ifdef _IO_MTSAFE_IO
- _IO_lock_t lock;
-#endif
- } new_f;
- int result;
-
-#ifdef _IO_MTSAFE_IO
- new_f.ofile.file._lock = &new_f.lock;
-#endif
-
- _IO_init ((_IO_FILE *) &new_f.ofile, 0);
- _IO_JUMPS (&new_f.ofile.file) = &_IO_obstack_jumps;
- _IO_str_init_static (&new_f.ofile.file, obstack_base (obstack),
- (obstack_object_size (obstack) +
- obstack_room (obstack)), obstack_next_free (obstack));
- /* Now allocate the rest of the current chunk. */
- obstack_blank_fast (obstack,
- (new_f.ofile.file._IO_write_end
- - new_f.ofile.file._IO_write_ptr));
- new_f.ofile.obstack = obstack;
-
- result = _IO_vfprintf ((_IO_FILE *) &new_f, format, args);
-
- /* Shrink the buffer to the space we really currently need. */
- obstack_blank (obstack, (new_f.ofile.file._IO_write_ptr
- - new_f.ofile.file._IO_write_end));
-
- return result;
-}
-#ifdef weak_alias
-weak_alias (_IO_obstack_vprintf, obstack_vprintf)
-#endif
-
-
-int
-_IO_obstack_printf (struct obstack *obstack, const char *format, ...)
-{
- int result;
- va_list ap;
- va_start (ap, format);
- result = _IO_obstack_vprintf (obstack, format, ap);
- va_end (ap);
- return result;
-}
-#ifdef weak_alias
-weak_alias (_IO_obstack_printf, obstack_printf)
-#endif
diff --git a/contrib/libio/stdio/popen.c b/contrib/libio/stdio/popen.c
deleted file mode 100644
index 9f9f3f72f58e..000000000000
--- a/contrib/libio/stdio/popen.c
+++ /dev/null
@@ -1,23 +0,0 @@
-#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);
-}
diff --git a/contrib/libio/stdio/putc.c b/contrib/libio/stdio/putc.c
deleted file mode 100644
index 3c35c365f07a..000000000000
--- a/contrib/libio/stdio/putc.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Copyright (C) 1991, 1995, 1996, 1997 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., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-#undef _IO_putc
-
-int
-_IO_putc (c, fp)
- int c;
- _IO_FILE *fp;
-{
- int result;
- CHECK_FILE (fp, EOF);
- _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
- _IO_flockfile (fp);
- result = _IO_putc_unlocked (c, fp);
- _IO_cleanup_region_end (1);
- return result;
-}
-
-#undef putc
-
-#ifdef weak_alias
-weak_alias (_IO_putc, putc)
-#endif
diff --git a/contrib/libio/stdio/putc_u.c b/contrib/libio/stdio/putc_u.c
deleted file mode 100644
index b4d94e8912bc..000000000000
--- a/contrib/libio/stdio/putc_u.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright (C) 1991, 1995, 1996, 1997 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., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-#undef putc_unlocked
-
-int
-putc_unlocked (c, fp)
- int c;
- _IO_FILE *fp;
-{
- CHECK_FILE (fp, EOF);
- return _IO_putc_unlocked (c, fp);
-}
diff --git a/contrib/libio/stdio/putchar.c b/contrib/libio/stdio/putchar.c
deleted file mode 100644
index 1e1dd1376267..000000000000
--- a/contrib/libio/stdio/putchar.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright (C) 1991, 1995, 1996, 1997 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., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-#undef putchar
-
-int
-putchar (c)
- int c;
-{
- int result;
- _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile,
- _IO_stdout);
- _IO_flockfile (_IO_stdout);
- result = _IO_putc_unlocked (c, _IO_stdout);
- _IO_cleanup_region_end (1);
- return result;
-}
diff --git a/contrib/libio/stdio/putchar_u.c b/contrib/libio/stdio/putchar_u.c
deleted file mode 100644
index f8f387ac4edb..000000000000
--- a/contrib/libio/stdio/putchar_u.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 1991, 1995, 1996, 1997 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., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-#undef putchar_unlocked
-
-int
-putchar_unlocked (c)
- int c;
-{
- CHECK_FILE (stdout, EOF);
- return _IO_putc_unlocked (c, stdout);
-}
diff --git a/contrib/libio/stdio/putw.c b/contrib/libio/stdio/putw.c
deleted file mode 100644
index fd73261359cf..000000000000
--- a/contrib/libio/stdio/putw.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#include "libioP.h"
-#include "stdio.h"
-
-#undef putw
-
-int
-putw(w, fp)
- int w;
- FILE *fp;
-{
- _IO_size_t written;
- CHECK_FILE(fp, EOF);
- written = _IO_sputn(fp, (const char *)&w, sizeof(w));
- return written == sizeof(w) ? 0 : EOF;
-}
diff --git a/contrib/libio/stdio/rewind.c b/contrib/libio/stdio/rewind.c
deleted file mode 100644
index bce27575fd8a..000000000000
--- a/contrib/libio/stdio/rewind.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU IO Library.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This 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
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this library; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- As a special exception, if you link this library with files
- compiled with a GNU compiler to produce an executable, this does
- not cause the resulting executable to be covered by the GNU General
- Public License. This exception does not however invalidate any
- other reasons why the executable file might be covered by the GNU
- General Public License. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-void
-rewind (fp)
- _IO_FILE *fp;
-{
- CHECK_FILE (fp, );
- _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
- _IO_flockfile (fp);
- _IO_rewind (fp);
- _IO_cleanup_region_end (1);
-}
diff --git a/contrib/libio/stdio/setbuf.c b/contrib/libio/stdio/setbuf.c
deleted file mode 100644
index ac323a31b5ba..000000000000
--- a/contrib/libio/stdio/setbuf.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
- This file is part of the GNU IO Library.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This 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
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this library; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- As a special exception, if you link this library with files
- compiled with a GNU compiler to produce an executable, this does
- not cause the resulting executable to be covered by the GNU General
- Public License. This exception does not however invalidate any
- other reasons why the executable file might be covered by the GNU
- General Public License. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-void
-setbuf (fp, buf)
- _IO_FILE *fp;
- char *buf;
-{
- _IO_setbuffer (fp, buf, _IO_BUFSIZ);
-}
diff --git a/contrib/libio/stdio/setfileno.c b/contrib/libio/stdio/setfileno.c
deleted file mode 100644
index f7ccc6fdd666..000000000000
--- a/contrib/libio/stdio/setfileno.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Some known programs (xterm, pdksh?) non-portably change the _file
- field of s struct _iobuf. This kludge allows the same "functionality".
- This code is an undocumented feature for iostream/stdio. Use it at
- your own risk. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-void
-setfileno(fp, fd)
- _IO_FILE* fp;
- int fd;
-{
- CHECK_FILE(fp, );
- if ((fp->_flags & _IO_IS_FILEBUF) != 0)
- fp->_fileno = fd;
-}
diff --git a/contrib/libio/stdio/setlinebuf.c b/contrib/libio/stdio/setlinebuf.c
deleted file mode 100644
index e4e029faeac2..000000000000
--- a/contrib/libio/stdio/setlinebuf.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
- This file is part of the GNU IO Library.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This 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
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this library; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- As a special exception, if you link this library with files
- compiled with a GNU compiler to produce an executable, this does
- not cause the resulting executable to be covered by the GNU General
- Public License. This exception does not however invalidate any
- other reasons why the executable file might be covered by the GNU
- General Public License. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-#undef setlinebuf
-
-void
-setlinebuf (stream)
- _IO_FILE *stream;
-{
- _IO_setvbuf (stream, NULL, 1, 0);
-}
diff --git a/contrib/libio/stdio/snprintf.c b/contrib/libio/stdio/snprintf.c
deleted file mode 100644
index 5c70a4441127..000000000000
--- a/contrib/libio/stdio/snprintf.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-Copyright (C) 1994 Free Software Foundation
-
-This file is part of the GNU IO Library. This library is free
-software; you can redistribute it and/or modify it under the
-terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This 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 General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this library; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-As a special exception, if you link this library with files
-compiled with a GNU compiler to produce an executable, this does not cause
-the resulting executable to be covered by the GNU General Public License.
-This exception does not however invalidate any other reasons why
-the executable file might be covered by the GNU General Public License. */
-
-#include "libioP.h"
-
-#ifdef __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-int
-snprintf
-#ifdef __STDC__
- (char *string, _IO_size_t maxlen, const char *format, ...)
-#else
-(string, maxlen, format, va_alist)
- char *string;
- _IO_size_t maxlen;
- char *format;
- va_dcl
-#endif
-{
- int ret;
- va_list args;
- _IO_va_start(args, format);
- ret = vsnprintf(string, maxlen, format, args);
- va_end(args);
- return ret;
-}
diff --git a/contrib/libio/stdio/stdio.h b/contrib/libio/stdio/stdio.h
deleted file mode 100644
index 30065ac87149..000000000000
--- a/contrib/libio/stdio/stdio.h
+++ /dev/null
@@ -1,219 +0,0 @@
-/* This is part of the iostream/stdio library, providing -*- C -*- I/O.
- Define ANSI C stdio on top of C++ iostreams.
- Copyright (C) 1991, 1994 Free Software Foundation
-
-This 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.
-
-
-This 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 this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-/*
- * ANSI Standard: 4.9 INPUT/OUTPUT <stdio.h>
- */
-
-#ifndef _STDIO_H
-#define _STDIO_H
-#define _STDIO_USES_IOSTREAM
-
-#include <libio.h>
-
-#ifndef NULL
-#ifdef __cplusplus
-#define NULL 0
-#else
-#define NULL (void*)0
-#endif
-#endif
-
-#ifndef EOF
-#define EOF (-1)
-#endif
-#ifndef BUFSIZ
-#define BUFSIZ 1024
-#endif
-
-#define _IOFBF 0 /* Fully buffered. */
-#define _IOLBF 1 /* Line buffered. */
-#define _IONBF 2 /* No buffering. */
-
-#define SEEK_SET 0
-#define SEEK_CUR 1
-#define SEEK_END 2
-
- /* define size_t. Crud in case <sys/types.h> has defined it. */
-#if !defined(_SIZE_T) && !defined(_T_SIZE_) && !defined(_T_SIZE)
-#if !defined(__SIZE_T) && !defined(_SIZE_T_) && !defined(___int_size_t_h)
-#if !defined(_GCC_SIZE_T) && !defined(_SIZET_)
-#define _SIZE_T
-#define _T_SIZE_
-#define _T_SIZE
-#define __SIZE_T
-#define _SIZE_T_
-#define ___int_size_t_h
-#define _GCC_SIZE_T
-#define _SIZET_
-typedef _IO_size_t size_t;
-#endif
-#endif
-#endif
-
-typedef struct _IO_FILE FILE;
-typedef _IO_fpos_t fpos_t;
-
-#define FOPEN_MAX _G_FOPEN_MAX
-#define FILENAME_MAX _G_FILENAME_MAX
-#ifndef TMP_MAX
-#define TMP_MAX 999 /* Only limited by filename length */
-#endif
-
-#define L_ctermid 9
-#define L_cuserid 9
-#define P_tmpdir "/tmp"
-#define L_tmpnam 20
-
-/* For use by debuggers. These are linked in if printf or fprintf are used. */
-extern FILE *stdin, *stdout, *stderr; /* TODO */
-
-#define stdin _IO_stdin
-#define stdout _IO_stdout
-#define stderr _IO_stderr
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef __P
-#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
-#define __P(args) args
-#else
-#define __P(args) ()
-#endif
-#endif /*!__P*/
-
-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, _IO_va_list));
-extern int vprintf __P((char const *fmt, _IO_va_list));
-extern int vsprintf __P((char* string, const char* format, _IO_va_list));
-
-#ifndef __STRICT_ANSI__
-extern int vfscanf __P((FILE*, const char *, _IO_va_list));
-extern int vscanf __P((const char *, _IO_va_list));
-extern int vsscanf __P((const char *, const char *, _IO_va_list));
-#endif
-
-#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
-
-#ifdef __USE_GNU
-extern _IO_ssize_t getdelim __P ((char **, size_t *, int, FILE*));
-extern _IO_ssize_t getline __P ((char **, size_t *, FILE *));
-
-extern int snprintf __P ((char *, size_t, const char *, ...));
-extern int vsnprintf __P ((char *, size_t, const char *, _IO_va_list));
-#endif
-
-extern int __underflow __P((struct _IO_FILE*));
-extern int __overflow __P((struct _IO_FILE*, int));
-
-/* Handle locking of streams. */
-#if defined _REENTRANT || defined _THREAD_SAFE
-extern void clearerr_locked __P ((FILE *));
-extern void clearerr_unlocked __P ((FILE *));
-extern int feof_locked __P ((FILE *));
-extern int feof_unlocked __P ((FILE *));
-extern int ferror_locked __P ((FILE*));
-extern int ferror_unlocked __P ((FILE*));
-extern int fileno_locked __P ((FILE *));
-extern int fileno_unlocked __P ((FILE *));
-extern void flockfile __P ((FILE *));
-extern void funlockfile __P ((FILE *));
-extern int ftrylockfile __P ((FILE *));
-extern int fclose_unlocked __P ((FILE *));
-extern int fflush_locked __P ((FILE *));
-extern int fflush_unlocked __P ((FILE *));
-extern size_t fread_unlocked __P ((void *, size_t, size_t, FILE *));
-extern size_t fwrite_unlocked __P ((const void *, size_t, size_t, FILE *));
-
-extern int fputc_locked __P ((int, FILE*));
-extern int fputc_unlocked __P ((int, FILE*));
-extern int getc_locked __P ((FILE *));
-extern int getc_unlocked __P ((FILE *));
-extern int getchar_locked __P ((void));
-extern int getchar_unlocked __P ((void));
-extern int putc_locked __P ((int, FILE *));
-extern int putc_unlocked __P ((int, FILE *));
-extern int putchar_locked __P ((int));
-extern int putchar_unlocked __P ((int));
-
-# define getc_unlocked(fp) _IO_getc_unlocked (fp)
-# define getc_locked(fp) _IO_getc (fp)
-# define getchar_unlocked() _IO_getc_unlocked (stdin)
-# define getchar_locked() _IO_getc (stdin)
-# define putchar_unlocked(c) _IO_putc_unlocked (c, stdout)
-# define putchar_locked(c) _IO_putc (c, stdout)
-#endif /* __USE_REENTRANT */
-
-#define getc(fp) _IO_getc(fp)
-#define putc(c, fp) _IO_putc(c, fp)
-#define putchar(c) _IO_putc(c, stdout)
-#define getchar() _IO_getc(stdin)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*!_STDIO_H*/
diff --git a/contrib/libio/stdio/vasprintf.c b/contrib/libio/stdio/vasprintf.c
deleted file mode 100644
index 15513d0fca7d..000000000000
--- a/contrib/libio/stdio/vasprintf.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
- This file is part of the GNU IO Library.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This 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
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this library; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- As a special exception, if you link this library with files
- compiled with a GNU compiler to produce an executable, this does
- not cause the resulting executable to be covered by the GNU General
- Public License. This exception does not however invalidate any
- other reasons why the executable file might be covered by the GNU
- General Public License. */
-
-#include <malloc.h>
-#include "libioP.h"
-#include "stdio.h"
-#include "strfile.h"
-
-int
-_IO_vasprintf (result_ptr, format, args)
- char **result_ptr;
- const char *format;
- _IO_va_list args;
-{
- /* Initial size of the buffer to be used. Will be doubled each time an
- overflow occurs. */
- const _IO_size_t init_string_size = 100;
- char *string;
- _IO_strfile sf;
-#ifdef _IO_MTSAFE_IO
- _IO_lock_t lock;
-#endif
- int ret;
- string = (char *) malloc (init_string_size);
- if (string == NULL)
- return -1;
-#ifdef _IO_MTSAFE_IO
- sf._sbf._f._lock = &lock;
-#endif
- _IO_init ((_IO_FILE *) &sf, 0);
- _IO_JUMPS ((_IO_FILE *) &sf) = &_IO_str_jumps;
- _IO_str_init_static ((_IO_FILE *) &sf, string, init_string_size, string);
- sf._sbf._f._flags &= ~_IO_USER_BUF;
- sf._s._allocate_buffer = (_IO_alloc_type) malloc;
- sf._s._free_buffer = (_IO_free_type) free;
- ret = _IO_vfprintf ((_IO_FILE *) &sf, format, args);
- if (ret < 0)
- return ret;
- *result_ptr = (char *) realloc (sf._sbf._f._IO_buf_base,
- (sf._sbf._f._IO_write_ptr
- - sf._sbf._f._IO_write_base) +1);
- if (*result_ptr == NULL)
- *result_ptr = sf._sbf._f._IO_buf_base;
- (*result_ptr)[sf._sbf._f._IO_write_ptr-sf._sbf._f._IO_write_base] = '\0';
- return ret;
-}
-
-#ifdef weak_alias
-weak_alias (_IO_vasprintf, vasprintf)
-#endif
diff --git a/contrib/libio/stdio/vfprintf.c b/contrib/libio/stdio/vfprintf.c
deleted file mode 100644
index fca620944529..000000000000
--- a/contrib/libio/stdio/vfprintf.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-Copyright (C) 1993 Free Software Foundation
-
-This file is part of the GNU IO Library. This library is free
-software; you can redistribute it and/or modify it under the
-terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This 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 General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this library; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-As a special exception, if you link this library with files
-compiled with a GNU compiler to produce an executable, this does not cause
-the resulting executable to be covered by the GNU General Public License.
-This exception does not however invalidate any other reasons why
-the executable file might be covered by the GNU General Public License. */
-
-#include "libioP.h"
-
-int
-vfprintf(fp, format, args)
- register _IO_FILE* fp;
- char const *format;
- _IO_va_list args;
-{
- CHECK_FILE(fp, -1);
- return _IO_vfprintf(fp, format, args);
-}
diff --git a/contrib/libio/stdio/vfscanf.c b/contrib/libio/stdio/vfscanf.c
deleted file mode 100644
index 1759ee5ee017..000000000000
--- a/contrib/libio/stdio/vfscanf.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-Copyright (C) 1993 Free Software Foundation
-
-This file is part of the GNU IO Library. This library is free
-software; you can redistribute it and/or modify it under the
-terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This 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 General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this library; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-As a special exception, if you link this library with files
-compiled with a GNU compiler to produce an executable, this does not cause
-the resulting executable to be covered by the GNU General Public License.
-This exception does not however invalidate any other reasons why
-the executable file might be covered by the GNU General Public License. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-int
-vfscanf(fp, format, args)
- register _IO_FILE* fp;
- const char *format;
- _IO_va_list args;
-{
- CHECK_FILE(fp, EOF);
- return _IO_vfscanf(fp, format, args, NULL);
-}
diff --git a/contrib/libio/stdio/vprintf.c b/contrib/libio/stdio/vprintf.c
deleted file mode 100644
index 784f0d9b8dfe..000000000000
--- a/contrib/libio/stdio/vprintf.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-Copyright (C) 1993 Free Software Foundation
-
-This file is part of the GNU IO Library. This library is free
-software; you can redistribute it and/or modify it under the
-terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-This 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 General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this library; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-As a special exception, if you link this library with files
-compiled with a GNU compiler to produce an executable, this does not cause
-the resulting executable to be covered by the GNU General Public License.
-This exception does not however invalidate any other reasons why
-the executable file might be covered by the GNU General Public License. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-int vprintf(format, args)
- const char* format;
- _IO_va_list args;
-{
- return _IO_vfprintf(_IO_stdout, format, args);
-}
diff --git a/contrib/libio/stdio/vscanf.c b/contrib/libio/stdio/vscanf.c
deleted file mode 100644
index 8b92ae270e6d..000000000000
--- a/contrib/libio/stdio/vscanf.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
- This file is part of the GNU IO Library.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This 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
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this library; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- As a special exception, if you link this library with files
- compiled with a GNU compiler to produce an executable, this does
- not cause the resulting executable to be covered by the GNU General
- Public License. This exception does not however invalidate any
- other reasons why the executable file might be covered by the GNU
- General Public License. */
-
-#include "libioP.h"
-#include "stdio.h"
-
-#undef vscanf
-
-int
-_IO_vscanf (format, args)
- const char *format;
- _IO_va_list args;
-{
- return _IO_vfscanf (_IO_stdin, format, args, NULL);
-}
-
-#ifdef weak_alias
-weak_alias (_IO_vscanf, vscanf)
-#endif
diff --git a/contrib/libio/stdio/vsnprintf.c b/contrib/libio/stdio/vsnprintf.c
deleted file mode 100644
index 3f35af299ab7..000000000000
--- a/contrib/libio/stdio/vsnprintf.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
- This file is part of the GNU IO Library.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This 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
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this library; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
-
- As a special exception, if you link this library with files
- compiled with a GNU compiler to produce an executable, this does
- not cause the resulting executable to be covered by the GNU General
- Public License. This exception does not however invalidate any
- other reasons why the executable file might be covered by the GNU
- General Public License. */
-
-#include "libioP.h"
-#include "strfile.h"
-
-
-typedef struct
-{
- _IO_strfile f;
- /* This is used for the characters which do not fit in the buffer
- provided by the user. */
- char overflow_buf[64];
-} _IO_strnfile;
-
-
-static int _IO_strn_overflow __P ((_IO_FILE *fp, int c));
-
-static int
-_IO_strn_overflow (fp, c)
- _IO_FILE *fp;
- int c;
-{
- /* When we come to here this means the user supplied buffer is
- filled. But since we must return the number of characters which
- would have been written in total we must provide a buffer for
- further use. We can do this by writing on and on in the overflow
- buffer in the _IO_strnfile structure. */
- _IO_strnfile *snf = (_IO_strnfile *) fp;
-
- if (fp->_IO_buf_base != snf->overflow_buf)
- {
- /* Terminate the string. We know that there is room for at
- least one more character since we initialized the stream with
- a size to make this possible. */
- *fp->_IO_write_ptr = '\0';
-
- _IO_setb (fp, snf->overflow_buf,
- snf->overflow_buf + sizeof (snf->overflow_buf), 0);
-
- fp->_IO_write_base = snf->overflow_buf;
- fp->_IO_read_base = snf->overflow_buf;
- fp->_IO_read_ptr = snf->overflow_buf;
- fp->_IO_read_end = snf->overflow_buf + sizeof (snf->overflow_buf);
- }
-
- fp->_IO_write_ptr = snf->overflow_buf;
- fp->_IO_write_end = snf->overflow_buf;
-
- /* Since we are not really interested in storing the characters
- which do not fit in the buffer we simply ignore it. */
- return c;
-}
-
-
-static struct _IO_jump_t _IO_strn_jumps =
-{
- JUMP_INIT_DUMMY,
- JUMP_INIT(finish, _IO_str_finish),
- JUMP_INIT(overflow, _IO_strn_overflow),
- JUMP_INIT(underflow, _IO_str_underflow),
- JUMP_INIT(uflow, _IO_default_uflow),
- JUMP_INIT(pbackfail, _IO_str_pbackfail),
- JUMP_INIT(xsputn, _IO_default_xsputn),
- JUMP_INIT(xsgetn, _IO_default_xsgetn),
- JUMP_INIT(seekoff, _IO_str_seekoff),
- JUMP_INIT(seekpos, _IO_default_seekpos),
- JUMP_INIT(setbuf, _IO_default_setbuf),
- JUMP_INIT(sync, _IO_default_sync),
- JUMP_INIT(doallocate, _IO_default_doallocate),
- JUMP_INIT(read, _IO_default_read),
- JUMP_INIT(write, _IO_default_write),
- JUMP_INIT(seek, _IO_default_seek),
- JUMP_INIT(close, _IO_default_close),
- JUMP_INIT(stat, _IO_default_stat)
-};
-
-
-int
-_IO_vsnprintf (string, maxlen, format, args)
- char *string;
- _IO_size_t maxlen;
- const char *format;
- _IO_va_list args;
-{
- _IO_strnfile sf;
- int ret;
-#ifdef _IO_MTSAFE_IO
- _IO_lock_t lock;
- sf.f._sbf._f._lock = &lock;
-#endif
-
- /* We need to handle the special case where MAXLEN is 0. Use the
- overflow buffer right from the start. */
- if (maxlen == 0)
- {
- string = sf.overflow_buf;
- maxlen = sizeof (sf.overflow_buf);
- }
-
- _IO_init ((_IO_FILE *) &sf, 0);
- _IO_JUMPS ((_IO_FILE *) &sf) = &_IO_strn_jumps;
- _IO_str_init_static ((_IO_FILE *) &sf, string, maxlen - 1, string);
- ret = _IO_vfprintf ((_IO_FILE *) &sf, format, args);
-
- if (sf.f._sbf._f._IO_buf_base != sf.overflow_buf)
- *sf.f._sbf._f._IO_write_ptr = '\0';
- return ret;
-}
-
-#ifdef weak_alias
-weak_alias (_IO_vsnprintf, __vsnprintf)
-weak_alias (_IO_vsnprintf, vsnprintf)
-#endif