diff options
author | millert <> | 2015-05-15 22:29:37 +0000 |
---|---|---|
committer | millert <> | 2015-05-15 22:29:37 +0000 |
commit | 8542b4252e10ee9efd45f44099d0c2f5b6ca5d53 (patch) | |
tree | 6bbb15fabbabd9646670c0e68b98acb9bd443788 /src/lib/libc/string/strrchr.c | |
parent | f8e03ddcf892381c04c6d2274d698a4db936d93b (diff) | |
download | openbsd-8542b4252e10ee9efd45f44099d0c2f5b6ca5d53.tar.gz openbsd-8542b4252e10ee9efd45f44099d0c2f5b6ca5d53.tar.bz2 openbsd-8542b4252e10ee9efd45f44099d0c2f5b6ca5d53.zip |
Make index/rindex weak aliases of strchr/strrchr since they are not
part of the ISO C standard and have also been dropped from POSIX.
OK guenther@ kettenis@
Diffstat (limited to 'src/lib/libc/string/strrchr.c')
-rw-r--r-- | src/lib/libc/string/strrchr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libc/string/strrchr.c b/src/lib/libc/string/strrchr.c index b2f17fba28..181f56ea69 100644 --- a/src/lib/libc/string/strrchr.c +++ b/src/lib/libc/string/strrchr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: strrchr.c,v 1.1 2014/11/30 19:43:57 deraadt Exp $ */ | 1 | /* $OpenBSD: strrchr.c,v 1.2 2015/05/15 22:29:37 millert Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1988 Regents of the University of California. | 3 | * Copyright (c) 1988 Regents of the University of California. |
4 | * All rights reserved. | 4 | * All rights reserved. |
@@ -30,6 +30,8 @@ | |||
30 | 30 | ||
31 | #include <string.h> | 31 | #include <string.h> |
32 | 32 | ||
33 | __weak_alias(rindex, strrchr); | ||
34 | |||
33 | char * | 35 | char * |
34 | strrchr(const char *p, int ch) | 36 | strrchr(const char *p, int ch) |
35 | { | 37 | { |