diff options
author | millert <> | 2015-05-15 22:29:37 +0000 |
---|---|---|
committer | millert <> | 2015-05-15 22:29:37 +0000 |
commit | 1de10ca64487df142a028ce8310115c52be75a23 (patch) | |
tree | 6bbb15fabbabd9646670c0e68b98acb9bd443788 /src/lib/libc/string/strrchr.c | |
parent | 5e21cdbca851c965cd196f1d77d376bda7ff1e4f (diff) | |
download | openbsd-1de10ca64487df142a028ce8310115c52be75a23.tar.gz openbsd-1de10ca64487df142a028ce8310115c52be75a23.tar.bz2 openbsd-1de10ca64487df142a028ce8310115c52be75a23.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 | { |