#ifndef PROFILE_INSTRPROFILING_PORT_H_
#define PROFILE_INSTRPROFILING_PORT_H_
#ifdef _MSC_VER
#define COMPILER_RT_ALIGNAS …
#define COMPILER_RT_VISIBILITY
#define COMPILER_RT_WEAK …
#define COMPILER_RT_ALLOCA …
#define COMPILER_RT_FTRUNCATE …
#define COMPILER_RT_ALWAYS_INLINE …
#define COMPILER_RT_CLEANUP …
#define COMPILER_RT_USED
#elif __GNUC__
#ifdef _WIN32
#define COMPILER_RT_FTRUNCATE …
#define COMPILER_RT_VISIBILITY
#define COMPILER_RT_WEAK …
#else
#define COMPILER_RT_FTRUNCATE(f, l) …
#define COMPILER_RT_VISIBILITY …
#define COMPILER_RT_WEAK …
#endif
#define COMPILER_RT_ALIGNAS(x) …
#define COMPILER_RT_ALLOCA …
#define COMPILER_RT_ALWAYS_INLINE …
#define COMPILER_RT_CLEANUP(x) …
#define COMPILER_RT_USED …
#endif
#if defined(__APPLE__)
#define COMPILER_RT_SEG …
#else
#define COMPILER_RT_SEG …
#endif
#ifdef _MSC_VER
#define COMPILER_RT_SECTION …
#else
#define COMPILER_RT_SECTION(Sect) …
#endif
#define COMPILER_RT_MAX_HOSTLEN …
#ifdef __ORBIS__
#define COMPILER_RT_GETHOSTNAME …
#else
#define COMPILER_RT_GETHOSTNAME(Name, Len) …
#endif
#if COMPILER_RT_HAS_ATOMICS == 1
#ifdef _WIN32
#include <windows.h>
#if defined(_MSC_VER) && _MSC_VER < 1900
#define snprintf …
#endif
#if defined(_WIN64)
#define COMPILER_RT_BOOL_CMPXCHG …
#define COMPILER_RT_PTR_FETCH_ADD …
#else
#define COMPILER_RT_BOOL_CMPXCHG …
#define COMPILER_RT_PTR_FETCH_ADD …
#endif
#else
#define COMPILER_RT_BOOL_CMPXCHG(Ptr, OldV, NewV) …
#define COMPILER_RT_PTR_FETCH_ADD(DomType, PtrVar, PtrIncr) …
#endif
#else
#include "InstrProfilingUtil.h"
#define COMPILER_RT_BOOL_CMPXCHG …
#define COMPILER_RT_PTR_FETCH_ADD …
#endif
#if defined(_WIN32)
#define DIR_SEPARATOR …
#define DIR_SEPARATOR_2 …
#else
#define DIR_SEPARATOR …
#endif
#ifndef DIR_SEPARATOR_2
#define IS_DIR_SEPARATOR(ch) …
#else
#define IS_DIR_SEPARATOR …
#endif
#if defined(_WIN32)
#include <windows.h>
static inline size_t getpagesize() {
SYSTEM_INFO S;
GetNativeSystemInfo(&S);
return S.dwPageSize;
}
#else
#include <unistd.h>
#endif
#define PROF_ERR(Format, ...) …
#define PROF_WARN(Format, ...) …
#define PROF_NOTE(Format, ...) …
#ifndef MAP_FILE
#define MAP_FILE …
#endif
#ifndef O_BINARY
#define O_BINARY …
#endif
#if defined(__FreeBSD__)
#include <inttypes.h>
#include <sys/types.h>
#else
#include <inttypes.h>
#include <stdint.h>
#endif
#endif