diff --git a/appveyor.yml b/appveyor.yml index ae714a7..7ee81e9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -116,12 +116,6 @@ environment: BUILD_ENVIRONMENT: python APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 PYTHON: "C:\\Python311-x64\\python.exe" - - TARGET: macos-tox-py37 - BUILD_ENVIRONMENT: python-tox - APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey - HOMEBREW_NO_INSTALL_CLEANUP: 1 - PYTHON_VERSION: 3.7 - TOXENV: py37 - TARGET: macos-tox-py38 BUILD_ENVIRONMENT: python-tox APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey @@ -189,7 +183,7 @@ environment: install: - cmd: if [%BUILD_ENVIRONMENT%]==[msbuild] ( git clone https://github.com/libyal/vstools.git ..\vstools ) -- sh: if test ${BUILD_ENVIRONMENT} = "python-tox" || test ${BUILD_ENVIRONMENT} = "xcode"; then brew update -q; fi +- sh: if test ${BUILD_ENVIRONMENT} = "python-tox" || test ${BUILD_ENVIRONMENT} = "xcode"; then brew update-reset && brew update -q; fi - sh: if test ${BUILD_ENVIRONMENT} = "python-tox" || test ${BUILD_ENVIRONMENT} = "xcode"; then brew install -q gettext gnu-sed || true; fi - sh: if test ${BUILD_ENVIRONMENT} = "python-tox"; then brew install -q python@${PYTHON_VERSION} tox twine-pypi || true; fi - cmd: if [%BUILD_ENVIRONMENT%]==[python] ( @@ -199,7 +193,7 @@ install: - cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] ( C:\cygwin64\setup-x86_64.exe -qgnNdO -l C:\cygwin64\var\cache\setup -R c:\cygwin64 -s http://cygwin.mirror.constant.com -P gettext-devel -P wget -P python3-devel ) - cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] ( - C:\msys64\usr\bin\pacman -S --noconfirm --needed autoconf automake gcc gettext-devel libtool make ) + C:\msys64\usr\bin\pacman -S --noconfirm --needed autoconf automake gettext-devel libtool make mingw-w64-x86_64-gcc ) - ps: If ( ( "cygwin64-gcc-no-optimization", "mingw-w64-gcc-no-optimization" ).Contains( $env:TARGET ) ) { $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile ..\codecov.exe } diff --git a/configure.ac b/configure.ac index e064caa..57e6291 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.71]) AC_INIT( [libscca], - [20230424], + [20230709], [joachim.metz@gmail.com]) AC_CONFIG_SRCDIR( diff --git a/libscca.spec.in b/libscca.spec.in index 3859726..94cc01f 100644 --- a/libscca.spec.in +++ b/libscca.spec.in @@ -3,10 +3,9 @@ Version: @VERSION@ Release: 1 Summary: Library to access the Windows Prefetch File (PF) format Group: System Environment/Libraries -License: LGPLv3+ +License: LGPL-3.0-or-later Source: %{name}-%{version}.tar.gz URL: https://github.com/libyal/libscca -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @libscca_spec_requires@ @ax_libbfio_spec_requires@ @ax_libcdata_spec_requires@ @ax_libcerror_spec_requires@ @ax_libcfile_spec_requires@ @ax_libclocale_spec_requires@ @ax_libcnotify_spec_requires@ @ax_libcpath_spec_requires@ @ax_libcsplit_spec_requires@ @ax_libcthreads_spec_requires@ @ax_libfcache_spec_requires@ @ax_libfdata_spec_requires@ @ax_libfdatetime_spec_requires@ @ax_libfvalue_spec_requires@ @ax_libfwnt_spec_requires@ @ax_libuna_spec_requires@ BuildRequires: gcc @ax_libbfio_spec_build_requires@ @ax_libcdata_spec_build_requires@ @ax_libcerror_spec_build_requires@ @ax_libcfile_spec_build_requires@ @ax_libclocale_spec_build_requires@ @ax_libcnotify_spec_build_requires@ @ax_libcpath_spec_build_requires@ @ax_libcsplit_spec_build_requires@ @ax_libcthreads_spec_build_requires@ @ax_libfcache_spec_build_requires@ @ax_libfdata_spec_build_requires@ @ax_libfdatetime_spec_build_requires@ @ax_libfvalue_spec_build_requires@ @ax_libfwnt_spec_build_requires@ @ax_libuna_spec_build_requires@ @@ -65,19 +64,16 @@ rm -rf %{buildroot} %postun -p /sbin/ldconfig %files -n libscca -%defattr(644,root,root,755) %license COPYING COPYING.LESSER %doc AUTHORS README -%attr(755,root,root) %{_libdir}/*.so.* +%{_libdir}/*.so.* %files -n libscca-static -%defattr(644,root,root,755) %license COPYING COPYING.LESSER %doc AUTHORS README -%attr(755,root,root) %{_libdir}/*.a +%{_libdir}/*.a %files -n libscca-devel -%defattr(644,root,root,755) %license COPYING COPYING.LESSER %doc AUTHORS README %{_libdir}/*.so @@ -86,17 +82,15 @@ rm -rf %{buildroot} %{_mandir}/man3/* %files -n libscca-python3 -%defattr(644,root,root,755) %license COPYING COPYING.LESSER %doc AUTHORS README %{_libdir}/python3*/site-packages/*.a %{_libdir}/python3*/site-packages/*.so %files -n libscca-tools -%defattr(644,root,root,755) %license COPYING COPYING.LESSER %doc AUTHORS README -%attr(755,root,root) %{_bindir}/* +%{_bindir}/* %{_mandir}/man1/* %changelog diff --git a/libscca/libscca_file_information.c b/libscca/libscca_file_information.c index a06b44f..af8a079 100644 --- a/libscca/libscca_file_information.c +++ b/libscca/libscca_file_information.c @@ -548,9 +548,7 @@ int libscca_file_information_read_data( 80, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } - else if( ( io_handle->format_version == 26 ) - || ( ( io_handle->format_version == 30 ) - && ( file_information->metrics_array_offset == 0x00000130 ) ) ) + else if( io_handle->format_version == 26 ) { byte_stream_copy_to_uint32_little_endian( ( (scca_file_information_v26_t *) data )->unknown5a, @@ -573,7 +571,34 @@ int libscca_file_information_read_data( function ); libcnotify_print_data( ( (scca_file_information_v26_t *) data )->unknown6, - 88, + 84, + LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); + } + else if( ( io_handle->format_version == 30 ) + && ( file_information->metrics_array_offset == 0x00000130 ) ) + { + byte_stream_copy_to_uint32_little_endian( + ( (scca_file_information_v30_1_t *) data )->unknown5a, + value_32bit ); + libcnotify_printf( + "%s: unknown5a\t\t\t\t: 0x%08" PRIx32 "\n", + function, + value_32bit ); + + byte_stream_copy_to_uint32_little_endian( + ( (scca_file_information_v30_1_t *) data )->unknown5b, + value_32bit ); + libcnotify_printf( + "%s: unknown5b\t\t\t\t: 0x%08" PRIx32 "\n", + function, + value_32bit ); + + libcnotify_printf( + "%s: unknown6:\n", + function ); + libcnotify_print_data( + ( (scca_file_information_v30_1_t *) data )->unknown6, + 84, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } else if( ( io_handle->format_version == 30 ) @@ -600,7 +625,7 @@ int libscca_file_information_read_data( function ); libcnotify_print_data( ( (scca_file_information_v30_2_t *) data )->unknown6, - 88, + 84, LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ); } } diff --git a/libscca/scca_file_information.h b/libscca/scca_file_information.h index d748aff..ee61345 100644 --- a/libscca/scca_file_information.h +++ b/libscca/scca_file_information.h @@ -262,9 +262,95 @@ struct scca_file_information_v26 uint8_t unknown5b[ 4 ]; /* Unknown - * Consists of 88 bytes + * Consists of 84 bytes */ - uint8_t unknown6[ 88 ]; + uint8_t unknown6[ 84 ]; +}; + +typedef struct scca_file_information_v30_1 scca_file_information_v30_1_t; + +struct scca_file_information_v30_1 +{ + /* The offset of the metrics array + * Consists of 4 bytes + */ + uint8_t metrics_array_offset[ 4 ]; + + /* The number of file metrics array entries + * Consists of 4 bytes + */ + uint8_t number_of_file_metrics_entries[ 4 ]; + + /* The offset of the trace chain array + * Consists of 4 bytes + */ + uint8_t trace_chain_array_offset[ 4 ]; + + /* The number of trace chain array entries + * Consists of 4 bytes + */ + uint8_t number_of_trace_chain_array_entries[ 4 ]; + + /* The filename strings offset + * Consists of 4 bytes + */ + uint8_t filename_strings_offset[ 4 ]; + + /* The filename strings size + * Consists of 4 bytes + */ + uint8_t filename_strings_size[ 4 ]; + + /* The volumes information offset + * Consists of 4 bytes + */ + uint8_t volumes_information_offset[ 4 ]; + + /* The number of volumes + * Consists of 4 bytes + */ + uint8_t number_of_volumes[ 4 ]; + + /* The volumes information size + * Consists of 4 bytes + */ + uint8_t volumes_information_size[ 4 ]; + + /* Unknown + * Consists of 8 bytes + */ + uint8_t unknown3c[ 8 ]; + + /* The last run date and time + * Consists of 64 bytes + * Contains an array of FILETIME + */ + uint8_t last_run_time[ 64 ]; + + /* Unknown + * Consists of 16 bytes + */ + uint8_t unknown4[ 16 ]; + + /* The run count + * Consists of 4 bytes + */ + uint8_t run_count[ 4 ]; + + /* Unknown + * Consists of 4 bytes + */ + uint8_t unknown5a[ 4 ]; + + /* Unknown + * Consists of 4 bytes + */ + uint8_t unknown5b[ 4 ]; + + /* Unknown + * Consists of 84 bytes + */ + uint8_t unknown6[ 84 ]; }; typedef struct scca_file_information_v30_2 scca_file_information_v30_2_t; @@ -348,9 +434,9 @@ struct scca_file_information_v30_2 uint8_t unknown5b[ 4 ]; /* Unknown - * Consists of 88 bytes + * Consists of 84 bytes */ - uint8_t unknown6[ 88 ]; + uint8_t unknown6[ 84 ]; }; #if defined( __cplusplus ) diff --git a/m4/libuna.m4 b/m4/libuna.m4 index 8357c3d..4462a91 100644 --- a/m4/libuna.m4 +++ b/m4/libuna.m4 @@ -1,6 +1,6 @@ dnl Checks for libuna or required headers and functions dnl -dnl Version: 20210801 +dnl Version: 20230702 dnl Function to detect if a specific libuna definition is available. AC_DEFUN([AX_LIBUNA_CHECK_DEFINITION], @@ -43,7 +43,7 @@ AC_DEFUN([AX_LIBUNA_CHECK_LIB], [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libuna], - [libuna >= 20210801], + [libuna >= 20230702], [ac_cv_libuna=yes], [ac_cv_libuna=check]) ]) @@ -225,6 +225,138 @@ AC_DEFUN([AX_LIBUNA_CHECK_LIB], [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) + dnl Unicode character functions + AC_CHECK_LIB( + una, + libuna_unicode_character_size_to_byte_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_from_byte_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_to_byte_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_size_to_ucs2, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_from_ucs2, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_to_ucs2, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_size_to_ucs4, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_from_ucs4, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_to_ucs4, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_from_utf7_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_to_utf7_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_size_to_utf8, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_from_utf8, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_to_utf8, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_size_to_utf8_rfc2279, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_from_utf8_rfc2279, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_to_utf8_rfc2279, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_size_to_utf16, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_from_utf16, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_to_utf16, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_from_utf16_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_to_utf16_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_from_utf32, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_to_utf32, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_from_utf32_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_unicode_character_copy_to_utf32_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + dnl UTF-8 stream functions AC_CHECK_LIB( una, @@ -337,6 +469,11 @@ AC_DEFUN([AX_LIBUNA_CHECK_LIB], libuna_utf8_string_with_index_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf8_string_compare_with_byte_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_size_from_utf7_stream, @@ -352,6 +489,11 @@ AC_DEFUN([AX_LIBUNA_CHECK_LIB], libuna_utf8_string_with_index_copy_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf8_string_compare_with_utf7_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_size_from_utf8_stream, @@ -369,47 +511,47 @@ AC_DEFUN([AX_LIBUNA_CHECK_LIB], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf8_string_size_from_utf16_stream, + libuna_utf8_string_compare_with_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf8_string_copy_from_utf16_stream, + libuna_utf8_string_size_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf8_string_with_index_copy_from_utf16_stream, + libuna_utf8_string_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf8_string_size_from_utf32_stream, + libuna_utf8_string_with_index_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf8_string_copy_from_utf32_stream, + libuna_utf8_string_compare_with_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf8_string_with_index_copy_from_utf32_stream, + libuna_utf8_string_size_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf8_string_size_from_utf16, + libuna_utf8_string_copy_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf8_string_copy_from_utf16, + libuna_utf8_string_with_index_copy_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf8_string_with_index_copy_from_utf16, + libuna_utf8_string_compare_with_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( @@ -427,6 +569,31 @@ AC_DEFUN([AX_LIBUNA_CHECK_LIB], libuna_utf8_string_with_index_copy_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf8_string_compare_with_utf32, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf8_string_size_from_utf32_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf8_string_copy_from_utf32_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf8_string_with_index_copy_from_utf32_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf8_string_compare_with_utf32_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_size_from_scsu_stream, @@ -459,6 +626,11 @@ AC_DEFUN([AX_LIBUNA_CHECK_LIB], libuna_utf16_string_with_index_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf16_string_compare_with_byte_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_size_from_utf7_stream, @@ -474,6 +646,27 @@ AC_DEFUN([AX_LIBUNA_CHECK_LIB], libuna_utf16_string_with_index_copy_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf16_string_compare_with_utf7_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf16_string_size_from_utf8, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf16_string_copy_from_utf8, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf16_string_with_index_copy_from_utf8, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + dnl libuna_utf16_string_compare_with_utf8 is implemented by libuna_utf8_string_compare_with_utf16 AC_CHECK_LIB( una, libuna_utf16_string_size_from_utf8_stream, @@ -489,6 +682,11 @@ AC_DEFUN([AX_LIBUNA_CHECK_LIB], libuna_utf16_string_with_index_copy_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf16_string_compare_with_utf8_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_size_from_utf16_stream, @@ -506,47 +704,47 @@ AC_DEFUN([AX_LIBUNA_CHECK_LIB], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf16_string_size_from_utf32_stream, + libuna_utf16_string_compare_with_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf16_string_copy_from_utf32_stream, + libuna_utf16_string_size_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf16_string_with_index_copy_from_utf32_stream, + libuna_utf16_string_copy_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf16_string_size_from_utf8, + libuna_utf16_string_with_index_copy_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf16_string_copy_from_utf8, + libuna_utf16_string_compare_with_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf16_string_with_index_copy_from_utf8, + libuna_utf16_string_size_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf16_string_size_from_utf32, + libuna_utf16_string_copy_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf16_string_copy_from_utf32, + libuna_utf16_string_with_index_copy_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf16_string_with_index_copy_from_utf32, + libuna_utf16_string_compare_with_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( @@ -581,6 +779,11 @@ AC_DEFUN([AX_LIBUNA_CHECK_LIB], libuna_utf32_string_with_index_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf32_string_compare_with_byte_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_size_from_utf7_stream, @@ -596,11 +799,31 @@ AC_DEFUN([AX_LIBUNA_CHECK_LIB], libuna_utf32_string_with_index_copy_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf32_string_compare_with_utf7_stream, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_size_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf32_string_size_from_utf8, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + una, + libuna_utf32_string_copy_from_utf8, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + AC_CHECK_LIB( + libuna_utf32_string_with_index_copy_from_utf8, + [ac_cv_libuna_dummy=yes], + [ac_cv_libuna=no]) + dnl libuna_utf32_string_compare_with_utf8 is implemented by libuna_utf8_string_compare_with_utf32 AC_CHECK_LIB( una, libuna_utf32_string_copy_from_utf8_stream, @@ -613,61 +836,63 @@ AC_DEFUN([AX_LIBUNA_CHECK_LIB], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf32_string_size_from_utf16_stream, + libuna_utf32_string_compare_with_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf32_string_copy_from_utf16_stream, + libuna_utf32_string_size_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf32_string_with_index_copy_from_utf16_stream, + libuna_utf32_string_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf32_string_size_from_utf32_stream, + libuna_utf32_string_with_index_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) + dnl libuna_utf32_string_compare_with_utf16 is implemented by libuna_utf16_string_compare_with_utf32 AC_CHECK_LIB( una, - libuna_utf32_string_copy_from_utf32_stream, + libuna_utf32_string_size_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf32_string_with_index_copy_from_utf32_stream, + libuna_utf32_string_copy_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf32_string_size_from_utf8, + libuna_utf32_string_with_index_copy_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf32_string_copy_from_utf8, + libuna_utf32_string_compare_with_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( - libuna_utf32_string_with_index_copy_from_utf8, + una, + libuna_utf32_string_size_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf32_string_size_from_utf16, + libuna_utf32_string_copy_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf32_string_copy_from_utf16, + libuna_utf32_string_with_index_copy_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, - libuna_utf32_string_with_index_copy_from_utf16, + libuna_utf32_string_compare_with_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( @@ -708,6 +933,13 @@ AC_DEFUN([AX_LIBUNA_CHECK_LIB], [test "x$ac_cv_libuna_defines_compare_less" != xyes], [ac_cv_libuna=no]) + AX_LIBUNA_CHECK_DEFINITION( + LIBUNA_UTF16_STREAM_ALLOW_UNPAIRED_SURROGATE, + [ac_cv_libuna_defines_compare_greater]) + AS_IF( + [test "x$ac_cv_libuna_defines_utf16_stream_allow_unpaired_surrogate" != xyes], + [ac_cv_libuna=no]) + ac_cv_libuna_LIBADD="-luna"]) ]) AS_IF( diff --git a/runtests.sh b/runtests.sh index 32115f4..276a2d3 100755 --- a/runtests.sh +++ b/runtests.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Script that runs the tests # -# Version: 20230410 +# Version: 20230507 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -358,11 +358,6 @@ then then exit ${EXIT_FAILURE}; fi - - if test -f "setup.py" && ! run_setup_py_tests ${PYTHON2}; - then - exit ${EXIT_FAILURE}; - fi fi # Test with Python 3. @@ -393,11 +388,6 @@ then then exit ${EXIT_FAILURE}; fi - - if test -f "setup.py" && ! run_setup_py_tests ${PYTHON3}; - then - exit ${EXIT_FAILURE}; - fi fi # Test with the default Python version. diff --git a/synclibs.sh b/synclibs.sh index 3a3f59c..3f3c12c 100755 --- a/synclibs.sh +++ b/synclibs.sh @@ -1,7 +1,7 @@ #!/bin/sh # Script that synchronizes the local library dependencies # -# Version: 20210513 +# Version: 20230510 EXIT_SUCCESS=0; EXIT_FAILURE=1; @@ -52,7 +52,8 @@ do fi LOCAL_LIB_UPPER=`echo "${LOCAL_LIB}" | tr "[a-z]" "[A-Z]"`; - LOCAL_LIB_VERSION=`grep -A 2 AC_INIT ${LOCAL_LIB}-$$/configure.ac | tail -n 1 | sed 's/^\s*\[\([0-9]*\)\],\s*$/\1/'`; + # Note that sed on FreeBSD does not support \s hence that we use [[:space:]] instead. + LOCAL_LIB_VERSION=`grep -A 2 AC_INIT ${LOCAL_LIB}-$$/configure.ac | tail -n 1 | sed 's/^[[:space:]]*\[\([0-9]*\)\],[[:space:]]*$/\1/'`; LOCAL_LIB_MAKEFILE_AM="${LOCAL_LIB}/Makefile.am"; cp ${LOCAL_LIB}-$$/${LOCAL_LIB}/*.[chly] ${LOCAL_LIB};