jemalloc_internal_decls.h revision 286866
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> 24286866Sjasone#endif 25286866Sjasone#include <sys/types.h> 26286866Sjasone 27286866Sjasone#include <limits.h> 28286866Sjasone#ifndef SIZE_T_MAX 29286866Sjasone# define SIZE_T_MAX SIZE_MAX 30286866Sjasone#endif 31286866Sjasone#include <stdarg.h> 32286866Sjasone#include <stdbool.h> 33286866Sjasone#include <stdio.h> 34286866Sjasone#include <stdlib.h> 35286866Sjasone#include <stdint.h> 36286866Sjasone#include <stddef.h> 37286866Sjasone#ifndef offsetof 38286866Sjasone# define offsetof(type, member) ((size_t)&(((type *)NULL)->member)) 39286866Sjasone#endif 40286866Sjasone#include <string.h> 41286866Sjasone#include <strings.h> 42286866Sjasone#include <ctype.h> 43286866Sjasone#ifdef _MSC_VER 44286866Sjasone# include <io.h> 45286866Sjasonetypedef intptr_t ssize_t; 46286866Sjasone# define PATH_MAX 1024 47286866Sjasone# define STDERR_FILENO 2 48286866Sjasone# define __func__ __FUNCTION__ 49286866Sjasone# ifdef JEMALLOC_HAS_RESTRICT 50286866Sjasone# define restrict __restrict 51286866Sjasone# endif 52286866Sjasone/* Disable warnings about deprecated system functions. */ 53286866Sjasone# pragma warning(disable: 4996) 54286866Sjasone#if _MSC_VER < 1800 55286866Sjasonestatic int 56286866Sjasoneisblank(int c) 57286866Sjasone{ 58286866Sjasone 59286866Sjasone return (c == '\t' || c == ' '); 60286866Sjasone} 61286866Sjasone#endif 62286866Sjasone#else 63286866Sjasone# include <unistd.h> 64286866Sjasone#endif 65286866Sjasone#include <fcntl.h> 66286866Sjasone 67286866Sjasone#endif /* JEMALLOC_INTERNAL_H */ 68