Commit Graph

32 Commits

Author SHA1 Message Date
Joseph Myers 4fa9b3bfe6 Fix mcontext_t sigcontext namespace (bug 21457).
This patch completes the ucontext.h namespace fixes by fixing issues
related to the use of struct sigcontext as mcontext_t, and inclusion
of <bits/sigcontext.h> even when struct sigcontext is not so used.

Inclusion of <bits/sigcontext.h> by <sys/ucontext.h> is removed; the
way to get the sigcontext structure is by including <signal.h> (in a
context where __USE_MISC is defined); the sysdeps/generic version of
sys/ucontext.h keeps the inclusion by necessity, with a comment about
how this is not namespace-clean, but the only configuration that used
it, MicroBlaze, gets its own version of the header in this patch.
Where mcontext_t was typedefed to struct sigcontext, the contents of
struct sigcontext are inserted (with appropriate namespace handling to
prefix fields with __ when __USE_MISC is not defined); review should
check that this has been done correctly in each case, whether the
definition of struct sigcontext comes from glibc headers or from the
Linux kernel.  This changes C++ name mangling on affected
architectures (which do not include x86_64/x86).

Tested for x86_64, and with build-many-glibcs.py.

2017-08-14  Joseph Myers  <joseph@codesourcery.com>

	[BZ #21457]
	* sysdeps/arm/sys/ucontext.h: Do not include <bits/sigcontext.h>.
	* sysdeps/generic/sys/ucontext.h: Add comment about use of struct
	sigcontext and namespace requirements.
	* sysdeps/i386/sys/ucontext.h: Do not include <bits/sigcontext.h>.
	* sysdeps/m68k/sys/ucontext.h: Likewise.
	* sysdeps/mips/sys/ucontext.h: Likewise.  Include <bits/types.h>.
	* sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h: Do not include
	<bits/sigcontext.h>.
	(__ctx): Define earlier.
	(mcontext_t): Define structure contents rather than using struct
	sigcontext.
	* sysdeps/unix/sysv/linux/aarch64/ucontext_i.sym (oEXTENSION): Use
	__glibc_reserved1 instead of __reserved.
	* sysdeps/unix/sysv/linux/alpha/sys/ucontext.h: Do not include
	<bits/sigcontext.h>.
	(__ctx): Define earlier.
	(mcontext_t): Define structure contents rather than using struct
	sigcontext.
	* sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym: Use
	mcontext_t instead of struct sigcontext.
	* sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Do not include
	<bits/sigcontext.h>.
	(__ctx): Define earlier.
	(mcontext_t): Define structure contents rather than using struct
	sigcontext.
	* sysdeps/unix/sysv/linux/hppa/sys/ucontext.h: Do not include
	<bits/sigcontext.h>.
	(__ctx): Define earlier.
	(mcontext_t): Define structure contents rather than using struct
	sigcontext.
	* sysdeps/unix/sysv/linux/ia64/makecontext.c (__makecontext): Use
	mcontext_t instead of struct sigcontext.
	* sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym: Use
	mcontext_t instead of struct sigcontext.
	* sysdeps/unix/sysv/linux/ia64/sys/ucontext.h: Do not include
	<bits/sigcontext.h>.
	(__ctx): New macro.
	(struct __ia64_fpreg_mcontext): New type.
	(mcontext_t): Define structure contents rather than using struct
	sigcontext.
	(_SC_GR0_OFFSET): Use mcontext_t instead of struct sigcontext.
	(uc_sigmask): Define using __ctx.
	(uc_stack): Likewise.
	* sysdeps/unix/sysv/linux/ia64/sys/procfs.h: Include
	<bits/sigcontext.h>.
	* sysdeps/unix/sysv/linux/ia64/sys/ptrace.h: Likewise.
	* sysdeps/unix/sysv/linux/m68k/sys/ucontext.h: Do not include
	<bits/sigcontext.h>.
	* sysdeps/unix/sysv/linux/microblaze/sys/ucontext.h: New file.
	* sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Do not include
	<bits/sigcontext.h>.
	* sysdeps/unix/sysv/linux/nios2/sys/ucontext.h: Do not include
	<bits/sigcontext.h>.
	* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Do not include
	<bits/sigcontext.h>.
	* sysdeps/unix/sysv/linux/s390/sys/ucontext.h: Do not include
	<bits/sigcontext.h>.
	* sysdeps/unix/sysv/linux/sh/sys/ucontext.h: Do not include
	<bits/sigcontext.h>.
	* sysdeps/unix/sysv/linux/sparc/sys/ucontext.h: Do not include
	<bits/sigcontext.h>.
	* sysdeps/unix/sysv/linux/tile/sys/ucontext.h: Do not include
	<bits/sigcontext.h>.
	(__ctx): Define earlier.
	(mcontext_t): Define structure contents rather than using struct
	sigcontext.
	* sysdeps/unix/sysv/linux/x86/sys/ucontext.h: Do not include
	<bits/sigcontext.h>.  Include <bits/types.h>.
	* conform/Makefile (test-xfail-XPG42/signal.h/conform): Remove.
	(test-xfail-XPG42/sys/wait.h/conform): Likewise.
	(test-xfail-XPG42/ucontext.h/conform): Likewise.
	(test-xfail-UNIX98/signal.h/conform): Likewise.
	(test-xfail-UNIX98/sys/wait.h/conform): Likewise.
	(test-xfail-UNIX98/ucontext.h/conform): Likewise.
	(test-xfail-XOPEN2K/signal.h/conform): Likewise.
	(test-xfail-XOPEN2K/sys/wait.h/conform): Likewise.
	(test-xfail-XOPEN2K/ucontext.h/conform): Likewise.
	(test-xfail-POSIX2008/signal.h/conform): Likewise.
	(test-xfail-POSIX2008/sys/wait.h/conform): Likewise.
	(test-xfail-XOPEN2K8/signal.h/conform): Likewise.
	(test-xfail-XOPEN2K8/sys/wait.h/conform): Likewise.
2017-08-30 22:02:04 +00:00
Joseph Myers 3d452dabd1 Fix uc_* namespace (bug 21457).
The standard members of ucontext_t, in all standard versions with that
type, are uc_link, uc_sigmask, uc_stack and uc_mcontext.

The uc_* namespace is mostly reserved for additions to the structure.
However, in XPG4.2, it's only reserved when <ucontext.h> is included,
not when <signal.h> is included, while <signal.h> is required to
define ucontext_t (but not allowed to make visible other symbols from
<ucontext.h>).  Thus, nonstandard members should avoid uc_* names.
Some already do use __uc_*, but others don't; most architectures (all
except ia64, I think) have a member uc_flags and some have additional
members beyond that.

This patch makes nonstandard members have an __ prefix unless
__USE_MISC is defined.  Members whose names indicate they are solely
padding / reserved for future use are renamed unconditionally to use
the __glibc_reserved1 naming convention.

This is part of the preparation for a revised version of the
mcontext_t / sigcontext patch to be able to eliminate all 13 of the
miscellaneous XFAILs in conform/Makefile, rather than only 11 of them
as at present (at least one further fix on top of this one will be
needed for that as well).

