diff options
Diffstat (limited to 'libc/upstream-openbsd/android/include/openbsd-compat.h')
-rw-r--r-- | libc/upstream-openbsd/android/include/openbsd-compat.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libc/upstream-openbsd/android/include/openbsd-compat.h b/libc/upstream-openbsd/android/include/openbsd-compat.h index 878f71cec..6c21c5b49 100644 --- a/libc/upstream-openbsd/android/include/openbsd-compat.h +++ b/libc/upstream-openbsd/android/include/openbsd-compat.h @@ -25,6 +25,8 @@ #include <sys/random.h> // For getentropy. +#include "private/bsd_sys_param.h" + #define __BEGIN_HIDDEN_DECLS _Pragma("GCC visibility push(hidden)") #define __END_HIDDEN_DECLS _Pragma("GCC visibility pop") @@ -38,6 +40,8 @@ extern const char* __progname; /* Ignore all __warn_references in OpenBSD. */ #define __warn_references(sym,msg) +#define PROTO_NORMAL(x) + /* OpenBSD's <ctype.h> uses these names, which conflicted with stlport. * Additionally, we changed the numeric/digit type from N to D for libcxx. */ @@ -55,10 +59,6 @@ extern const char* __progname; #define explicit_bzero(p, s) memset(p, 0, s) -/* OpenBSD has these in <sys/param.h>, but "ALIGN" isn't something we want to reserve. */ -#define ALIGNBYTES (sizeof(uintptr_t) - 1) -#define ALIGN(p) (((uintptr_t)(p) + ALIGNBYTES) &~ ALIGNBYTES) - /* OpenBSD has this in paths.h. But this directory doesn't normally exist. * Even when it does exist, only the 'shell' user has permissions. */ @@ -70,3 +70,7 @@ __LIBC_HIDDEN__ extern const char* __bionic_get_shell_path(); __LIBC_HIDDEN__ extern char* __findenv(const char*, int, int*); __LIBC_HIDDEN__ extern char* _mktemp(char*); + +// Only OpenBSD has this at the moment, and we're more likely to just say +// "malloc is always calloc", so we don't expose this as libc API. +__LIBC_HIDDEN__ void* recallocarray(void*, size_t, size_t, size_t); |