From 7b037c095e31c2396d0a9b0e6356bc566ee4812f Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Wed, 16 Nov 2016 16:20:26 -0500 Subject: Clean up redundancies between string.h and strings.h. * string/string.h [__USE_MISC]: Include strings.h. (__bzero, bcmp, bcopy, bzero, index, rindex) (strcasecmp, strncasecmp, strcasecmp_l, strncasecmp_l) (ffs, ffsl, ffsll): Don't declare. * string/strings.h: Do not suppress the file if string.h has already been included. (bcmp, bcopy, bzero, strcasecmp, strncasecmp): Add __nonnull annotations. (index, rindex): Define inline forwarders even if __CORRECT_ISO_CPP_STRING_H_PROTO is defined. (ffs): Use __attribute_const__. (ffsl, ffsll): Declare here. (strcasecmp_l, strncasecmp_l): Correct comments; these functions have now been standardized. * include/string.h (__bzero): Declare here. --- include/string.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/string.h b/include/string.h index 45eca3c..f166de9 100644 --- a/include/string.h +++ b/include/string.h @@ -41,6 +41,8 @@ extern void *__memrchr (const void *__s, int __c, size_t __n) extern void *__memchr (const void *__s, int __c, size_t __n) __attribute_pure__; +extern void __bzero (void *__s, size_t __n) __THROW __nonnull ((1)); + extern int __ffs (int __i) __attribute__ ((const)); extern char *__strerror_r (int __errnum, char *__buf, size_t __buflen); -- cgit v1.1