Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libcdatetime for openSUSE:Factory checked in at 2026-06-01 18:02:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libcdatetime (Old) and /work/SRC/openSUSE:Factory/.libcdatetime.new.1937 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libcdatetime" Mon Jun 1 18:02:12 2026 rev:14 rq:1356393 version:20260602 Changes: -------- --- /work/SRC/openSUSE:Factory/libcdatetime/libcdatetime.changes 2026-05-21 18:29:22.983599104 +0200 +++ /work/SRC/openSUSE:Factory/.libcdatetime.new.1937/libcdatetime.changes 2026-06-01 18:03:39.777456697 +0200 @@ -1,0 +2,6 @@ +Mon Jun 1 14:30:53 UTC 2026 - Jan Engelhardt <[email protected]> + +- Update to release 20260602 + * Updated the internal CI/CD and testsuite scripts + +------------------------------------------------------------------- Old: ---- libcdatetime-alpha-20260520.tar.gz libcdatetime-alpha-20260520.tar.gz.asc New: ---- libcdatetime-alpha-20260602.tar.gz libcdatetime-alpha-20260602.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libcdatetime.spec ++++++ --- /var/tmp/diff_new_pack.yCTBaM/_old 2026-06-01 18:03:41.601532184 +0200 +++ /var/tmp/diff_new_pack.yCTBaM/_new 2026-06-01 18:03:41.613532681 +0200 @@ -18,7 +18,7 @@ %define lname libcdatetime1 Name: libcdatetime -Version: 20260520 +Version: 20260602 Release: 0 Summary: Library for C date and time functions License: LGPL-3.0-or-later ++++++ _scmsync.obsinfo ++++++ --- /var/tmp/diff_new_pack.yCTBaM/_old 2026-06-01 18:03:41.889544104 +0200 +++ /var/tmp/diff_new_pack.yCTBaM/_new 2026-06-01 18:03:41.933545924 +0200 @@ -1,5 +1,5 @@ -mtime: 1779291642 -commit: 654f59ddba3f37efd863da33b66372e398fd615aff7fdc0e7676695e75efb08d +mtime: 1780324280 +commit: 707e461420e54516428a4391b804e9eeef983532904dc7c2f1151ed3beb4baf0 url: https://src.opensuse.org/security-forensics/libcdatetime revision: master ++++++ build.specials.obscpio ++++++ ++++++ build.specials.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2026-06-01 16:31:20.000000000 +0200 @@ -0,0 +1 @@ +.osc ++++++ libcdatetime-alpha-20260520.tar.gz -> libcdatetime-alpha-20260602.tar.gz ++++++ ++++ 2539 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/common/byte_stream.h new/libcdatetime-20260602/common/byte_stream.h --- old/libcdatetime-20260520/common/byte_stream.h 2026-05-20 06:59:38.000000000 +0200 +++ new/libcdatetime-20260602/common/byte_stream.h 2026-06-01 14:46:18.000000000 +0200 @@ -29,13 +29,68 @@ extern "C" { #endif -#define _BYTE_STREAM_HOST_IS_ENDIAN_BIG ( *((uint32_t *) "\x01\x02\x03\x04" ) == 0x01020304 ) -#define _BYTE_STREAM_HOST_IS_ENDIAN_LITTLE ( *((uint32_t *) "\x01\x02\x03\x04" ) == 0x04030201 ) -#define _BYTE_STREAM_HOST_IS_ENDIAN_MIDDLE ( *((uint32_t *) "\x01\x02\x03\x04" ) == 0x02010403 ) - -#define _BYTE_STREAM_ENDIAN_BIG (uint8_t) 'b' -#define _BYTE_STREAM_ENDIAN_LITTLE (uint8_t) 'l' -#define _BYTE_STREAM_ENDIAN_MIDDLE (uint8_t) 'm' +#define _BYTE_STREAM_ENDIAN_BIG 'b' +#define _BYTE_STREAM_ENDIAN_LITTLE 'l' +#define _BYTE_STREAM_ENDIAN_MIDDLE 'm' + +#undef _BYTE_STREAM_HOST_BYTE_ORDER + +#if defined( __BYTE_ORDER__ ) && defined( __ORDER_LITTLE_ENDIAN__ ) && defined( __ORDER_BIG_ENDIAN__ ) && defined( __ORDER_PDP_ENDIAN__ ) +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +#define _BYTE_STREAM_HOST_BYTE_ORDER _BYTE_STREAM_ENDIAN_BIG + +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +#define _BYTE_STREAM_HOST_BYTE_ORDER _BYTE_STREAM_ENDIAN_LITTLE + +#elif __BYTE_ORDER__ == __ORDER_PDP_ENDIAN__ +#define _BYTE_STREAM_HOST_BYTE_ORDER _BYTE_STREAM_ENDIAN_MIDDLE +#endif + +#elif defined( __linux__ ) || defined( __GLIBC__ ) +#include <endian.h> + +#if defined( __BYTE_ORDER ) && defined( __LITTLE_ENDIAN ) && defined( __BIG_ENDIAN ) && defined( __PDP_ENDIAN ) +#if __BYTE_ORDER == __BIG_ENDIAN +#define _BYTE_STREAM_HOST_BYTE_ORDER _BYTE_STREAM_ENDIAN_BIG + +#elif __BYTE_ORDER == __LITTLE_ENDIAN +#define _BYTE_STREAM_HOST_BYTE_ORDER _BYTE_STREAM_ENDIAN_LITTLE + +#elif __BYTE_ORDER == __PDP_ENDIAN +#define _BYTE_STREAM_HOST_BYTE_ORDER _BYTE_STREAM_ENDIAN_MIDDLE + +#endif +#endif + +#elif defined( __APPLE__ ) || defined( __FreeBSD__ ) || defined( __OpenBSD__ ) || defined( __NetBSD__ ) +#include <machine/endian.h> + +#if defined( BYTE_ORDER ) && defined( LITTLE_ENDIAN ) && defined( BIG_ENDIAN ) +#if BYTE_ORDER == BIG_ENDIAN +#define _BYTE_STREAM_HOST_BYTE_ORDER _BYTE_STREAM_ENDIAN_BIG + +#elif BYTE_ORDER == LITTLE_ENDIAN +#define _BYTE_STREAM_HOST_BYTE_ORDER _BYTE_STREAM_ENDIAN_LITTLE + +#endif +#endif + +#elif defined( _MSC_VER ) || defined( _WIN32 ) +#define _BYTE_STREAM_HOST_BYTE_ORDER _BYTE_STREAM_ENDIAN_LITTLE + +#elif defined( __hppa__ ) || defined( __m68k__ ) || defined( __mips__ ) || defined( __powerpc__ ) || defined( __sparc__ ) +#define _BYTE_STREAM_HOST_BYTE_ORDER _BYTE_STREAM_ENDIAN_BIG + +#elif defined( __i386__ ) || defined( __x86_64__ ) || defined( __arm__ ) || defined( __aarch64__ ) +#define _BYTE_STREAM_HOST_BYTE_ORDER _BYTE_STREAM_ENDIAN_LITTLE + +#elif defined( __pdp11__ ) +#define _BYTE_STREAM_HOST_BYTE_ORDER _BYTE_STREAM_ENDIAN_MIDDLE +#endif + +#if !defined( _BYTE_STREAM_HOST_BYTE_ORDER ) +#error "Unable to determine host byte-order" +#endif typedef union byte_stream_float32 { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/common/config.h new/libcdatetime-20260602/common/config.h --- old/libcdatetime-20260520/common/config.h 2026-05-20 07:01:35.000000000 +0200 +++ new/libcdatetime-20260602/common/config.h 2026-06-01 14:48:00.000000000 +0200 @@ -5,6 +5,9 @@ language is requested. */ #define ENABLE_NLS 1 +/* Define to 1 whether file system is case-insensitive. */ +/* #undef HAVE_CASE_INSENSITIVE_FILE_SYSTEM */ + /* Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ /* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ @@ -145,6 +148,9 @@ /* Define to 1 if you have the 'mktime' function. */ #define HAVE_MKTIME 1 +/* Define to 1 if the compiler supports -fno-builtin-memcpy. */ +/* #undef HAVE_NO_BUILTIN_MEMCPY */ + /* Define to 1 whether printf supports the conversion specifier "%jd". */ #define HAVE_PRINTF_JD 1 @@ -317,7 +323,7 @@ #define PACKAGE_NAME "libcdatetime" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "libcdatetime 20260520" +#define PACKAGE_STRING "libcdatetime 20260602" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "libcdatetime" @@ -326,7 +332,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "20260520" +#define PACKAGE_VERSION "20260602" /* The size of 'int', as computed by sizeof. */ #define SIZEOF_INT 4 @@ -355,7 +361,7 @@ /* #undef TM_IN_SYS_TIME */ /* Version number of package */ -#define VERSION "20260520" +#define VERSION "20260602" /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/common/config.h.in new/libcdatetime-20260602/common/config.h.in --- old/libcdatetime-20260520/common/config.h.in 2026-05-20 16:43:23.000000000 +0200 +++ new/libcdatetime-20260602/common/config.h.in 2026-06-01 14:49:05.000000000 +0200 @@ -4,6 +4,9 @@ language is requested. */ #undef ENABLE_NLS +/* Define to 1 whether file system is case-insensitive. */ +#undef HAVE_CASE_INSENSITIVE_FILE_SYSTEM + /* Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES @@ -144,6 +147,9 @@ /* Define to 1 if you have the 'mktime' function. */ #undef HAVE_MKTIME +/* Define to 1 if the compiler supports -fno-builtin-memcpy. */ +#undef HAVE_NO_BUILTIN_MEMCPY + /* Define to 1 whether printf supports the conversion specifier "%jd". */ #undef HAVE_PRINTF_JD diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/configure.ac new/libcdatetime-20260602/configure.ac --- old/libcdatetime-20260520/configure.ac 2026-05-20 06:59:37.000000000 +0200 +++ new/libcdatetime-20260602/configure.ac 2026-06-01 14:46:34.000000000 +0200 @@ -2,7 +2,7 @@ AC_INIT( [libcdatetime], - [20260520], + [20260602], [[email protected]]) AC_CONFIG_SRCDIR( @@ -44,6 +44,15 @@ dnl Check if shared library support should be disabled AX_COMMON_CHECK_DISABLE_SHARED_LIBS +dnl Check if asan support should be enabled +AX_TESTS_CHECK_ENABLE_ASAN + +dnl Check if ubsan support should be enabled +AX_TESTS_CHECK_ENABLE_UBSAN + +dnl Check if code coverage support should be enabled +AX_TESTS_CHECK_ENABLE_CODE_COVERAGE + dnl Check if WINAPI support should be enabled AX_COMMON_CHECK_ENABLE_WINAPI diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/dpkg/changelog new/libcdatetime-20260602/dpkg/changelog --- old/libcdatetime-20260520/dpkg/changelog 2026-05-20 16:43:27.000000000 +0200 +++ new/libcdatetime-20260602/dpkg/changelog 2026-06-01 14:49:09.000000000 +0200 @@ -1,5 +1,5 @@ -libcdatetime (20260520-1) unstable; urgency=low +libcdatetime (20260602-1) unstable; urgency=low * Auto-generated - -- Joachim Metz <[email protected]> Wed, 20 May 2026 16:43:27 +0200 + -- Joachim Metz <[email protected]> Mon, 01 Jun 2026 14:49:08 +0200 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/include/libcdatetime/definitions.h new/libcdatetime-20260602/include/libcdatetime/definitions.h --- old/libcdatetime-20260520/include/libcdatetime/definitions.h 2026-05-20 16:43:27.000000000 +0200 +++ new/libcdatetime-20260602/include/libcdatetime/definitions.h 2026-06-01 14:49:09.000000000 +0200 @@ -24,11 +24,11 @@ #include <libcdatetime/types.h> -#define LIBCDATETIME_VERSION 20260520 +#define LIBCDATETIME_VERSION 20260602 /* The libcdatetime version string */ -#define LIBCDATETIME_VERSION_STRING "20260520" +#define LIBCDATETIME_VERSION_STRING "20260602" /* The string format definition flags */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/libcdatetime/libcdatetime.c new/libcdatetime-20260602/libcdatetime/libcdatetime.c --- old/libcdatetime-20260520/libcdatetime/libcdatetime.c 2026-05-20 06:59:38.000000000 +0200 +++ new/libcdatetime-20260602/libcdatetime/libcdatetime.c 2026-06-01 14:46:18.000000000 +0200 @@ -37,6 +37,8 @@ #pragma managed( push, off ) #endif +/* LCOV_EXCL_START */ + /* Defines the entry point for the DLL */ BOOL WINAPI DllMain( @@ -65,6 +67,8 @@ return( TRUE ); } +/* LCOV_EXCL_STOP */ + /* Function that indicates the library is a DLL * Returns 1 */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/libcdatetime/libcdatetime.rc new/libcdatetime-20260602/libcdatetime/libcdatetime.rc --- old/libcdatetime-20260520/libcdatetime/libcdatetime.rc 2026-05-20 16:43:27.000000000 +0200 +++ new/libcdatetime-20260602/libcdatetime/libcdatetime.rc 2026-06-01 14:49:09.000000000 +0200 @@ -22,12 +22,12 @@ BLOCK "040904E4" BEGIN VALUE "FileDescription", "Library to support cross-platform C date and time functions\0" - VALUE "FileVersion", "20260520" "\0" + VALUE "FileVersion", "20260602" "\0" VALUE "InternalName", "libcdatetime.dll\0" VALUE "LegalCopyright", "(C) 2013-2026, Joachim Metz <[email protected]>\0" VALUE "OriginalFilename", "libcdatetime.dll\0" VALUE "ProductName", "libcdatetime\0" - VALUE "ProductVersion", "20260520" "\0" + VALUE "ProductVersion", "20260602" "\0" VALUE "Comments", "For more information visit https://github.com/libyal/libcdatetime/\0" END END diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/libcdatetime/libcdatetime_definitions.h new/libcdatetime-20260602/libcdatetime/libcdatetime_definitions.h --- old/libcdatetime-20260520/libcdatetime/libcdatetime_definitions.h 2026-05-20 16:43:27.000000000 +0200 +++ new/libcdatetime-20260602/libcdatetime/libcdatetime_definitions.h 2026-06-01 14:49:09.000000000 +0200 @@ -35,11 +35,11 @@ */ #else -#define LIBCDATETIME_VERSION 20260520 +#define LIBCDATETIME_VERSION 20260602 /* The libcdatetime version string */ -#define LIBCDATETIME_VERSION_STRING "20260520" +#define LIBCDATETIME_VERSION_STRING "20260602" /* The string format definition flags */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/libcdatetime/libcdatetime_elements.c new/libcdatetime-20260602/libcdatetime/libcdatetime_elements.c --- old/libcdatetime-20260520/libcdatetime/libcdatetime_elements.c 2026-05-20 06:59:38.000000000 +0200 +++ new/libcdatetime-20260602/libcdatetime/libcdatetime_elements.c 2026-06-01 14:46:18.000000000 +0200 @@ -1696,7 +1696,7 @@ return( -1 ); } if( memory_copy( - internal_elements->tm, + &( internal_elements->tm ), static_tm, sizeof( struct tm ) ) == NULL ) { @@ -1783,7 +1783,7 @@ return( -1 ); } if( memory_copy( - internal_elements->tm, + &( internal_elements->tm ), static_tm, sizeof( struct tm ) ) == NULL ) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/libcdatetime/libcdatetime_extern.h new/libcdatetime-20260602/libcdatetime/libcdatetime_extern.h --- old/libcdatetime-20260520/libcdatetime/libcdatetime_extern.h 2026-05-20 06:59:38.000000000 +0200 +++ new/libcdatetime-20260602/libcdatetime/libcdatetime_extern.h 2026-06-01 14:46:18.000000000 +0200 @@ -24,6 +24,19 @@ #include <common.h> +#if !defined( __CYGWIN__ ) && !defined( _WIN32 ) && defined( __has_attribute ) +#if __has_attribute( visibility ) +#define LIBCDATETIME_INTERNAL __attribute__((visibility("hidden"))) extern + +#else +#define LIBCDATETIME_INTERNAL extern + +#endif /* __has_attribute( visibility ) */ +#else +#define LIBCDATETIME_INTERNAL extern + +#endif /* !defined( __CYGWIN__ ) && !defined( _WIN32 ) && defined( __has_attribute ) */ + /* Define HAVE_LOCAL_LIBCDATETIME for local use of libcdatetime */ #if !defined( HAVE_LOCAL_LIBCDATETIME ) @@ -32,7 +45,7 @@ #else #define LIBCDATETIME_EXTERN /* extern */ -#define LIBCDATETIME_EXTERN_VARIABLE extern +#define LIBCDATETIME_EXTERN_VARIABLE LIBCDATETIME_INTERNAL #endif /* !defined( HAVE_LOCAL_LIBCDATETIME ) */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/libcdatetime.spec new/libcdatetime-20260602/libcdatetime.spec --- old/libcdatetime-20260520/libcdatetime.spec 2026-05-20 16:43:27.000000000 +0200 +++ new/libcdatetime-20260602/libcdatetime.spec 2026-06-01 14:49:09.000000000 +0200 @@ -1,5 +1,5 @@ Name: libcdatetime -Version: 20260520 +Version: 20260602 Release: 1 Summary: Library to support cross-platform C date and time functions Group: System Environment/Libraries @@ -65,6 +65,6 @@ %{_mandir}/man3/* %changelog -* Wed May 20 2026 Joachim Metz <[email protected]> 20260520-1 +* Mon Jun 1 2026 Joachim Metz <[email protected]> 20260602-1 - Auto-generated diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/libcerror/libcerror_definitions.h new/libcdatetime-20260602/libcerror/libcerror_definitions.h --- old/libcdatetime-20260520/libcerror/libcerror_definitions.h 2026-05-20 16:43:20.000000000 +0200 +++ new/libcdatetime-20260602/libcerror/libcerror_definitions.h 2026-06-01 14:49:02.000000000 +0200 @@ -35,11 +35,11 @@ */ #else -#define LIBCERROR_VERSION 20260513 +#define LIBCERROR_VERSION 20260527 /* The libcerror version string */ -#define LIBCERROR_VERSION_STRING "20260513" +#define LIBCERROR_VERSION_STRING "20260527" /* The error domains */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/libcerror/libcerror_extern.h new/libcdatetime-20260602/libcerror/libcerror_extern.h --- old/libcdatetime-20260520/libcerror/libcerror_extern.h 2026-05-20 16:43:20.000000000 +0200 +++ new/libcdatetime-20260602/libcerror/libcerror_extern.h 2026-06-01 14:49:02.000000000 +0200 @@ -30,12 +30,6 @@ #include <libcerror/extern.h> -#if defined( __CYGWIN__ ) || defined( __MINGW32__ ) -#define LIBCERROR_EXTERN_VARIABLE extern -#else -#define LIBCERROR_EXTERN_VARIABLE LIBCERROR_EXTERN -#endif - #else #define LIBCERROR_EXTERN /* extern */ #define LIBCERROR_EXTERN_VARIABLE extern diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/libcerror/libcerror_system.c new/libcdatetime-20260602/libcerror/libcerror_system.c --- old/libcdatetime-20260520/libcerror/libcerror_system.c 2026-05-20 16:43:20.000000000 +0200 +++ new/libcdatetime-20260602/libcerror/libcerror_system.c 2026-06-01 14:49:02.000000000 +0200 @@ -487,19 +487,6 @@ } while( print_count <= -1 ); - if( message_size >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) - { - error_string[ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 4 ] = (system_character_t) '.'; - error_string[ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 3 ] = (system_character_t) '.'; - error_string[ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 2 ] = (system_character_t) '.'; - error_string[ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 1 ] = 0; - error_string_size = (size_t) LIBCERROR_MESSAGE_MAXIMUM_SIZE; - } - message_index = internal_error->number_of_messages - 1; - - internal_error->messages[ message_index ] = error_string; - internal_error->sizes[ message_index ] = error_string_size; - #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) memory_free( system_format_string ); @@ -507,67 +494,62 @@ system_format_string = NULL; #endif - message_size = internal_error->sizes[ message_index ]; - if( message_size < LIBCERROR_MESSAGE_MAXIMUM_SIZE ) { /* TODO move to separate helper function */ - string_index = internal_error->sizes[ message_index ] - 1; - - if( ( internal_error->messages[ message_index ] != NULL ) - && ( ( internal_error->messages[ message_index ] )[ string_index - 1 ] == (system_character_t) '.' ) ) + if( error_string != NULL ) { - string_index -= 1; - } - reallocation = memory_reallocate( - internal_error->messages[ message_index ], - sizeof( system_character_t ) * ( message_size + 13 + 512 ) ); - - if( reallocation == NULL ) - { - memory_free( - internal_error->messages[ message_index ] ); + string_index = error_string_size - 1; - internal_error->messages[ message_index ] = NULL; - - goto on_error; + if( error_string[ string_index - 1 ] == (system_character_t) '.' ) + { + string_index -= 1; + } + error_string[ string_index ] = 0; + error_string_size = string_index + 1; + + reallocation = memory_reallocate( + error_string, + sizeof( system_character_t ) * ( message_size + 13 + 512 ) ); + + if( reallocation != NULL ) + { + error_string = (system_character_t *) reallocation; + + if( system_string_copy( + &( error_string[ string_index ] ), + _SYSTEM_STRING( " with error: " ), + 13 ) != NULL ) + { + error_string_size += 13; + string_index += 13; + + print_count = libcerror_system_copy_string_from_error_number( + &( error_string[ string_index ] ), + 512, + system_error_code ); + + if( print_count != -1 ) + { + error_string_size += print_count; + } + } + } } - internal_error->messages[ message_index ] = (system_character_t *) reallocation; - - if( system_string_copy( - &( ( internal_error->messages[ message_index ] )[ string_index ] ), - _SYSTEM_STRING( " with error: " ), - 13 ) == NULL ) - { - memory_free( - internal_error->messages[ message_index ] ); - - internal_error->messages[ message_index ] = NULL; - - goto on_error; - } - internal_error->sizes[ message_index ] += 13; - string_index += 13; - - print_count = libcerror_system_copy_string_from_error_number( - &( ( internal_error->messages[ message_index ] )[ string_index ] ), - 512, - system_error_code ); - - if( print_count == -1 ) - { - goto on_error; - } - internal_error->sizes[ message_index ] += print_count; } - if( internal_error->sizes[ message_index ] >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) + if( message_size >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) { - internal_error->messages[ message_index ][ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 4 ] = (system_character_t) '.'; - internal_error->messages[ message_index ][ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 3 ] = (system_character_t) '.'; - internal_error->messages[ message_index ][ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 2 ] = (system_character_t) '.'; - internal_error->messages[ message_index ][ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 1 ] = 0; - internal_error->sizes[ message_index ] = (size_t) LIBCERROR_MESSAGE_MAXIMUM_SIZE; + error_string[ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 4 ] = (system_character_t) '.'; + error_string[ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 3 ] = (system_character_t) '.'; + error_string[ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 2 ] = (system_character_t) '.'; + error_string[ LIBCERROR_MESSAGE_MAXIMUM_SIZE - 1 ] = 0; + error_string_size = (size_t) LIBCERROR_MESSAGE_MAXIMUM_SIZE; } + message_index = internal_error->number_of_messages - 1; + + internal_error->messages[ message_index ] = error_string; + internal_error->sizes[ message_index ] = error_string_size; + return; on_error: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/m4/common.m4 new/libcdatetime-20260602/m4/common.m4 --- old/libcdatetime-20260520/m4/common.m4 2024-10-16 06:31:04.000000000 +0200 +++ new/libcdatetime-20260602/m4/common.m4 2026-06-01 09:01:29.000000000 +0200 @@ -1,6 +1,6 @@ dnl Checks for common headers and functions dnl -dnl Version: 20241013 +dnl Version: 20260530 dnl Function to test if a certain feature was disabled AC_DEFUN([AX_COMMON_ARG_DISABLE], @@ -50,12 +50,36 @@ [ac_cv_with_$2=$4])dnl ]) +dnl Function to detect whether a specific compiler flag can be used +dnl Note that function only supports compiler flags without a = +AC_DEFUN([AX_COMMON_CHECK_COMPILER_FLAG], + [AC_REQUIRE([AC_PROG_CC]) + + m4_define([variable_name], [ac_cv_with[]m4_translit([$1], [- ], [__])]) + + AC_MSG_CHECKING([whether $CC supports $1]) + + BACKUP_CFLAGS="$CFLAGS" + + dnl Force -Werror so Clang/GCC fail on unsupported options + CFLAGS="$CFLAGS -Werror $1" + + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], [[]])], + [AC_MSG_RESULT([yes]) + eval variable_name="yes"], + [AC_MSG_RESULT([no]) + eval variable_name="no"]) + + CFLAGS="$BACKUP_CFLAGS" + ]) + dnl Function to detect whether shared library support should be disabled AC_DEFUN([AX_COMMON_CHECK_DISABLE_SHARED_LIBS], [AX_COMMON_ARG_DISABLE( [shared-libs], [shared_libs], - [disable shared library support]) + [shared library support]) ]) dnl Function to detect whether debug output should be enabled @@ -127,7 +151,7 @@ [AX_COMMON_ARG_ENABLE( [winapi], [winapi], - [enable WINAPI support for cross-compilation], + [WINAPI support for cross-compilation], [auto-detect]) AS_IF( @@ -155,7 +179,7 @@ [AC_MSG_CHECKING( [whether printf supports the conversion specifier "%jd"]) - SAVE_CFLAGS="$CFLAGS" + BACKUP_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Werror" AC_LANG_PUSH(C) @@ -164,24 +188,24 @@ [AC_LANG_PROGRAM( [[#include <stdio.h>]], [[printf( "%jd" ); ]] )], - [ac_cv_cv_have_printf_jd=no], - [ac_cv_cv_have_printf_jd=yes]) + [ac_cv_have_printf_jd=no], + [ac_cv_have_printf_jd=yes]) dnl Second try to see if compilation and linkage with a parameter succeeds AS_IF( - [test "x$ac_cv_cv_have_printf_jd" = xyes], + [test "x$ac_cv_have_printf_jd" = xyes], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include <sys/types.h> #include <stdio.h>]], [[printf( "%jd", (off_t) 10 ); ]] )], - [ac_cv_cv_have_printf_jd=yes], - [ac_cv_cv_have_printf_jd=no]) + [ac_cv_have_printf_jd=yes], + [ac_cv_have_printf_jd=no]) ]) dnl Third try to see if the program runs correctly AS_IF( - [test "x$ac_cv_cv_have_printf_jd" = xyes], + [test "x$ac_cv_have_printf_jd" = xyes], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include <sys/types.h> @@ -189,16 +213,16 @@ [[char string[ 3 ]; if( snprintf( string, 3, "%jd", (off_t) 10 ) < 0 ) return( 1 ); if( ( string[ 0 ] != '1' ) || ( string[ 1 ] != '0' ) ) return( 1 ); ]] )], - [ac_cv_cv_have_printf_jd=yes], - [ac_cv_cv_have_printf_jd=no], - [ac_cv_cv_have_printf_jd=undetermined]) + [ac_cv_have_printf_jd=yes], + [ac_cv_have_printf_jd=no], + [ac_cv_have_printf_jd=undetermined]) ]) AC_LANG_POP(C) - CFLAGS="$SAVE_CFLAGS" + CFLAGS="$BACKUP_CFLAGS" AS_IF( - [test "x$ac_cv_cv_have_printf_jd" = xyes], + [test "x$ac_cv_have_printf_jd" = xyes], [AC_MSG_RESULT( [yes]) AC_DEFINE( @@ -206,7 +230,7 @@ [1], [Define to 1 whether printf supports the conversion specifier "%jd".]) ], [AC_MSG_RESULT( - [$ac_cv_cv_have_printf_jd]) + [$ac_cv_have_printf_jd]) ]) ]) @@ -215,7 +239,7 @@ [AC_MSG_CHECKING( [whether printf supports the conversion specifier "%zd"]) - SAVE_CFLAGS="$CFLAGS" + BACKUP_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Werror" AC_LANG_PUSH(C) @@ -224,24 +248,24 @@ [AC_LANG_PROGRAM( [[#include <stdio.h>]], [[printf( "%zd" ); ]] )], - [ac_cv_cv_have_printf_zd=no], - [ac_cv_cv_have_printf_zd=yes]) + [ac_cv_have_printf_zd=no], + [ac_cv_have_printf_zd=yes]) dnl Second try to see if compilation and linkage with a parameter succeeds AS_IF( - [test "x$ac_cv_cv_have_printf_zd" = xyes], + [test "x$ac_cv_have_printf_zd" = xyes], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include <sys/types.h> #include <stdio.h>]], [[printf( "%zd", (size_t) 10 ); ]] )], - [ac_cv_cv_have_printf_zd=yes], - [ac_cv_cv_have_printf_zd=no]) + [ac_cv_have_printf_zd=yes], + [ac_cv_have_printf_zd=no]) ]) dnl Third try to see if the program runs correctly AS_IF( - [test "x$ac_cv_cv_have_printf_zd" = xyes], + [test "x$ac_cv_have_printf_zd" = xyes], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include <sys/types.h> @@ -249,16 +273,16 @@ [[char string[ 3 ]; if( snprintf( string, 3, "%zd", (size_t) 10 ) < 0 ) return( 1 ); if( ( string[ 0 ] != '1' ) || ( string[ 1 ] != '0' ) ) return( 1 ); ]] )], - [ac_cv_cv_have_printf_zd=yes], - [ac_cv_cv_have_printf_zd=no], - [ac_cv_cv_have_printf_zd=undetermined]) + [ac_cv_have_printf_zd=yes], + [ac_cv_have_printf_zd=no], + [ac_cv_have_printf_zd=undetermined]) ]) AC_LANG_POP(C) - CFLAGS="$SAVE_CFLAGS" + CFLAGS="$BACKUP_CFLAGS" AS_IF( - [test "x$ac_cv_cv_have_printf_zd" = xyes], + [test "x$ac_cv_have_printf_zd" = xyes], [AC_MSG_RESULT( [yes]) AC_DEFINE( @@ -266,7 +290,7 @@ [1], [Define to 1 whether printf supports the conversion specifier "%zd".]) ], [AC_MSG_RESULT( - [$ac_cv_cv_have_printf_zd]) + [$ac_cv_have_printf_zd]) ]) ]) @@ -288,7 +312,7 @@ AS_IF( [test "x$ac_cv_enable_winapi" = xno], [AC_CHECK_HEADERS([libintl.h]) - ]) + ]) dnl Headers included in common/types.h AC_CHECK_HEADERS([limits.h]) @@ -300,7 +324,7 @@ AC_CHECK_HEADERS([wchar.h wctype.h]) dnl File stream functions used in common/file_stream.h - AC_CHECK_FUNCS([fclose feof fgets fopen fread fseeko fseeko64 fwrite vfprintf]) + AC_CHECK_FUNCS([fclose feof fgets fgetws fopen fread fseeko fseeko64 fwrite vfprintf]) AS_IF( [test "x$ac_cv_func_fclose" != xyes], @@ -360,9 +384,7 @@ AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], - [AC_CHECK_FUNCS([fgetws]) - - AS_IF( + [AS_IF( [test "x$ac_cv_func_fgetws" != xyes], [AC_MSG_FAILURE( [Missing function: fgetws], @@ -498,11 +520,11 @@ ]) dnl Wide character string functions used in common/wide_string.h + AC_CHECK_FUNCS([swprintf towlower wcscasecmp wcschr wcslen wcsncasecmp wcsncmp wcsncpy wcsnicmp wcsrchr wcsstr wmemchr wmemcmp wmemcpy wmemrchr]) + AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], - [AC_CHECK_FUNCS([swprintf towlower wcscasecmp wcschr wcslen wcsncasecmp wcsncmp wcsncpy wcsnicmp wcsrchr wcsstr wmemchr wmemcmp wmemcpy wmemrchr]) - - AS_IF( + [AS_IF( [test "x$ac_cv_func_swprintf" != xyes], [AC_MSG_FAILURE( [Missing function: swprintf], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/m4/tests.m4 new/libcdatetime-20260602/m4/tests.m4 --- old/libcdatetime-20260520/m4/tests.m4 2024-06-01 08:12:40.000000000 +0200 +++ new/libcdatetime-20260602/m4/tests.m4 2026-06-01 14:46:18.000000000 +0200 @@ -1,6 +1,177 @@ dnl Functions for testing dnl -dnl Version: 20200712 +dnl Version: 20260601 + +dnl Function to detect whether the file system is case-insensitive +AC_DEFUN([AX_TEST_CHECK_FILE_SYSTEM_IS_CASE_INSENSITIVE], + [AC_MSG_CHECKING([whether the file system is case-insensitive]) + + as_tmp_case_file="conftest.case.tst" + touch "$as_tmp_case_file" 2>/dev/null + + AS_IF( + [test -f CONFTEST.CASE.TST], + [ac_cv_file_system_case_insentive=yes], + [ac_cv_file_system_case_insentive=no]) + + rm -f "$as_tmp_case_file" CONFTEST.CASE.TST 2>/dev/null + + AC_MSG_RESULT( + [$ac_cv_file_system_case_insentive]) + + AS_IF( + [test "x$ac_cv_file_system_case_insentive" = xyes], + [AC_DEFINE( + [HAVE_CASE_INSENSITIVE_FILE_SYSTEM], + [1], + [Define to 1 whether file system is case-insensitive.]) + ]) + ]) + +dnl Function to check whether libasan is functional +AC_DEFUN([AX_TESTS_CHECK_LIBASAN], + [AC_MSG_CHECKING([whether libasan is functional]) + + BACKUP_CFLAGS="$CFLAGS" + BACKUP_LDFLAGS="$LDFLAGS" + + ASAN_CFLAGS="-fno-omit-frame-pointer -fsanitize=address -g -O0" + ASAN_LDFLAGS="-fsanitize=address" + + CFLAGS="$CFLAGS $ASAN_CFLAGS" + LDFLAGS="$LDFLAGS $ASAN_LDFLAGS" + + AC_LANG_PUSH(C) + + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include <stdlib.h>]], + [[char *array = (char *) malloc(10 * sizeof(char)); +if (array == NULL) { return 0; } +array[10] = 42; +free(array);]] )], + [ac_cv_have_asan=no], + [ac_cv_have_asan=yes], + [ac_cv_have_asan=undetermined]) + + AC_LANG_POP(C) + + CFLAGS="$BACKUP_CFLAGS" + LDFLAGS="$BACKUP_LDFLAGS" + + AC_MSG_RESULT( + [$ac_cv_have_asan]) + ]) + +dnl Function to check whether libubsan is functional +AC_DEFUN([AX_TESTS_CHECK_LIBUBSAN], + [AC_MSG_CHECKING([whether libubsan is functional]) + + BACKUP_CFLAGS="$CFLAGS" + BACKUP_LDFLAGS="$LDFLAGS" + + UBSAN_CFLAGS="-fsanitize=undefined" + UBSAN_LDFLAGS="-fsanitize=undefined" + + CFLAGS="$CFLAGS $UBSAN_CFLAGS" + LDFLAGS="$LDFLAGS $UBSAN_LDFLAGS" + + AC_LANG_PUSH(C) + + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include <stdio.h>]] + [[int shift = 1; +int negative = -5; +int result = (negative << shift);]] )], + [ac_cv_have_ubsan=no], + [ac_cv_have_ubsan=yes], + [ac_cv_have_ubsan=undetermined]) + + AC_LANG_POP(C) + + CFLAGS="$BACKUP_CFLAGS" + LDFLAGS="$BACKUP_LDFLAGS" + + AC_MSG_RESULT( + [$ac_cv_have_asan]) + ]) + +dnl Function to detect whether asan support should be enabled +AC_DEFUN([AX_TESTS_CHECK_ENABLE_ASAN], + [AX_COMMON_ARG_ENABLE( + [asan], + [asan], + [build with asan], + [no]) + + AS_IF( + [test "x$ac_cv_enable_asan" != xno], + [AX_TESTS_CHECK_LIBASAN + + AS_IF( + [test "x$ac_cv_have_asan" = xno], + [AC_MSG_FAILURE( + [Unable to build with functional libasan], + [1]) + ]) + + CFLAGS="$CFLAGS $ASAN_CFLAGS" + LDFLAGS="$LDFLAGS $ASAN_LDFLAGS" + ]) + ]) + +dnl Function to detect whether ubsan support should be enabled +AC_DEFUN([AX_TESTS_CHECK_ENABLE_UBSAN], + [AX_COMMON_ARG_ENABLE( + [ubsan], + [ubsan], + [build with ubsan], + [no]) + + AS_IF( + [test "x$ac_cv_enable_ubsan" != xno], + [AX_TESTS_CHECK_LIBUBSAN + + AS_IF( + [test "x$ac_cv_have_ubsan" = xno], + [AC_MSG_FAILURE( + [Unable to build with functional libubsan], + [1]) + ]) + + CFLAGS="$CFLAGS $UBSAN_CFLAGS -fno-sanitize-recover=undefined" + LDFLAGS="$LDFLAGS $UBSAN_LDFLAGS" + ]) + ]) + +dnl Function to detect whether code coverage support should be enabled +AC_DEFUN([AX_TESTS_CHECK_ENABLE_CODE_COVERAGE], + [AX_COMMON_ARG_ENABLE( + [code-coverage], + [code_coverage], + [build for code coverage)], + [no]) + + AS_IF( + [test "x$ac_cv_enable_code_coverage" != xno], + [AX_COMMON_CHECK_COMPILER_FLAG(-fno-builtin-memcpy) + + AS_IF( + [test "x$ac_cv_with_fno_builtin_memcpy" != xno], + [AC_DEFINE( + [HAVE_NO_BUILTIN_MEMCPY], + [1], + [Define to 1 if the compiler supports -fno-builtin-memcpy.]) + + CFLAGS="$CFLAGS --coverage -fno-builtin-memcpy -O0"], + [CFLAGS="$CFLAGS --coverage -O0"]) + + CPPFLAGS="$CPPFLAGS -DOPTIMIZATION_DISABLED" + LDFLAGS="$LDFLAGS --coverage" + + enable_shared=no]) + ]) dnl Function to detect if tests dependencies are available AC_DEFUN([AX_TESTS_CHECK_LOCAL], @@ -18,8 +189,14 @@ [HAVE_GNU_DL_DLSYM], [1], [Define to 1 if dlsym function is available in GNU dl.]) + ]) + + AX_TEST_CHECK_FILE_SYSTEM_IS_CASE_INSENSITIVE + + AC_SUBST( + [TESTS_USE_WINAPI], + [$ac_cv_enable_winapi]) ]) -]) dnl Function to detect if OSS-Fuzz build environment is available AC_DEFUN([AX_TESTS_CHECK_OSSFUZZ], @@ -29,5 +206,5 @@ AC_SUBST( [LIB_FUZZING_ENGINE], ["${LIB_FUZZING_ENGINE}"]) -]) + ]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/m4/types.m4 new/libcdatetime-20260602/m4/types.m4 --- old/libcdatetime-20260520/m4/types.m4 2024-06-01 08:12:40.000000000 +0200 +++ new/libcdatetime-20260602/m4/types.m4 2026-05-28 11:56:22.000000000 +0200 @@ -1,6 +1,6 @@ dnl Functions for type definitions dnl -dnl Version: 20180727 +dnl Version: 20260528 dnl Function to detect if type definitions are available AC_DEFUN([AX_TYPES_CHECK_LOCAL], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/tests/Makefile.am new/libcdatetime-20260602/tests/Makefile.am --- old/libcdatetime-20260520/tests/Makefile.am 2026-05-20 06:59:47.000000000 +0200 +++ new/libcdatetime-20260602/tests/Makefile.am 2026-06-01 14:46:27.000000000 +0200 @@ -4,6 +4,9 @@ @LIBCERROR_CPPFLAGS@ \ @LIBCDATETIME_DLL_IMPORT@ +AM_TESTS_ENVIRONMENT = \ + export TESTS_USE_WINAPI="@TESTS_USE_WINAPI@"; + TESTS = \ test_library.sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/tests/cdatetime_test_elements.c new/libcdatetime-20260602/tests/cdatetime_test_elements.c --- old/libcdatetime-20260520/tests/cdatetime_test_elements.c 2026-05-20 06:59:47.000000000 +0200 +++ new/libcdatetime-20260602/tests/cdatetime_test_elements.c 2026-06-01 14:46:27.000000000 +0200 @@ -3122,7 +3122,7 @@ &error ); result = libcdatetime_internal_elements_set_from_filetime_utc( - elements, + (libcdatetime_internal_elements_t *) elements, NULL, &error ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/tests/cdatetime_test_memory.h new/libcdatetime-20260602/tests/cdatetime_test_memory.h --- old/libcdatetime-20260520/tests/cdatetime_test_memory.h 2026-05-20 06:59:38.000000000 +0200 +++ new/libcdatetime-20260602/tests/cdatetime_test_memory.h 2026-06-01 14:46:18.000000000 +0200 @@ -28,9 +28,23 @@ extern "C" { #endif -#if defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) && !defined( LIBCDATETIME_DLL_IMPORT ) && !defined( __aarch64__ ) && !defined( __arm__ ) && !defined( __clang__ ) && !defined( __CYGWIN__ ) && !defined( __hppa__ ) && !defined( __loongarch__ ) && !defined( __mips__ ) && !defined( __riscv ) && !defined( __sparc__ ) && !defined( HAVE_ASAN ) -#define HAVE_CDATETIME_TEST_MEMORY 1 -#endif +#if defined( HAVE_MEMORY_TESTS ) + +/* Memory tests only support x86 or x86-64 architectures */ +#if defined( __x86__ ) || defined( __x86_64__ ) + +/* Memory tests cannot be used in combination with DLLs or CygWin */ +#if !defined( LIBCDATETIME_DLL_IMPORT ) && !defined( __CYGWIN__ ) + +/* Memory tests require dlsym */ +#if defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) + +#define HAVE_CDATETIME_TEST_MEMORY 1 + +#endif /* defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) */ +#endif /* !defined( LIBCDATETIME_DLL_IMPORT ) && !defined( __CYGWIN__ ) */ +#endif /* defined( __x86__ ) || defined( __x86_64__ ) */ +#endif /* defined( HAVE_MEMORY_TESTS ) */ #if defined( HAVE_CDATETIME_TEST_MEMORY ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/tests/test_library.sh new/libcdatetime-20260602/tests/test_library.sh --- old/libcdatetime-20260520/tests/test_library.sh 2026-05-20 06:59:38.000000000 +0200 +++ new/libcdatetime-20260602/tests/test_library.sh 2026-06-01 14:46:18.000000000 +0200 @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Tests library functions and types. # -# Version: 20260509 +# Version: 20260531 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -89,21 +89,16 @@ INPUT_FILES+=("${TEST_SET_INPUT_DIRECTORY}/${FILENAME}") fi done < "${TEST_SET_DIRECTORY}/files" - else + else for FILENAME in ${TEST_SET_INPUT_DIRECTORY}/${INPUT_GLOB}; do INPUT_FILES+=("${FILENAME}") done - fi + fi for INPUT_FILE in "${INPUT_FILES[@]}"; do OPTION_INPUT_FILE="${INPUT_FILE}"; - if test "${OSTYPE}" = "msys"; - then - # A test executable built with MinGW expects a Windows path. - INPUT_FILE=`echo ${INPUT_FILE} | sed 's?/?\\\\?g'`; - fi local TESTED_WITH_OPTIONS=0; for OPTION_SET in ${OPTION_SETS[@]}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libcdatetime-20260520/tests/test_runner.sh new/libcdatetime-20260602/tests/test_runner.sh --- old/libcdatetime-20260520/tests/test_runner.sh 2026-05-20 06:59:38.000000000 +0200 +++ new/libcdatetime-20260602/tests/test_runner.sh 2026-06-01 14:46:21.000000000 +0200 @@ -1,20 +1,11 @@ #!/usr/bin/env bash # Bash functions to run an executable for testing. # -# Version: 20231119 -# -# When CHECK_WITH_ASAN is set to a non-empty value the test executable -# is run with asan, otherwise it is run without. -# -# When CHECK_WITH_GDB is set to a non-empty value the test executable -# is run with gdb, otherwise it is run without. +# Version: 20260601 # # When CHECK_WITH_STDERR is set to a non-empty value the test executable # is run with error output to stderr. # -# When CHECK_WITH_VALGRIND is set to a non-empty value the test executable -# is run with valgrind, otherwise it is run without. -# # PYTHON is used to determine the Python interpreter. EXIT_SUCCESS=0; @@ -42,10 +33,6 @@ # Checks the availability of binaries and exits if not available. # -# Globals: -# CHECK_WITH_GDB -# CHECK_WITH_VALGRIND -# assert_availability_binaries() { assert_availability_binary cat; @@ -60,15 +47,6 @@ assert_availability_binary uname; assert_availability_binary wc; assert_availability_binary zcat; - - if test -n "${CHECK_WITH_GDB}"; - then - assert_availability_binary gdb; - - elif test -n "${CHECK_WITH_VALGRIND}"; - then - assert_availability_binary valgrind; - fi } # Checks if the test set is in the ignore list. @@ -405,10 +383,7 @@ # Runs the test with optional arguments. # # Globals: -# CHECK_WITH_ASAN -# CHECK_WITH_GDB # CHECK_WITH_STDERR -# CHECK_WITH_VALGRIND # # Arguments: # a string containing the test description @@ -456,196 +431,7 @@ fi local RESULT=0; - if test -n "${CHECK_WITH_ASAN}"; - then - local TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} ); - local LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} ); - local PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} ); - - local LSAN_SUPPRESSIONS="lsan.suppressions"; - - if ! test -f ${LSAN_SUPPRESSIONS}; - then - LSAN_SUPPRESSIONS="../lsan.suppressions"; - fi - if test "${PLATFORM}" = "Darwin"; - then - if test ${IS_PYTHON_SCRIPT} -eq 0; - then - LSAN_OPTIONS=suppressions="${LSAN_SUPPRESSIONS}" DYLD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; - RESULT=$?; - else - LSAN_OPTIONS=suppressions="${LSAN_SUPPRESSIONS}" DYLD_LIBRARY_PATH="${LIBRARY_PATH}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; - RESULT=$?; - fi - else - local CONFIG_LOG="../config.log"; - - if ! test -f ${CONFIG_LOG}; - then - CONFIG_LOG="../../config.log"; - fi - local CC=`cat ${CONFIG_LOG} | grep -e "^CC=" | sed "s/CC='\\(.*\\)'/\1/"`; - local LIBASAN=""; - - if test -z ${CC} || test ${CC} != "clang"; - then - local LDCONFIG=`which ldconfig 2> /dev/null`; - - if test -z ${LDCONFIG} || ! test -x ${LDCONFIG}; - then - LDCONFIG="/sbin/ldconfig"; - fi - if test -z ${LDCONFIG} || ! test -x ${LDCONFIG}; - then - echo "Missing binary: ldconfig"; - echo ""; - - exit ${EXIT_FAILURE}; - fi - LIBASAN=`${LDCONFIG} -p | grep libasan | sed 's/^.* => //' | sort | tail -n 1`; - - if ! test -f ${LIBASAN}; - then - echo "Missing library: ${BINARY}"; - echo ""; - - exit ${EXIT_FAILURE}; - fi - fi - if test ${IS_PYTHON_SCRIPT} -eq 0; - then - LSAN_OPTIONS=suppressions="${LSAN_SUPPRESSIONS}" LD_PRELOAD="${LIBASAN}" LD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; - RESULT=$?; - else - LSAN_OPTIONS=suppressions="${LSAN_SUPPRESSIONS}" LD_PRELOAD="${LIBASAN}" LD_LIBRARY_PATH="${LIBRARY_PATH}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; - RESULT=$?; - fi - fi - - elif test -n "${CHECK_WITH_GDB}"; - then - local TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} ); - local LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} ); - local PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} ); - - if test "${PLATFORM}" = "Darwin"; - then - if test ${IS_PYTHON_SCRIPT} -eq 0; - then - DYLD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; - RESULT=$?; - else - DYLD_LIBRARY_PATH="${LIBRARY_PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; - RESULT=$?; - fi - - elif test "${PLATFORM}" = "CYGWIN_NT"; - then - if test ${IS_PYTHON_SCRIPT} -eq 0; - then - PATH="${LIBRARY_PATH}:${PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; - RESULT=$?; - else - PATH="${LIBRARY_PATH}:${PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; - RESULT=$?; - fi - - else - if test ${IS_PYTHON_SCRIPT} -eq 0; - then - LD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; - RESULT=$?; - else - LD_LIBRARY_PATH="${LIBRARY_PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; - RESULT=$?; - fi - fi - - elif test -n "${CHECK_WITH_VALGRIND}"; - then - local TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} ); - local LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} ); - local PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} ); - - local VALGRIND_LOG="valgrind.log-$$"; - local VALGRIND_OPTIONS=("--tool=memcheck" "--leak-check=full" "--show-leak-kinds=definite,indirect,possible" "--track-origins=yes" "--log-file=${VALGRIND_LOG}"); - - if test "${PLATFORM}" = "Darwin"; - then - if test ${IS_PYTHON_SCRIPT} -eq 0; - then - DYLD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; - RESULT=$?; - else - DYLD_LIBRARY_PATH="${LIBRARY_PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; - RESULT=$?; - fi - - elif test "${PLATFORM}" = "CYGWIN_NT"; - then - if test ${IS_PYTHON_SCRIPT} -eq 0; - then - PATH="${LIBRARY_PATH}:${PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; - RESULT=$?; - else - PATH="${LIBRARY_PATH}:${PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; - RESULT=$?; - fi - - else - if test ${IS_PYTHON_SCRIPT} -eq 0; - then - LD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; - RESULT=$?; - else - LD_LIBRARY_PATH="${LIBRARY_PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${TEST_EXECUTABLE}" ${ARGUMENTS[@]}; - RESULT=$?; - fi - fi - if test ${RESULT} -eq ${EXIT_SUCCESS}; - then - grep "All heap blocks were freed -- no leaks are possible" ${VALGRIND_LOG} > /dev/null 2>&1; - - if test $? -ne ${EXIT_SUCCESS}; - then - # Ignore "still reachable" - # Also see: http://valgrind.org/docs/manual/faq.html#faq.deflost - - grep "definitely lost: 0 bytes in 0 blocks" ${VALGRIND_LOG} > /dev/null 2>&1; - RESULT_DIRECTLY_LOST=$?; - - grep "indirectly lost: 0 bytes in 0 blocks" ${VALGRIND_LOG} > /dev/null 2>&1; - RESULT_INDIRECTLY_LOST=$?; - - grep "possibly lost: 0 bytes in 0 blocks" ${VALGRIND_LOG} > /dev/null 2>&1; - RESULT_POSSIBLY_LOST=$?; - - grep "suppressed: 0 bytes in 0 blocks" ${VALGRIND_LOG} > /dev/null 2>&1; - RESULT_SUPPRESSED=$?; - - if test ${RESULT_DIRECTLY_LOST} -ne ${EXIT_SUCCESS} || test ${RESULT_INDIRECTLY_LOST} -ne ${EXIT_SUCCESS} || test ${RESULT_POSSIBLY_LOST} -ne ${EXIT_SUCCESS} || test ${RESULT_SUPPRESSED} -ne ${EXIT_SUCCESS}; - then - echo "Memory leakage detected."; - cat ${VALGRIND_LOG}; - - RESULT=${EXIT_FAILURE}; - fi - fi - # Detect valgrind warnings. - local NUMBER_OF_LINES=`wc -l ${VALGRIND_LOG} | awk '{ print $1 }'`; - - if test ${NUMBER_OF_LINES} -ne 15 && test ${NUMBER_OF_LINES} -ne 22; - then - echo "Unsupported number of lines: ${NUMBER_OF_LINES}"; - cat ${VALGRIND_LOG}; - - RESULT=${EXIT_FAILURE}; - fi - fi - rm -f ${VALGRIND_LOG}; - - elif test ${IS_PYTHON_SCRIPT} -eq 0; + if test ${IS_PYTHON_SCRIPT} -eq 0; then if ! test -f "${TEST_EXECUTABLE}"; then @@ -725,10 +511,7 @@ # Runs the test with an input file and optional arguments. # # Globals: -# CHECK_WITH_ASAN -# CHECK_WITH_GDB # CHECK_WITH_STDERR -# CHECK_WITH_VALGRIND # # Arguments: # a string containing the path of the test executable @@ -776,197 +559,25 @@ fi local RESULT=0; - if test -n "${CHECK_WITH_ASAN}"; + # TODO: add support for "${MSYSTEM}" = "UCRT64" + if test ${TESTS_USE_WINAPI} = "yes" || test "${MSYSTEM}" = "MINGW32" || test "${MSYSTEM}" = "MINGW64"; then - local TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} ); - local LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} ); - local PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} ); - - local LSAN_SUPPRESSIONS="lsan.suppressions"; - - if ! test -f ${LSAN_SUPPRESSIONS}; - then - LSAN_SUPPRESSIONS="../lsan.suppressions"; - fi - if test "${PLATFORM}" = "Darwin"; - then - # TODO DYLD_INSERT_LIBRARIES=/Library/Developer/CommandLineTools/usr/lib/clang/8.1.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib - if test ${IS_PYTHON_SCRIPT} -eq 0; - then - LSAN_OPTIONS=suppressions="${LSAN_SUPPRESSIONS}" DYLD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; - RESULT=$?; - else - LSAN_OPTIONS=suppressions="${LSAN_SUPPRESSIONS}" DYLD_LIBRARY_PATH="${LIBRARY_PATH}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; - RESULT=$?; - fi - else - local CONFIG_LOG="../config.log"; - - if ! test -f ${CONFIG_LOG}; - then - CONFIG_LOG="../../config.log"; - fi - local CC=`cat ${CONFIG_LOG} | grep -e "^CC=" | sed "s/CC='\\(.*\\)'/\1/"`; - local LIBASAN=""; - - if test -z ${CC} || test ${CC} != "clang"; - then - local LDCONFIG=`which ldconfig 2> /dev/null`; + INPUT_FILE=`cygpath -w "${INPUT_FILE}"`; - if test -z ${LDCONFIG} || ! test -x ${LDCONFIG}; - then - LDCONFIG="/sbin/ldconfig"; - fi - if test -z ${LDCONFIG} || ! test -x ${LDCONFIG}; - then - echo "Missing binary: ldconfig"; - echo ""; - - exit ${EXIT_FAILURE}; - fi - LIBASAN=`${LDCONFIG} -p | grep libasan | sed 's/^.* => //' | sort | tail -n 1`; - - if ! test -f ${LIBASAN}; - then - echo "Missing library: ${BINARY}"; - echo ""; - - exit ${EXIT_FAILURE}; - fi - fi - if test ${IS_PYTHON_SCRIPT} -eq 0; - then - LSAN_OPTIONS=suppressions="${LSAN_SUPPRESSIONS}" LD_PRELOAD="${LIBASAN}" LD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; - RESULT=$?; - else - LSAN_OPTIONS=suppressions="${LSAN_SUPPRESSIONS}" LD_PRELOAD="${LIBASAN}" LD_LIBRARY_PATH="${LIBRARY_PATH}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; - RESULT=$?; - fi - fi - - elif test -n "${CHECK_WITH_GDB}"; + elif test "${OSTYPE}" != "cygwin" && test "${OSTYPE}" != "msys"; then - local TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} ); - local LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} ); - local PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} ); - - if test "${PLATFORM}" = "Darwin"; + if ! test -x ${OBJDUMP}; then - if test ${IS_PYTHON_SCRIPT} -eq 0; - then - DYLD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; - RESULT=$?; - else - DYLD_LIBRARY_PATH="${LIBRARY_PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; - RESULT=$?; - fi - - elif test "${PLATFORM}" = "CYGWIN_NT"; - then - if test ${IS_PYTHON_SCRIPT} -eq 0; - then - PATH="${LIBRARY_PATH}:${PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; - RESULT=$?; - else - PATH="${LIBRARY_PATH}:${PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; - RESULT=$?; - fi + echo "Missing executable: ${OBJDUMP}"; - else - if test ${IS_PYTHON_SCRIPT} -eq 0; - then - LD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; - RESULT=$?; - else - LD_LIBRARY_PATH="${LIBRARY_PATH}" gdb -ex "set non-stop on" -ex "run" -ex "quit" --args "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; - RESULT=$?; - fi - fi - - elif test -n "${CHECK_WITH_VALGRIND}"; - then - local TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} ); - local LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} ); - local PYTHON_MODULE_PATH=$( find_binary_python_module_path ${TEST_EXECUTABLE} ); - - local VALGRIND_LOG="valgrind.log-$$"; - local VALGRIND_OPTIONS=("--tool=memcheck" "--leak-check=full" "--show-leak-kinds=definite,indirect,possible" "--track-origins=yes" "--log-file=${VALGRIND_LOG}"); - - if test "${PLATFORM}" = "Darwin"; - then - if test ${IS_PYTHON_SCRIPT} -eq 0; - then - DYLD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; - RESULT=$?; - else - DYLD_LIBRARY_PATH="${LIBRARY_PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; - RESULT=$?; - fi - - elif test "${PLATFORM}" = "CYGWIN_NT"; - then - if test ${IS_PYTHON_SCRIPT} -eq 0; - then - PATH="${LIBRARY_PATH}:${PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; - RESULT=$?; - else - PATH="${LIBRARY_PATH}:${PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; - RESULT=$?; - fi - - else - if test ${IS_PYTHON_SCRIPT} -eq 0; - then - LD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; - RESULT=$?; - else - LD_LIBRARY_PATH="${LIBRARY_PATH}" valgrind ${VALGRIND_OPTIONS[@]} "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}"; - RESULT=$?; - fi + exit ${EXIT_FAILURE}; fi - if test ${RESULT} -eq ${EXIT_SUCCESS}; + if ${OBJDUMP} -f "${TEST_EXECUTABLE}" 2>&1 | grep -q "pei-"; then - grep "All heap blocks were freed -- no leaks are possible" ${VALGRIND_LOG} > /dev/null 2>&1; - - if test $? -ne ${EXIT_SUCCESS}; - then - # Ignore "still reachable" - # Also see: http://valgrind.org/docs/manual/faq.html#faq.deflost - - grep "definitely lost: 0 bytes in 0 blocks" ${VALGRIND_LOG} > /dev/null 2>&1; - RESULT_DIRECTLY_LOST=$?; - - grep "indirectly lost: 0 bytes in 0 blocks" ${VALGRIND_LOG} > /dev/null 2>&1; - RESULT_INDIRECTLY_LOST=$?; - - grep "possibly lost: 0 bytes in 0 blocks" ${VALGRIND_LOG} > /dev/null 2>&1; - RESULT_POSSIBLY_LOST=$?; - - grep "suppressed: 0 bytes in 0 blocks" ${VALGRIND_LOG} > /dev/null 2>&1; - RESULT_SUPPRESSED=$?; - - if test ${RESULT_DIRECTLY_LOST} -ne ${EXIT_SUCCESS} || test ${RESULT_INDIRECTLY_LOST} -ne ${EXIT_SUCCESS} || test ${RESULT_POSSIBLY_LOST} -ne ${EXIT_SUCCESS} || test ${RESULT_SUPPRESSED} -ne ${EXIT_SUCCESS}; - then - echo "Memory leakage detected."; - cat ${VALGRIND_LOG}; - - RESULT=${EXIT_FAILURE}; - fi - fi - # Detect valgrind warnings. - local NUMBER_OF_LINES=`wc -l ${VALGRIND_LOG} | awk '{ print $1 }'`; - - if test ${NUMBER_OF_LINES} -ne 15 && test ${NUMBER_OF_LINES} -ne 22; - then - echo "Unsupported number of lines: ${NUMBER_OF_LINES}"; - cat ${VALGRIND_LOG}; - - RESULT=${EXIT_FAILURE}; - fi + INPUT_FILE=`winepath -w "${INPUT_FILE}"`; fi - rm -f ${VALGRIND_LOG}; - - elif test ${IS_PYTHON_SCRIPT} -eq 0; + fi + if test ${IS_PYTHON_SCRIPT} -eq 0; then if ! test -f "${TEST_EXECUTABLE}"; then @@ -1019,7 +630,6 @@ return ${EXIT_FAILURE}; fi - if test -n "${CHECK_WITH_STDERR}"; then ${TEST_EXECUTABLE} ${ARGUMENTS[@]} "${INPUT_FILE}";
