diff options
author | pfg <pfg@FreeBSD.org> | 2014-05-30 01:09:07 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2014-05-30 01:09:07 +0000 |
commit | f14a9b1c1eddb38b0169ad578180f8f2d16f2fd1 (patch) | |
tree | 0f28ab48e41df14ffe5cb02b4faa7394ea45e013 /include/strings.h | |
parent | bb147ad2e05299d0c5f1a6f497a647434e294db4 (diff) | |
download | FreeBSD-src-f14a9b1c1eddb38b0169ad578180f8f2d16f2fd1.zip FreeBSD-src-f14a9b1c1eddb38b0169ad578180f8f2d16f2fd1.tar.gz |
Fix strcasecmp_l() and strncasecmp_l() POSIX 2008 compliance.
POSIX.1-2008 specifies that those two functions should be declared by
including <strings.h>, not <string.h> (the latter only has strcoll_l()
and strxfrm_l()):
http://pubs.opengroup.org/onlinepubs/9699919799/functions/strcasecmp.html
Obtained from: DragonFlyBSD
Reviewed by: theraven
MFC after: 2 weeks
Diffstat (limited to 'include/strings.h')
-rw-r--r-- | include/strings.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/strings.h b/include/strings.h index f272078..4fb9311 100644 --- a/include/strings.h +++ b/include/strings.h @@ -59,6 +59,10 @@ char *rindex(const char *, int) __pure; /* LEGACY */ #endif int strcasecmp(const char *, const char *) __pure; int strncasecmp(const char *, const char *, size_t) __pure; + +#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) +#include <xlocale/_strings.h> +#endif __END_DECLS #endif /* _STRINGS_H_ */ |