mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-10 15:20:10 +00:00
9c4c002459
1998-09-14 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sysdeps/mach/hurd/dl-cache.c (_dl_unload_cache): New dummy function. Reported by okuji@kuicr.kyoto-u.ac.jp [PR libc/789]. 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com> * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_runtime_setup): Add profiling support. (TRAMPOLINE_TEMPLATE): New macro. (ELF_MACHINE_RUNTIME_TRAMPOLINE): Define in terms of that. (RTLD_START): Prettify, and set __libc_stack_end properly. (elf_machine_rela) [R_SPARC_COPY]: Remove RTLD_BOOTSTRAP ifndef and check for sym being NULL instead. * sysdeps/sparc/sparc64/addmul_1.S: Adjust to allocate 192 bytes of stack space. * sysdeps/sparc/sparc64/lshift.S: Likewise. * sysdeps/sparc/sparc64/mul_1.S: Likewise. * sysdeps/sparc/sparc64/rshift.S: Likewise. * sysdeps/sparc/sparc64/submul_1.S: Likewise. * sysdeps/sparc/sparc64/elf/crtbegin.S: Likewise and remove old MEDANY code model %g4 usage. * sysdeps/sparc/sparc64/elf/crtend.S: Likewise and remove old MEDANY code model %g4 usage. * sysdeps/sparc/sparc64/elf/start.S: Rework to not use old FULLANY code model address formation. * sysdeps/sparc/sparc64/dl-machine.h: Don't include link.h, do include elf/ldsodefs.h (DT_SPARC): Remove. (elf_machine_matches_host): It is now EM_SPARCV9. (elf_machine_dynamic): Clean up to remove ugly cast. (elf_machine_fixup_plt): Rework for new V9 ABI, add support for new PLT formats. (elf_machine_rela): Don't do anything at all for R_SPARC_NONE. Prettify rest of function. [R_SPARC_COPY]: Check for sym being NULL. [R_SPARC_32]: Handle it. [R_SPARC_H44, R_SPARC_M44, R_SPARC_L44]: Handle them for the MEDMID code model. [R_SPARC_HH22, R_SPARC_HM10, R_SPARC_LM22]: Handle them for the MEDANY code model. [R_SPARC_NONE]: Remove this case, as it is now checked earlier. (elf_machine_runtime_setup): Rewrite for new V9 ABI plt formats. Add profiling support. (TRAMPOLINE_TEMPLATE): New macro. (ELF_MACHINE_RUNTIME_TRAMPOLINE): Define in terms of that. (RTLD_START): Prettify and set __libc_stack_end. * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h (SA_SIGINFO): Define. * sysdeps/unix/sysv/linux/sparc/bits/signum.h (_NSIG): Set to 64. (SIGRTMIN, SIGRTMAX, __SIGRTMIN, __SIGRTMAX): Define. * sysdeps/unix/sysv/linux/sparc/sparc32/brk.c (__brk): Remove unused variable scratch. * sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c (__syscall_rt_sigaction, __rt_sigreturn_stub, __sigreturn_stub): Declare. (__sigaction): Rewrite rt_sigaction case to pass correct sigreturn stub to rt_sigaction syscalls. Rewrite non-rt case to use correct old format kernel sigaction structures. * sysdeps/unix/sysv/linux/sparc/sparc64/ucontext.h: Move... * sysdeps/unix/sysv/linux/sparc/sparc64/sys/ucontext.h: to here. * sysdeps/unix/sysv/linux/sparc/sparc64/Dist: Remove ucontext.h * sysdeps/unix/sysv/linux/sparc/sparc64/bits/setjmp.h: Fix ucontext include. (_JMPBUF_UNWINDS): Define. * sysdeps/unix/sysv/linux/sparc/sparc64/bits/statfs.h: Declare statfs64 structure, which is exactly the same as the normal one. * sysdeps/unix/sysv/linux/sparc/sparc64/brk.S: Allocate 192 bytes of stack. Use correct syscall trap number. Add branch prediction settings to branch instructions. Remove old MEDANY code model %g4 referneces for non-PIC. * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/init-first.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/pipe.S: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/syscall.S: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/longjmp.S: Add __libc_longjmp and __libc_siglongjmp strong aliases. * sysdeps/unix/sysv/linux/sparc/sparc64/readdir.c (__readdir64): Also define to __no__readdir64_decl around readdir.c inclusion. (__readdir64): Add strong alias. * sysdeps/unix/sysv/linux/sparc/sparc64/socket.S: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (getrlimit): Set strong and weak names properly. 1998-09-16 11:25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * manual/Makefile (AWK): Default to gawk if standalone. 1998-09-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Makefile (distribute): Undo last change. * Make-dist (+tsrc) [not subdir]: Also include indirection headers for sysdep headers. (+subdir-headers): Removed, unused. 1998-09-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * stdio-common/Makefile ($(inst_includedir)/bits/stdio_lim.h): Use $(do-install). 1998-09-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Makerules ($(+sysdir_pfx)sysd-Makefile): Don't check for absolute name in $(config-sysdirs), can never happen. ($(+sysdir_pfx)sysd-rules): Likewise. * Makeconfig (full-config-sysdirs): Likewise. (all-Subdirs-files): Prepend $(..). * configure.in: Don't check for absolute name in $add_ons_pfx, can not happen. Let --enable-add-ons=yes work if no add-ons actually exist. 1998-09-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Rules ($(common-objpfx)bits/stdio_%.h): Remove extra continuations in command. 1998-09-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * libio/oldstdfiles.c (_IO_stdin_used): Update declaration.
93 lines
3.1 KiB
C
93 lines
3.1 KiB
C
/* Copyright (C) 1993, 1994, 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. */
|
|
|
|
|
|
/* This file provides definitions of _IO_stdin, _IO_stdout, and _IO_stderr
|
|
for C code. Compare stdstreams.cc.
|
|
(The difference is that here the vtable field is set to 0,
|
|
so the objects defined are not valid C++ objects. On the other
|
|
hand, we don't need a C++ compiler to build this file.) */
|
|
|
|
#define _IO_USE_OLD_IO_FILE
|
|
#include "libioP.h"
|
|
|
|
#ifdef _IO_MTSAFE_IO
|
|
#define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
|
|
static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_initializer; \
|
|
struct _IO_FILE_plus NAME \
|
|
= {FILEBUF_LITERAL(CHAIN, FLAGS, FD), &_IO_old_file_jumps};
|
|
#else
|
|
#define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
|
|
struct _IO_FILE_plus NAME \
|
|
= {FILEBUF_LITERAL(CHAIN, FLAGS, FD), &_IO_old_file_jumps};
|
|
#endif
|
|
|
|
DEF_STDFILE(_IO_stdin_, 0, 0, _IO_NO_WRITES);
|
|
DEF_STDFILE(_IO_stdout_, 1, &_IO_stdin_.file, _IO_NO_READS);
|
|
DEF_STDFILE(_IO_stderr_, 2, &_IO_stdout_.file,
|
|
_IO_NO_READS+_IO_UNBUFFERED);
|
|
|
|
#if defined __GNUC__ && __GNUC__ >= 2
|
|
|
|
#include <stdio.h>
|
|
|
|
extern const int _IO_stdin_used;
|
|
weak_extern (_IO_stdin_used);
|
|
|
|
#undef stdin
|
|
#undef stdout
|
|
#undef stderr
|
|
|
|
extern FILE *stdin;
|
|
extern FILE *stdout;
|
|
extern FILE *stderr;
|
|
|
|
extern FILE *_IO_list_all;
|
|
|
|
static void _IO_check_libio __P ((void)) __attribute__ ((constructor));
|
|
|
|
/* This function determines which shared C library the application
|
|
was linked against. We then set up the stdin/stdout/stderr and
|
|
_IO_list_all accordingly. */
|
|
|
|
static void
|
|
_IO_check_libio ()
|
|
{
|
|
if (&_IO_stdin_used == NULL)
|
|
{
|
|
/* We are using the old one. */
|
|
_IO_stdin = stdin = &_IO_stdin_.file;
|
|
_IO_stdout = stdout = &_IO_stdout_.file;
|
|
_IO_stderr = stderr = _IO_list_all = &_IO_stderr_.file;
|
|
_IO_stdin->_vtable_offset = _IO_stdout->_vtable_offset =
|
|
_IO_stderr->_vtable_offset = stdin->_vtable_offset =
|
|
stdout->_vtable_offset = stderr->_vtable_offset =
|
|
((int) sizeof (struct _IO_FILE)
|
|
- (int) sizeof (struct _IO_FILE_complete));
|
|
}
|
|
}
|
|
|
|
#endif
|