mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
build: remove fdelt_chk backwards compatibility code
Now that we require glibc 2.17 or later, we no longer need to check for different return types in fdelt_chk. It was changed from unsigned long int to long int in glibc 2.16 . See this commit: https://sourceware.org/git/?p=glibc.git;a=commit;h=ceb9e56b3d1f8c1922e0526c2e841373843460e2 and related issue: https://sourceware.org/bugzilla/show_bug.cgi?id=14210.
This commit is contained in:
parent
3b1e289248
commit
8bf1540cc2
@ -41,9 +41,6 @@
|
|||||||
/* Define to 1 to enable ZMQ functions */
|
/* Define to 1 to enable ZMQ functions */
|
||||||
#define ENABLE_ZMQ 1
|
#define ENABLE_ZMQ 1
|
||||||
|
|
||||||
/* parameter and return value type for __fdelt_chk */
|
|
||||||
/* #undef FDELT_TYPE */
|
|
||||||
|
|
||||||
/* define if the Boost library is available */
|
/* define if the Boost library is available */
|
||||||
#define HAVE_BOOST /**/
|
#define HAVE_BOOST /**/
|
||||||
|
|
||||||
|
18
configure.ac
18
configure.ac
@ -717,22 +717,8 @@ AX_GCC_FUNC_ATTRIBUTE([dllexport])
|
|||||||
AX_GCC_FUNC_ATTRIBUTE([dllimport])
|
AX_GCC_FUNC_ATTRIBUTE([dllimport])
|
||||||
|
|
||||||
if test x$use_glibc_compat != xno; then
|
if test x$use_glibc_compat != xno; then
|
||||||
|
AX_CHECK_LINK_FLAG([[-Wl,--wrap=__divmoddi4]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=__divmoddi4"])
|
||||||
dnl __fdelt_chk's params and return type have changed from long unsigned int to long int.
|
AX_CHECK_LINK_FLAG([[-Wl,--wrap=log2f]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=log2f"])
|
||||||
dnl See which one is present here.
|
|
||||||
AC_MSG_CHECKING(__fdelt_chk type)
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef _FORTIFY_SOURCE
|
|
||||||
#undef _FORTIFY_SOURCE
|
|
||||||
#endif
|
|
||||||
#define _FORTIFY_SOURCE 2
|
|
||||||
#include <sys/select.h>
|
|
||||||
extern "C" long unsigned int __fdelt_warn(long unsigned int);]],[[]])],
|
|
||||||
[ fdelt_type="long unsigned int"],
|
|
||||||
[ fdelt_type="long int"])
|
|
||||||
AC_MSG_RESULT($fdelt_type)
|
|
||||||
AC_DEFINE_UNQUOTED(FDELT_TYPE, $fdelt_type,[parameter and return value type for __fdelt_chk])
|
|
||||||
AX_CHECK_LINK_FLAG([[-Wl,--wrap=__divmoddi4]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=__divmoddi4"],, [[$LDFLAG_WERROR]])
|
|
||||||
AX_CHECK_LINK_FLAG([[-Wl,--wrap=log2f]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=log2f"],, [[$LDFLAG_WERROR]])
|
|
||||||
else
|
else
|
||||||
AC_SEARCH_LIBS([clock_gettime],[rt])
|
AC_SEARCH_LIBS([clock_gettime],[rt])
|
||||||
fi
|
fi
|
||||||
|
@ -9,10 +9,6 @@
|
|||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#if defined(HAVE_SYS_SELECT_H)
|
|
||||||
#include <sys/select.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Prior to GLIBC_2.14, memcpy was aliased to memmove.
|
// Prior to GLIBC_2.14, memcpy was aliased to memmove.
|
||||||
extern "C" void* memmove(void* a, const void* b, size_t c);
|
extern "C" void* memmove(void* a, const void* b, size_t c);
|
||||||
extern "C" void* memcpy(void* a, const void* b, size_t c)
|
extern "C" void* memcpy(void* a, const void* b, size_t c)
|
||||||
@ -20,15 +16,6 @@ extern "C" void* memcpy(void* a, const void* b, size_t c)
|
|||||||
return memmove(a, b, c);
|
return memmove(a, b, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void __chk_fail(void) __attribute__((__noreturn__));
|
|
||||||
extern "C" FDELT_TYPE __fdelt_warn(FDELT_TYPE a)
|
|
||||||
{
|
|
||||||
if (a >= FD_SETSIZE)
|
|
||||||
__chk_fail();
|
|
||||||
return a / __NFDBITS;
|
|
||||||
}
|
|
||||||
extern "C" FDELT_TYPE __fdelt_chk(FDELT_TYPE) __attribute__((weak, alias("__fdelt_warn")));
|
|
||||||
|
|
||||||
#if defined(__i386__) || defined(__arm__)
|
#if defined(__i386__) || defined(__arm__)
|
||||||
|
|
||||||
extern "C" int64_t __udivmoddi4(uint64_t u, uint64_t v, uint64_t* rp);
|
extern "C" int64_t __udivmoddi4(uint64_t u, uint64_t v, uint64_t* rp);
|
||||||
|
Loading…
Reference in New Issue
Block a user