[3/5] string: stpcpy.c: Only alias __stpcpy to stpcpy if STPCPY undefined

Message ID 20230415112340.38431-4-xry111@xry111.site
State New
Headers
Series LoongArch: Multiarch string and memory copy routines for unaligned access |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Xi Ruoyao April 15, 2023, 11:23 a.m. UTC
  If STPCPY is defined, it's likely __stpcpy is not provided by this file
anyway.  So it does not make too much sense to make the alias.
---
 string/stpcpy.c | 3 +++
 1 file changed, 3 insertions(+)
  

Patch

diff --git a/string/stpcpy.c b/string/stpcpy.c
index dd0fef12ef..80ddf81595 100644
--- a/string/stpcpy.c
+++ b/string/stpcpy.c
@@ -116,6 +116,9 @@  STPCPY (char *dest, const char *src)
 		  : stpcpy_unaligned_loop ((op_t*) dest,
 					   (const op_t *) (src - ofs) , ofs);
 }
+
+#ifndef STPCPY
 weak_alias (__stpcpy, stpcpy)
 libc_hidden_def (__stpcpy)
 libc_hidden_builtin_def (stpcpy)
+#endif