1
0
mirror of https://github.com/upx/upx.git synced 2025-08-07 22:46:51 +08:00

src: remove currently unused submodules

This commit is contained in:
Markus F.X.J. Oberhumer
2023-01-21 18:57:23 +01:00
parent 213ac3ac73
commit 1ab8d5fb3f
5 changed files with 0 additions and 197 deletions

View File

@ -239,10 +239,6 @@ if(NOT UPX_CONFIG_DISABLE_ZSTD)
target_compile_definitions(${t} PRIVATE WITH_ZSTD=1)
target_link_libraries(upx upx_vendor_zstd)
endif()
if(Threads_FOUND AND 0)
# for RANGELESS_FN_ENABLE_PARALLEL multithreading test
target_link_libraries(upx Threads::Threads)
endif()
#***********************************************************************
# "ctest"

View File

@ -1,6 +1,5 @@
-std=gnu++17
-Ivendor
-Ivendor/boost-pfr/include
-fno-strict-aliasing
-fno-strict-overflow
-funsigned-char

View File

@ -1,82 +0,0 @@
/* dtx_.cpp -- DocTest eXtra checks
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
*/
#if DEBUG && 0
#ifndef WITH_BOOST_PFR
#define WITH_BOOST_PFR 1
#endif
#endif
#include "../conf.h"
/*************************************************************************
//
**************************************************************************/
#if WITH_BOOST_PFR
TEST_CASE("boost::pfr") {
struct Foo {
BE16 b16;
BE32 b32;
BE64 b64;
LE16 l16;
LE32 l32;
LE64 l64;
};
{
int i = -1;
CHECK_EQ(strcmp(pfr_str(i), "-1"), 0);
BE32 b32;
b32 = 1;
LE32 l32;
l32 = 2;
CHECK_EQ(strcmp(pfr_str(b32), "1"), 0);
CHECK_EQ(strcmp(pfr_str(l32), "2"), 0);
}
{
Foo foo;
foo.b16 = 1;
foo.b32 = 2;
foo.b64 = 3;
foo.l16 = 4;
foo.l32 = 5;
foo.l64 = 6;
CHECK_EQ(strcmp(pfr_str("foo", "=", foo), "foo = {1, 2, 3, 4, 5, 6}"), 0);
}
{
#if (ACC_ABI_BIG_ENDIAN)
#else
constexpr Foo foo{{1}, {1}, {1}, {1}, {1}, {1}};
CHECK_EQ(strcmp(pfr_str(foo), "{256, 16777216, 72057594037927936, 1, 1, 1}"), 0);
#endif
}
}
#endif // WITH_BOOST_PFR
/* vim:set ts=4 sw=4 et: */

View File

@ -1,64 +0,0 @@
/* dtx_.cpp -- DocTest eXtra checks
This file is part of the UPX executable compressor.
Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
and/or modify them under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
*/
#if DEBUG && 0
#ifndef WITH_RANGELESS_FN
#define WITH_RANGELESS_FN 1
#endif
#endif
#if WITH_RANGELESS_FN
#define RANGELESS_FN_ENABLE_RUN_TESTS 1
#if defined(__i386__) && defined(__MSDOS__) && defined(__DJGPP__) && defined(__GNUC__)
#define RANGELESS_FN_ENABLE_PARALLEL 0
#elif defined(__m68k__) && defined(__atarist__) && defined(__GNUC__)
#define RANGELESS_FN_ENABLE_PARALLEL 0
#else
// disable multithreading for now; needs CMake find_package(Threads)
#define RANGELESS_FN_ENABLE_PARALLEL 0
#endif
#endif // WITH_RANGELESS_FN
#include "../conf.h"
/*************************************************************************
//
**************************************************************************/
#if WITH_RANGELESS_FN && RANGELESS_FN_ENABLE_RUN_TESTS
TEST_CASE("rangeless::fn") { CHECK_NOTHROW(rangeless::fn::impl::run_tests()); }
#if RANGELESS_FN_ENABLE_PARALLEL
TEST_CASE("rangeless::fn parallel") {
// CHECK_NOTHROW(rangeless::mt::impl::run_tests());
ACC_UNUSED_FUNC(rangeless::mt::impl::run_tests);
}
#endif
#endif // WITH_RANGELESS_FN
/* vim:set ts=4 sw=4 et: */

View File

@ -855,52 +855,6 @@ int upx_test_overlap ( const upx_bytep buf,
const upx_compress_result_t *cresult );
/*************************************************************************
//
**************************************************************************/
#if WITH_BOOST_PFR
template <class A>
__acc_noinline std::string pfr_string(const A &a) {
std::ostringstream ss;
ss << boost::pfr::io(a);
return ss.str();
}
template <class A, class B>
__acc_noinline std::string pfr_string(const A &a, const B &b) {
std::ostringstream ss;
ss << boost::pfr::io(a);
ss << ' ';
ss << boost::pfr::io(b);
return ss.str();
}
template <class A, class B, class C>
__acc_noinline std::string pfr_string(const A &a, const B &b, const C &c) {
std::ostringstream ss;
ss << boost::pfr::io(a);
ss << ' ';
ss << boost::pfr::io(b);
ss << ' ';
ss << boost::pfr::io(c);
return ss.str();
}
template <class A, class B, class C, class D>
__acc_noinline std::string pfr_string(const A &a, const B &b, const C &c, const D &d) {
std::ostringstream ss;
ss << boost::pfr::io(a);
ss << ' ';
ss << boost::pfr::io(b);
ss << ' ';
ss << boost::pfr::io(c);
ss << ' ';
ss << boost::pfr::io(d);
return ss.str();
}
// note: this MUST be a macro and not a function because of implicit temporary variable
#define pfr_str(a,...) (pfr_string(a, ##__VA_ARGS__).c_str())
#endif // WITH_BOOST_PFR
/*************************************************************************
// raw_bytes() - get underlying memory from checked buffers/pointers.
// This is overloaded by various utility classes like BoundedPtr,