1 #ifndef JEMALLOC_INTERNAL_DECLS_H
2 #define JEMALLOC_INTERNAL_DECLS_H
4 #include "libc_private.h"
10 # include "msvc_compat/windows_extra.h"
13 # error Generate the headers using x64 vcargs
22 # include <sys/param.h>
23 # include <sys/mman.h>
24 # if !defined(__pnacl__) && !defined(__native_client__)
25 # include <sys/syscall.h>
26 # if !defined(SYS_write) && defined(__NR_write)
27 # define SYS_write __NR_write
29 # if defined(SYS_open) && defined(__aarch64__)
30 /* Android headers may define SYS_open to __NR_open even though
31 * __NR_open may not exist on AArch64 (superseded by __NR_openat). */
38 # include <pthread_np.h>
41 # ifdef JEMALLOC_OS_UNFAIR_LOCK
44 # ifdef JEMALLOC_GLIBC_MALLOC_HOOK
48 # include <sys/time.h>
50 # ifdef JEMALLOC_HAVE_MACH_ABSOLUTE_TIME
51 # include <mach/mach_time.h>
54 #include <sys/types.h>
58 # define SIZE_T_MAX SIZE_MAX
61 # define SSIZE_MAX ((ssize_t)(SIZE_T_MAX >> 1))
70 # define offsetof(type, member) ((size_t)&(((type *)NULL)->member))
77 typedef intptr_t ssize_t;
78 # define PATH_MAX 1024
79 # define STDERR_FILENO 2
80 # define __func__ __FUNCTION__
81 # ifdef JEMALLOC_HAS_RESTRICT
82 # define restrict __restrict
84 /* Disable warnings about deprecated system functions. */
85 # pragma warning(disable: 4996)
89 return (c == '\t' || c == ' ');
97 #endif /* JEMALLOC_INTERNAL_H */