Add missing file

This commit is contained in:
Thomas Pöchtrager 2019-11-06 17:56:26 +01:00
parent 5e9c52005f
commit 9fa76fb95a

View File

@ -0,0 +1,40 @@
#include_next <strings.h>
#undef bcmp
#undef bzero
#undef bcopy
#ifndef HAVE_BCMP
static inline int bcmp(const void *s1, const void *s2, size_t n)
{
return __builtin_memcmp(s1, s2, n);
}
#endif
#ifndef HAVE_BZERO
static inline void bzero(void *s, size_t n)
{
__builtin_memset(s, '\0', n);
}
#endif
#ifndef HAVE_BCOPY
static inline void bcopy(const void *src, void *dest, size_t n)
{
__builtin_memcpy(dest, src, n);
}
#endif
#ifndef HAVE_INDEX
static inline char *index(const char *s, int c)
{
return __builtin_strchr(s, c);
}
#endif
#ifndef HAVE_RINDEX
static inline char *rindex(const char *s, int c)
{
return __builtin_strrchr(s, c);
}
#endif