mirror of
				https://sourceware.org/git/glibc.git
				synced 2025-10-24 13:33:08 +03:00 
			
		
		
		
	This patch fixes various miscellaneous namespace issues in the SPARC sys/ucontext.h header. These are similar to changes made previous to other sys/ucontext.h headers, where the SPARC header was excluded from those previous patches because of its complexity. Tested for SPARC with build-many-glibcs.py. [BZ #21457] * sysdeps/unix/sysv/linux/sparc/sys/ucontext.h (__ctx): New macro. [__WORDSIZE == 64] (MC_TSTATE): Define only for [__USE_MISC]. [__WORDSIZE == 64] (MC_PC): Likewise. [__WORDSIZE == 64] (MC_NPC): Likewise. [__WORDSIZE == 64] (MC_Y): Likewise. [__WORDSIZE == 64] (MC_G1): Likewise. [__WORDSIZE == 64] (MC_G2): Likewise. [__WORDSIZE == 64] (MC_G3): Likewise. [__WORDSIZE == 64] (MC_G4): Likewise. [__WORDSIZE == 64] (MC_G5): Likewise. [__WORDSIZE == 64] (MC_G6): Likewise. [__WORDSIZE == 64] (MC_G7): Likewise. [__WORDSIZE == 64] (MC_O0): Likewise. [__WORDSIZE == 64] (MC_O1): Likewise. [__WORDSIZE == 64] (MC_O2): Likewise. [__WORDSIZE == 64] (MC_O3): Likewise. [__WORDSIZE == 64] (MC_O4): Likewise. [__WORDSIZE == 64] (MC_O5): Likewise. [__WORDSIZE == 64] (MC_O6): Likewise. [__WORDSIZE == 64] (MC_O7): Likewise. [__WORDSIZE == 64] (MC_NGREG): Rename to __MC_NGREG and define to __MC_NGREG if [__USE_MISC]. [__WORDSIZE == 64] (MC_MAXFPQ): Define only for [__USE_MISC]. [__WORDSIZE == 64] (mc_gregset_t): Define using __MC_NGREG. [__WORDSIZE == 64] (struct mc_fq): Rename to struct __mc_fq. Define fields using __ctx. [__WORDSIZE == 64] (mc_fpu_t): Remove struct tag. Define fields using __ctx. [__WORDSIZE == 64] (mcontext_t): Define fields using __ctx. (REG_PSR): Define only for [__USE_MISC]. (REG_PC): Likewise. (REG_nPC): Likewise. (REG_Y): Likewise. (REG_G1): Likewise. (REG_G2): Likewise. (REG_G3): Likewise. (REG_G4): Likewise. (REG_G5): Likewise. (REG_G6): Likewise. (REG_G7): Likewise. (REG_O0): Likewise. (REG_O1): Likewise. (REG_O2): Likewise. (REG_O3): Likewise. (REG_O4): Likewise. (REG_O5): Likewise. (REG_O6): Likewise. (REG_O7): Likewise. [__WORDSIZE == 64] (REG_ASI): Define only for [__USE_MISC]. [__WORDSIZE == 64] (REG_FPRS): Likewise. (NGREG): Rename to __NGREG and define to __NGREG if [__USE_MISC]. (gregset_t): Define using __NGREG. (SPARC_MAXREGWINDOW): Rename to __SPARC_MAXREGWINDOW and define to __SPARC_MAXREGWINDOW if [__USE_MISC]. (struct rwindow): Rename to struct __rwindow. Define fields using __ctx. (rw_fp): Define only for [__USE_MISC]. (rw_rtn): Likewise. (gwindows_t): Remove struct tag. Define fields using __ctx and __SPARC_MAXREGWINDOW. (MAXFPQ): Define only for [__USE_MISC]. (struct fpq): Rename to struct __fpq. Define fields using __ctx. (struct fq): Rename to struct __fq. Define fields using __ctx. (FPU_REGS_TYPE): Define only for [__USE_MISC]. (FPU_DREGS_TYPE): Likewise. (V7_FPU_FSR_TYPE): Likewise. (V9_FPU_FSR_TYPE): Likewise. (V9_FPU_FPRS_TYPE): Likewise. [__WORDSIZE == 64] (fpregset_t): Remove struct tag. Define fields using __ctx. [__WORDSIZE != 64] (fpregset_t): Likewise. [__WORDSIZE != 64] (xrs_t): Define fields using __ctx. [__WORDSIZE != 64] (XRS_ID): Define only for [__USE_MISC]. [__WORDSIZE != 64] (mcontext_t): Define fields using __ctx. Rename field filler to __glibc_reserved1. * sysdeps/unix/sysv/linux/sparc/sparc32/ucontext_i.sym (MC_FILLER): Remove.
		
			
				
	
	
		
			61 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			61 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| #include <stddef.h>
 | |
| #include <signal.h>
 | |
| #include <sys/ucontext.h>
 | |
| 
 | |
| --
 | |
| 
 | |
| SIG_BLOCK
 | |
| SIG_SETMASK
 | |
| 
 | |
| UC_FLAGS	offsetof (ucontext_t, uc_flags)
 | |
| UC_LINK		offsetof (ucontext_t, uc_link)
 | |
| UC_SIGMASK	offsetof (ucontext_t, uc_sigmask)
 | |
| UC_STACK	offsetof (ucontext_t, uc_stack)
 | |
| UC_MCONTEXT	offsetof (ucontext_t, uc_mcontext)
 | |
| MC_GREGS	offsetof (mcontext_t, gregs)
 | |
| MC_GWINS	offsetof (mcontext_t, gwins)
 | |
| MC_FPREGS	offsetof (mcontext_t, fpregs)
 | |
| MC_XRS		offsetof (mcontext_t, xrs)
 | |
| GREG_PSR	(REG_PSR * sizeof(greg_t))
 | |
| GREG_PC		(REG_PC * sizeof(greg_t))
 | |
| GREG_NPC	(REG_nPC * sizeof(greg_t))
 | |
| GREG_Y		(REG_Y * sizeof(greg_t))
 | |
| GREG_G1		(REG_G1 * sizeof(greg_t))
 | |
| GREG_G2		(REG_G2 * sizeof(greg_t))
 | |
| GREG_G3		(REG_G3 * sizeof(greg_t))
 | |
| GREG_G4		(REG_G4 * sizeof(greg_t))
 | |
| GREG_G5		(REG_G5 * sizeof(greg_t))
 | |
| GREG_G6		(REG_G6 * sizeof(greg_t))
 | |
| GREG_G7		(REG_G7 * sizeof(greg_t))
 | |
| GREG_O0		(REG_O0 * sizeof(greg_t))
 | |
| GREG_O1		(REG_O1 * sizeof(greg_t))
 | |
| GREG_O2		(REG_O2 * sizeof(greg_t))
 | |
| GREG_O3		(REG_O3 * sizeof(greg_t))
 | |
| GREG_O4		(REG_O4 * sizeof(greg_t))
 | |
| GREG_O5		(REG_O5 * sizeof(greg_t))
 | |
| GREG_O6		(REG_O6 * sizeof(greg_t))
 | |
| GREG_O7		(REG_O7 * sizeof(greg_t))
 | |
| FPU_D0		offsetof (fpregset_t, fpu_fr.fpu_dregs[0])
 | |
| FPU_D2		offsetof (fpregset_t, fpu_fr.fpu_dregs[1])
 | |
| FPU_D4		offsetof (fpregset_t, fpu_fr.fpu_dregs[2])
 | |
| FPU_D6		offsetof (fpregset_t, fpu_fr.fpu_dregs[3])
 | |
| FPU_D8		offsetof (fpregset_t, fpu_fr.fpu_dregs[4])
 | |
| FPU_D10		offsetof (fpregset_t, fpu_fr.fpu_dregs[5])
 | |
| FPU_D12		offsetof (fpregset_t, fpu_fr.fpu_dregs[6])
 | |
| FPU_D14		offsetof (fpregset_t, fpu_fr.fpu_dregs[7])
 | |
| FPU_D16		offsetof (fpregset_t, fpu_fr.fpu_dregs[8])
 | |
| FPU_D18		offsetof (fpregset_t, fpu_fr.fpu_dregs[9])
 | |
| FPU_D20		offsetof (fpregset_t, fpu_fr.fpu_dregs[10])
 | |
| FPU_D22		offsetof (fpregset_t, fpu_fr.fpu_dregs[11])
 | |
| FPU_D24		offsetof (fpregset_t, fpu_fr.fpu_dregs[12])
 | |
| FPU_D26		offsetof (fpregset_t, fpu_fr.fpu_dregs[13])
 | |
| FPU_D28		offsetof (fpregset_t, fpu_fr.fpu_dregs[14])
 | |
| FPU_D30		offsetof (fpregset_t, fpu_fr.fpu_dregs[15])
 | |
| FPU_Q		offsetof (fpregset_t, fpu_q)
 | |
| FPU_FSR		offsetof (fpregset_t, fpu_fsr)
 | |
| FPU_QCNT	offsetof (fpregset_t, fpu_qcnt)
 | |
| FPU_Q_ENTRY_SZ	offsetof (fpregset_t, fpu_q_entrysize)
 | |
| FPU_EN		offsetof (fpregset_t, fpu_en)
 | |
| XRS_ID		offsetof (xrs_t, xrs_id)
 | |
| XRS_PTR		offsetof (xrs_t, xrs_ptr)
 |