Tested for x86_64, and with build-many-glibcs.py.

	[BZ #21457]
	* sysdeps/arm/sys/ucontext.h (__ctx): Move undefine further down.
	(ucontext_t): Use __ctx with uc_flags.  Rename uc_filler to
	__glibc_reserved1.
	* sysdeps/generic/sys/ucontext.h (__ctx): New macro.
	(ucontext_t): Use __ctx with uc_flags.
	* sysdeps/i386/sys/ucontext.h (__ctx): Move undefine further down.
	(__ctxt): Likewise.
	(ucontext_t): Use __ctx with uc_flags.  Rename uc_filler to
	__glibc_reserved1.
	* sysdeps/m68k/sys/ucontext.h (__ctx): Move undefine further down.
	(ucontext_t): Use __ctx with uc_flags.  Rename uc_filler to
	__glibc_reserved1.
	* sysdeps/mips/sys/ucontext.h (__ctx): Move undefine further down.
	(ucontext_t): Use __ctx with uc_flags.  Rename uc_filler to
	__glibc_reserved1.
	* sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h (__ctx): New
	macro.
	(ucontext_t): Use __ctx with uc_flags.
	* sysdeps/unix/sysv/linux/alpha/sys/ucontext.h (__ctx): New macro.
	(ucontext_t): Use __ctx with uc_flags.
	* sysdeps/unix/sysv/linux/arm/sys/ucontext.h (__ctx): New macro.
	(ucontext_t): Use __ctx with uc_flags and uc_regspace.
	* sysdeps/unix/sysv/linux/hppa/sys/ucontext.h (__ctx): New macro.
	(ucontext_t): Use __ctx with uc_flags.
	* sysdeps/unix/sysv/linux/m68k/sys/ucontext.h (__ctx): Move
	undefine further down.
	(ucontext_t): Use __ctx with uc_flags.  Rename uc_filler to
	__glibc_reserved1.
	* sysdeps/unix/sysv/linux/mips/sys/ucontext.h (__ctx): Move
	undefine further down.
	(ucontext_t): Use __ctx with uc_flags.
	* sysdeps/unix/sysv/linux/nios2/sys/ucontext.h (__ctx): Move
	undefine further down.
	(ucontext_t): Use __ctx with uc_flags.
	* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h (ucontext_t): Use
	__ctx with uc_flags, uc_regs_ptr, uc_regs and uc_reg_space.
	Rename uc_pad to __glibc_reserved1.
	* sysdeps/unix/sysv/linux/s390/sys/ucontext.h (__ctx): Move
	undefine further down.
	(ucontext_t): Use __ctx with uc_flags.
	* sysdeps/unix/sysv/linux/sh/sys/ucontext.h (__ctx): Move undefine
	further down.
	(ucontext_t): Use __ctx with uc_flags.
	* sysdeps/unix/sysv/linux/sparc/sys/ucontext.h (ucontext_t): Use
	__ctx with uc_flags.
	* sysdeps/unix/sysv/linux/tile/sys/ucontext.h (__ctx): New macro.
	(ucontext_t): Use __ctx with uc_flags.
	* sysdeps/unix/sysv/linux/x86/sys/ucontext.h (ucontext_t): Use
	__ctx with uc_flags.
2017-08-09 17:51:26 +00:00
Joseph Myers 251287734e Rename struct ucontext tag (bug 21457).
The ucontext_t type has a tag struct ucontext.  As with previous such
issues for siginfo_t and stack_t, this tag is not permitted by POSIX
(is not in a reserved namespace), and so namespace conformance means
breaking C++ name mangling for this type.

In this case, the type does need to have some tag rather than just a
typedef name, because it includes a pointer to itself.  This patch
uses struct ucontext_t as the new tag, so the type is mangled as
ucontext_t (the POSIX *_t reservation applies in all namespaces, not
just the namespace of ordinary identifiers).  Another reserved name
such as struct __ucontext could of course be used.

Because of other namespace issues, this patch does not by itself fix
bug 21457 or allow any XFAILs to be removed.

Tested for x86_64, and with build-many-glibcs.py.

	[BZ #21457]
	* sysdeps/arm/sys/ucontext.h (struct ucontext): Rename to struct
	ucontext_t.
	* sysdeps/generic/sys/ucontext.h (struct ucontext): Likewise.
	* sysdeps/i386/sys/ucontext.h (struct ucontext): Likewise.
	* sysdeps/m68k/sys/ucontext.h (struct ucontext): Likewise.
	* sysdeps/mips/sys/ucontext.h (struct ucontext): Likewise.
	* sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h (struct
	ucontext): Likewise.
	* sysdeps/unix/sysv/linux/alpha/sys/ucontext.h (struct ucontext):
	Likewise.
	* sysdeps/unix/sysv/linux/arm/sys/ucontext.h (struct ucontext):
	Likewise.
	* sysdeps/unix/sysv/linux/hppa/sys/ucontext.h (struct ucontext):
	Likewise.
	* sysdeps/unix/sysv/linux/ia64/sys/ucontext.h (struct ucontext):
	Likewise.
	* sysdeps/unix/sysv/linux/m68k/sys/ucontext.h (struct ucontext):
	Likewise.
	* sysdeps/unix/sysv/linux/mips/sys/ucontext.h (struct ucontext):
	Likewise.
	* sysdeps/unix/sysv/linux/nios2/sys/ucontext.h (struct ucontext):
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h (struct
	ucontext): Likewise.
	* sysdeps/unix/sysv/linux/s390/sys/ucontext.h (struct ucontext):
	Likewise.
	* sysdeps/unix/sysv/linux/sh/sys/ucontext.h (struct ucontext):
	Likewise.
	* sysdeps/unix/sysv/linux/sparc/sys/ucontext.h (struct ucontext):
	Likewise.
	* sysdeps/unix/sysv/linux/tile/sys/ucontext.h (struct ucontext):
	Likewise.
	* sysdeps/unix/sysv/linux/x86/sys/ucontext.h (struct ucontext):
	Likewise.
	* sysdeps/powerpc/powerpc32/backtrace.c (struct
	rt_signal_frame_32): Likewise.
	* sysdeps/powerpc/powerpc64/backtrace.c (struct signal_frame_64):
	Likewise.
	* sysdeps/unix/sysv/linux/aarch64/kernel_rt_sigframe.h (struct
	kernel_rt_sigframe): Likewise.
	* sysdeps/unix/sysv/linux/aarch64/sigcontextinfo.h (SIGCONTEXT):
	Likewise.
	* sysdeps/unix/sysv/linux/arm/register-dump.h (register_dump):
	Likewise.
	* sysdeps/unix/sysv/linux/arm/sigcontextinfo.h (SIGCONTEXT):
	Likewise.
	* sysdeps/unix/sysv/linux/hppa/profil-counter.h
	(__profil_counter): Likewise.
	* sysdeps/unix/sysv/linux/microblaze/sigcontextinfo.h
	(SIGCONTEXT): Likewise.
	* sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h (struct
	kernel_rt_sigframe): Likewise.
	* sysdeps/unix/sysv/linux/nios2/kernel_rt_sigframe.h (struct
	kernel_rt_sigframe): Likewise.
	* sysdeps/unix/sysv/linux/nios2/sigcontextinfo.h (SIGCONTEXT):
	Likewise.
	* sysdeps/unix/sysv/linux/sh/makecontext.S (__makecontext):
	Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/makecontext.c
	(__start_context): Likewise.
	* sysdeps/unix/sysv/linux/tile/sigcontextinfo.h (SIGCONTEXT):
	Likewise.
	* sysdeps/unix/sysv/linux/x86_64/register-dump.h (register_dump):
	Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h (SIGCONTEXT):
	Likewise.
2017-06-26 22:03:58 +00:00
Joseph Myers 139904b7e4 Fix more namespace issues in sys/ucontext.h (bug 21457).
Continuing the fixes for namespace issues in sys/ucontext.h, this
patch moves various symbols into the implementation namespace in the
absence of __USE_MISC.  As with previous changes, it is nonexhaustive,
just covering more straightforward cases.

Structure fields are generally changed to have a prefix __ in the
absence of __USE_MISC, via a macro __ctx (used without a space before
the open parenthesis, since the result is a single identifier).
Various macros such as NGREG also have leading __ added.  No changes
are made to structure tags (and thus to C++ name mangling), except
that in the (unused) file sysdeps/i386/sys/ucontext.h, structures
defined inside other structures as the type for a field have their
tags removed in the non-__USE_MISC case (those structure tags would
not in any case have been visible in C++, because in C++ the scope of
such a tag is limited to the containing structure).  No changes are
made to the contents of bits/sigcontext.h, or to whether it is
included.  Because of remaining namespace issues, this patch does not
yet fix the bug or allow any XFAILs to be removed.

Tested for x86_64 and x86, and with build-many-glibcs.py.

	[BZ #21457]
	* sysdeps/arm/sys/ucontext.h (NGREG): Rename to __NGREG and define
	NGREG to __NGREG if [__USE_MISC].
	(gregset_t): Define using __NGREG.
	(__ctx): New macro.
	(mcontext_t): Use __ctx in defining fields.
	* sysdeps/i386/sys/ucontext.h (NGREG): Rename to __NGREG and
	define NGREG to __NGREG if [__USE_MISC].
	(gregset_t): Define using __NGREG.
	(__ctx): New macro.
	(__ctxt): Likewise.
	(fpregset_t): Use __ctx and __ctxt in defining fields.
	(mcontext_t): Likewise.
	* sysdeps/m68k/sys/ucontext.h (NGREG): Rename to __NGREG and
	define NGREG to __NGREG if [__USE_MISC].
	(gregset_t): Define using __NGREG.
	(__ctx): New macro.
	(mcontext_t): Use __ctx in defining fields.
	* sysdeps/mips/sys/ucontext.h (NGREG): Rename to __NGREG and
	define NGREG to __NGREG if [__USE_MISC].
	(gregset_t): Define using __NGREG.
	(__ctx): New macro.
	(fpregset_t): Use __ctx in defining fields.
	(mcontext_t): Likewise.
	* sysdeps/unix/sysv/linux/alpha/sys/ucontext.h (NGREG): Rename to
	__NGREG and define NGREG to __NGREG if [__USE_MISC].
	(gregset_t): Define using __NGREG.
	(NFPREG): Rename to __NFPREG and define NFPREG to __NFPREG if
	[__USE_MISC].
	(fpregset_t): Define using __NFPREG.
	* sysdeps/unix/sysv/linux/m68k/sys/ucontext.h (NGREG): Rename to
	__NGREG and define NGREG to __NGREG if [__USE_MISC].
	(gregset_t): Define using __NGREG.
	(__ctx): New macro.
	(fpregset_t): Use __ctx in defining fields.
	(mcontext_t): Likewise.
	* sysdeps/unix/sysv/linux/mips/sys/ucontext.h (NGREG): Rename to
	__NGREG and define NGREG to __NGREG if [__USE_MISC].
	(NFPREG): Rename to __NFPREG and define NFPREG to __NFPREG if
	[__USE_MISC].
	(gregset_t): Define using __NGREG.
	(__ctx): New macro.
	(fpregset_t): Use __ctx in defining fields.
	(mcontext_t): Likewise.
	* sysdeps/unix/sysv/linux/nios2/sys/ucontext.h (__ctx): New macro.
	(mcontext_t): Use __ctx in defining fields.
	* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h (__ctx): New
	macro.
	[__WORDSIZE == 32] (NGREG): Rename to __NGREG and define NGREG to
	__NGREG if [__USE_MISC].
	[__WORDSIZE == 32] (gregset_t): Define using __NGREG.
	[__WORDSIZE == 32] (fpregset_t): Use __ctx in defining fields.
	(mcontext_t): Likewise.
	[__WORDSIZE != 32] (NGREG): Rename to __NGREG and define NGREG to
	__NGREG if [__USE_MISC].
	[__WORDSIZE != 32] (NFPREG): Rename to __NFPREG and define NFPREG
	to __NFPREG if [__USE_MISC].
	[__WORDSIZE != 32] (NVRREG): Rename to __NVRREG and define NVRREG
	to __NVRREG if [__USE_MISC].
	[__WORDSIZE != 32] (gregset_t): Define using __NGREG.
	[__WORDSIZE != 32] (fpregset_t): Define using __NFPREG.
	[__WORDSIZE != 32] (vscr_t): Use __ctx in defining fields.
	[__WORDSIZE != 32] (vrregset_t): Likewise.
	[__WORDSIZE != 32] (mcontext_t): Likewise.
	* sysdeps/unix/sysv/linux/s390/sys/ucontext.h (__ctx): New macro.
	(__psw_t): Use __ctx in defining fields.
	(NGREG): Rename to __NGREG and define NGREG to __NGREG if
	[__USE_MISC].
	(gregset_t): Define using __NGREG.
	(fpreg_t): Use __ctx in defining fields.
	(fpregset_t): Likewise.
	(mcontext_t): Likewise.
	* sysdeps/unix/sysv/linux/sh/sys/ucontext.h (NGREG): Rename to
	__NGREG and define NGREG to __NGREG if [__USE_MISC].
	(gregset_t): Define using __NGREG.
	(NFPREG): Rename to __NFPREG and define NFPREG to __NFPREG if
	[__USE_MISC].
	(fpregset_t): Define using __NFPREG.
	(__ctx): New macro.
	(mcontext_t): Use __ctx in defining fields.
	* sysdeps/unix/sysv/linux/x86/sys/ucontext.h (__ctx): New macro.
	[__x86_64__] (NGREG): Rename to __NGREG and define NGREG to
	__NGREG if [__USE_MISC].
	[__x86_64__] (gregset_t): Define using __NGREG.
	[__x86_64__] (struct _libc_fpxreg): Use __ctx in defining fields.
	[__x86_64__] (struct _libc_fpstate): Likewise.
	[__x86_64__] (mcontext_t): Likewise.
	[!__x86_64__] (NGREG): Rename to __NGREG and define NGREG to
	__NGREG if [__USE_MISC].
	[!__x86_64__] (gregset_t): Define using __NGREG.
	[!__x86_64__] (struct _libc_fpreg): Use __ctx in defining fields.
	[!__x86_64__] (struct _libc_fpstate): Likewise.
	[!__x86_64__] (mcontext_t): Likewise.
2017-06-01 14:07:40 +00:00
Joseph Myers cfed8ece79 Fix sys/ucontext.h namespace from signal.h etc. inclusion (bug 21457).
The various sys/ucontext.h headers include <signal.h> and all the
headers split out of <bits/sigstack.h>.  (Except that the powerpc
version does not include <signal.h>.)

None of the standard versions defining ucontext.h require or permit
such inclusions; rather, they all say that the stack_t and sigset_t
types from signal.h are defined.  This patch fixes the headers to
include just the bits/ headers for those types (and the existing
includes of bits/sigcontext.h).  Since bits/types/sigset_t.h is now
being included instead of bits/types/__sigset_t.h, __sigset_t uses in
the headers are replaced by direct use of the public sigset_t type.
sysdeps/unix/sysv/linux/x86/bits/sigcontext.h was relying on the prior
inclusion of <signal.h> to define types such as __uint32_t, so gets a
bits/types.h include added to provide those types.

Although one could keep some or all of the includes under a __USE_MISC
conditional, that seems unnecessary to me, especially given the lack
of a <signal.h> include in the powerpc version meaning that portable
programs already cannot rely on such an include.

Tested for x86_64 and x86, and with build-many-glibcs.py.  As with
other such fixes, more namespace issues remain so this does not permit
any XFAILs to be removed or bugs to be closed.

	[BZ #21457]
	* sysdeps/arm/sys/ucontext.h: Do not include <signal.h>,
	<bits/sigstack.h>, <bits/types/struct_sigstack.h> or
	<bits/ss_flags.h>.  Include <bits/types/sigset_t.h> instead of
	<bits/types/__sigset_t.h>.
	(ucontext_t): Use sigset_t instead of __sigset_t.
	* sysdeps/generic/sys/ucontext.h: Do not include <signal.h>,
	<bits/sigstack.h>, <bits/types/struct_sigstack.h> or
	<bits/ss_flags.h>.  Include <bits/types/sigset_t.h> instead of
	<bits/types/__sigset_t.h>.
	(ucontext_t): Use sigset_t instead of __sigset_t.
	* sysdeps/i386/sys/ucontext.h: Do not include <signal.h>,
	<bits/sigstack.h>, <bits/types/struct_sigstack.h> or
	<bits/ss_flags.h>.  Include <bits/types/sigset_t.h> instead of
	<bits/types/__sigset_t.h>.
	(ucontext_t): Use sigset_t instead of __sigset_t.
	* sysdeps/m68k/sys/ucontext.h: Do not include <signal.h>,
	<bits/sigstack.h>, <bits/types/struct_sigstack.h> or
	<bits/ss_flags.h>.  Include <bits/types/sigset_t.h> instead of
	<bits/types/__sigset_t.h>.
	(ucontext_t): Use sigset_t instead of __sigset_t.
	* sysdeps/mips/sys/ucontext.h: Do not include <signal.h>,
	<bits/sigstack.h>, <bits/types/struct_sigstack.h> or
	<bits/ss_flags.h>.  Include <bits/types/sigset_t.h> instead of
	<bits/types/__sigset_t.h>.
	(ucontext_t): Use sigset_t instead of __sigset_t.
	* sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h: Do not include
	<signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or
	<bits/ss_flags.h>.  Include <bits/types/sigset_t.h> instead of
	<bits/types/__sigset_t.h>.
	(ucontext_t): Use sigset_t instead of __sigset_t.
	* sysdeps/unix/sysv/linux/alpha/sys/ucontext.h: Do not include
	<signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or
	<bits/ss_flags.h>.  Include <bits/types/sigset_t.h> instead of
	<bits/types/__sigset_t.h>.
	(ucontext_t): Use sigset_t instead of __sigset_t.
	* sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Do not include
	<signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or
	<bits/ss_flags.h>.  Include <bits/types/sigset_t.h> instead of
	<bits/types/__sigset_t.h>.
	(ucontext_t): Use sigset_t instead of __sigset_t.
	* sysdeps/unix/sysv/linux/hppa/sys/ucontext.h: Do not include
	<signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or
	<bits/ss_flags.h>.  Include <bits/types/sigset_t.h> instead of
	<bits/types/__sigset_t.h>.
	(ucontext_t): Use sigset_t instead of __sigset_t.
	* sysdeps/unix/sysv/linux/ia64/sys/ucontext.h: Do not include
	<signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or
	<bits/ss_flags.h>.  Include <bits/types/sigset_t.h>.
	* sysdeps/unix/sysv/linux/m68k/sys/ucontext.h: Do not include
	<signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or
	<bits/ss_flags.h>.  Include <bits/types/sigset_t.h> instead of
	<bits/types/__sigset_t.h>.
	(ucontext_t): Use sigset_t instead of __sigset_t.
	* sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Do not include
	<signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or
	<bits/ss_flags.h>.  Include <bits/types/sigset_t.h> instead of
	<bits/types/__sigset_t.h>.
	(ucontext_t): Use sigset_t instead of __sigset_t.
	* sysdeps/unix/sysv/linux/nios2/sys/ucontext.h: Do not include
	<signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or
	<bits/ss_flags.h>.  Include <bits/types/sigset_t.h> instead of
	<bits/types/__sigset_t.h>.
	(ucontext_t): Use sigset_t instead of __sigset_t.
	* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Do not include
	<bits/sigstack.h>, <bits/types/struct_sigstack.h> or
	<bits/ss_flags.h>.
	* sysdeps/unix/sysv/linux/s390/sys/ucontext.h: Do not include
	<signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or
	<bits/ss_flags.h>.  Include <bits/types/sigset_t.h> instead of
	<bits/types/__sigset_t.h>.
	(ucontext_t): Use sigset_t instead of __sigset_t.
	* sysdeps/unix/sysv/linux/sh/sys/ucontext.h: Do not include
	<signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or
	<bits/ss_flags.h>.  Include <bits/types/sigset_t.h> instead of
	<bits/types/__sigset_t.h>.
	(ucontext_t): Use sigset_t instead of __sigset_t.
	* sysdeps/unix/sysv/linux/sparc/sys/ucontext.h: Do not include
	<signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or
	<bits/ss_flags.h>.  Include <bits/types/sigset_t.h> instead of
	<bits/types/__sigset_t.h>.
	(ucontext_t): Use sigset_t instead of __sigset_t.
	* sysdeps/unix/sysv/linux/tile/sys/ucontext.h: Do not include
	<signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or
	<bits/ss_flags.h>.  Include <bits/types/sigset_t.h> instead of
	<bits/types/__sigset_t.h>.
	(ucontext_t): Use sigset_t instead of __sigset_t.
	* sysdeps/unix/sysv/linux/x86/bits/sigcontext.h: Include
	<bits/types.h>.
	* sysdeps/unix/sysv/linux/x86/sys/ucontext.h: Do not include
	<signal.h>, <bits/sigstack.h>, <bits/types/struct_sigstack.h> or
	<bits/ss_flags.h>.  Include <bits/types/sigset_t.h> instead of
	<bits/types/__sigset_t.h>.
	(ucontext_t): Use sigset_t instead of __sigset_t.
2017-05-23 11:49:48 +00:00
Zack Weinberg a992f506ff Remove __need macros from signal.h.
The types affected are __sig_atomic_t, sig_atomic_t, __sigset_t,
sigset_t, sigval_t, sigevent_t, and siginfo_t. __sig_atomic_t is a
scalar, so it's now directly available from bits/types.h.  The others
get bits/types/ headers.

Side effects include: There have been small changes to which
non-signal headers expose which subset of the signal-related types.
A couple of architectures' nested siginfo_t fields had to be renamed
to prevent undesired macro expansion.  Internal code that wants to
manipulate signal masks must now include <sigsetops.h> (which is not
installed) and should be aware that __sigaddset, __sigandset,
__sigdelset, __sigemptyset, and __sigorset no longer return a value
(unlike the public API).  Relatedly, the public signal.h no longer
declares any of those functions.  The obsolete sigmask() macro no
longer has a system-specific definition -- in the cases where it
matters, it didn't work anyway.

New Linux architectures should create bits/siginfo-arch.h and/or
bits/siginfo-consts-arch.h to customize their siginfo_t, rather than
duplicating everything in bits/siginfo.h (which no longer exists).
Add new __SI_* macros if necessary.  Ports to other operating systems
are strongly encouraged to generalize this scheme further.

	* bits/sigevent-consts.h
	* bits/siginfo-consts.h
	* bits/types/__sigset_t.h
	* bits/types/sigevent_t.h
	* bits/types/siginfo_t.h
	* sysdeps/unix/sysv/linux/bits/sigevent-consts.h
	* sysdeps/unix/sysv/linux/bits/siginfo-consts.h
	* sysdeps/unix/sysv/linux/bits/types/__sigset_t.h
	* sysdeps/unix/sysv/linux/bits/types/sigevent_t.h
	* sysdeps/unix/sysv/linux/bits/types/siginfo_t.h:
	New system-dependent bits headers.

	* sysdeps/unix/sysv/linux/bits/siginfo-arch.h
	* sysdeps/unix/sysv/linux/bits/siginfo-consts-arch.h
	* sysdeps/unix/sysv/linux/ia64/bits/siginfo-arch.h
	* sysdeps/unix/sysv/linux/ia64/bits/siginfo-consts-arch.h
	* sysdeps/unix/sysv/linux/mips/bits/siginfo-arch.h
	* sysdeps/unix/sysv/linux/sparc/bits/siginfo-arch.h
	* sysdeps/unix/sysv/linux/tile/bits/siginfo-arch.h
	* sysdeps/unix/sysv/linux/tile/bits/siginfo-consts-arch.h
	* sysdeps/unix/sysv/linux/x86/bits/siginfo-arch.h:
	New Linux-only system-dependent bits headers.

	* signal/bits/types/sig_atomic_t.h
	* signal/bits/types/sigset_t.h
	* signal/bits/types/sigval_t.h:
	New non-system-dependent bits headers.

	* sysdeps/generic/sigsetops.h
	* sysdeps/unix/sysv/linux/sigsetops.h:
	New internal headers.

	* include/bits/types/sig_atomic_t.h
	* include/bits/types/sigset_t.h
	* include/bits/types/sigval_t.h:
	New wrappers.

	* signal/sigsetops.h
	* bits/siginfo.h
	* bits/sigset.h
	* sysdeps/unix/sysv/linux/bits/siginfo.h
	* sysdeps/unix/sysv/linux/bits/sigset.h
	* sysdeps/unix/sysv/linux/ia64/bits/siginfo.h
	* sysdeps/unix/sysv/linux/mips/bits/siginfo.h
	* sysdeps/unix/sysv/linux/s390/bits/siginfo.h
	* sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
	* sysdeps/unix/sysv/linux/tile/bits/siginfo.h
	* sysdeps/unix/sysv/linux/x86/bits/siginfo.h:
	Deleted.

	* signal/Makefile, sysdeps/unix/sysv/linux/Makefile:
	Update lists of installed headers.

	* posix/bits/types.h: Define __sig_atomic_t here.
	* signal/signal.h: Use the new bits headers; no need to handle
	__need_sig_atomic_t nor __need_sigset_t.  Don't use __sigmask
	to define sigmask.
	* include/signal.h: No need to handle __need_sig_atomic_t
	nor __need_sigset_t.  Don't define __sigemptyset.

	* io/sys/poll.h, setjmp/setjmp.h
	* sysdeps/arm/sys/ucontext.h, sysdeps/generic/sys/ucontext.h
	* sysdeps/i386/sys/ucontext.h, sysdeps/m68k/sys/ucontext.h
	* sysdeps/mach/hurd/i386/bits/sigcontext.h
	* sysdeps/mips/sys/ucontext.h, sysdeps/powerpc/novmxsetjmp.h
	* sysdeps/pthread/bits/sigthread.h
	* sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
	* sysdeps/unix/sysv/linux/m68k/sys/ucontext.h
	* sysdeps/unix/sysv/linux/mips/sys/ucontext.h
	* sysdeps/unix/sysv/linux/nios2/sys/ucontext.h
	* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h
	* sysdeps/unix/sysv/linux/s390/sys/ucontext.h
	* sysdeps/unix/sysv/linux/sh/sys/ucontext.h
	* sysdeps/unix/sysv/linux/sparc/sys/ucontext.h
	* sysdeps/unix/sysv/linux/tile/sys/ucontext.h
	* sysdeps/unix/sysv/linux/x86/sys/ucontext.h:
	Use bits/types/__sigset_t.h.

	* misc/sys/select.h, posix/spawn.h
	* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h
	* sysdeps/unix/sysv/linux/sys/epoll.h
	* sysdeps/unix/sysv/linux/sys/signalfd.h:
	Use bits/types/sigset_t.h.

	* resolv/netdb.h, rt/mqueue.h: Use bits/types/sigevent_t.h.
	* rt/aio.h: Use bits/types/sigevent_t.h and bits/sigevent-consts.h.
	* socket/sys/socket.h: Don't include bits/sigset.h.

	* login/utmp_file.c, shadow/lckpwdf.c, signal/sigandset.c
	* signal/sigisempty.c, stdlib/abort.c, sysdeps/posix/profil.c
	* sysdeps/posix/sigignore.c, sysdeps/posix/sigintr.c
	* sysdeps/posix/signal.c, sysdeps/posix/sigset.c
	* sysdeps/posix/sprofil.c, sysdeps/posix/sysv_signal.c
	* sysdeps/unix/sysv/linux/nptl-signals.h:
	Include sigsetops.h.

	* signal/sigaddset.c, signal/sigandset.c, signal/sigdelset.c
	* signal/sigorset.c, stdlib/abort.c, sysdeps/posix/sigignore.c
	* sysdeps/posix/signal.c, sysdeps/posix/sigset.c:
	__sigaddset, __sigandset, __sigdelset, __sigemptyset, __sigorset
	now return no value.

	* signal/sigaddset.c, signal/sigdelset.c, signal/sigismem.c
	Include <errno.h>, <signal.h>, and <sigsetops.h> instead of
	"sigsetops.h".

	* signal/sigsetops.c: Explicitly define __sigismember,
	__sigaddset, and __sigdelset as compatibility symbols.

	* signal/Versions: Correct commentary on __sigpause,
	__sigaddset, __sigdelset, __sigismember.

	* inet/rcmd.c: Include sigsetops.h.  Convert old code using
	__sigblock/__sigsetmask to use __sigprocmask and friends.
2017-05-20 19:04:43 -04:00
Joseph Myers 0bcec5321f Split up bits/sigstack.h.
bits/sigstack.h contains four things: the legacy struct sigstack type,
the preferred stack_t type, the SS_* enum values and macros for signal
stack sizes.

These vary in different ways between glibc configurations; in
particular, the stack sizes vary much more than any of the other
pieces.  Furthermore, these pieces have different standard namespace
rules for when they should be visible (not currently visible in
conform/ results both because the relevant tests are XFAILed for
sys/ucontext.h namespace issues, and because some of the expectations
are incorrect in the same way as the headers, e.g. neither
expectations nor headers reflect that current POSIX no longer has
either the sigstack function or the sigstack structure).

To reduce duplication of identical definitions, and facilitate
namespace fixes without requiring the same feature test macro
conditions to be repeated in many versions of the same header, this
patch splits bits/sigstack.h up into four headers.  It keeps the stack
size macros, while new bits/types/struct_sigstack.h,
bits/types/stack_t.h and bits/ss_flags.h are added for the other
pieces.  bits/types/struct_sigstack.h is the same everywhere,
bits/types/stack_t.h has three variants different in the order of the
structure elements (generic = MIPS Linux, and other Linux), and
bits/ss_flags.h has generic and Linux variants.

This patch includes the new headers everywhere that included
<bits/sigstack.h>, so should cause no difference to what any public
header defines.  Subsequent namespace fixes would then remove or
condition some of those includes.

There should be no conflicts with Zack's changes to signal.h types,
beyond the trivial conflict of both making additions to
signal/Makefile's headers list; the two patches affect disjoint sets
of types and other definitions.

Tested for x86_64 and x86, and with build-many-glibcs.py.

	* bits/ss_flags.h: New file.
	* bits/types/stack_t.h: Likewise.
	* include/bits/types/struct_sigstack.h: Likewise.
	* signal/bits/types/struct_sigstack.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/ss_flags.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/types/stack_t.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/types/stack_t.h: Likewise.
	* signal/Makefile (headers): Add bits/types/struct_sigstack.h,
	bits/types/stack_t.h and bits/ss_flags.h.
	* signal/signal.h [__USE_XOPEN_EXTENDED || __USE_XOPEN2K8]:
	Include <bits/types/struct_sigstack.h>, <bits/types/stack_t.h> and
	<bits/ss_flags.h>.
	* bits/sigstack.h (struct sigstack): Remove.
	(stack_t): Likewise.
	(SS_ONSTACK): Likewise.
	(SS_DISABLE): Likewise.
	* sysdeps/unix/sysv/linux/aarch64/bits/sigstack.h
	(struct sigstack): Likewise.
	(stack_t): Likewise.
	(SS_ONSTACK): Likewise.
	(SS_DISABLE): Likewise.
	* sysdeps/unix/sysv/linux/alpha/bits/sigstack.h (struct sigstack):
	Likewise.
	(stack_t): Likewise.
	(SS_ONSTACK): Likewise.
	(SS_DISABLE): Likewise.
	* sysdeps/unix/sysv/linux/bits/sigstack.h (struct sigstack):
	Likewise.
	(stack_t): Likewise.
	(SS_ONSTACK): Likewise.
	(SS_DISABLE): Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/sigstack.h: Likewise.
	* sysdeps/unix/sysv/linux/ia64/bits/sigstack.h (struct sigstack):
	Likewise.
	(stack_t): Likewise.
	(SS_ONSTACK): Likewise.
	(SS_DISABLE): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h
	(struct sigstack): Likewise.
	(stack_t): Likewise.
	(SS_ONSTACK): Likewise.
	(SS_DISABLE): Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/sigstack.h (struct sigstack):
	Likewise.
	(stack_t): Likewise.
	(SS_ONSTACK): Likewise.
	(SS_DISABLE): Likewise.
	* sysdeps/arm/sys/ucontext.h: Include
	<bits/types/struct_sigstack.h>, <bits/types/stack_t.h> and
	<bits/ss_flags.h>.
	* sysdeps/generic/sys/ucontext.h: Likewise.
	* sysdeps/i386/sys/ucontext.h: Likewise.
	* sysdeps/m68k/sys/ucontext.h: Likewise.
	* sysdeps/mips/sys/ucontext.h: Likewise.
	* sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h: Likewise.
	* sysdeps/unix/sysv/linux/alpha/sys/ucontext.h: Likewise.
	* sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Likewise.
	* sysdeps/unix/sysv/linux/hppa/sys/ucontext.h: Likewise.
	* sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h: Likewise.
	* sysdeps/unix/sysv/linux/ia64/sys/ucontext.h: Likewise.
	* sysdeps/unix/sysv/linux/m68k/sys/ucontext.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Likewise.
	* sysdeps/unix/sysv/linux/nios2/sys/ucontext.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Likewise.
	* sysdeps/unix/sysv/linux/s390/sys/ucontext.h: Likewise.
	* sysdeps/unix/sysv/linux/sh/sys/ucontext.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sys/ucontext.h: Likewise.
	* sysdeps/unix/sysv/linux/tile/sys/ucontext.h: Likewise.
	* sysdeps/unix/sysv/linux/x86/sys/ucontext.h: Likewise.
2017-05-19 20:35:07 +00:00
Joseph Myers 5df4854ed2 Condition some sys/ucontext.h contents on __USE_MISC (bug 21457).
Continuing the fixes for namespace issues arising from sys/ucontext.h,
this patch conditions various definitions, that are not needed for
defining mcontext_t / ucontext_t, on __USE_MISC, so they do not appear
in strict POSIX modes.

This patch is non-exhaustive; that is, it only conditions
straightforward cases and there may be more such definitions that can
be conditioned for these and other architectures, to be dealt with
later in separate patches.  Also, using __USE_MISC is the minimum
change for these definitions where they conflict with POSIX; some
headers already have __USE_GNU conditionals on similar definitions of
names for registers.  The patch specifically does not do anything with
definitions in bits/sigcontext.h, and nor does it condition any
inclusions of bits/sigcontext.h even where in fact that is not needed
on some architectures for the definitions of mcontext_t / ucontext_t.

As other namespace issues in these headers remain, this patch does not
fix bug 21457, nor allow any XFAILs to be removed.

Tested with build-many-glibcs.py.

	[BZ #21457]
	* sysdeps/arm/sys/ucontext.h (R0): Condition on [__USE_MISC].
	(R1): Likewise.
	(R2): Likewise.
	(R3): Likewise.
	(R4): Likewise.
	(R5): Likewise.
	(R6): Likewise.
	(R7): Likewise.
	(R8): Likewise.
	(R9): Likewise.
	(R10): Likewise.
	(R11): Likewise.
	(R12): Likewise.
	(R13): Likewise.
	(R14): Likewise.
	(R15): Likewise.
	* sysdeps/i386/sys/ucontext.h (REG_GS): Likewise.
	(REG_FS): Likewise.
	(REG_ES): Likewise.
	(REG_DS): Likewise.
	(REG_EDI): Likewise.
	(REG_ESI): Likewise.
	(REG_EBP): Likewise.
	(REG_ESP): Likewise.
	(REG_EBX): Likewise.
	(REG_EDX): Likewise.
	(REG_ECX): Likewise.
	(REG_EAX): Likewise.
	(REG_TRAPNO): Likewise.
	(REG_ERR): Likewise.
	(REG_EIP): Likewise.
	(REG_CS): Likewise.
	(REG_EFL): Likewise.
	(REG_UESP): Likewise.
	(REG_SS): Likewise.
	* sysdeps/m68k/sys/ucontext.h (R_D0): Likewise.
	(R_D1): Likewise.
	(R_D2): Likewise.
	(R_D3): Likewise.
	(R_D4): Likewise.
	(R_D5): Likewise.
	(R_D6): Likewise.
	(R_D7): Likewise.
	(R_A0): Likewise.
	(R_A1): Likewise.
	(R_A2): Likewise.
	(R_A3): Likewise.
	(R_A4): Likewise.
	(R_A5): Likewise.
	(R_A6): Likewise.
	(R_A7): Likewise.
	(R_SP): Likewise.
	(R_PC): Likewise.
	(R_PS): Likewise.
	(fpregset_t): Likewise.
	(MCONTEXT_VERSION): Likewise.
	* sysdeps/mips/sys/ucontext.h (CTX_R0): Likewise.
	(CTX_AT): Likewise.
	(CTX_V0): Likewise.
	(CTX_V1): Likewise.
	(CTX_A0): Likewise.
	(CTX_A1): Likewise.
	(CTX_A2): Likewise.
	(CTX_A3): Likewise.
	(CTX_T0): Likewise.
	(CTX_T1): Likewise.
	(CTX_T2): Likewise.
	(CTX_T3): Likewise.
	(CTX_T4): Likewise.
	(CTX_T5): Likewise.
	(CTX_T6): Likewise.
	(CTX_T7): Likewise.
	(CTX_S0): Likewise.
	(CTX_S1): Likewise.
	(CTX_S2): Likewise.
	(CTX_S3): Likewise.
	(CTX_S4): Likewise.
	(CTX_S5): Likewise.
	(CTX_S6): Likewise.
	(CTX_S7): Likewise.
	(CTX_T8): Likewise.
	(CTX_T9): Likewise.
	(CTX_K0): Likewise.
	(CTX_K1): Likewise.
	(CTX_GP): Likewise.
	(CTX_SP): Likewise.
	(CTX_S8): Likewise.
	(CTX_RA): Likewise.
	(CTX_MDLO): Likewise.
	(CTX_MDHI): Likewise.
	(CTX_CAUSE): Likewise.
	(CTX_EPC): Likewise.
	* sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h: Condition
	inclusion of <sys/procfs.h> on [__USE_MISC].
	(greg_t): Condition on [__USE_MISC].
	(gregset_t): Likewise.
	(fpregset_t): Likewise.
	* sysdeps/unix/sysv/linux/arm/sys/ucontext.h (greg_t): Likewise.
	(NGREG): Likewise.
	(gregset_t): Likewise.
	(REG_R0): Likewise.
	(REG_R1): Likewise.
	(REG_R2): Likewise.
	(REG_R3): Likewise.
	(REG_R4): Likewise.
	(REG_R5): Likewise.
	(REG_R6): Likewise.
	(REG_R7): Likewise.
	(REG_R8): Likewise.
	(REG_R9): Likewise.
	(REG_R10): Likewise.
	(REG_R11): Likewise.
	(REG_R12): Likewise.
	(REG_R13): Likewise.
	(REG_R14): Likewise.
	(REG_R15): Likewise.
	(struct _libc_fpstate): Likewise.
	(fpregset_t): Likewise.
	* sysdeps/unix/sysv/linux/hppa/sys/ucontext.h (NGREG): Likewise.
	(NFPREG): Likewise.
	(gregset_t): Likewise.
	(fpregset_t): Likewise.
	* sysdeps/unix/sysv/linux/m68k/sys/ucontext.h (R_D0): Likewise.
	(R_D1): Likewise.
	(R_D2): Likewise.
	(R_D3): Likewise.
	(R_D4): Likewise.
	(R_D5): Likewise.
	(R_D6): Likewise.
	(R_D7): Likewise.
	(R_A0): Likewise.
	(R_A1): Likewise.
	(R_A2): Likewise.
	(R_A3): Likewise.
	(R_A4): Likewise.
	(R_A5): Likewise.
	(R_A6): Likewise.
	(R_A7): Likewise.
	(R_SP): Likewise.
	(R_PC): Likewise.
	(R_PS): Likewise.
	(fpregset_t): Likewise.
	(MCONTEXT_VERSION): Likewise.
	* sysdeps/unix/sysv/linux/nios2/sys/ucontext.h (MCONTEXT_VERSION):
	Likewise.
	* sysdeps/unix/sysv/linux/sh/sys/ucontext.h (REG_R0): Likewise.
	(REG_R1): Likewise.
	(REG_R2): Likewise.
	(REG_R3): Likewise.
	(REG_R4): Likewise.
	(REG_R5): Likewise.
	(REG_R6): Likewise.
	(REG_R7): Likewise.
	(REG_R8): Likewise.
	(REG_R9): Likewise.
	(REG_R10): Likewise.
	(REG_R11): Likewise.
	(REG_R12): Likewise.
	(REG_R13): Likewise.
	(REG_R14): Likewise.
	(REG_R15): Likewise.
	* sysdeps/unix/sysv/linux/tile/sys/ucontext.h: Condition inclusion
	of <arch/abi.h> on [__USE_MISC].
	(greg_t): Condition on [__USE_MISC].
	(NGREG): Likewise.
	(gregset_t): Likewise.
2017-05-11 14:15:26 +00:00
Joseph Myers bfff8b1bec Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Zack Weinberg c66b29f9cc Installed-header hygiene (BZ#20366): stack_t.
sys/ucontext.h unconditionally uses stack_t, and it does not make
sense to change that.  But signal.h only declares stack_t under
__USE_XOPEN_EXTENDED || __USE_XOPEN2K8.  The actual definition is
already in a bits header, bits/sigstack.h, but that header insists on
only being included by signal.h, so we have to change that as well as
all of the sys/ucontext.h variants.  (Some but not all variants of
bits/sigcontext.h, which sys/ucontext.h may also need, had already
received this adjustment; for consistency, I made them all the same,
even if that's not strictly necessary in some configurations.)
bits/sigcontext.h and bits/sigstack.h also all need to receive
multiple inclusion guards.

	* sysdeps/generic/sys/ucontext.h
	* sysdeps/arm/sys/ucontext.h
	* sysdeps/i386/sys/ucontext.h
	* sysdeps/m68k/sys/ucontext.h
	* sysdeps/mips/sys/ucontext.h
	* sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h
	* sysdeps/unix/sysv/linux/alpha/sys/ucontext.h
	* sysdeps/unix/sysv/linux/arm/sys/ucontext.h
	* sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
	* sysdeps/unix/sysv/linux/ia64/sys/ucontext.h
	* sysdeps/unix/sysv/linux/m68k/sys/ucontext.h
	* sysdeps/unix/sysv/linux/mips/sys/ucontext.h
	* sysdeps/unix/sysv/linux/nios2/sys/ucontext.h
	* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h
	* sysdeps/unix/sysv/linux/s390/sys/ucontext.h
	* sysdeps/unix/sysv/linux/sh/sys/ucontext.h
	* sysdeps/unix/sysv/linux/sparc/sys/ucontext.h
	* sysdeps/unix/sysv/linux/tile/sys/ucontext.h
	* sysdeps/unix/sysv/linux/x86/sys/ucontext.h:
	Include both bits/sigcontext.h and bits/sigstack.h.
	Fix grammar error in comment, if present.

	* bits/sigstack.h
	* sysdeps/unix/sysv/linux/aarch64/bits/sigstack.h
	* sysdeps/unix/sysv/linux/alpha/bits/sigstack.h
	* sysdeps/unix/sysv/linux/bits/sigstack.h
	* sysdeps/unix/sysv/linux/ia64/bits/sigstack.h
	* sysdeps/unix/sysv/linux/mips/bits/sigstack.h
	* sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h
	* sysdeps/unix/sysv/linux/sparc/bits/sigstack.h
	* bits/sigcontext.h
	* sysdeps/mach/hurd/i386/bits/sigcontext.h
	* sysdeps/unix/sysv/linux/bits/sigcontext.h
	* sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h
	* sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h:
	Add multiple inclusion guard.  Permit inclusion by sys/ucontext.h
	as well as signal.h, if this was not already allowed.  Request
	definition of size_t if necessary.  Minimize semantically-null
	differences across files.
2016-09-23 08:43:56 -04:00
Joseph Myers f7a9f785e5 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Andrew Bennett 7498d7676d MIPS: Only use .set mips* assembler directives when necessary
There are a few .set mips* assembler directives used in the MIPS specific
sysdep code that force an instruction to be assembled for a specific ISA.
The reason for these is to allow an instruction to be encoded when it might
not be supported in the current ISA (when the code is run the Linux kernel
will trap and emulate any unsupported instructions).  Unfortunately forcing
a specific ISA means that when assembling for a newer ISA, where the
instruction has a different encoding, the wrong encoding will be used.

        * sysdeps/mips/bits/atomic.h [_MIPS_SIM == _ABIO32] (MIPS_PUSH_MIPS2):
        Only use .set mips2 if the current ISA is below mips2.
        * sysdeps/mips/sys/tas.h [_MIPS_SIM == _ABIO32] (_test_and_set):
        Likewise.
        * sysdeps/mips/nptl/tls.h (READ_THREAD_POINTER): Only use .set
        mips32r2 if the current ISA is below mips32r2.
        * sysdeps/mips/tls-macros.h (TLS_RDHWR): New define.
        (TLS_IE): Updated to use the TLD_RDHWR macro.
        (TLS_LE): Likewise.
        * sysdeps/unix/mips/sysdep.h (__mips_isa_rev): Moved out of #ifdef
        __ASSEMBLER__ condition.
2015-09-08 16:52:43 +01:00
Joseph Myers 86c56b164c Fix MIPS __mips_isa_rev -Werror=undef build.
I see an error

In file included from ../sysdeps/mips/include/sys/asm.h:20:0,
                 from ../sysdeps/mips/start.S:39:
../sysdeps/mips/sys/asm.h:421:5: error: "__mips_isa_rev" is not defined [-Werror=undef]
 #if __mips_isa_rev < 6
     ^
cc1: some warnings being treated as errors

in MIPS builds.  As sys/asm.h is an installed header, it seems better
to test for !defined __mips_isa_rev here, instead of defining it to 0
as done in sysdeps/unix/mips/sysdep.h, to avoid perturbing any code
outside glibc that tests whether __mips_isa_rev is defined; this patch
does so.

	* sysdeps/mips/sys/asm.h [__mips_isa_rev < 6]: Change condition to
	[!defined __mips_isa_rev || __mips_isa_rev < 6].
2015-02-16 22:12:15 +00:00
Joseph Myers b168057aaa Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Steve Ellcey 04d5556197 2014-12-19 Steve Ellcey <sellcey@imgtec.com>
* sysdeps/mips/sys/asm.h (PTR_ADDU): Use addu on mips32r6/mips64r6.
	(PTR_ADDIU): Use addiu for mips32r6/mips64r6.
	(PTR_SUBU): Use subu for mips32r6/mips64r6.
	(PTR_SUBIU): Use subu for mips32r6/mips64r6 (subiu does not exist).
	* sysdeps/mips/machine-gmon.h (PTR_ADDU_STRING) Use addu for
	mips32r6/mips64r6.
	(PTR_SUBU_STRING) Use subu for mips32r6/mips64r6.
2014-12-19 14:37:44 -08:00
Steve Ellcey 5057ad3b50 2014-05-07 Steve Ellcey <sellcey@mips.com>
[BZ# 16922]
	* sysdeps/mips/sys/asm.h (INT_SUB): Fix definition.
	(LONG_SUB): Ditto.
	(PTR_SUB): Ditto.
2014-05-07 13:10:48 -07:00
Joseph Myers 2ad7600be7 Move mips from ports to libc.
I've moved the MIPS port from ports to the main sysdeps hierarchy.
Beyond the README update, the move of the files was simply

git mv ports/sysdeps/mips sysdeps/mips
git mv ports/sysdeps/unix/mips sysdeps/unix/mips
git mv ports/sysdeps/unix/sysv/linux/mips sysdeps/unix/sysv/linux/mips

and in addition to the ChangeLog entries here, I put a note at the top
of ports/ChangeLog.mips similar to those in other files.

Tested that disassembly of installed shared libraries for mips is the
same before and after this patch (except for ld.so where paths in
assertions are involved, as for arm).

	* sysdeps/mips: Move directory from ports/sysdeps/mips.
	* sysdeps/unix/mips: Move directory from ports/sysdeps/unix/mips.
	* sysdeps/unix/sysv/linux/mips: Move directory from
	ports/sysdeps/unix/sysv/linux/mips.
	* README: Update listing for mips-*-linux-gnu and
	mips64-*-linux-gnu.

	* sysdeps/mips: Move directory to ../sysdeps/mips.
	* sysdeps/unix/mips: Move directory to ../sysdeps/unix/mips.
	* sysdeps/unix/sysv/linux/mips: Move directory to
	../sysdeps/unix/sysv/linux/mips.
2014-02-10 23:30:21 +00:00
Roland McGrath 0d5cb2c74f [BZ #2329]
2006-02-20  Roland McGrath  <roland@redhat.com>
	* sysdeps/mips: Directory removed, saved in ports repository.
	* sysdeps/unix/mips: Likewise.
	* sysdeps/unix/sysv/linux/mips: Likewise.
	* sysdeps/mach/mips: Likewise.
	* sysdeps/mach/hurd/mips: Likewise.
	* shlib-versions: Remove mips matches, now in ports fragment.
	* sysdeps/unix/sysv/linux/kernel-features.h: Likewise.
	* configure.in (machine): Likewise.
	* configure: Regenerated.
2006-02-15  Thomas Schwinge  <tschwinge@gnu.org>

	[BZ #2329]
	* include/unistd.h (__getresuid, __getresgid, __setresuid)
	(__setresgid): Fix argument name order in prototypes.
	* posix/unistd.h (getresuid, getresgid, setresuid, setresgid):
	Likewise.
	* posix/getresuid.c (__getresuid): Fix argument order in definition.
	* posix/getresgid.c (__getresgid): Likewise.
	* posix/setresuid.c (__setresuid): Likewise.
	* posix/setresgid.c (__setresgid): Likewise.
	* sysdeps/mach/hurd/getresuid.c (__getresuid): Likewise.
	* sysdeps/mach/hurd/getresgid.c (__getresgid): Likewise.
	* sysdeps/mach/hurd/setresuid.c (__setresuid): Likewise.
	* sysdeps/mach/hurd/setresgid.c (__setresgid): Likewise.
	Reported by Samuel Thibault <samuel.thibault@ens-lyon.org>.
2006-02-21 02:30:10 +00:00
Andreas Jaeger f850220be6 Update.
* sysdeps/mips/atomicity.h: Remove unused file.
	* sysdeps/mips/dl-machine.h (elf_machine_rel): Add TLS relocations.
	* sysdeps/mips/dl-tls.h: New file.
	* sysdeps/mips/libc-tls.c: New file.
	* sysdeps/mips/tls-macros.h: New file.
	* sysdeps/mips/bits/atomic.h: New file.
	* sysdeps/mips/bits/setjmp.h: Protect against multiple inclusion.
	* sysdeps/mips/elf/configure.in: New file.
	* sysdeps/mips/elf/configure: Generated.
	* sysdeps/mips/sys/asm.h: New file.
	* sysdeps/unix/sysv/linux/mips/vfork.S: New file.
	* sysdeps/unix/sysv/linux/mips/clone.S: Add NPTL and five-argument
	clone support.
	* sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
	(INTERNAL_SYSCALL_NCS): New.
	(INTERNAL_SYSCALL): Update for non-constant support.
	(internal_syscall0): Likewise.
	(internal_syscall1): Likewise.
	(internal_syscall2): Likewise.
	(internal_syscall3): Likewise.
	(internal_syscall4): Likewise.
	(internal_syscall5): Likewise.
	(internal_syscall6): Likewise.
	(internal_syscall7): Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/siginfo.h (SIGEV_THREAD):
	Update to match the kernel.
	(SIGEV_CALLBACK): Likewise.
	(SIGEV_THREAD_ID): Likewise.

2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
2005-03-28 09:26:46 +00:00
Ulrich Drepper a334319f65 (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4. 2004-12-22 20:10:10 +00:00
Jakub Jelinek 0ecb606cb6 2.5-18.1 2007-07-12 18:26:36 +00:00
Andreas Jaeger c997e9d40e Update.
2004-11-05  Maciej W. Rozycki  <macro@mips.com>

	* sysdeps/mips/dl-machine.h: Include <sgidefs.h>.  Use _ABIO32,
	_ABIN32 and _ABI64 for ABI selection throughout.
	* sysdeps/mips/elf/start.S: Likewise.
	* sysdeps/mips/mips64/__longjmp.c: Likewise.
	* sysdeps/mips/mips64/bsd-_setjmp.S: Likewise.
	* sysdeps/mips/mips64/bsd-setjmp.S: Likewise.
	* sysdeps/mips/mips64/setjmp.S: Likewise.
	* sysdeps/mips/mips64/setjmp_aux.c: Likewise.
	* sysdeps/mips/sys/regdef.h: Likewise.
	* sysdeps/mips/sys/ucontext.h: Likewise.
	* sysdeps/unix/mips/sysdep.h: Likewise.
	* sysdeps/unix/sysv/linux/kernel-features.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/pread.c: Likewise.
	* sysdeps/unix/sysv/linux/mips/pread64.c: Likewise.
	* sysdeps/unix/sysv/linux/mips/ptrace.c: Likewise.
	* sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise.
	* sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise.
	* sysdeps/unix/sysv/linux/mips/sigaction.c: Likewise.
	* sysdeps/unix/sysv/linux/mips/sys/procfs.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Likewise.

	* sysdeps/mips/atomicity.h: Use _ABIO32, _ABIN32 and _ABI64 for
	ABI selection throughout.
	* sysdeps/mips/bits/setjmp.h: Likewise.
	* sysdeps/mips/fpu/bits/mathdef.h: Likewise.
	* sysdeps/mips/machine-gmon.h: Likewise.
	* sysdeps/mips/sys/asm.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/sigcontext.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/stat.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/kernel_stat.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/sigcontextinfo.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/sys/ptrace.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/sys/tas.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/sys/user.h: Likewise.

	* sysdeps/mips/sgidefs.h: Prevent <asm/sgidefs.h> from being 
	included by kernel headers and undo its settings if already 
	included.  Define _ABIO32, _ABIN32 and _ABI64 if missing and use 
	them to define _MIPS_SIM_ABI32, _MIPS_SIM_NABI32 and 
	_MIPS_SIM_ABI64 for compatibility.
	* sysdeps/unix/sysv/linux/mips/Makefile: Use _ABIO32, _ABIN32 and
	_ABI64 for ABI selection in generated syscall-list.h
	* sysdeps/unix/sysv/linux/mips/configure.in: Use _ABIO32, _ABIN32
	and _ABI64 for ABI selection in generated asm-unistd.h.
	* sysdeps/unix/sysv/linux/mips/configure: Regenerate.

	* sysdeps/unix/sysv/linux/mips/pwrite.c (__libc_pwrite): Correct
	an inverted _MIPS_SIM conditional.
2004-11-24 04:39:24 +00:00
Alexandre Oliva c9efbeda6f * sysdeps/mips/sys/regdef.h (t4,t5,t6,t7): Renamed to t0..t3 on NewABI. (ta0, ta1, ta2, ta3): Defined to t4..t7 on o32, and a4..a7 on NewABI. * sysdeps/mips/mips64/memcpy.S: Adjust register naming conventions. * sysdeps/mips/mips64/memset.S: Likewise. * sysdeps/unix/mips/sysdep.S (__syscall_error) [_LIBC_REENTRANT]: Use t0 instead of t4 as temporary.
2003-04-08  Alexandre Oliva  <aoliva@redhat.com>

	* sysdeps/mips/sys/regdef.h (t4,t5,t6,t7): Renamed to t0..t3 on
	NewABI.
	(ta0, ta1, ta2, ta3): Defined to t4..t7 on o32, and a4..a7 on
	NewABI.
	* sysdeps/mips/mips64/memcpy.S: Adjust register naming
	conventions.
	* sysdeps/mips/mips64/memset.S: Likewise.
	* sysdeps/unix/mips/sysdep.S (__syscall_error) [_LIBC_REENTRANT]:
	Use t0 instead of t4 as temporary.
2003-04-09 02:51:04 +00:00
Alexandre Oliva 1b12060c5e * sysdeps/mips/sgidefs.h (_MIPS_ISA_MIPS32, _MIPS_ISA_MIPS64): Define. * sysdeps/mips/sys/asm.h: Test _MIPS_ISA against them on all ISA tests. (ALSZ, ALMASK, SZREG, REG_S, REG_L): Define based on ABI, not ISA. (PTR_ADD, etc): Test _MIPS_SZPTR instead of _MIPS_SZLONG. * sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Use _MIPS_SZPTR to decide whether to add padding. * sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Use _MIPS_SZPTR to decide whether to add padding. * sysdeps/unix/sysv/linux/mips/kernel_sigaction.h (struct old_kernel_sigaction): Likewise.
2003-03-25  Alexandre Oliva  <aoliva@redhat.com>

	* sysdeps/mips/sgidefs.h (_MIPS_ISA_MIPS32, _MIPS_ISA_MIPS64):
	Define.
	* sysdeps/mips/sys/asm.h: Test _MIPS_ISA against them on all
	ISA tests.
	(ALSZ, ALMASK, SZREG, REG_S, REG_L): Define based on ABI, not ISA.
	(PTR_ADD, etc): Test _MIPS_SZPTR instead of _MIPS_SZLONG.
	* sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Use _MIPS_SZPTR
	to decide whether to add padding.
	* sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Use _MIPS_SZPTR
	to decide whether to add padding.
	* sysdeps/unix/sysv/linux/mips/kernel_sigaction.h (struct
	old_kernel_sigaction): Likewise.
2003-03-25 21:51:53 +00:00
Alexandre Oliva 4947b4b20f * sysdeps/mips/bits/wordsize.h: New file, appropriate for all 3 ABIs. * sysdeps/mips/mips64/gmp-mparam.h: New file. Define BITS_PER_LONGINT to __WORDSIZE, to match all 3 ABIs. * sysdeps/mips/setjmp_aux.c (STRINGXP, REGS, PTRS): New macros. (__sigsetjmp_aux): Use them. Adjust for all 3 ABIs. * sysdeps/mips/elf/start.S: Adjust for all 3 ABIs. * sysdeps/unix/mips/brk.S: Likewise. * sysdeps/unix/mips/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/mips/clone.S: Likewise. * sysdeps/mips/bits/setjmp.h (__jmp_buf): Likewise. * sysdeps/mips/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/mips/sys/profcs.h: Likewise. * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/mips/kernel_stat.h: Likewise. * sysdeps/mips/mips64/bsd-_setjmp.S: Likewise. * sysdeps/mips/mips64/bsd-setjmp.S: Likewise. * sysdeps/mips/mips64/setjmp.S: Likewise. * sysdeps/mips/mips64/bits/setjmp.h: Deleted, obsolete. * sysdeps/mips/mips64/soft-fp/sfp-machine.h: Use long long for 64-bit types.
2003-03-17  Alexandre Oliva  <aoliva@redhat.com>

	* sysdeps/mips/bits/wordsize.h: New file, appropriate for all
	3 ABIs.
	* sysdeps/mips/mips64/gmp-mparam.h: New file.  Define
	BITS_PER_LONGINT to __WORDSIZE, to match all 3 ABIs.
	* sysdeps/mips/setjmp_aux.c (STRINGXP, REGS, PTRS): New macros.
	(__sigsetjmp_aux): Use them.  Adjust for all 3 ABIs.
	* sysdeps/mips/elf/start.S: Adjust for all 3 ABIs.
	* sysdeps/unix/mips/brk.S: Likewise.
	* sysdeps/unix/mips/sysdep.S: Likewise.
	* sysdeps/unix/sysv/linux/mips/clone.S: Likewise.
	* sysdeps/mips/bits/setjmp.h (__jmp_buf): Likewise.
	* sysdeps/mips/sys/ucontext.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/sys/profcs.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/kernel_stat.h: Likewise.
	* sysdeps/mips/mips64/bsd-_setjmp.S: Likewise.
	* sysdeps/mips/mips64/bsd-setjmp.S: Likewise.
	* sysdeps/mips/mips64/setjmp.S: Likewise.
	* sysdeps/mips/mips64/bits/setjmp.h: Deleted, obsolete.
	* sysdeps/mips/mips64/soft-fp/sfp-machine.h: Use long long for
	64-bit types.
2003-03-17 15:47:13 +00:00
Alexandre Oliva 4abdb6ca35 * sysdeps/mips/sys/asm.h: Formatting changes. (PTR, PTRSIZE, PTRLOG): Adjust for all 3 ABIs. (CPADD): Define for all of them. (SETUP_GP, SETUP_GPX, SETUP_GPX_L, SAVE_GP, SETUP_GP64, SETUP_GPX64, SETUP_GPX64_L, RESTORE_GP64, USE_ALT_CP, NARGSAVE): Define per ABI spec. (END): Don't redefine. (LONG_SLL, LONG_SLLV, LONG_SRL, LONG_SRLV, LONG_SRA, LONG_SRAV): Remove duplicate definitions. (PTR_ADD, PTR_ADDI, PTR_ADDU, PTR_ADDIU, PTR_SUB, PTR_SUBI, PTR_SUBU, PTR_SUBIU, PTR_L, PTR_S, PTR_SLL, PTR_SLLV, PTR_SRL, PTR_SRLV, PTR_SRA, PTR_SRAV, PTR_SCALESHIFT): Define for n32. (PTR_LA): Define for all 3 ABIs.
* sysdeps/mips/sys/asm.h: Formatting changes.
	(PTR, PTRSIZE, PTRLOG): Adjust for all 3 ABIs.
	(CPADD): Define for all of them.
	(SETUP_GP, SETUP_GPX, SETUP_GPX_L, SAVE_GP, SETUP_GP64,
	SETUP_GPX64, SETUP_GPX64_L, RESTORE_GP64, USE_ALT_CP,
	NARGSAVE): Define per ABI spec.
	(END): Don't redefine.
	(LONG_SLL, LONG_SLLV, LONG_SRL, LONG_SRLV, LONG_SRA,
	LONG_SRAV): Remove duplicate definitions.
	(PTR_ADD, PTR_ADDI, PTR_ADDU, PTR_ADDIU, PTR_SUB, PTR_SUBI,
	PTR_SUBU, PTR_SUBIU, PTR_L, PTR_S, PTR_SLL, PTR_SLLV, PTR_SRL,
	PTR_SRLV, PTR_SRA, PTR_SRAV, PTR_SCALESHIFT): Define for n32.
	(PTR_LA): Define for all 3 ABIs.
2003-03-14 11:06:32 +00:00
Alexandre Oliva 5ace139364 * sysdeps/mips/memcpy.S: Map t0-3 to a4-7 on new abis. * sysdeps/mips/memset.S: Likewise. * sysdeps/mips/sys/regdef.h: Alias a4-7 or t0-3 to $8-11 depending on the ABI.
* sysdeps/mips/memcpy.S: Map t0-3 to a4-7 on new abis.
	* sysdeps/mips/memset.S: Likewise.
	* sysdeps/mips/sys/regdef.h: Alias a4-7 or t0-3 to $8-11
	depending on the ABI.

2003-03-14  Alexandre Oliva  <aoliva@redhat.com>
2003-03-14 05:31:28 +00:00
Andreas Jaeger 41bdb6e20c Update to LGPL v2.1.
2001-07-06  Paul Eggert  <eggert@twinsun.com>

	* manual/argp.texi: Remove ignored LGPL copyright notice; it's
	not appropriate for documentation anyway.
	* manual/libc-texinfo.sh: "Library General Public License" ->
	"Lesser General Public License".

2001-07-06  Andreas Jaeger  <aj@suse.de>

	* All files under GPL/LGPL version 2: Place under LGPL version
	2.1.
2001-07-06 04:58:11 +00:00
Ulrich Drepper 9f6b6d8d19 Update.
1999-03-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* sysdeps/i386/sys/ucontext.h (ucontext): Rename field uc_links to
	uc_link which is the right name according to Unix98.
	Reported by Craig Metz [PR libc/1001].
	* sysdeps/arm/sys/ucontext.h (ucontext): Likewise.
	* sysdeps/m68k/sys/ucontext.h (ucontext): Likewise.
	* sysdeps/mips/sys/ucontext.h (ucontext): Likewise.
	* sysdeps/unix/sysv/linux/alpha/sys/ucontext.h (ucontext): Likewise.
	* sysdeps/unix/sysv/linux/i386/sys/ucontext.h (ucontext): Likewise
	* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h (ucontext): Likewise.
1999-03-01 07:21:39 +00:00
Ulrich Drepper 51bba858cd Update.
* Make-dist: If file is generated but still distributed the later
	is correct.

1998-12-30  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	Patche by Ralf Baechle <ralf@gnu.org>:
	* sysdeps/mips/sys/regdef.h: New file, enhanced versions of
	deleted linux specific files.
1999-01-14 13:27:00 +00:00
Ulrich Drepper 118bad87bd Update.
1998-12-31  Ulrich Drepper  <drepper@cygnus.com>

	* iconvdata/Makefile: Use rpath $ORIGIN for modules which use any of
	the conversion libraries.

	* include/features.h: Mention latest extensions in _POSIX_C_SOURCE
	description.

	* libio/genops.c (list_all_lock): New variable.
	(_IO_un_link, _IO_link_in): Acquire lock before modifying _IO_list_all.
	[PR libc/911].

	* sysdeps/i386/i686/strtok.s: Add missing cld.

	* sysdeps/i386/i686/mempcpy.S: New file.

1998-12-30  Geoff Keating  <geoffk@ozemail.com.au>

	Suppress parentheses warnings:
	* sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
	(DL_FIND_ARG_COMPONENTS): here,
	* sysdeps/powerpc/dl-machine.c: here,
	* sysdeps/powerpc/fclrexcpt.c (feclearexcept): here,
	* sysdeps/powerpc/fesetround.c (fesetround): here,
	* sysdeps/powerpc/feupdateenv.c (feupdateenv): here,
	* sysdeps/powerpc/fraiseexcpt.c (feraiseexcept): here,
	* sysdeps/powerpc/fsetexcptflg.c (fesetexceptflag): here,
	* sysdeps/powerpc/s_rint.c (__rint): here,
	* sysdeps/powerpc/s_rintf.c (__rintf): here,
	* sysdeps/powerpc/w_sqrt.c (__sqrt): here,
	* sysdeps/powerpc/w_sqrtf.c (__sqrtf): and here.

1998-12-30  Geoff Keating  <geoffk@ozemail.com.au>

	* wcsmbs/wcstold.c [__NO_LONG_DOUBLE_MATH]: Include wchar.h.
	* wcsmbs/wcstold_l.c [__NO_LONG_DOUBLE_MATH]: Likewise.  Also define
	appropropriate prototypes, correct procedure names.

1998-12-30  Geoff Keating  <geoffk@ozemail.com.au>

	* sysdeps/generic/crypt-entry.c: Prototype __crypt_r, suppress
	warning.
	(__crypt_r): Add __restrict.
	* sysdeps/generic/crypt.h: Remove internal routine.  Add __restrict.

1998-12-31  Ulrich Drepper  <drepper@cygnus.com>

	* stdlib/longlong.h: Add missing #else in SPARC definitions.

1998-12-30  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	Patches by Ralf Baechle <ralf@gnu.org>:
	* sysdeps/unix/sysv/linux/mips/sgidefs.h: Removed.
	* sysdeps/unix/sysv/linux/mips/sys/asm.h:  Removed.
	* sysdeps/unix/sysv/linux/mips/sys/regdef.h:  Removed.
	* sysdeps/unix/sysv/linux/mips/sys/fpregdef.h:  Removed.
	* sysdeps/unix/sysv/linux/mips/regdef.h:  Removed.
	* sysdeps/unix/sysv/linux/mips/fpregdef.h: Removed.

	* sysdeps/unix/sysv/linux/mips/Makefile: Remove delete files.
	* sysdeps/unix/sysv/linux/mips/Dist: Remove deleted files.

	* sysdeps/mips/sys/fpregdef.h: New files, enhanced versions of deleted
	linux specific files.
	* sysdeps/mips/sys/asm.h: Likewise.
	* sysdeps/mips/sgidefs.h: Likewise.
	* sysdeps/mips/fpregdef.h: Likewise.
	* sysdeps/mips/regdef.h: Likewise.

	* sysdeps/mips/Makefile: Add new headers.
	* sysdeps/mips/Dist: Add new files.

	* sysdeps/mips/fpu_control.h (_FPU_DEFAULT): Change value.

1998-12-28  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>

	* iconvdata/Makefile: Remove variable assignments and rules that
	are now auto-generated.  Include $(objpfx)iconv-rules instead.
	Btw, that removes a few typos.
	(charmaps): New variable.
	($(objpfx)iconv-rules): New target.
	(gen-8bit-modules): Renamed from sed-generated-headers, remove .h
	suffixes.
	(gen-8bit-gap-modules): Renamed from awk-generated-headers, remove
	.h suffixes.
	(gen-special-modules): New variable.
	(generated-modules): New variable.
	(headers): Use it.
	(before-compile): Likewise.
	(generated): Likewise, and add iconv-rules.
	* iconvdata/euc-cn.c: Renamed from euccn.c.
	* iconvdata/euc-jp.c: Renamed from eucjp.c.
	* iconvdata/euc-kr.c: Renamed from euckr.c.
	* iconvdata/euc-tw.c: Renamed from euctw.c.
	* iconvdata/iso_6937.c: Renamed from iso6937.c.
	* iconvdata/iso_6937-2.c: Renamed from iso6937-2.c.
	* iconvdata/t.61.c: Renamed from t61.c.
	* iconvdata/Makefile (distribute): Adjusted for those renames.
	Remove $(objpfx) from names.

1998-12-28  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>

	* sysdeps/generic/hp-timing.h: Fix comment.
	* sysdeps/generic/dl-hash.h: Likewise.
	* sysdeps/i386/i686/hp-timing.h: Likewise.

1998-12-28  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>

	* posix/fnmatch.c (fnmatch): Always pass unsigned char values to
	FOLD macro.

1998-12-28  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>

	* nss/db-Makefile ($(VAR_DB)/shadow.db): Fix last change.

1998-12-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Sync with
	current Linux 2.1.132 kernel sources.

1998-12-28  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	Patches by Ralf Baechle <ralf@gnu.org> for Linux/MIPS:
	* sysdeps/unix/sysv/linux/mips/syscalls.list: Add ipc, change
	pread/pwrite and llseek calls.

	* sysdeps/unix/sysv/linux/mips/sysdep.S: New file.

1998-12-29  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>

	* malloc/thread-m.h [_LIBC] : Fix for NO_THREADS case.
1998-12-31 18:19:19 +00:00
Ulrich Drepper cb0509a8d5 Update.
1998-11-26  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/mips/dl-machine.h (ELF_MACHINE_NO_PLT): New defined macro.
	(elf_machine_got_rel): Remove scope variable.  Use scope from the map.
	Don't modify _dl_global_scope_end in the end.
	(__dl_runtime_resolv): Also use scope from the map.
	* sysdeps/mips/mips64/dl-machine.h: Likewise.
	* elf/dl-runtime.c: Don't define fixup and profile_fixup if
	ELF_MACHINE_NO_PLT is defined.
	* sysdeps/mips/sys/ucontext.h: New file.
	Patches by kaz Kojima <kkojima@rr.iij4u.or.jp>.

1998-11-26  Andreas Jaeger  <aj@arthur.rhein-neckar.de> 
 
	* sysdeps/generic/pselect.c (__pselect): Change interface, 
	set/restore sigmask. 
 
	* misc/sys/select.h: Change declaration according to Stevens' Unix  
	Network Programming. 
	* include/sys/select.h (__pselect): Likewise. 
	Reported by <bwelling@anomaly.munge.com> [PR libc/872]. 
 
	* include/fpu_control.h: New file, contains __setfpucw 
	declaration. 
 
	* sysdeps/generic/fpu_control.h: Remove __setfpucw declaration, 
	it's an internal symbol. 
	* sysdeps/alpha/fpu/fpu_control.h: Likewise. 
	* sysdeps/arm/fpu/fpu_control.h: Likewise. 
	* sysdeps/i386/fpu_control.h: Likewise. 
	* sysdeps/m68k/fpu_control.h: Likewise. 
	* sysdeps/powerpc/fpu_control.h: Likewise. 
	* sysdeps/sparc/sparc32/fpu/fpu_control.h: Likewise. 
	* sysdeps/sparc/sparc64/fpu/fpu_control.h: Likewise.
1998-11-26 12:02:23 +00:00