[v2,15/16] arm: Define __memchr

Message ID 20161221230605.28638-16-rth@twiddle.net
State New, archived
Headers

Commit Message

Richard Henderson Dec. 21, 2016, 11:06 p.m. UTC
  All other memchr implementations define it.

	* sysdeps/arm/armv6t2/memchr.S (__memchr): Define alias.
---
 sysdeps/arm/armv6t2/memchr.S | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Joseph Myers Dec. 22, 2016, 12:25 a.m. UTC | #1
On Wed, 21 Dec 2016, Richard Henderson wrote:

> All other memchr implementations define it.

But since memchr is a C90 function (so there are no external-linkage 
namespace issues), and not used in any macros defined in installed headers 
(so no block-scope namespace issues), is there any actual use for 
__memchr, or should all the implementations just define memchr and not 
__memchr?
  
Richard Henderson Dec. 23, 2016, 6:54 p.m. UTC | #2
On 12/21/2016 04:25 PM, Joseph Myers wrote:
> On Wed, 21 Dec 2016, Richard Henderson wrote:
> 
>> All other memchr implementations define it.
> 
> But since memchr is a C90 function (so there are no external-linkage 
> namespace issues), and not used in any macros defined in installed headers 
> (so no block-scope namespace issues), is there any actual use for 
> __memchr, or should all the implementations just define memchr and not 
> __memchr?
> 

It's an excellent question.  As best I can tell, __memchr is no longer used (or
was never used -- it's hard to tell) at all.

Probably it should be purged from all of the implementations.


r~
  

Patch

diff --git a/sysdeps/arm/armv6t2/memchr.S b/sysdeps/arm/armv6t2/memchr.S
index ded52dc..b4117fe 100644
--- a/sysdeps/arm/armv6t2/memchr.S
+++ b/sysdeps/arm/armv6t2/memchr.S
@@ -184,4 +184,6 @@  ENTRY(memchr)
 	DO_RET(lr)
 
 END(memchr)
+
+strong_alias (memchr, __memchr)
 libc_hidden_builtin_def (memchr)