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