2024-01-01 18:12:26 +00:00
|
|
|
/* Copyright (C) 1998-2024 Free Software Foundation, Inc.
|
2001-07-06 04:58:11 +00:00
|
|
|
This file is part of the GNU C Library.
|
Update.
1998-11-23 Ulrich Drepper <drepper@cygnus.com>
* Makeconfig: Don't read sysd-sorted unless sysd-dirs is read.
Patch by Zack Weinberg.
* math/bits/mathcalls.h: Adjust comments. Remove gamma_r prototype.
* sysdeps/i386/fpu/bits/mathinline.h: Make log2 only available if
__USE_ISOC9X is defined. Provide rint optimization.
1998-11-21 H.J. Lu <hjl@gnu.org>
* libio/Versions (_IO_popen, _IO_proc_open, _IO_proc_close,
popen, pclose): Add to GLIBC_2.1.
* libio/Makefile (routines): Add oldiopopen and oldpclose.
(shared-only-routines): Likewise.
* libio/pclose.c (pclose): Make it default for GLIBC_2.1.
* libio/iopopen.c (_IO_proc_open, _IO_popen, popen,
_IO_proc_close): Likewise.
* libio/iolibio.h (_IO_new_popen, _IO_old_popen, __new_pclose,
__old_pclose): New prototypes.
* libio/libioP.h (_IO_new_file_jumps): Removed.
(_IO_old_proc_jumps): Added.
(_IO_new_proc_open, _IO_old_proc_open): New prototypes.
* libio/oldiopopen.c: New file.
* libio/oldpclose.c: New file.
1998-11-22 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nss/Makefile: Build and install getent.
* nss/getent.c: New, get entries from administrative database.
1998-11-23 09:36:06 +00:00
|
|
|
|
2001-07-06 04:58:11 +00:00
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
Update.
1998-11-23 Ulrich Drepper <drepper@cygnus.com>
* Makeconfig: Don't read sysd-sorted unless sysd-dirs is read.
Patch by Zack Weinberg.
* math/bits/mathcalls.h: Adjust comments. Remove gamma_r prototype.
* sysdeps/i386/fpu/bits/mathinline.h: Make log2 only available if
__USE_ISOC9X is defined. Provide rint optimization.
1998-11-21 H.J. Lu <hjl@gnu.org>
* libio/Versions (_IO_popen, _IO_proc_open, _IO_proc_close,
popen, pclose): Add to GLIBC_2.1.
* libio/Makefile (routines): Add oldiopopen and oldpclose.
(shared-only-routines): Likewise.
* libio/pclose.c (pclose): Make it default for GLIBC_2.1.
* libio/iopopen.c (_IO_proc_open, _IO_popen, popen,
_IO_proc_close): Likewise.
* libio/iolibio.h (_IO_new_popen, _IO_old_popen, __new_pclose,
__old_pclose): New prototypes.
* libio/libioP.h (_IO_new_file_jumps): Removed.
(_IO_old_proc_jumps): Added.
(_IO_new_proc_open, _IO_old_proc_open): New prototypes.
* libio/oldiopopen.c: New file.
* libio/oldpclose.c: New file.
1998-11-22 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nss/Makefile: Build and install getent.
* nss/getent.c: New, get entries from administrative database.
1998-11-23 09:36:06 +00:00
|
|
|
|
2001-07-06 04:58:11 +00:00
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
Update.
1998-11-23 Ulrich Drepper <drepper@cygnus.com>
* Makeconfig: Don't read sysd-sorted unless sysd-dirs is read.
Patch by Zack Weinberg.
* math/bits/mathcalls.h: Adjust comments. Remove gamma_r prototype.
* sysdeps/i386/fpu/bits/mathinline.h: Make log2 only available if
__USE_ISOC9X is defined. Provide rint optimization.
1998-11-21 H.J. Lu <hjl@gnu.org>
* libio/Versions (_IO_popen, _IO_proc_open, _IO_proc_close,
popen, pclose): Add to GLIBC_2.1.
* libio/Makefile (routines): Add oldiopopen and oldpclose.
(shared-only-routines): Likewise.
* libio/pclose.c (pclose): Make it default for GLIBC_2.1.
* libio/iopopen.c (_IO_proc_open, _IO_popen, popen,
_IO_proc_close): Likewise.
* libio/iolibio.h (_IO_new_popen, _IO_old_popen, __new_pclose,
__old_pclose): New prototypes.
* libio/libioP.h (_IO_new_file_jumps): Removed.
(_IO_old_proc_jumps): Added.
(_IO_new_proc_open, _IO_old_proc_open): New prototypes.
* libio/oldiopopen.c: New file.
* libio/oldpclose.c: New file.
1998-11-22 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nss/Makefile: Build and install getent.
* nss/getent.c: New, get entries from administrative database.
1998-11-23 09:36:06 +00:00
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2001-07-06 04:58:11 +00:00
|
|
|
Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2012-02-09 23:18:22 +00:00
|
|
|
License along with the GNU C Library; if not, see
|
Prefer https to http for gnu.org and fsf.org URLs
Also, change sources.redhat.com to sourceware.org.
This patch was automatically generated by running the following shell
script, which uses GNU sed, and which avoids modifying files imported
from upstream:
sed -ri '
s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g
s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g
' \
$(find $(git ls-files) -prune -type f \
! -name '*.po' \
! -name 'ChangeLog*' \
! -path COPYING ! -path COPYING.LIB \
! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \
! -path manual/texinfo.tex ! -path scripts/config.guess \
! -path scripts/config.sub ! -path scripts/install-sh \
! -path scripts/mkinstalldirs ! -path scripts/move-if-change \
! -path INSTALL ! -path locale/programs/charmap-kw.h \
! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \
! '(' -name configure \
-execdir test -f configure.ac -o -f configure.in ';' ')' \
! '(' -name preconfigure \
-execdir test -f preconfigure.ac ';' ')' \
-print)
and then by running 'make dist-prepare' to regenerate files built
from the altered files, and then executing the following to cleanup:
chmod a+x sysdeps/unix/sysv/linux/riscv/configure
# Omit irrelevant whitespace and comment-only changes,
# perhaps from a slightly-different Autoconf version.
git checkout -f \
sysdeps/csky/configure \
sysdeps/hppa/configure \
sysdeps/riscv/configure \
sysdeps/unix/sysv/linux/csky/configure
# Omit changes that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines
git checkout -f \
sysdeps/powerpc/powerpc64/ppc-mcount.S \
sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
# Omit change that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline
git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
2019-09-07 05:40:42 +00:00
|
|
|
<https://www.gnu.org/licenses/>.
|
2001-07-06 04:58:11 +00:00
|
|
|
|
|
|
|
As a special exception, if you link the code in this file with
|
|
|
|
files compiled with a GNU compiler to produce an executable,
|
|
|
|
that does not cause the resulting executable to be covered by
|
|
|
|
the GNU Lesser General Public License. This exception does not
|
|
|
|
however invalidate any other reasons why the executable file
|
|
|
|
might be covered by the GNU Lesser General Public License.
|
|
|
|
This exception applies to code released by its copyright holders
|
|
|
|
in files containing the exception. */
|
Update.
1998-11-23 Ulrich Drepper <drepper@cygnus.com>
* Makeconfig: Don't read sysd-sorted unless sysd-dirs is read.
Patch by Zack Weinberg.
* math/bits/mathcalls.h: Adjust comments. Remove gamma_r prototype.
* sysdeps/i386/fpu/bits/mathinline.h: Make log2 only available if
__USE_ISOC9X is defined. Provide rint optimization.
1998-11-21 H.J. Lu <hjl@gnu.org>
* libio/Versions (_IO_popen, _IO_proc_open, _IO_proc_close,
popen, pclose): Add to GLIBC_2.1.
* libio/Makefile (routines): Add oldiopopen and oldpclose.
(shared-only-routines): Likewise.
* libio/pclose.c (pclose): Make it default for GLIBC_2.1.
* libio/iopopen.c (_IO_proc_open, _IO_popen, popen,
_IO_proc_close): Likewise.
* libio/iolibio.h (_IO_new_popen, _IO_old_popen, __new_pclose,
__old_pclose): New prototypes.
* libio/libioP.h (_IO_new_file_jumps): Removed.
(_IO_old_proc_jumps): Added.
(_IO_new_proc_open, _IO_old_proc_open): New prototypes.
* libio/oldiopopen.c: New file.
* libio/oldpclose.c: New file.
1998-11-22 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nss/Makefile: Build and install getent.
* nss/getent.c: New, get entries from administrative database.
1998-11-23 09:36:06 +00:00
|
|
|
|
2000-03-27 05:18:47 +00:00
|
|
|
#include <shlib-compat.h>
|
|
|
|
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
|
|
|
|
|
Update.
1998-11-23 Ulrich Drepper <drepper@cygnus.com>
* Makeconfig: Don't read sysd-sorted unless sysd-dirs is read.
Patch by Zack Weinberg.
* math/bits/mathcalls.h: Adjust comments. Remove gamma_r prototype.
* sysdeps/i386/fpu/bits/mathinline.h: Make log2 only available if
__USE_ISOC9X is defined. Provide rint optimization.
1998-11-21 H.J. Lu <hjl@gnu.org>
* libio/Versions (_IO_popen, _IO_proc_open, _IO_proc_close,
popen, pclose): Add to GLIBC_2.1.
* libio/Makefile (routines): Add oldiopopen and oldpclose.
(shared-only-routines): Likewise.
* libio/pclose.c (pclose): Make it default for GLIBC_2.1.
* libio/iopopen.c (_IO_proc_open, _IO_popen, popen,
_IO_proc_close): Likewise.
* libio/iolibio.h (_IO_new_popen, _IO_old_popen, __new_pclose,
__old_pclose): New prototypes.
* libio/libioP.h (_IO_new_file_jumps): Removed.
(_IO_old_proc_jumps): Added.
(_IO_new_proc_open, _IO_old_proc_open): New prototypes.
* libio/oldiopopen.c: New file.
* libio/oldpclose.c: New file.
1998-11-22 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nss/Makefile: Build and install getent.
* nss/getent.c: New, get entries from administrative database.
1998-11-23 09:36:06 +00:00
|
|
|
#define _IO_USE_OLD_IO_FILE
|
|
|
|
#include "libioP.h"
|
|
|
|
#include "stdio.h"
|
|
|
|
#include <errno.h>
|
|
|
|
|
Remove miscellaneous debris from libio.
This patch eliminates a number of #if 0 and #ifdef TODO blocks, macros
that are never used, macros that provide portability to substrates that
lack basic things like EINVAL and off_t, and other such debris.
I preserved IO_DEBUG and CHECK_FILE, even though as far as I can tell
IO_DEBUG is never defined and therefore CHECK_FILE never does
anything, because it seems like we might actually want to turn it _on_.
Installed stripped libraries and executables are unchanged, except,
again, that the line number of an assertion changes (this time it's
somewhere in fileops.c).
* libio/libio.h (_IO_pos_BAD, _IO_pos_0, _IO_pos_adjust):
Define here, unconditionally.
* libio/iolibio.h (_IO_pos_BAD): Don't define here.
* libio/libioP.h: Remove #if 0 blocks.
(_IO_pos_BAD, _IO_pos_0, _IO_pos_adjust): Don't define here.
(_IO_va_start, COERCE_FILE, MAYBE_SET_EINVAL): Don't define.
(CHECK_FILE): Don't use MAYBE_SET_EINVAL or COERCE_FILE. Fix style.
* libio/clearerr.c, libio/fputc.c, libio/getchar.c:
Assume weak_alias is always defined.
* libio/fileops.c, libio/genops.c, libio/oldfileops.c
* libio/oldpclose.c, libio/pclose.c, libio/wfileops.c:
Remove #if 0 and #ifdef TODO blocks.
Assume text_set_element is always defined.
* libio/iofdopen.c, libio/iogetdelim.c, libio/oldiofdopen.c
Use __set_errno (EINVAL) instead of MAYBE_SET_EINVAL.
* libio/tst-mmap-eofsync.c: Make #if 1 block unconditional.
2018-02-21 19:38:24 +00:00
|
|
|
/* POSIX does not require us to check that a stream passed to pclose()
|
|
|
|
was created by popen(). Instead we rely on _IO_SYSCLOSE to call
|
|
|
|
_proc_close when appropriate. */
|
Update.
1998-11-23 Ulrich Drepper <drepper@cygnus.com>
* Makeconfig: Don't read sysd-sorted unless sysd-dirs is read.
Patch by Zack Weinberg.
* math/bits/mathcalls.h: Adjust comments. Remove gamma_r prototype.
* sysdeps/i386/fpu/bits/mathinline.h: Make log2 only available if
__USE_ISOC9X is defined. Provide rint optimization.
1998-11-21 H.J. Lu <hjl@gnu.org>
* libio/Versions (_IO_popen, _IO_proc_open, _IO_proc_close,
popen, pclose): Add to GLIBC_2.1.
* libio/Makefile (routines): Add oldiopopen and oldpclose.
(shared-only-routines): Likewise.
* libio/pclose.c (pclose): Make it default for GLIBC_2.1.
* libio/iopopen.c (_IO_proc_open, _IO_popen, popen,
_IO_proc_close): Likewise.
* libio/iolibio.h (_IO_new_popen, _IO_old_popen, __new_pclose,
__old_pclose): New prototypes.
* libio/libioP.h (_IO_new_file_jumps): Removed.
(_IO_old_proc_jumps): Added.
(_IO_new_proc_open, _IO_old_proc_open): New prototypes.
* libio/oldiopopen.c: New file.
* libio/oldpclose.c: New file.
1998-11-22 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nss/Makefile: Build and install getent.
* nss/getent.c: New, get entries from administrative database.
1998-11-23 09:36:06 +00:00
|
|
|
int
|
2004-03-10 09:29:17 +00:00
|
|
|
attribute_compat_text_section
|
2015-10-16 20:21:49 +00:00
|
|
|
__old_pclose (FILE *fp)
|
Update.
1998-11-23 Ulrich Drepper <drepper@cygnus.com>
* Makeconfig: Don't read sysd-sorted unless sysd-dirs is read.
Patch by Zack Weinberg.
* math/bits/mathcalls.h: Adjust comments. Remove gamma_r prototype.
* sysdeps/i386/fpu/bits/mathinline.h: Make log2 only available if
__USE_ISOC9X is defined. Provide rint optimization.
1998-11-21 H.J. Lu <hjl@gnu.org>
* libio/Versions (_IO_popen, _IO_proc_open, _IO_proc_close,
popen, pclose): Add to GLIBC_2.1.
* libio/Makefile (routines): Add oldiopopen and oldpclose.
(shared-only-routines): Likewise.
* libio/pclose.c (pclose): Make it default for GLIBC_2.1.
* libio/iopopen.c (_IO_proc_open, _IO_popen, popen,
_IO_proc_close): Likewise.
* libio/iolibio.h (_IO_new_popen, _IO_old_popen, __new_pclose,
__old_pclose): New prototypes.
* libio/libioP.h (_IO_new_file_jumps): Removed.
(_IO_old_proc_jumps): Added.
(_IO_new_proc_open, _IO_old_proc_open): New prototypes.
* libio/oldiopopen.c: New file.
* libio/oldpclose.c: New file.
1998-11-22 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nss/Makefile: Build and install getent.
* nss/getent.c: New, get entries from administrative database.
1998-11-23 09:36:06 +00:00
|
|
|
{
|
|
|
|
return _IO_old_fclose (fp);
|
|
|
|
}
|
|
|
|
|
2000-03-27 05:18:47 +00:00
|
|
|
compat_symbol (libc, __old_pclose, pclose, GLIBC_2_0);
|
|
|
|
#endif
|