123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- #ifndef _STRINGS_H
- #define _STRINGS_H 1
- #if !defined _STRING_H || !defined __USE_BSD
- # include <features.h>
- # define __need_size_t
- # include <stddef.h>
- __BEGIN_DECLS
- # ifdef __UCLIBC_SUSV3_LEGACY__
- extern void bcopy (const void *__src, void *__dest, size_t __n)
- __THROW __nonnull ((1, 2));
- extern void bzero (void *__s, size_t __n) __THROW __nonnull ((1));
- extern int bcmp (const void *__s1, const void *__s2, size_t __n)
- __THROW __attribute_pure__ __nonnull ((1, 2));
- extern char *index (const char *__s, int __c)
- __THROW __attribute_pure__ __nonnull ((1));
- extern char *rindex (const char *__s, int __c)
- __THROW __attribute_pure__ __nonnull ((1));
- # else
- # ifdef __UCLIBC_SUSV3_LEGACY_MACROS__
- # define bcopy(src,dest,n) (memmove((dest), (src), (n)), (void) 0)
- # define bzero(s,n) (memset((s), '\0', (n)), (void) 0)
- # define bcmp(s1,s2,n) memcmp((s1), (s2), (size_t)(n))
- # define index(s,c) strchr((s), (c))
- # define rindex(s,c) strrchr((s), (c))
- # endif
- # endif
- extern int ffs (int __i) __THROW __attribute__ ((__const__));
- libc_hidden_proto(ffs)
- # ifdef __USE_GNU
- extern int ffsl (long int __l) __THROW __attribute__ ((__const__));
- # ifdef __GNUC__
- __extension__ extern int ffsll (long long int __ll)
- __THROW __attribute__ ((__const__));
- # endif
- # endif
- extern int strcasecmp (const char *__s1, const char *__s2)
- __THROW __attribute_pure__ __nonnull ((1, 2));
- libc_hidden_proto(strcasecmp)
- extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)
- __THROW __attribute_pure__ __nonnull ((1, 2));
- libc_hidden_proto(strncasecmp)
- #if defined __USE_XOPEN2K8 && defined __UCLIBC_HAS_XLOCALE__
- # include <xlocale.h>
- extern int strcasecmp_l (const char *__s1, const char *__s2,
- __locale_t __loc)
- __THROW __attribute_pure__ __nonnull ((1, 2, 3));
- libc_hidden_proto(strcasecmp_l)
- extern int strncasecmp_l (const char *__s1, const char *__s2,
- size_t __n, __locale_t __loc)
- __THROW __attribute_pure__ __nonnull ((1, 2, 4));
- libc_hidden_proto(strncasecmp_l)
- #endif
- __END_DECLS
- #ifdef _LIBC
- #error "<strings.h> should not be included from libc."
- #endif
- #endif
- #endif
|