Skip to content

Commit

Permalink
merge bitcoin#21405: remove memcpy -> memmove backwards compatibility…
Browse files Browse the repository at this point in the history
… alias
  • Loading branch information
kwvg committed Jul 1, 2022
1 parent 959518f commit 94786b9
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 56 deletions.
1 change: 0 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,6 @@ libdash_util_a_SOURCES = \
support/lockedpool.cpp \
chainparamsbase.cpp \
clientversion.cpp \
compat/glibc_sanity.cpp \
compat/glibcxx_sanity.cpp \
compat/strnlen.cpp \
fs.cpp \
Expand Down
7 changes: 0 additions & 7 deletions src/compat/glibc_compat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@
#include <cstddef>
#include <cstdint>

// 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* memcpy(void* a, const void* b, size_t c)
{
return memmove(a, b, c);
}

#if defined(__i386__) || defined(__arm__)

extern "C" int64_t __udivmoddi4(uint64_t u, uint64_t v, uint64_t* rp);
Expand Down
45 changes: 0 additions & 45 deletions src/compat/glibc_sanity.cpp

This file was deleted.

1 change: 0 additions & 1 deletion src/compat/sanity.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#ifndef BITCOIN_COMPAT_SANITY_H
#define BITCOIN_COMPAT_SANITY_H

bool glibc_sanity_test();
bool glibcxx_sanity_test();

#endif // BITCOIN_COMPAT_SANITY_H
2 changes: 1 addition & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ static bool InitSanityCheck()
return InitError(Untranslated("Elliptic curve cryptography sanity check failure. Aborting."));
}

if (!glibc_sanity_test() || !glibcxx_sanity_test())
if (!glibcxx_sanity_test())
return false;

if (!BLSInit()) {
Expand Down
1 change: 0 additions & 1 deletion src/test/sanity_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ BOOST_FIXTURE_TEST_SUITE(sanity_tests, BasicTestingSetup)

BOOST_AUTO_TEST_CASE(basic_sanity)
{
BOOST_CHECK_MESSAGE(glibc_sanity_test() == true, "libc sanity test");
BOOST_CHECK_MESSAGE(glibcxx_sanity_test() == true, "stdlib sanity test");
BOOST_CHECK_MESSAGE(ECC_InitSanityCheck() == true, "secp256k1 sanity test");
}
Expand Down

0 comments on commit 94786b9

Please sign in to comment.