/* Icecast * * This program is distributed under the GNU General Public License, version 2. * A copy of this license is included with this source. * * Copyright 2000-2004, Jack Moffitt , * oddsock , * Karl Heyes * and others (see AUTHORS for details). * Copyright 2018, Philipp "ph3-der-loewe" Schafft , */ #ifndef __COMPAT_H__ #define __COMPAT_H__ /* compat.h * * This file contains most of the ugliness for header portability * and common types across various systems like Win32, Linux and * Solaris. */ #ifdef HAVE_CONFIG_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #ifdef _WIN32 # define PATH_SEPARATOR "\\" #else # define PATH_SEPARATOR "/" #endif /* Make sure we define 64 bit types */ #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #if defined(_WIN32) && !defined(HAVE_STDINT_H) && !defined(HAVE_INTTYPES_H) # define size_t unsigned int # define ssize_t int # define int64_t __int64 # define uint64_t unsigned __int64 # define int32_t __int32 # define uint32_t unsigned __int32 # define PRIu64 "I64u" # define PRId64 "I64d" #endif /* some defaults if not provided above */ #ifndef SCNdMAX # define SCNdMAX "lld" #endif #endif /* __COMPAT_H__ */