From e4635466da86e5d86e1f50f3ebd2305b888b2bfa Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Fri, 5 Dec 1997 01:34:22 +0000 Subject: [PATCH] ifdef on strcasecmp and strncasecmp git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4114 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/roken/strcasecmp.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/roken/strcasecmp.c b/lib/roken/strcasecmp.c index 7618d0d36..5e25ad140 100644 --- a/lib/roken/strcasecmp.c +++ b/lib/roken/strcasecmp.c @@ -86,6 +86,8 @@ static const unsigned char charmap[] = { '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377', }; +#ifndef HAVE_STRCASECMP + int strcasecmp(const char *s1, const char *s2) { @@ -99,6 +101,10 @@ strcasecmp(const char *s1, const char *s2) return (cm[*us1] - cm[*--us2]); } +#endif /* HAVE_STRCASECMP */ + +#ifndef HAVE_STRNCASECMP + int strncasecmp(const char *s1, const char *s2, size_t n) { @@ -116,3 +122,5 @@ strncasecmp(const char *s1, const char *s2, size_t n) } return (0); } + +#endif /* HAVE_STRNCASECMP */