1286866Sjasone#ifndef JEMALLOC_INTERNAL_DECLS_H 2286866Sjasone#define JEMALLOC_INTERNAL_DECLS_H 3286866Sjasone 4286866Sjasone#include "libc_private.h" 5286866Sjasone#include "namespace.h" 6286866Sjasone 7286866Sjasone#include <math.h> 8286866Sjasone#ifdef _WIN32 9286866Sjasone# include <windows.h> 10286866Sjasone# include "msvc_compat/windows_extra.h" 11286866Sjasone 12286866Sjasone#else 13286866Sjasone# include <sys/param.h> 14286866Sjasone# include <sys/mman.h> 15286866Sjasone# if !defined(__pnacl__) && !defined(__native_client__) 16286866Sjasone# include <sys/syscall.h> 17286866Sjasone# if !defined(SYS_write) && defined(__NR_write) 18286866Sjasone# define SYS_write __NR_write 19286866Sjasone# endif 20286866Sjasone# include <sys/uio.h> 21286866Sjasone# endif 22286866Sjasone# include <pthread.h> 23286866Sjasone# include <errno.h> 24296221Sjasone# include <sys/time.h> 25286866Sjasone#endif 26286866Sjasone#include <sys/types.h> 27286866Sjasone 28286866Sjasone#include <limits.h> 29286866Sjasone#ifndef SIZE_T_MAX 30286866Sjasone# define SIZE_T_MAX SIZE_MAX 31286866Sjasone#endif 32286866Sjasone#include <stdarg.h> 33286866Sjasone#include <stdbool.h> 34286866Sjasone#include <stdio.h> 35286866Sjasone#include <stdlib.h> 36286866Sjasone#include <stdint.h> 37286866Sjasone#include <stddef.h> 38286866Sjasone#ifndef offsetof 39286866Sjasone# define offsetof(type, member) ((size_t)&(((type *)NULL)->member)) 40286866Sjasone#endif 41286866Sjasone#include <string.h> 42286866Sjasone#include <strings.h> 43286866Sjasone#include <ctype.h> 44286866Sjasone#ifdef _MSC_VER 45286866Sjasone# include <io.h> 46286866Sjasonetypedef intptr_t ssize_t; 47286866Sjasone# define PATH_MAX 1024 48286866Sjasone# define STDERR_FILENO 2 49286866Sjasone# define __func__ __FUNCTION__ 50286866Sjasone# ifdef JEMALLOC_HAS_RESTRICT 51286866Sjasone# define restrict __restrict 52286866Sjasone# endif 53286866Sjasone/* Disable warnings about deprecated system functions. */ 54286866Sjasone# pragma warning(disable: 4996) 55286866Sjasone#if _MSC_VER < 1800 56286866Sjasonestatic int 57286866Sjasoneisblank(int c) 58286866Sjasone{ 59286866Sjasone 60286866Sjasone return (c == '\t' || c == ' '); 61286866Sjasone} 62286866Sjasone#endif 63286866Sjasone#else 64286866Sjasone# include <unistd.h> 65286866Sjasone#endif 66286866Sjasone#include <fcntl.h> 67286866Sjasone 68286866Sjasone#endif /* JEMALLOC_INTERNAL_H */ 69