#ifndef _LIBC_NAMESPACE_H_
#define _LIBC_NAMESPACE_H_
#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112
#define _ISOC11_SOURCE 1
#endif
#include <sys/cdefs.h>
#define __dso_protected __attribute__((__visibility__("protected")))
#define HIDDEN(x) _libc_##x
#define CANCEL(x) _libc_##x##_cancel
#define WRAP(x) _libc_##x##_wrap
#define HIDDEN_STRING(x) "_libc_" __STRING(x)
#define CANCEL_STRING(x) "_libc_" __STRING(x) "_cancel"
#define WRAP_STRING(x) "_libc_" __STRING(x) "_wrap"
#define PROTO_NORMAL(x) __dso_hidden typeof(x) x asm(HIDDEN_STRING(x))
#define PROTO_STD_DEPRECATED(x) typeof(x) x __attribute__((deprecated))
#define PROTO_DEPRECATED(x) typeof(x) x __attribute__((deprecated, weak))
#define PROTO_CANCEL(x) __dso_hidden typeof(x) HIDDEN(x), \
x asm(CANCEL_STRING(x))
#define PROTO_WRAP(x) PROTO_NORMAL(x), WRAP(x)
#define PROTO_PROTECTED(x) __dso_protected typeof(x) x
#define DEF_STRONG(x) __strong_alias(x, HIDDEN(x))
#define DEF_WEAK(x) __weak_alias(x, HIDDEN(x))
#define DEF_CANCEL(x) __weak_alias(x, CANCEL(x))
#define DEF_WRAP(x) __weak_alias(x, WRAP(x))
#define DEF_SYS(x) __strong_alias(_thread_sys_##x, HIDDEN(x))
#if !defined(__clang__)
#define DEF_BUILTIN(x) DEF_STRONG(x)
#define BUILTIN
#else
#define DEF_BUILTIN(x) __asm("")
#define BUILTIN __dso_protected
#endif
#define MAKE_CLONE(dst, src) __dso_hidden typeof(dst) HIDDEN(dst) \
__attribute__((alias (HIDDEN_STRING(src))))
#define __relro __attribute__((section(".data.rel.ro")))
#include <sys/_types.h>
BUILTIN void *memmove(void *, const void *, __size_t);
BUILTIN void *memcpy(void *__restrict, const void *__restrict, __size_t);
BUILTIN void *memset(void *, int, __size_t);
BUILTIN void __stack_smash_handler(const char [], int __unused);
#if !defined(__clang__)
PROTO_NORMAL(memmove);
PROTO_NORMAL(memcpy);
PROTO_NORMAL(memset);
PROTO_NORMAL(__stack_smash_handler);
#endif
#undef BUILTIN
#endif