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