Changeset View
Changeset View
Standalone View
Standalone View
src/compat.h
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | |||||
#else | #else | ||||
#define MAX_PATH 1024 | #define MAX_PATH 1024 | ||||
#endif | #endif | ||||
#if HAVE_DECL_STRNLEN == 0 | #if HAVE_DECL_STRNLEN == 0 | ||||
size_t strnlen(const char *start, size_t max_len); | size_t strnlen(const char *start, size_t max_len); | ||||
#endif // HAVE_DECL_STRNLEN | #endif // HAVE_DECL_STRNLEN | ||||
#ifndef WIN32 | |||||
typedef void *sockopt_arg_type; | |||||
#else | |||||
typedef char *sockopt_arg_type; | |||||
#endif | |||||
static bool inline IsSelectableSocket(const SOCKET &s) { | static bool inline IsSelectableSocket(const SOCKET &s) { | ||||
#ifdef WIN32 | #ifdef WIN32 | ||||
return true; | return true; | ||||
#else | #else | ||||
return (s < FD_SETSIZE); | return (s < FD_SETSIZE); | ||||
#endif | #endif | ||||
} | } | ||||
#endif // BITCOIN_COMPAT_H | #endif // BITCOIN_COMPAT_H |