• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #    include <sys/uio.h>
18 #  endif
19 #  include <pthread.h>
20 #  ifdef JEMALLOC_OS_UNFAIR_LOCK
21 #    include <os/lock.h>
22 #  endif
23 #  ifdef JEMALLOC_GLIBC_MALLOC_HOOK
24 #    include <sched.h>
25 #  endif
26 #  include <errno.h>
27 #  include <sys/time.h>
28 #  include <time.h>
29 #  ifdef JEMALLOC_HAVE_MACH_ABSOLUTE_TIME
30 #    include <mach/mach_time.h>
31 #  endif
32 #endif
33 #include <sys/types.h>
34 
35 #include <limits.h>
36 #ifndef SIZE_T_MAX
37 #  define SIZE_T_MAX	SIZE_MAX
38 #endif
39 #include <stdarg.h>
40 #include <stdbool.h>
41 #include <stdio.h>
42 #include <stdlib.h>
43 #include <stdint.h>
44 #include <stddef.h>
45 #ifndef offsetof
46 #  define offsetof(type, member)	((size_t)&(((type *)NULL)->member))
47 #endif
48 #include <string.h>
49 #include <strings.h>
50 #include <ctype.h>
51 #ifdef _MSC_VER
52 #  include <io.h>
53 typedef intptr_t ssize_t;
54 #  define PATH_MAX 1024
55 #  define STDERR_FILENO 2
56 #  define __func__ __FUNCTION__
57 #  ifdef JEMALLOC_HAS_RESTRICT
58 #    define restrict __restrict
59 #  endif
60 /* Disable warnings about deprecated system functions. */
61 #  pragma warning(disable: 4996)
62 #if _MSC_VER < 1800
63 static int
isblank(int c)64 isblank(int c)
65 {
66 
67 	return (c == '\t' || c == ' ');
68 }
69 #endif
70 #else
71 #  include <unistd.h>
72 #endif
73 #include <fcntl.h>
74 
75 #endif /* JEMALLOC_INTERNAL_H */
76