Reduce ARM sys/ucontext.h namespace polution.

This commit is contained in:
Peter Green 2011-12-20 16:02:29 +00:00 committed by Joseph Myers
parent d92b0dd4ed
commit c1e30fd8bf
2 changed files with 76 additions and 36 deletions

View File

@ -1,3 +1,27 @@
2011-12-20 Peter Green <plugwash@p10link.net>
* sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Don't include
<sys/procfs.h>.
(gregset_t): Define without using elf_gregset_t.
(R0): Rename to REG_R0.
(R1): Rename to REG_R1.
(R2): Rename to REG_R2.
(R3): Rename to REG_R3.
(R4): Rename to REG_R4.
(R5): Rename to REG_R5.
(R6): Rename to REG_R6.
(R7): Rename to REG_R7.
(R8): Rename to REG_R8.
(R9): Rename to REG_R9.
(R10): Rename to REG_R10.
(R11): Rename to REG_R11.
(R12): Rename to REG_R12.
(R13): Rename to REG_R13.
(R14): Rename to REG_R14.
(R15): Rename to REG_R15.
(struct _libc_fpstate): New.
(fpregset_t): Define using struct _libc_fpstate.
2011-12-08 David Alan Gilbert <david.gilbert@linaro.org>
* sysdeps/arm/preconfigure: Identify architecture version from

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1998, 1999, 2001, 2006 Free Software Foundation, Inc.
/* Copyright (C) 1998, 1999, 2001, 2006, 2011 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
@ -23,7 +23,6 @@
#include <features.h>
#include <signal.h>
#include <sys/procfs.h>
/* We need the signal context definitions even if they are not used
included in <signal.h>. */
@ -35,47 +34,64 @@ typedef int greg_t;
#define NGREG 18
/* Container for all general registers. */
typedef elf_gregset_t gregset_t;
typedef greg_t gregset_t[NGREG];
/* Number of each register is the `gregset_t' array. */
enum
{
R0 = 0,
#define R0 R0
R1 = 1,
#define R1 R1
R2 = 2,
#define R2 R2
R3 = 3,
#define R3 R3
R4 = 4,
#define R4 R4
R5 = 5,
#define R5 R5
R6 = 6,
#define R6 R6
R7 = 7,
#define R7 R7
R8 = 8,
#define R8 R8
R9 = 9,
#define R9 R9
R10 = 10,
#define R10 R10
R11 = 11,
#define R11 R11
R12 = 12,
#define R12 R12
R13 = 13,
#define R13 R13
R14 = 14,
#define R14 R14
R15 = 15
#define R15 R15
REG_R0 = 0,
#define REG_R0 REG_R0
REG_R1 = 1,
#define REG_R1 REG_R1
REG_R2 = 2,
#define REG_R2 REG_R2
REG_R3 = 3,
#define REG_R3 REG_R3
REG_R4 = 4,
#define REG_R4 REG_R4
REG_R5 = 5,
#define REG_R5 REG_R5
REG_R6 = 6,
#define REG_R6 REG_R6
REG_R7 = 7,
#define REG_R7 REG_R7
REG_R8 = 8,
#define REG_R8 REG_R8
REG_R9 = 9,
#define REG_R9 REG_R9
REG_R10 = 10,
#define REG_R10 REG_R10
REG_R11 = 11,
#define REG_R11 REG_R11
REG_R12 = 12,
#define REG_R12 REG_R12
REG_R13 = 13,
#define REG_R13 REG_R13
REG_R14 = 14,
#define REG_R14 REG_R14
REG_R15 = 15
#define REG_R15 REG_R15
};
struct _libc_fpstate
{
struct
{
unsigned int sign1:1;
unsigned int unused:15;
unsigned int sign2:1;
unsigned int exponent:14;
unsigned int j:1;
unsigned int mantissa1:31;
unsigned int mantissa0:32;
} fpregs[8];
unsigned int fpsr:32;
unsigned int fpcr:32;
unsigned char ftype[8];
unsigned int init_flag;
};
/* Structure to describe FPU registers. */
typedef elf_fpregset_t fpregset_t;
typedef struct _libc_fpstate fpregset_t;
/* Context to describe whole processor state. This only describes
the core registers; coprocessor registers get saved elsewhere