From: kettenis Date: Tue, 31 Dec 2013 23:31:13 +0000 (+0000) Subject: Remove #ifdef _REENTRANT code that isn't used here. These days, the code X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2288a3a9ea41ecdc15991a77eebaf3d1a3aa2777;p=openbsd Remove #ifdef _REENTRANT code that isn't used here. These days, the code handling per-thread errno lives in librthread. ok miod@, espie@ --- diff --git a/lib/libc/arch/arm/sys/cerror.S b/lib/libc/arch/arm/sys/cerror.S index 8c941bd0042..4481a0918f8 100644 --- a/lib/libc/arch/arm/sys/cerror.S +++ b/lib/libc/arch/arm/sys/cerror.S @@ -1,4 +1,4 @@ -/* $OpenBSD: cerror.S,v 1.5 2012/08/22 17:19:34 pascal Exp $ */ +/* $OpenBSD: cerror.S,v 1.6 2013/12/31 23:31:13 kettenis Exp $ */ /* $NetBSD: cerror.S,v 1.5 2003/08/07 16:42:04 agc Exp $ */ /*- @@ -37,15 +37,6 @@ WEAK_ALIAS(CERROR, _CERROR) ASENTRY(_CERROR) -#ifdef _REENTRANT - stmfd sp!, {r4, lr} - mov r4, r0 - bl PIC_SYM(_C_LABEL(__errno), PLT) - str r4, [r0] - mvn r0, #0x00000000 - mvn r1, #0x00000000 - ldmfd sp!, {r4, pc} -#else #ifdef __PIC__ /* Setup the GOT */ ldr r3, .Lgot @@ -71,4 +62,3 @@ ASENTRY(_CERROR) .Lerrno: .word PIC_SYM(_C_LABEL(errno), GOT) -#endif /* _REENTRANT */ diff --git a/lib/libc/arch/sh/sys/cerror.S b/lib/libc/arch/sh/sys/cerror.S index c873e076a4d..3df872707ef 100644 --- a/lib/libc/arch/sh/sys/cerror.S +++ b/lib/libc/arch/sh/sys/cerror.S @@ -1,4 +1,4 @@ -/* $OpenBSD: cerror.S,v 1.3 2012/08/22 17:19:35 pascal Exp $ */ +/* $OpenBSD: cerror.S,v 1.4 2013/12/31 23:31:13 kettenis Exp $ */ /* $NetBSD: cerror.S,v 1.10 2006/01/06 05:14:39 uwe Exp $ */ /*- @@ -40,26 +40,6 @@ WEAK_ALIAS(CERROR, _CERROR) ASENTRY(_CERROR) -#ifdef _REENTRANT - mov.l .L___errno, r1 - PIC_PROLOGUE(.L_got) - sts.l pr, @-sp -1: CALL r1 - mov.l r4, @-sp ! save error code - mov.l @sp+, r4 - lds.l @sp+, pr - PIC_EPILOGUE - mov.l r4, @r0 - mov #-1, r1 - rts - mov #-1, r0 - - .align 2 -.L_got: PIC_GOT_DATUM -.L___errno: CALL_DATUM(_C_LABEL(__errno), 1b) - SET_ASENTRY_SIZE(_CERROR) - -#else /* !_REENTRANT */ #ifdef __PIC__ mova L_GOT, r0 mov.l L_GOT, r1 @@ -82,4 +62,3 @@ L_errno: .long _C_LABEL(errno)@GOT #else L_errno: .long _C_LABEL(errno) #endif -#endif /* !_REENTRANT */