26 #ifndef __EVE_COMPAT_H__INCL__
27 #define __EVE_COMPAT_H__INCL__
35 #ifdef HAVE_INTTYPES_H
37 typedef uint8_t
uint8;
38 typedef int16_t
int16;
40 typedef int32_t
int32;
42 typedef int64_t
int64;
45 typedef signed __int8
int8;
60 #ifndef HAVE_INTTYPES_H
75 # define PRId32 "I32d"
76 # define PRIi32 "I32i"
77 # define PRIo32 "I32o"
78 # define PRIu32 "I32u"
79 # define PRIx32 "I32x"
80 # define PRIX32 "I32X"
82 # define PRId64 "I64d"
83 # define PRIi64 "I64i"
84 # define PRIo64 "I64o"
85 # define PRIu64 "I64u"
86 # define PRIx64 "I64x"
87 # define PRIX64 "I64X"
101 # define SCNd32 "I32d"
102 # define SCNi32 "I32i"
103 # define SCNo32 "I32o"
104 # define SCNu32 "I32u"
105 # define SCNx32 "I32x"
107 # define SCNd64 "I64d"
108 # define SCNi64 "I64i"
109 # define SCNo64 "I64o"
110 # define SCNu64 "I64u"
111 # define SCNx64 "I64x"
117 #ifndef HAVE_WINDOWS_H
126 #ifndef HAVE_WINSOCK2_H
129 # define INVALID_SOCKET -1
130 # define SOCKET_ERROR -1
135 # define MSG_NOSIGNAL SO_NOSIGPIPE
137 # define MSG_NOSIGNAL 0
145 # define asinh boost::math::asinh
149 # if defined( HAVE_ISFINITE )
150 # define finite isfinite
151 # elif defined( HAVE_STD_FINITE )
152 # define finite std::finite
153 # elif defined( HAVE_STD_ISFINITE )
154 # define finite std::isfinite
155 # elif defined( HAVE__FINITE )
156 # define finite _finite
157 # elif defined( HAVE___FINITE )
158 # define finite __finite
165 # if defined( HAVE__ISNAN )
166 # define isnan _isnan
177 # define va_copy( a, b ) ::memcpy( &( a ), &( b ), sizeof( va_list ) )
183 #ifndef HAVE_SNPRINTF
184 # define snprintf _snprintf
187 #ifndef HAVE_VSNPRINTF
188 # define vsnprintf _vsnprintf
191 #ifndef HAVE_ASPRINTF
192 int asprintf(
char** strp,
const char* fmt, ... );
195 #ifndef HAVE_VASPRINTF
196 int vasprintf(
char** strp,
const char* fmt, va_list ap );
207 std::string
sprintf(
const char* fmt, ... );
216 std::string
vsprintf(
const char* fmt, va_list ap );
227 int sprintf( std::string& str,
const char* fmt, ... );
237 int vsprintf( std::string& str,
const char* fmt, va_list ap );
243 # define strtoll _strtoi64
246 #ifndef HAVE_STRTOULL
247 # define strtoull _strtoui64
251 float strtof(
const char* nptr,
char** endptr );
258 # define strdup _strdup
261 #ifndef HAVE_STRCASECMP
262 # define strcasecmp _stricmp
265 #ifndef HAVE_STRNCASECMP
266 # define strncasecmp _strnicmp
272 #ifndef HAVE_LOCALTIME_R
273 tm*
localtime_r(
const time_t* timep, tm* result );
tm * localtime_r(const time_t *timep, tm *result)
int vasprintf(char **strp, const char *fmt, va_list ap)
std::string sprintf(const char *fmt,...)
sprintf for std::string.
int asprintf(char **strp, const char *fmt,...)
std::string vsprintf(const char *fmt, va_list ap)
vsprintf for std::string.
float strtof(const char *nptr, char **endptr)
int CreateDirectory(const char *name, void *)