mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Merge #9921: build: Probe MSG_DONTWAIT in the same way as MSG_NOSIGNAL
a4d1c9f
compat: use `unsigned int` instead of `u_int` (Wladimir J. van der Laan)25da1ee
build: cleanup: define MSG_DONTWAIT/MSG_NO_SIGNAL locally (Wladimir J. van der Laan)c459d50
build: Probe MSG_DONTWAIT in the same way as MSG_NOSIGNAL (Wladimir J. van der Laan) Tree-SHA512: 60d79d69439bb181465e4244aa5ddc28bbd84f69c0ca0c753956b3798c9022394e29d791bc085fe7ffb1268c64c789a57e24797daad63525bb776088188ff9ae fix merge error in configure.ac Signed-off-by: Pasta <Pasta@dash.org>
This commit is contained in:
parent
5ae202da96
commit
594b78fdf5
@ -603,6 +603,14 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]],
|
||||
[ AC_MSG_RESULT(no)]
|
||||
)
|
||||
|
||||
dnl Check for MSG_DONTWAIT
|
||||
AC_MSG_CHECKING(for MSG_DONTWAIT)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]],
|
||||
[[ int f = MSG_DONTWAIT; ]])],
|
||||
[ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_DONTWAIT, 1,[Define this symbol if you have MSG_DONTWAIT]) ],
|
||||
[ AC_MSG_RESULT(no)]
|
||||
)
|
||||
|
||||
dnl Check for mallopt(M_ARENA_MAX) (to set glibc arenas)
|
||||
AC_MSG_CHECKING(for mallopt M_ARENA_MAX)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <malloc.h>]],
|
||||
|
11
src/compat.h
11
src/compat.h
@ -47,10 +47,8 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#define MSG_DONTWAIT 0
|
||||
#else
|
||||
typedef u_int SOCKET;
|
||||
#ifndef WIN32
|
||||
typedef unsigned int SOCKET;
|
||||
#include "errno.h"
|
||||
#define WSAGetLastError() errno
|
||||
#define WSAEINVAL EINVAL
|
||||
@ -74,11 +72,6 @@ typedef u_int SOCKET;
|
||||
#define MAX_PATH 1024
|
||||
#endif
|
||||
|
||||
// As Solaris does not have the MSG_NOSIGNAL flag for send(2) syscall, it is defined as 0
|
||||
#if !defined(HAVE_MSG_NOSIGNAL) && !defined(MSG_NOSIGNAL)
|
||||
#define MSG_NOSIGNAL 0
|
||||
#endif
|
||||
|
||||
#if HAVE_DECL_STRNLEN == 0
|
||||
size_t strnlen( const char *start, size_t max_len);
|
||||
#endif // HAVE_DECL_STRNLEN
|
||||
|
@ -52,10 +52,15 @@
|
||||
// We add a random period time (0 to 1 seconds) to feeler connections to prevent synchronization.
|
||||
#define FEELER_SLEEP_WINDOW 1
|
||||
|
||||
#if !defined(HAVE_MSG_NOSIGNAL) && !defined(MSG_NOSIGNAL)
|
||||
#if !defined(HAVE_MSG_NOSIGNAL)
|
||||
#define MSG_NOSIGNAL 0
|
||||
#endif
|
||||
|
||||
// MSG_DONTWAIT is not available on some platforms, if it doesn't exist define it as 0
|
||||
#if !defined(HAVE_MSG_DONTWAIT)
|
||||
#define MSG_DONTWAIT 0
|
||||
#endif
|
||||
|
||||
// Fix for ancient MinGW versions, that don't have defined these in ws2tcpip.h.
|
||||
// Todo: Can be removed when our pull-tester is upgraded to a modern MinGW version.
|
||||
#ifdef WIN32
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <boost/algorithm/string/case_conv.hpp> // for to_lower()
|
||||
#include <boost/algorithm/string/predicate.hpp> // for startswith() and endswith()
|
||||
|
||||
#if !defined(HAVE_MSG_NOSIGNAL) && !defined(MSG_NOSIGNAL)
|
||||
#if !defined(HAVE_MSG_NOSIGNAL)
|
||||
#define MSG_NOSIGNAL 0
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user