Change index() and rindex() to a weak alias.
This allows people to still write statically linked applications that call strchr() or strrchr() and have a local variable or function called index. Discussed with: bde@
This commit is contained in:
parent
30b42655cf
commit
19c262fe87
@ -63,6 +63,6 @@ L2:
|
||||
ret
|
||||
END(strchr)
|
||||
|
||||
STRONG_ALIAS(index, strchr)
|
||||
WEAK_ALIAS(index, strchr)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -64,6 +64,6 @@ L2:
|
||||
ret
|
||||
END(strrchr)
|
||||
|
||||
STRONG_ALIAS(rindex, strrchr)
|
||||
WEAK_ALIAS(rindex, strrchr)
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
@ -58,4 +58,4 @@ fnd:
|
||||
j ra
|
||||
END(strchr)
|
||||
|
||||
STRONG_ALIAS(index, strchr)
|
||||
WEAK_ALIAS(index, strchr)
|
||||
|
@ -56,4 +56,4 @@ LEAF(strrchr)
|
||||
j ra
|
||||
END(strrchr)
|
||||
|
||||
STRONG_ALIAS(rindex, strrchr)
|
||||
WEAK_ALIAS(rindex, strrchr)
|
||||
|
@ -51,4 +51,4 @@ strchr(const char *p, int ch)
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
__strong_reference(strchr, index);
|
||||
__weak_reference(strchr, index);
|
||||
|
@ -52,4 +52,4 @@ strrchr(const char *p, int ch)
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
__strong_reference(strrchr, rindex);
|
||||
__weak_reference(strrchr, rindex);
|
||||
|
Loading…
Reference in New Issue
Block a user