CI updates and minor cleanups

This commit is contained in:
Markus F.X.J. Oberhumer
2024-04-01 20:31:05 +02:00
parent 70b20d7d89
commit 24f3824524
29 changed files with 176 additions and 128 deletions
+3 -8
View File
@@ -162,7 +162,7 @@ ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(upx_charptr_unit_type) == 1)
typedef upx_int64_t upx_off_t;
#undef off_t
#if 0
// TODO cleanup: at some future point we can do this:
// TODO later cleanup: at some future point we can do this:
#define off_t DO_NOT_USE_off_t
#else
#define off_t upx_off_t
@@ -230,12 +230,6 @@ typedef upx_int64_t upx_off_t;
#undef sopen
#endif
#if defined(HAVE_DUP) && (HAVE_DUP + 0 == 0)
// TODO later: add upx_fd_dup() util
#undef dup
#define dup(x) (-1)
#endif
#ifndef STDIN_FILENO
#define STDIN_FILENO (fileno(stdin))
#endif
@@ -338,7 +332,7 @@ typedef upx_int64_t upx_off_t;
// TODO later: check __MINGW_PRINTF_FORMAT
#if defined(_WIN32) && defined(__MINGW32__) && defined(__GNUC__) && !defined(__clang__)
#define attribute_format(a, b) __attribute__((__format__(__gnu_printf__, a, b)))
#elif (ACC_CC_CLANG || ACC_CC_GNUC)
#elif defined(__clang__) || defined(__GNUC__)
#define attribute_format(a, b) __attribute__((__format__(__printf__, a, b)))
#else
#define attribute_format(a, b) /*empty*/
@@ -442,6 +436,7 @@ inline void mem_clear(T *object) noexcept {
static_assert(size >= 1 && size <= UPX_RSIZE_MAX_MEM);
memset((void *) object, 0, size);
}
// disable some overloads
#if defined(__clang__) || __GNUC__ != 7
template <class T>
inline void mem_clear(T (&array)[]) noexcept DELETED_FUNCTION;