mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-06-02 15:32:34 +02:00
Merge bitcoin/bitcoin#24704: compat: remove strnlen back-compat code
d4ba2b2cbc
compat: remove strnlen back-compat code (fanquake) Pull request description: This was needed for mingw (not mingw-w64), and some older versions of macOS, which we no-longer support. ACKs for top commit: hebasto: ACKd4ba2b2cbc
Tree-SHA512: d1beb9df58464feea3076091361d7d46e4a8901e347644a5fa6f24e052ca24ee0c7c0dd3f2a3d682b0204bf50430fa89eac62121691ea08af6dcf6b907bdec87
This commit is contained in:
commit
f4fba57829
@ -125,10 +125,6 @@
|
|||||||
don't. */
|
don't. */
|
||||||
#define HAVE_DECL_STRERROR_R 0
|
#define HAVE_DECL_STRERROR_R 0
|
||||||
|
|
||||||
/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
|
|
||||||
don't. */
|
|
||||||
#define HAVE_DECL_STRNLEN 1
|
|
||||||
|
|
||||||
/* Define if the dllexport attribute is supported. */
|
/* Define if the dllexport attribute is supported. */
|
||||||
#define HAVE_DLLEXPORT_ATTRIBUTE 1
|
#define HAVE_DLLEXPORT_ATTRIBUTE 1
|
||||||
|
|
||||||
|
@ -984,7 +984,6 @@ AC_CHECK_DECLS([getifaddrs, freeifaddrs],[CHECK_SOCKET],,
|
|||||||
[#include <sys/types.h>
|
[#include <sys/types.h>
|
||||||
#include <ifaddrs.h>]
|
#include <ifaddrs.h>]
|
||||||
)
|
)
|
||||||
AC_CHECK_DECLS([strnlen])
|
|
||||||
|
|
||||||
dnl These are used for daemonization in bitcoind
|
dnl These are used for daemonization in bitcoind
|
||||||
AC_CHECK_DECLS([fork])
|
AC_CHECK_DECLS([fork])
|
||||||
|
@ -606,7 +606,6 @@ libbitcoin_util_a_SOURCES = \
|
|||||||
chainparamsbase.cpp \
|
chainparamsbase.cpp \
|
||||||
clientversion.cpp \
|
clientversion.cpp \
|
||||||
compat/glibcxx_sanity.cpp \
|
compat/glibcxx_sanity.cpp \
|
||||||
compat/strnlen.cpp \
|
|
||||||
fs.cpp \
|
fs.cpp \
|
||||||
interfaces/echo.cpp \
|
interfaces/echo.cpp \
|
||||||
interfaces/handler.cpp \
|
interfaces/handler.cpp \
|
||||||
|
@ -80,10 +80,6 @@ typedef int32_t ssize_t;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_DECL_STRNLEN == 0
|
|
||||||
size_t strnlen( const char *start, size_t max_len);
|
|
||||||
#endif // HAVE_DECL_STRNLEN
|
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
typedef void* sockopt_arg_type;
|
typedef void* sockopt_arg_type;
|
||||||
#else
|
#else
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
// Copyright (c) 2009-2018 The Bitcoin Core developers
|
|
||||||
// Distributed under the MIT software license, see the accompanying
|
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
||||||
|
|
||||||
#if defined(HAVE_CONFIG_H)
|
|
||||||
#include <config/bitcoin-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
#if HAVE_DECL_STRNLEN == 0
|
|
||||||
size_t strnlen( const char *start, size_t max_len)
|
|
||||||
{
|
|
||||||
const char *end = (const char *)memchr(start, '\0', max_len);
|
|
||||||
|
|
||||||
return end ? (size_t)(end - start) : max_len;
|
|
||||||
}
|
|
||||||
#endif // HAVE_DECL_STRNLEN
|
|
Loading…
Reference in New Issue
Block a user