]> git.proxmox.com Git - rustc.git/blob - src/jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h
New upstream version 1.22.1+dfsg1
[rustc.git] / src / jemalloc / include / jemalloc / internal / jemalloc_internal_decls.h
1 #ifndef JEMALLOC_INTERNAL_DECLS_H
2 #define JEMALLOC_INTERNAL_DECLS_H
3
4 #include <math.h>
5 #ifdef _WIN32
6 # include <windows.h>
7 # include "msvc_compat/windows_extra.h"
8
9 #else
10 # include <sys/param.h>
11 # include <sys/mman.h>
12 # if !defined(__pnacl__) && !defined(__native_client__)
13 # include <sys/syscall.h>
14 # if !defined(SYS_write) && defined(__NR_write)
15 # define SYS_write __NR_write
16 # endif
17 # if defined(SYS_open) && defined(__aarch64__)
18 /* Android headers may define SYS_open to __NR_open even though
19 * __NR_open may not exist on AArch64 (superseded by __NR_openat). */
20 # undef SYS_open
21 # endif
22 # include <sys/uio.h>
23 # endif
24 # include <pthread.h>
25 # ifdef JEMALLOC_OS_UNFAIR_LOCK
26 # include <os/lock.h>
27 # endif
28 # ifdef JEMALLOC_GLIBC_MALLOC_HOOK
29 # include <sched.h>
30 # endif
31 # include <errno.h>
32 # include <sys/time.h>
33 # include <time.h>
34 # ifdef JEMALLOC_HAVE_MACH_ABSOLUTE_TIME
35 # include <mach/mach_time.h>
36 # endif
37 #endif
38 #include <sys/types.h>
39
40 #include <limits.h>
41 #ifndef SIZE_T_MAX
42 # define SIZE_T_MAX SIZE_MAX
43 #endif
44 #include <stdarg.h>
45 #include <stdbool.h>
46 #include <stdio.h>
47 #include <stdlib.h>
48 #include <stdint.h>
49 #include <stddef.h>
50 #ifndef offsetof
51 # define offsetof(type, member) ((size_t)&(((type *)NULL)->member))
52 #endif
53 #include <string.h>
54 #include <strings.h>
55 #include <ctype.h>
56 #ifdef _MSC_VER
57 # include <io.h>
58 typedef intptr_t ssize_t;
59 # define PATH_MAX 1024
60 # define STDERR_FILENO 2
61 # define __func__ __FUNCTION__
62 # ifdef JEMALLOC_HAS_RESTRICT
63 # define restrict __restrict
64 # endif
65 /* Disable warnings about deprecated system functions. */
66 # pragma warning(disable: 4996)
67 #if _MSC_VER < 1800
68 static int
69 isblank(int c)
70 {
71
72 return (c == '\t' || c == ' ');
73 }
74 #endif
75 #else
76 # include <unistd.h>
77 #endif
78 #include <fcntl.h>
79
80 #endif /* JEMALLOC_INTERNAL_H */