diff options
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | Makefile.in | 54 | ||||
-rw-r--r-- | aclocal.m4 | 419 | ||||
-rwxr-xr-x | build-aux/ar-lib | 14 | ||||
-rwxr-xr-x | build-aux/compile | 11 | ||||
-rwxr-xr-x | build-aux/config.guess | 198 | ||||
-rwxr-xr-x | build-aux/config.sub | 29 | ||||
-rwxr-xr-x | build-aux/depcomp | 15 | ||||
-rwxr-xr-x | build-aux/install-sh | 8 | ||||
-rwxr-xr-x | build-aux/missing | 75 | ||||
-rwxr-xr-x | build-aux/test-driver | 15 | ||||
-rwxr-xr-x | configure | 444 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | doc/api.rst | 5 | ||||
-rw-r--r-- | doc/changelog.rst | 18 | ||||
-rw-r--r-- | doc/helper_headers.rst | 1 | ||||
-rw-r--r-- | doc/macros.rst | 7 | ||||
-rw-r--r-- | doc/option_parsing.rst | 3 | ||||
-rw-r--r-- | doc/scope.rst | 22 | ||||
-rw-r--r-- | doc/string_ops.rst | 5 | ||||
-rw-r--r-- | include/Makefile.am | 5 | ||||
-rw-r--r-- | include/Makefile.in | 31 | ||||
-rw-r--r-- | include/libHX/ctype_helper.h | 5 | ||||
-rw-r--r-- | include/libHX/defs.h | 12 | ||||
-rw-r--r-- | include/libHX/endian.h | 202 | ||||
-rw-r--r-- | include/libHX/scope.hpp | 35 | ||||
-rw-r--r-- | src/Makefile.in | 104 | ||||
-rw-r--r-- | src/string.c | 16 | ||||
-rw-r--r-- | src/tc-compile.c | 1 | ||||
-rw-r--r-- | src/tc-string.c | 10 | ||||
-rw-r--r-- | src/tx-compile.cpp | 1 |
31 files changed, 1225 insertions, 544 deletions
diff --git a/Makefile.am b/Makefile.am index 3d02bf3..f7e3483 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,6 +5,6 @@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = include src pkgconfig_DATA = libHX.pc -EXTRA_DIST = doc/api.rst doc/assorted.txt doc/bitmaps.rst doc/changelog.rst doc/const_cast.c doc/dirstamp.rst doc/files_and_dirs.rst doc/generator.cpp doc/helper_headers.rst doc/history.rst doc/init.rst doc/inline_clist.rst doc/inline_list.rst doc/install.rst doc/libHX_Documentation.rst doc/linked_list.rst doc/macros.rst doc/maps.rst doc/memory_container.rst doc/misc_functions.rst doc/option_parsing.rst doc/process_management.rst doc/random_numbers.rst doc/shconfig.rst doc/socket_functions.rst doc/string_formatter.rst doc/string_ops.rst doc/strlcpy-timing.rst doc/time_functions.rst doc/typecheck_casts.rst doc/ux-file.rst doc/ux-mmap.rst +EXTRA_DIST = doc/api.rst doc/assorted.txt doc/bitmaps.rst doc/changelog.rst doc/const_cast.c doc/dirstamp.rst doc/files_and_dirs.rst doc/generator.cpp doc/helper_headers.rst doc/history.rst doc/init.rst doc/inline_clist.rst doc/inline_list.rst doc/install.rst doc/libHX_Documentation.rst doc/linked_list.rst doc/macros.rst doc/maps.rst doc/memory_container.rst doc/misc_functions.rst doc/option_parsing.rst doc/process_management.rst doc/random_numbers.rst doc/scope.rst doc/shconfig.rst doc/socket_functions.rst doc/string_formatter.rst doc/string_ops.rst doc/strlcpy-timing.rst doc/time_functions.rst doc/typecheck_casts.rst doc/ux-file.rst doc/ux-mmap.rst ${pkgconfig_DATA}: ${top_builddir}/config.status diff --git a/Makefile.in b/Makefile.in index 6d7c044..0d47770 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. +# Makefile.in generated by automake 1.17 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2021 Free Software Foundation, Inc. +# Copyright (C) 1994-2024 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -72,6 +72,8 @@ am__make_running_with_option = \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +am__rm_f = rm -f $(am__rm_f_notfound) +am__rm_rf = rm -rf $(am__rm_f_notfound) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -155,10 +157,9 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ + { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \ } am__installdirs = "$(DESTDIR)$(pkgconfigdir)" DATA = $(pkgconfig_DATA) @@ -205,8 +206,8 @@ distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ - find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -rf "$(distdir)" \ + find "$(distdir)" -type d ! -perm -700 -exec chmod u+rwx {} ';' \ + ; rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) @@ -236,14 +237,16 @@ am__relativize = \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best +GZIP_ENV = -9 DIST_TARGETS = dist-gzip # Exists only to be overridden by the user if desired. AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' -distcleancheck_listfiles = find . -type f -print +distcleancheck_listfiles = \ + find . \( -type f -a \! \ + \( -name .nfs* -o -name .smb* -o -name .__afs* \) \) -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ @@ -325,8 +328,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__rm_f_notfound = @am__rm_f_notfound@ am__tar = @am__tar@ am__untar = @am__untar@ +am__xargs_n = @am__xargs_n@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -379,7 +384,7 @@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = include src pkgconfig_DATA = libHX.pc -EXTRA_DIST = doc/api.rst doc/assorted.txt doc/bitmaps.rst doc/changelog.rst doc/const_cast.c doc/dirstamp.rst doc/files_and_dirs.rst doc/generator.cpp doc/helper_headers.rst doc/history.rst doc/init.rst doc/inline_clist.rst doc/inline_list.rst doc/install.rst doc/libHX_Documentation.rst doc/linked_list.rst doc/macros.rst doc/maps.rst doc/memory_container.rst doc/misc_functions.rst doc/option_parsing.rst doc/process_management.rst doc/random_numbers.rst doc/shconfig.rst doc/socket_functions.rst doc/string_formatter.rst doc/string_ops.rst doc/strlcpy-timing.rst doc/time_functions.rst doc/typecheck_casts.rst doc/ux-file.rst doc/ux-mmap.rst +EXTRA_DIST = doc/api.rst doc/assorted.txt doc/bitmaps.rst doc/changelog.rst doc/const_cast.c doc/dirstamp.rst doc/files_and_dirs.rst doc/generator.cpp doc/helper_headers.rst doc/history.rst doc/init.rst doc/inline_clist.rst doc/inline_list.rst doc/install.rst doc/libHX_Documentation.rst doc/linked_list.rst doc/macros.rst doc/maps.rst doc/memory_container.rst doc/misc_functions.rst doc/option_parsing.rst doc/process_management.rst doc/random_numbers.rst doc/scope.rst doc/shconfig.rst doc/socket_functions.rst doc/string_formatter.rst doc/string_ops.rst doc/strlcpy-timing.rst doc/time_functions.rst doc/typecheck_casts.rst doc/ux-file.rst doc/ux-mmap.rst all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -423,12 +428,12 @@ config.h: stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status config.h + $(AM_V_at)rm -f stamp-h1 + $(AM_V_GEN)cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ + $(AM_V_GEN)($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + $(AM_V_at)rm -f stamp-h1 + $(AM_V_at)touch $@ distclean-hdr: -rm -f config.h stamp-h1 @@ -575,7 +580,7 @@ distdir: $(BUILT_SOURCES) distdir-am: $(DISTFILES) $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" + $(AM_V_at)$(MKDIR_P) "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -686,7 +691,7 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -696,7 +701,7 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ *.tar.zst*) \ @@ -799,8 +804,8 @@ mostlyclean-generic: clean-generic: distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -$(am__rm_f) $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -903,3 +908,10 @@ ${pkgconfig_DATA}: ${top_builddir}/config.status # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: + +# Tell GNU make to disable its built-in pattern rules. +%:: %,v +%:: RCS/%,v +%:: RCS/% +%:: s.% +%:: SCCS/s.% @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.5 -*- Autoconf -*- +# generated automatically by aclocal 1.17 -*- Autoconf -*- -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2024 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2021 Free Software Foundation, Inc. +# Copyright (C) 2002-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.16' +[am__api_version='1.17' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.5], [], +m4_if([$1], [1.17], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,12 +51,12 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.5])dnl +[AM_AUTOMAKE_VERSION([1.17])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) -# Copyright (C) 2011-2021 Free Software Foundation, Inc. +# Copyright (C) 2011-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -70,16 +70,18 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) AC_DEFUN([AM_PROG_AR], [AC_BEFORE([$0], [LT_INIT])dnl AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl +AC_BEFORE([$0], [AC_PROG_AR])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([ar-lib])dnl AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) : ${AR=ar} +: ${ARFLAGS=cr} AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], [AC_LANG_PUSH([C]) am_cv_ar_interface=ar AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], - [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' + [am_ar_try='$AR $ARFLAGS libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) if test "$ac_status" -eq 0; then am_cv_ar_interface=ar @@ -118,7 +120,7 @@ AC_SUBST([AR])dnl # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -170,7 +172,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2021 Free Software Foundation, Inc. +# Copyright (C) 1997-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -201,7 +203,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -333,7 +335,7 @@ AC_CACHE_CHECK([dependency style of $depcc], # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: + # When given -MP, icc 7.0 and 7.1 complain thus: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported @@ -392,7 +394,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -460,7 +462,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -594,7 +596,7 @@ if test -z "$CSCOPE"; then fi AC_SUBST([CSCOPE]) -AC_REQUIRE([AM_SILENT_RULES])dnl +AC_REQUIRE([_AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. @@ -602,47 +604,9 @@ AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. +AC_REQUIRE([_AM_PROG_RM_F]) +AC_REQUIRE([_AM_PROG_XARGS_N]) -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: <https://www.gnu.org/software/coreutils/>. - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) - fi -fi AM_SILENT_RULES([yes]) dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments @@ -676,7 +640,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -697,7 +661,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2021 Free Software Foundation, Inc. +# Copyright (C) 2003-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -718,7 +682,7 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -761,7 +725,7 @@ AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2021 Free Software Foundation, Inc. +# Copyright (C) 1997-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -795,7 +759,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -824,7 +788,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -871,7 +835,23 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2022-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_RM_F +# --------------- +# Check whether 'rm -f' without any arguments works. +# https://bugs.gnu.org/10828 +AC_DEFUN([_AM_PROG_RM_F], +[am__rm_f_notfound= +AS_IF([(rm -f && rm -fr && rm -rf) 2>/dev/null], [], [am__rm_f_notfound='""']) +AC_SUBST(am__rm_f_notfound) +]) + +# Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -890,16 +870,169 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# _AM_SLEEP_FRACTIONAL_SECONDS +# ---------------------------- +AC_DEFUN([_AM_SLEEP_FRACTIONAL_SECONDS], [dnl +AC_CACHE_CHECK([whether sleep supports fractional seconds], + am_cv_sleep_fractional_seconds, [dnl +AS_IF([sleep 0.001 2>/dev/null], [am_cv_sleep_fractional_seconds=yes], + [am_cv_sleep_fractional_seconds=no]) +])]) + +# _AM_FILESYSTEM_TIMESTAMP_RESOLUTION +# ----------------------------------- +# Determine the filesystem's resolution for file modification +# timestamps. The coarsest we know of is FAT, with a resolution +# of only two seconds, even with the most recent "exFAT" extensions. +# The finest (e.g. ext4 with large inodes, XFS, ZFS) is one +# nanosecond, matching clock_gettime. However, it is probably not +# possible to delay execution of a shell script for less than one +# millisecond, due to process creation overhead and scheduling +# granularity, so we don't check for anything finer than that. (See below.) +AC_DEFUN([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION], [dnl +AC_REQUIRE([_AM_SLEEP_FRACTIONAL_SECONDS]) +AC_CACHE_CHECK([filesystem timestamp resolution], + am_cv_filesystem_timestamp_resolution, [dnl +# Default to the worst case. +am_cv_filesystem_timestamp_resolution=2 + +# Only try to go finer than 1 sec if sleep can do it. +# Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work, +# - 1 sec is not much of a win compared to 2 sec, and +# - it takes 2 seconds to perform the test whether 1 sec works. +# +# Instead, just use the default 2s on platforms that have 1s resolution, +# accept the extra 1s delay when using $sleep in the Automake tests, in +# exchange for not incurring the 2s delay for running the test for all +# packages. +# +am_try_resolutions= +if test "$am_cv_sleep_fractional_seconds" = yes; then + # Even a millisecond often causes a bunch of false positives, + # so just try a hundredth of a second. The time saved between .001 and + # .01 is not terribly consequential. + am_try_resolutions="0.01 0.1 $am_try_resolutions" +fi + +# In order to catch current-generation FAT out, we must *modify* files +# that already exist; the *creation* timestamp is finer. Use names +# that make ls -t sort them differently when they have equal +# timestamps than when they have distinct timestamps, keeping +# in mind that ls -t prints the *newest* file first. +rm -f conftest.ts? +: > conftest.ts1 +: > conftest.ts2 +: > conftest.ts3 + +# Make sure ls -t actually works. Do 'set' in a subshell so we don't +# clobber the current shell's arguments. (Outer-level square brackets +# are removed by m4; they're present so that m4 does not expand +# <dollar><star>; be careful, easy to get confused.) +if ( + set X `[ls -t conftest.ts[12]]` && + { + test "$[]*" != "X conftest.ts1 conftest.ts2" || + test "$[]*" != "X conftest.ts2 conftest.ts1"; + } +); then :; else + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + _AS_ECHO_UNQUOTED( + ["Bad output from ls -t: \"`[ls -t conftest.ts[12]]`\""], + [AS_MESSAGE_LOG_FD]) + AC_MSG_FAILURE([ls -t produces unexpected output. +Make sure there is not a broken ls alias in your environment.]) +fi + +for am_try_res in $am_try_resolutions; do + # Any one fine-grained sleep might happen to cross the boundary + # between two values of a coarser actual resolution, but if we do + # two fine-grained sleeps in a row, at least one of them will fall + # entirely within a coarse interval. + echo alpha > conftest.ts1 + sleep $am_try_res + echo beta > conftest.ts2 + sleep $am_try_res + echo gamma > conftest.ts3 + + # We assume that 'ls -t' will make use of high-resolution + # timestamps if the operating system supports them at all. + if (set X `ls -t conftest.ts?` && + test "$[]2" = conftest.ts3 && + test "$[]3" = conftest.ts2 && + test "$[]4" = conftest.ts1); then + # + # Ok, ls -t worked. If we're at a resolution of 1 second, we're done, + # because we don't need to test make. + make_ok=true + if test $am_try_res != 1; then + # But if we've succeeded so far with a subsecond resolution, we + # have one more thing to check: make. It can happen that + # everything else supports the subsecond mtimes, but make doesn't; + # notably on macOS, which ships make 3.81 from 2006 (the last one + # released under GPLv2). https://bugs.gnu.org/68808 + # + # We test $MAKE if it is defined in the environment, else "make". + # It might get overridden later, but our hope is that in practice + # it does not matter: it is the system "make" which is (by far) + # the most likely to be broken, whereas if the user overrides it, + # probably they did so with a better, or at least not worse, make. + # https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html + # + # Create a Makefile (real tab character here): + rm -f conftest.mk + echo 'conftest.ts1: conftest.ts2' >conftest.mk + echo ' touch conftest.ts2' >>conftest.mk + # + # Now, running + # touch conftest.ts1; touch conftest.ts2; make + # should touch ts1 because ts2 is newer. This could happen by luck, + # but most often, it will fail if make's support is insufficient. So + # test for several consecutive successes. + # + # (We reuse conftest.ts[12] because we still want to modify existing + # files, not create new ones, per above.) + n=0 + make=${MAKE-make} + until test $n -eq 3; do + echo one > conftest.ts1 + sleep $am_try_res + echo two > conftest.ts2 # ts2 should now be newer than ts1 + if $make -f conftest.mk | grep 'up to date' >/dev/null; then + make_ok=false + break # out of $n loop + fi + n=`expr $n + 1` + done + fi + # + if $make_ok; then + # Everything we know to check worked out, so call this resolution good. + am_cv_filesystem_timestamp_resolution=$am_try_res + break # out of $am_try_res loop + fi + # Otherwise, we'll go on to check the next resolution. + fi +done +rm -f conftest.ts? +# (end _am_filesystem_timestamp_resolution) +])]) + # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) +[AC_REQUIRE([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION]) +# This check should not be cached, as it may vary across builds of +# different projects. +AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -918,49 +1051,40 @@ esac # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken - alias in your environment]) - fi - if test "$[2]" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! +am_build_env_is_sane=no +am_has_slept=no +rm -f conftest.file +for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[]*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + test "$[]2" = conftest.file + ); then + am_build_env_is_sane=yes + break + fi + # Just in case. + sleep "$am_cv_filesystem_timestamp_resolution" + am_has_slept=yes +done + +AC_MSG_RESULT([$am_build_env_is_sane]) +if test "$am_build_env_is_sane" = no; then + AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi -AC_MSG_RESULT([yes]) + # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & +AS_IF([test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1],, [dnl + ( sleep "$am_cv_filesystem_timestamp_resolution" ) & am_sleep_pid=$! -fi +]) AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then @@ -971,18 +1095,18 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2021 Free Software Foundation, Inc. +# Copyright (C) 2009-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# AM_SILENT_RULES([DEFAULT]) -# -------------------------- -# Enable less verbose build rules; with the default set to DEFAULT -# ("yes" being less verbose, "no" or empty being verbose). -AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], [dnl +# _AM_SILENT_RULES +# ---------------- +# Enable less verbose build rules support. +AC_DEFUN([_AM_SILENT_RULES], +[AM_DEFAULT_VERBOSITY=1 +AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) @@ -990,11 +1114,6 @@ AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) -case $enable_silent_rules in @%:@ ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; -esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. @@ -1013,14 +1132,6 @@ am__doit: else am_cv_make_support_nested_variables=no fi]) -if test $am_cv_make_support_nested_variables = yes; then - dnl Using '$V' instead of '$(V)' breaks IRIX make. - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl @@ -1029,9 +1140,33 @@ AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +dnl Delay evaluation of AM_DEFAULT_VERBOSITY to the end to allow multiple calls +dnl to AM_SILENT_RULES to change the default value. +AC_CONFIG_COMMANDS_PRE([dnl +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; +esac +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +])dnl ]) -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Set the default verbosity level to DEFAULT ("yes" being less verbose, "no" or +# empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_REQUIRE([_AM_SILENT_RULES]) +AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])]) + +# Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1059,7 +1194,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2021 Free Software Foundation, Inc. +# Copyright (C) 2006-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1078,7 +1213,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2021 Free Software Foundation, Inc. +# Copyright (C) 2004-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1124,15 +1259,19 @@ m4_if([$1], [v7], am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) - if test $am_uid -le $am_max_uid; then - AC_MSG_RESULT([yes]) + if test x$am_uid = xunknown; then + AC_MSG_WARN([ancient id detected; assuming current UID is ok, but dist-ustar might not work]) + elif test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) else - AC_MSG_RESULT([no]) - _am_tools=none + AC_MSG_RESULT([no]) + _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) - if test $am_gid -le $am_max_gid; then - AC_MSG_RESULT([yes]) + if test x$gm_gid = xunknown; then + AC_MSG_WARN([ancient id detected; assuming current GID is ok, but dist-ustar might not work]) + elif test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none @@ -1209,6 +1348,26 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +# Copyright (C) 2022-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_XARGS_N +# ---------------- +# Check whether 'xargs -n' works. It should work everywhere, so the fallback +# is not optimized at all as we never expect to use it. +AC_DEFUN([_AM_PROG_XARGS_N], +[AC_CACHE_CHECK([xargs -n works], am_cv_xargs_n_works, [dnl +AS_IF([test "`echo 1 2 3 | xargs -n2 echo`" = "1 2 +3"], [am_cv_xargs_n_works=yes], [am_cv_xargs_n_works=no])]) +AS_IF([test "$am_cv_xargs_n_works" = yes], [am__xargs_n='xargs -n'], [dnl + am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "$@" "$am__xargs_n_arg"; done; }' +])dnl +AC_SUBST(am__xargs_n) +]) + m4_include([m4/gcc4_visibility.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) diff --git a/build-aux/ar-lib b/build-aux/ar-lib index c349042..1521987 100755 --- a/build-aux/ar-lib +++ b/build-aux/ar-lib @@ -2,9 +2,9 @@ # Wrapper for Microsoft lib.exe me=ar-lib -scriptversion=2019-07-04.01; # UTC +scriptversion=2024-06-19.01; # UTC -# Copyright (C) 2010-2021 Free Software Foundation, Inc. +# Copyright (C) 2010-2024 Free Software Foundation, Inc. # Written by Peter Rosin <peda@lysator.liu.se>. # # This program is free software; you can redistribute it and/or modify @@ -105,11 +105,15 @@ case $1 in Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...] Members may be specified in a file named with @FILE. + +Report bugs to <bug-automake@gnu.org>. +GNU Automake home page: <https://www.gnu.org/software/automake/>. +General help using GNU software: <https://www.gnu.org/gethelp/>. EOF exit $? ;; -v | --v*) - echo "$me, version $scriptversion" + echo "$me (GNU Automake) $scriptversion" exit $? ;; esac @@ -135,6 +139,10 @@ do AR="$AR $1" shift ;; + -nologo | -NOLOGO) + # We always invoke AR with -nologo, so don't need to add it again. + shift + ;; *) action=$1 shift diff --git a/build-aux/compile b/build-aux/compile index df363c8..49b3d05 100755 --- a/build-aux/compile +++ b/build-aux/compile @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2018-03-07.03; # UTC +scriptversion=2024-06-19.01; # UTC -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2024 Free Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify @@ -143,7 +143,7 @@ func_cl_wrapper () # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in - *.o | *.[oO][bB][jJ]) + *.o | *.lo | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift @@ -248,14 +248,17 @@ If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to <bug-automake@gnu.org>. +GNU Automake home page: <https://www.gnu.org/software/automake/>. +General help using GNU software: <https://www.gnu.org/gethelp/>. EOF exit $? ;; -v | --v*) - echo "compile $scriptversion" + echo "compile (GNU Automake) $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; diff --git a/build-aux/config.guess b/build-aux/config.guess index cdfc439..67f9aa0 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2023 Free Software Foundation, Inc. +# Copyright 1992-2024 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2023-08-22' +timestamp='2024-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -60,7 +60,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2023 Free Software Foundation, Inc. +Copyright 1992-2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -165,6 +165,8 @@ Linux|GNU|GNU/*) LIBC=dietlibc #elif defined(__GLIBC__) LIBC=gnu + #elif defined(__LLVM_LIBC__) + LIBC=llvm #else #include <stdarg.h> /* First heuristic to detect musl libc. */ @@ -192,6 +194,17 @@ Linux|GNU|GNU/*) ;; esac +case "${UNAME_MACHINE}" in + i?86) + test -z "$VENDOR" && VENDOR=pc + ;; + *) + test -z "$VENDOR" && VENDOR=unknown + ;; +esac +test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse +test -f /etc/os-release && grep -q suse /etc/os-release && VENDOR=suse + # Note: order is significant - the case branches are not exclusive. case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in @@ -273,46 +286,46 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE + GUESS=$UNAME_MACHINE_ARCH-${VENDOR}-bitrig$UNAME_RELEASE ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE + GUESS=$UNAME_MACHINE_ARCH-${VENDOR}-openbsd$UNAME_RELEASE ;; *:SecBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE + GUESS=$UNAME_MACHINE_ARCH-${VENDOR}-secbsd$UNAME_RELEASE ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE + GUESS=$UNAME_MACHINE_ARCH-${VENDOR}-libertybsd$UNAME_RELEASE ;; *:MidnightBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE + GUESS=$UNAME_MACHINE-${VENDOR}-midnightbsd$UNAME_RELEASE ;; *:ekkoBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE + GUESS=$UNAME_MACHINE-${VENDOR}-ekkobsd$UNAME_RELEASE ;; *:SolidBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE + GUESS=$UNAME_MACHINE-${VENDOR}-solidbsd$UNAME_RELEASE ;; *:OS108:*:*) - GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE + GUESS=$UNAME_MACHINE-${VENDOR}-os108_$UNAME_RELEASE ;; macppc:MirBSD:*:*) - GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE + GUESS=powerpc-${VENDOR}-mirbsd$UNAME_RELEASE ;; *:MirBSD:*:*) - GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE + GUESS=$UNAME_MACHINE-${VENDOR}-mirbsd$UNAME_RELEASE ;; *:Sortix:*:*) - GUESS=$UNAME_MACHINE-unknown-sortix + GUESS=$UNAME_MACHINE-${VENDOR}-sortix ;; *:Twizzler:*:*) - GUESS=$UNAME_MACHINE-unknown-twizzler + GUESS=$UNAME_MACHINE-${VENDOR}-twizzler ;; *:Redox:*:*) - GUESS=$UNAME_MACHINE-unknown-redox + GUESS=$UNAME_MACHINE-${VENDOR}-redox ;; mips:OSF1:*.*) GUESS=mips-dec-osf1 @@ -374,13 +387,13 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in GUESS=$UNAME_MACHINE-dec-osf$OSF_REL ;; Amiga*:UNIX_System_V:4.0:*) - GUESS=m68k-unknown-sysv4 + GUESS=m68k-${VENDOR}-sysv4 ;; *:[Aa]miga[Oo][Ss]:*:*) - GUESS=$UNAME_MACHINE-unknown-amigaos + GUESS=$UNAME_MACHINE-${VENDOR}-amigaos ;; *:[Mm]orph[Oo][Ss]:*:*) - GUESS=$UNAME_MACHINE-unknown-morphos + GUESS=$UNAME_MACHINE-${VENDOR}-morphos ;; *:OS/390:*:*) GUESS=i370-ibm-openedition @@ -395,7 +408,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in GUESS=arm-acorn-riscix$UNAME_RELEASE ;; arm*:riscos:*:*|arm*:RISCOS:*:*) - GUESS=arm-unknown-riscos + GUESS=arm-${VENDOR}-riscos ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) GUESS=hppa1.1-hitachi-hiuxmpp @@ -509,7 +522,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in GUESS=m68k-hades-mint$UNAME_RELEASE ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - GUESS=m68k-unknown-mint$UNAME_RELEASE + GUESS=m68k-${VENDOR}-mint$UNAME_RELEASE ;; m68k:machten:*:*) GUESS=m68k-apple-machten$UNAME_RELEASE @@ -822,9 +835,9 @@ EOF ;; i*86:OSF1:*:*) if test -x /usr/sbin/sysversion ; then - GUESS=$UNAME_MACHINE-unknown-osf1mk + GUESS=$UNAME_MACHINE-${VENDOR}-osf1mk else - GUESS=$UNAME_MACHINE-unknown-osf1 + GUESS=$UNAME_MACHINE-${VENDOR}-osf1 fi ;; parisc*:Lites*:*:*) @@ -889,10 +902,10 @@ EOF GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE ;; sparc*:BSD/OS:*:*) - GUESS=sparc-unknown-bsdi$UNAME_RELEASE + GUESS=sparc-${VENDOR}-bsdi$UNAME_RELEASE ;; *:BSD/OS:*:*) - GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE + GUESS=$UNAME_MACHINE-${VENDOR}-bsdi$UNAME_RELEASE ;; arm:FreeBSD:*:*) UNAME_PROCESSOR=`uname -p` @@ -901,10 +914,10 @@ EOF | grep -q __ARM_PCS_VFP then FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi + GUESS=$UNAME_PROCESSOR-${VENDOR}-freebsd$FREEBSD_REL-gnueabi else FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf + GUESS=$UNAME_PROCESSOR-${VENDOR}-freebsd$FREEBSD_REL-gnueabihf fi ;; *:FreeBSD:*:*) @@ -916,7 +929,7 @@ EOF UNAME_PROCESSOR=i586 ;; esac FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL + GUESS=$UNAME_PROCESSOR-${VENDOR}-freebsd$FREEBSD_REL ;; i*:CYGWIN*:*) GUESS=$UNAME_MACHINE-pc-cygwin @@ -942,10 +955,10 @@ EOF GUESS=i586-pc-interix$UNAME_RELEASE ;; authenticamd | genuineintel | EM64T) - GUESS=x86_64-unknown-interix$UNAME_RELEASE + GUESS=x86_64-${VENDOR}-interix$UNAME_RELEASE ;; IA64) - GUESS=ia64-unknown-interix$UNAME_RELEASE + GUESS=ia64-${VENDOR}-interix$UNAME_RELEASE ;; esac ;; i*:UWIN*:*) @@ -956,7 +969,7 @@ EOF ;; prep*:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` - GUESS=powerpcle-unknown-solaris2$SUN_REL + GUESS=powerpcle-${VENDOR}-solaris2$SUN_REL ;; *:GNU:*:*) # the GNU system @@ -974,10 +987,10 @@ EOF GUESS="$UNAME_MACHINE-pc-managarm-mlibc" ;; *:[Mm]anagarm:*:*) - GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" + GUESS="$UNAME_MACHINE-${VENDOR}-managarm-mlibc" ;; *:Minix:*:*) - GUESS=$UNAME_MACHINE-unknown-minix + GUESS=$UNAME_MACHINE-${VENDOR}-minix ;; aarch64:Linux:*:*) set_cc_for_build @@ -1000,11 +1013,11 @@ EOF eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; esac fi - GUESS=$CPU-unknown-linux-$LIBCABI + GUESS=$CPU-${VENDOR}-linux-$LIBCABI ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in @@ -1018,29 +1031,29 @@ EOF esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC ;; arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi + GUESS=$UNAME_MACHINE-${VENDOR}-linux-${LIBC}eabi else - GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf + GUESS=$UNAME_MACHINE-${VENDOR}-linux-${LIBC}eabihf fi fi ;; avr32*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC ;; cris:Linux:*:*) GUESS=$UNAME_MACHINE-axis-linux-$LIBC @@ -1049,40 +1062,40 @@ EOF GUESS=$UNAME_MACHINE-axis-linux-$LIBC ;; e2k:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC ;; frv:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC ;; hexagon:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC ;; i*86:Linux:*:*) GUESS=$UNAME_MACHINE-pc-linux-$LIBC ;; ia64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC ;; k1om:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC ;; kvx:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC ;; kvx:cos:*:*) - GUESS=$UNAME_MACHINE-unknown-cos + GUESS=$UNAME_MACHINE-${VENDOR}-cos ;; kvx:mbr:*:*) - GUESS=$UNAME_MACHINE-unknown-mbr + GUESS=$UNAME_MACHINE-${VENDOR}-mbr ;; loongarch32:Linux:*:* | loongarch64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC ;; m32r*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC ;; m68*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build @@ -1133,57 +1146,57 @@ EOF test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC ;; openrisc*:Linux:*:*) - GUESS=or1k-unknown-linux-$LIBC + GUESS=or1k-${VENDOR}-linux-$LIBC ;; or32:Linux:*:* | or1k*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC ;; padre:Linux:*:*) - GUESS=sparc-unknown-linux-$LIBC + GUESS=sparc-${VENDOR}-linux-$LIBC ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - GUESS=hppa64-unknown-linux-$LIBC + GUESS=hppa64-${VENDOR}-linux-$LIBC ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; - PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; - *) GUESS=hppa-unknown-linux-$LIBC ;; + PA7*) GUESS=hppa1.1-${VENDOR}-linux-$LIBC ;; + PA8*) GUESS=hppa2.0-${VENDOR}-linux-$LIBC ;; + *) GUESS=hppa-${VENDOR}-linux-$LIBC ;; esac ;; ppc64:Linux:*:*) - GUESS=powerpc64-unknown-linux-$LIBC + GUESS=powerpc64-${VENDOR}-linux-$LIBC ;; ppc:Linux:*:*) - GUESS=powerpc-unknown-linux-$LIBC + GUESS=powerpc-${VENDOR}-linux-$LIBC ;; ppc64le:Linux:*:*) - GUESS=powerpc64le-unknown-linux-$LIBC + GUESS=powerpc64le-${VENDOR}-linux-$LIBC ;; ppcle:Linux:*:*) - GUESS=powerpcle-unknown-linux-$LIBC + GUESS=powerpcle-${VENDOR}-linux-$LIBC ;; riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC ;; s390:Linux:*:* | s390x:Linux:*:*) GUESS=$UNAME_MACHINE-ibm-linux-$LIBC ;; sh64*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC ;; sh*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC ;; sparc:Linux:*:* | sparc64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC ;; tile*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC ;; vax:Linux:*:*) GUESS=$UNAME_MACHINE-dec-linux-$LIBC @@ -1213,7 +1226,7 @@ EOF GUESS=$CPU-pc-linux-$LIBCABI ;; xtensa*:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1235,16 +1248,16 @@ EOF GUESS=$UNAME_MACHINE-pc-os2-emx ;; i*86:XTS-300:*:STOP) - GUESS=$UNAME_MACHINE-unknown-stop + GUESS=$UNAME_MACHINE-${VENDOR}-stop ;; i*86:atheos:*:*) - GUESS=$UNAME_MACHINE-unknown-atheos + GUESS=$UNAME_MACHINE-${VENDOR}-atheos ;; i*86:syllable:*:*) GUESS=$UNAME_MACHINE-pc-syllable ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - GUESS=i386-unknown-lynxos$UNAME_RELEASE + GUESS=i386-${VENDOR}-lynxos$UNAME_RELEASE ;; i*86:*DOS:*:*) GUESS=$UNAME_MACHINE-pc-msdosdjgpp @@ -1264,7 +1277,7 @@ EOF *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + GUESS=$UNAME_MACHINE-${VENDOR}-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then @@ -1303,7 +1316,7 @@ EOF if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 + GUESS=i860-${VENDOR}-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi ;; mini*:CTIX:SYS*5:*) @@ -1340,19 +1353,19 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - GUESS=m68k-unknown-lynxos$UNAME_RELEASE + GUESS=m68k-${VENDOR}-lynxos$UNAME_RELEASE ;; mc68030:UNIX_System_V:4.*:*) GUESS=m68k-atari-sysv4 ;; TSUNAMI:LynxOS:2.*:*) - GUESS=sparc-unknown-lynxos$UNAME_RELEASE + GUESS=sparc-${VENDOR}-lynxos$UNAME_RELEASE ;; rs6000:LynxOS:2.*:*) - GUESS=rs6000-unknown-lynxos$UNAME_RELEASE + GUESS=rs6000-${VENDOR}-lynxos$UNAME_RELEASE ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - GUESS=powerpc-unknown-lynxos$UNAME_RELEASE + GUESS=powerpc-${VENDOR}-lynxos$UNAME_RELEASE ;; SM[BE]S:UNIX_SV:*:*) GUESS=mips-dde-sysv$UNAME_RELEASE @@ -1402,7 +1415,7 @@ EOF if test -d /usr/nec; then GUESS=mips-nec-sysv$UNAME_RELEASE else - GUESS=mips-unknown-sysv$UNAME_RELEASE + GUESS=mips-${VENDOR}-sysv$UNAME_RELEASE fi ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. @@ -1421,7 +1434,7 @@ EOF GUESS=powerpc-apple-haiku ;; *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) - GUESS=$UNAME_MACHINE-unknown-haiku + GUESS=$UNAME_MACHINE-${VENDOR}-haiku ;; SX-4:SUPER-UX:*:*) GUESS=sx4-nec-superux$UNAME_RELEASE @@ -1534,13 +1547,13 @@ EOF elif test "x${cputype-}" != x; then UNAME_MACHINE=$cputype fi - GUESS=$UNAME_MACHINE-unknown-plan9 + GUESS=$UNAME_MACHINE-${VENDOR}-plan9 ;; *:TOPS-10:*:*) - GUESS=pdp10-unknown-tops10 + GUESS=pdp10-${VENDOR}-tops10 ;; *:TENEX:*:*) - GUESS=pdp10-unknown-tenex + GUESS=pdp10-${VENDOR}-tenex ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) GUESS=pdp10-dec-tops20 @@ -1549,17 +1562,17 @@ EOF GUESS=pdp10-xkl-tops20 ;; *:TOPS-20:*:*) - GUESS=pdp10-unknown-tops20 + GUESS=pdp10-${VENDOR}-tops20 ;; *:ITS:*:*) - GUESS=pdp10-unknown-its + GUESS=pdp10-${VENDOR}-its ;; SEI:*:*:SEIUX) GUESS=mips-sei-seiux$UNAME_RELEASE ;; *:DragonFly:*:*) DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` - GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL + GUESS=$UNAME_MACHINE-${VENDOR}-dragonfly$DRAGONFLY_REL ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` @@ -1582,16 +1595,19 @@ EOF GUESS=$UNAME_MACHINE-pc-fiwix ;; *:AROS:*:*) - GUESS=$UNAME_MACHINE-unknown-aros + GUESS=$UNAME_MACHINE-${VENDOR}-aros ;; x86_64:VMkernel:*:*) - GUESS=$UNAME_MACHINE-unknown-esx + GUESS=$UNAME_MACHINE-${VENDOR}-esx ;; amd64:Isilon\ OneFS:*:*) - GUESS=x86_64-unknown-onefs + GUESS=x86_64-${VENDOR}-onefs ;; *:Unleashed:*:*) - GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE + GUESS=$UNAME_MACHINE-${VENDOR}-unleashed$UNAME_RELEASE + ;; + *:Ironclad:*:*) + GUESS=$UNAME_MACHINE-${VENDOR}-ironclad ;; esac diff --git a/build-aux/config.sub b/build-aux/config.sub index defe52c..2c6a07a 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2023 Free Software Foundation, Inc. +# Copyright 1992-2024 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2023-09-19' +timestamp='2024-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -76,7 +76,7 @@ Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) -Copyright 1992-2023 Free Software Foundation, Inc. +Copyright 1992-2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -1222,6 +1222,7 @@ case $cpu-$vendor in | moxie \ | mt \ | msp430 \ + | nanomips* \ | nds32 | nds32le | nds32be \ | nfp \ | nios | nios2 | nios2eb | nios2el \ @@ -1253,6 +1254,7 @@ case $cpu-$vendor in | ubicom32 \ | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ | vax \ + | vc4 \ | visium \ | w65 \ | wasm32 | wasm64 \ @@ -1597,7 +1599,7 @@ case $cpu-$vendor in os= obj=elf ;; - mips*-*) + mips*-*|nanomips*-*) os= obj=elf ;; @@ -1721,7 +1723,7 @@ fi case $os in # Sometimes we do "kernel-libc", so those need to count as OSes. - musl* | newlib* | relibc* | uclibc*) + llvm* | musl* | newlib* | relibc* | uclibc*) ;; # Likewise for "kernel-abi" eabi* | gnueabi*) @@ -1766,12 +1768,19 @@ case $os in | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ - | fiwix* | mlibc* | cos* | mbr* ) + | fiwix* | mlibc* | cos* | mbr* | ironclad* ) ;; # This one is extra strict with allowed versions sco3.2v2 | sco3.2v[4-9]* | sco5v6*) # Don't forget version if it is 3.2v4 or newer. ;; + # This refers to builds using the UEFI calling convention + # (which depends on the architecture) and PE file format. + # Note that this is both a different calling convention and + # different file format than that of GNU-EFI + # (x86_64-w64-mingw32). + uefi) + ;; none) ;; kernel* | msvc* ) @@ -1818,8 +1827,9 @@ esac # As a final step for OS-related things, validate the OS-kernel combination # (given a valid OS), if there is a kernel. case $kernel-$os-$obj in - linux-gnu*- | linux-dietlibc*- | linux-android*- | linux-newlib*- \ - | linux-musl*- | linux-relibc*- | linux-uclibc*- | linux-mlibc*- ) + linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ + | linux-mlibc*- | linux-musl*- | linux-newlib*- \ + | linux-relibc*- | linux-uclibc*- ) ;; uclinux-uclibc*- ) ;; @@ -1827,7 +1837,8 @@ case $kernel-$os-$obj in ;; windows*-msvc*-) ;; - -dietlibc*- | -newlib*- | -musl*- | -relibc*- | -uclibc*- | -mlibc*- ) + -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \ + | -uclibc*- ) # These are just libc implementations, not actual OSes, and thus # require a kernel. echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 diff --git a/build-aux/depcomp b/build-aux/depcomp index 715e343..1f0aa97 100755 --- a/build-aux/depcomp +++ b/build-aux/depcomp @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2018-03-07.03; # UTC +scriptversion=2024-06-19.01; # UTC -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2024 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -47,11 +47,13 @@ Environment variables: libtool Whether libtool is used (yes/no). Report bugs to <bug-automake@gnu.org>. +GNU Automake home page: <https://www.gnu.org/software/automake/>. +General help using GNU software: <https://www.gnu.org/gethelp/>. EOF exit $? ;; -v | --v*) - echo "depcomp $scriptversion" + echo "depcomp (GNU Automake) $scriptversion" exit $? ;; esac @@ -113,7 +115,6 @@ nl=' # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz -digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then @@ -128,7 +129,7 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" -# Avoid interferences from the environment. +# Avoid interference from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We @@ -198,8 +199,8 @@ gcc3) ;; gcc) -## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. -## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## Note that this doesn't just cater to obsolete pre-3.x GCC compilers. +## but also to in-use compilers like IBM xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: diff --git a/build-aux/install-sh b/build-aux/install-sh index 7c56c9c..b1d7a6f 100755 --- a/build-aux/install-sh +++ b/build-aux/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2023-11-23.18; # UTC +scriptversion=2024-06-19.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -170,7 +170,7 @@ while test $# -ne 0; do -T) is_target_a_directory=never;; - --version) echo "$0 $scriptversion"; exit $?;; + --version) echo "$0 (GNU Automake) $scriptversion"; exit $?;; --) shift break;; @@ -345,7 +345,7 @@ do ' 0 # Because "mkdir -p" follows existing symlinks and we likely work - # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directly in world-writable /tmp, make sure that the '$tmpdir' # directory is successfully created first before we actually test # 'mkdir -p'. if (umask $mkdir_umask && @@ -353,7 +353,7 @@ do exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. + # Check for POSIX incompatibility with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. diff --git a/build-aux/missing b/build-aux/missing index 1fe1611..7e7d78e 100755 --- a/build-aux/missing +++ b/build-aux/missing @@ -1,9 +1,11 @@ #! /bin/sh -# Common wrapper for a few potentially missing GNU programs. +# Common wrapper for a few potentially missing GNU and other programs. -scriptversion=2018-03-07.03; # UTC +scriptversion=2024-06-07.14; # UTC -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# shellcheck disable=SC2006,SC2268 # we must support pre-POSIX shells + +# Copyright (C) 1996-2024 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify @@ -54,18 +56,20 @@ Options: -v, --version output version information and exit Supported PROGRAM values: - aclocal autoconf autoheader autom4te automake makeinfo - bison yacc flex lex help2man +aclocal autoconf autogen autoheader autom4te automake autoreconf +bison flex help2man lex makeinfo perl yacc Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. -Send bug reports to <bug-automake@gnu.org>." +Report bugs to <bug-automake@gnu.org>. +GNU Automake home page: <https://www.gnu.org/software/automake/>. +General help using GNU software: <https://www.gnu.org/gethelp/>." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" + echo "missing (GNU Automake) $scriptversion" exit $? ;; @@ -108,7 +112,7 @@ gnu_software_URL=https://www.gnu.org/software program_details () { case $1 in - aclocal|automake) + aclocal|automake|autoreconf) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" @@ -123,6 +127,9 @@ program_details () echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; + *) + : + ;; esac } @@ -137,48 +144,55 @@ give_advice () printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + autoheader_deps="'acconfig.h'" + automake_deps="'Makefile.am'" + aclocal_deps="'acinclude.m4'" case $normalized_program in + aclocal*) + echo "You should only need it if you modified $aclocal_deps or" + echo "$configure_deps." + ;; autoconf*) - echo "You should only need it if you modified 'configure.ac'," - echo "or m4 files included by it." - program_details 'autoconf' + echo "You should only need it if you modified $configure_deps." + ;; + autogen*) + echo "You should only need it if you modified a '.def' or '.tpl' file." + echo "You may want to install the GNU AutoGen package:" + echo "<$gnu_software_URL/autogen/>" ;; autoheader*) - echo "You should only need it if you modified 'acconfig.h' or" + echo "You should only need it if you modified $autoheader_deps or" echo "$configure_deps." - program_details 'autoheader' ;; automake*) - echo "You should only need it if you modified 'Makefile.am' or" - echo "$configure_deps." - program_details 'automake' - ;; - aclocal*) - echo "You should only need it if you modified 'acinclude.m4' or" + echo "You should only need it if you modified $automake_deps or" echo "$configure_deps." - program_details 'aclocal' ;; - autom4te*) + autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." - program_details 'autom4te' + ;; + autoreconf*) + echo "You should only need it if you modified $aclocal_deps or" + echo "$automake_deps or $autoheader_deps or $automake_deps or" + echo "$configure_deps." ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; - lex*|flex*) - echo "You should only need it if you modified a '.l' file." - echo "You may want to install the Fast Lexical Analyzer package:" - echo "<$flex_URL>" - ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." @@ -189,6 +203,12 @@ give_advice () echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; + perl*) + echo "You should only need it to run GNU Autoconf, GNU Automake, " + echo " assorted other tools, or if you modified a Perl source file." + echo "You may want to install the Perl 5 language interpreter:" + echo "<$perl_URL>" + ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" @@ -197,6 +217,7 @@ give_advice () echo "case some other package contains this missing '$1' program." ;; esac + program_details "$normalized_program" } give_advice "$1" | sed -e '1s/^/WARNING: /' \ diff --git a/build-aux/test-driver b/build-aux/test-driver index 0fa6395..2c2a38b 100755 --- a/build-aux/test-driver +++ b/build-aux/test-driver @@ -1,9 +1,9 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2018-03-07.03; # UTC +scriptversion=2024-06-19.01; # UTC -# Copyright (C) 2011-2021 Free Software Foundation, Inc. +# Copyright (C) 2011-2024 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -44,11 +44,16 @@ print_usage () Usage: test-driver --test-name NAME --log-file PATH --trs-file PATH [--expect-failure {yes|no}] [--color-tests {yes|no}] + [--collect-skipped-logs {yes|no}] [--enable-hard-errors {yes|no}] [--] TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS] The '--test-name', '--log-file' and '--trs-file' options are mandatory. See the GNU Automake documentation for information. + +Report bugs to <bug-automake@gnu.org>. +GNU Automake home page: <https://www.gnu.org/software/automake/>. +General help using GNU software: <https://www.gnu.org/gethelp/>. END } @@ -57,6 +62,7 @@ log_file= # Where to save the output of the test script. trs_file= # Where to save the metadata of the test run. expect_failure=no color_tests=no +collect_skipped_logs=yes enable_hard_errors=yes while test $# -gt 1; do arg=${1%=*} @@ -67,11 +73,12 @@ while test $# -gt 1; do fi case $arg in --help) print_usage; exit $?;; - --version) echo "test-driver $scriptversion"; exit $?;; + --version) echo "test-driver (GNU Automake) $scriptversion"; exit $?;; --test-name) test_name=$val;; --log-file) log_file=$val;; --trs-file) trs_file=$val;; --color-tests) color_tests=$val;; + --collect-skipped-logs) collect_skipped_logs=$val;; --expect-failure) expect_failure=$val;; --enable-hard-errors) enable_hard_errors=$val;; --) break;; @@ -126,7 +133,7 @@ fi case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; - 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; + 77:*) col=$blu res=SKIP recheck=no gcopy=$collect_skipped_logs;; 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;; @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.72 for libHX 4.24. +# Generated by GNU Autoconf 2.72 for libHX 4.26. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, @@ -611,8 +611,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libHX' PACKAGE_TARNAME='libhx' -PACKAGE_VERSION='4.24' -PACKAGE_STRING='libHX 4.24' +PACKAGE_VERSION='4.26' +PACKAGE_STRING='libHX 4.26' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -724,6 +724,8 @@ CPPFLAGS LDFLAGS CFLAGS CC +am__xargs_n +am__rm_f_notfound AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V @@ -1370,7 +1372,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -'configure' configures libHX 4.24 to adapt to many kinds of systems. +'configure' configures libHX 4.26 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1441,7 +1443,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libHX 4.24:";; + short | recursive ) echo "Configuration of libHX 4.26:";; esac cat <<\_ACEOF @@ -1556,7 +1558,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libHX configure 4.24 +libHX configure 4.26 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. @@ -2209,7 +2211,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libHX $as_me 4.24, which was +It was created by libHX $as_me 4.26, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -3303,8 +3305,167 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -am__api_version='1.16' +am__api_version='1.17' +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sleep supports fractional seconds" >&5 +printf %s "checking whether sleep supports fractional seconds... " >&6; } +if test ${am_cv_sleep_fractional_seconds+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if sleep 0.001 2>/dev/null +then : + am_cv_sleep_fractional_seconds=yes +else case e in #( + e) am_cv_sleep_fractional_seconds=no ;; +esac +fi + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_sleep_fractional_seconds" >&5 +printf "%s\n" "$am_cv_sleep_fractional_seconds" >&6; } + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking filesystem timestamp resolution" >&5 +printf %s "checking filesystem timestamp resolution... " >&6; } +if test ${am_cv_filesystem_timestamp_resolution+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) # Default to the worst case. +am_cv_filesystem_timestamp_resolution=2 + +# Only try to go finer than 1 sec if sleep can do it. +# Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work, +# - 1 sec is not much of a win compared to 2 sec, and +# - it takes 2 seconds to perform the test whether 1 sec works. +# +# Instead, just use the default 2s on platforms that have 1s resolution, +# accept the extra 1s delay when using $sleep in the Automake tests, in +# exchange for not incurring the 2s delay for running the test for all +# packages. +# +am_try_resolutions= +if test "$am_cv_sleep_fractional_seconds" = yes; then + # Even a millisecond often causes a bunch of false positives, + # so just try a hundredth of a second. The time saved between .001 and + # .01 is not terribly consequential. + am_try_resolutions="0.01 0.1 $am_try_resolutions" +fi + +# In order to catch current-generation FAT out, we must *modify* files +# that already exist; the *creation* timestamp is finer. Use names +# that make ls -t sort them differently when they have equal +# timestamps than when they have distinct timestamps, keeping +# in mind that ls -t prints the *newest* file first. +rm -f conftest.ts? +: > conftest.ts1 +: > conftest.ts2 +: > conftest.ts3 + +# Make sure ls -t actually works. Do 'set' in a subshell so we don't +# clobber the current shell's arguments. (Outer-level square brackets +# are removed by m4; they're present so that m4 does not expand +# <dollar><star>; be careful, easy to get confused.) +if ( + set X `ls -t conftest.ts[12]` && + { + test "$*" != "X conftest.ts1 conftest.ts2" || + test "$*" != "X conftest.ts2 conftest.ts1"; + } +); then :; else + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + printf "%s\n" ""Bad output from ls -t: \"`ls -t conftest.ts[12]`\""" >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error $? "ls -t produces unexpected output. +Make sure there is not a broken ls alias in your environment. +See 'config.log' for more details" "$LINENO" 5; } +fi + +for am_try_res in $am_try_resolutions; do + # Any one fine-grained sleep might happen to cross the boundary + # between two values of a coarser actual resolution, but if we do + # two fine-grained sleeps in a row, at least one of them will fall + # entirely within a coarse interval. + echo alpha > conftest.ts1 + sleep $am_try_res + echo beta > conftest.ts2 + sleep $am_try_res + echo gamma > conftest.ts3 + + # We assume that 'ls -t' will make use of high-resolution + # timestamps if the operating system supports them at all. + if (set X `ls -t conftest.ts?` && + test "$2" = conftest.ts3 && + test "$3" = conftest.ts2 && + test "$4" = conftest.ts1); then + # + # Ok, ls -t worked. If we're at a resolution of 1 second, we're done, + # because we don't need to test make. + make_ok=true + if test $am_try_res != 1; then + # But if we've succeeded so far with a subsecond resolution, we + # have one more thing to check: make. It can happen that + # everything else supports the subsecond mtimes, but make doesn't; + # notably on macOS, which ships make 3.81 from 2006 (the last one + # released under GPLv2). https://bugs.gnu.org/68808 + # + # We test $MAKE if it is defined in the environment, else "make". + # It might get overridden later, but our hope is that in practice + # it does not matter: it is the system "make" which is (by far) + # the most likely to be broken, whereas if the user overrides it, + # probably they did so with a better, or at least not worse, make. + # https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html + # + # Create a Makefile (real tab character here): + rm -f conftest.mk + echo 'conftest.ts1: conftest.ts2' >conftest.mk + echo ' touch conftest.ts2' >>conftest.mk + # + # Now, running + # touch conftest.ts1; touch conftest.ts2; make + # should touch ts1 because ts2 is newer. This could happen by luck, + # but most often, it will fail if make's support is insufficient. So + # test for several consecutive successes. + # + # (We reuse conftest.ts[12] because we still want to modify existing + # files, not create new ones, per above.) + n=0 + make=${MAKE-make} + until test $n -eq 3; do + echo one > conftest.ts1 + sleep $am_try_res + echo two > conftest.ts2 # ts2 should now be newer than ts1 + if $make -f conftest.mk | grep 'up to date' >/dev/null; then + make_ok=false + break # out of $n loop + fi + n=`expr $n + 1` + done + fi + # + if $make_ok; then + # Everything we know to check worked out, so call this resolution good. + am_cv_filesystem_timestamp_resolution=$am_try_res + break # out of $am_try_res loop + fi + # Otherwise, we'll go on to check the next resolution. + fi +done +rm -f conftest.ts? +# (end _am_filesystem_timestamp_resolution) + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_filesystem_timestamp_resolution" >&5 +printf "%s\n" "$am_cv_filesystem_timestamp_resolution" >&6; } + +# This check should not be cached, as it may vary across builds of +# different projects. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 printf %s "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory @@ -3325,49 +3486,45 @@ esac # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). -if ( - am_has_slept=no - for am_try in 1 2; do - echo "timestamp, slept: $am_has_slept" > conftest.file - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken - alias in your environment" "$LINENO" 5 - fi - if test "$2" = conftest.file || test $am_try -eq 2; then - break - fi - # Just in case. - sleep 1 - am_has_slept=yes - done - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! +am_build_env_is_sane=no +am_has_slept=no +rm -f conftest.file +for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + test "$2" = conftest.file + ); then + am_build_env_is_sane=yes + break + fi + # Just in case. + sleep "$am_cv_filesystem_timestamp_resolution" + am_has_slept=yes +done + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_build_env_is_sane" >&5 +printf "%s\n" "$am_build_env_is_sane" >&6; } +if test "$am_build_env_is_sane" = no; then + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= -if grep 'slept: no' conftest.file >/dev/null 2>&1; then - ( sleep 1 ) & +if test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1 +then : + +else case e in #( + e) ( sleep "$am_cv_filesystem_timestamp_resolution" ) & am_sleep_pid=$! + ;; +esac fi rm -f conftest.file @@ -3657,17 +3814,13 @@ else fi rmdir .tst 2>/dev/null +AM_DEFAULT_VERBOSITY=1 # Check whether --enable-silent-rules was given. if test ${enable_silent_rules+y} then : enableval=$enable_silent_rules; fi -case $enable_silent_rules in # ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=1;; -esac am_make=${MAKE-make} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 printf %s "checking whether $am_make supports nested variables... " >&6; } @@ -3690,15 +3843,45 @@ esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi AM_BACKSLASH='\' +am__rm_f_notfound= +if (rm -f && rm -fr && rm -rf) 2>/dev/null +then : + +else case e in #( + e) am__rm_f_notfound='""' ;; +esac +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking xargs -n works" >&5 +printf %s "checking xargs -n works... " >&6; } +if test ${am_cv_xargs_n_works+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test "`echo 1 2 3 | xargs -n2 echo`" = "1 2 +3" +then : + am_cv_xargs_n_works=yes +else case e in #( + e) am_cv_xargs_n_works=no ;; +esac +fi ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_xargs_n_works" >&5 +printf "%s\n" "$am_cv_xargs_n_works" >&6; } +if test "$am_cv_xargs_n_works" = yes +then : + am__xargs_n='xargs -n' +else case e in #( + e) am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "" "$am__xargs_n_arg"; done; }' + ;; +esac +fi + if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." @@ -3721,7 +3904,7 @@ fi # Define the identity of the package. PACKAGE='libhx' - VERSION='4.24' + VERSION='4.26' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -3869,89 +4052,11 @@ fi -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: <https://www.gnu.org/software/coreutils/>. - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 - fi -fi -# Check whether --enable-silent-rules was given. -if test ${enable_silent_rules+y} -then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in # ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=0;; -esac -am_make=${MAKE-make} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -printf %s "checking whether $am_make supports nested variables... " >&6; } -if test ${am_cv_make_support_nested_variables+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if printf "%s\n" 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' +AM_DEFAULT_VERBOSITY=0 @@ -5199,7 +5304,7 @@ else case e in #( # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: + # When given -MP, icc 7.0 and 7.1 complain thus: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported @@ -5718,7 +5823,7 @@ else case e in #( # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: + # When given -MP, icc 7.0 and 7.1 complain thus: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported @@ -5753,48 +5858,8 @@ else fi -# Check whether --enable-silent-rules was given. -if test ${enable_silent_rules+y} -then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in # ((( - yes) AM_DEFAULT_VERBOSITY=0;; - no) AM_DEFAULT_VERBOSITY=1;; - *) AM_DEFAULT_VERBOSITY=0;; -esac -am_make=${MAKE-make} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -printf %s "checking whether $am_make supports nested variables... " >&6; } -if test ${am_cv_make_support_nested_variables+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) if printf "%s\n" 'TRUE=$(BAR$(V)) -BAR0=false -BAR1=true -V=1 -am__doit: - @$(TRUE) -.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then - am_cv_make_support_nested_variables=yes -else - am_cv_make_support_nested_variables=no -fi ;; -esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } -if test $am_cv_make_support_nested_variables = yes; then - AM_V='$(V)' - AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' -else - AM_V=$AM_DEFAULT_VERBOSITY - AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY -fi -AM_BACKSLASH='\' +AM_DEFAULT_VERBOSITY=0 if test -n "$ac_tool_prefix"; then @@ -5910,6 +5975,7 @@ esac fi : ${AR=ar} +: ${ARFLAGS=cr} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 printf %s "checking the archiver ($AR) interface... " >&6; } @@ -5930,7 +5996,7 @@ int some_variable = 0; _ACEOF if ac_fn_c_try_compile "$LINENO" then : - am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' + am_ar_try='$AR $ARFLAGS libconftest.a conftest.$ac_objext >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? @@ -18649,6 +18715,18 @@ printf %s "checking that generated files are newer than configure... " >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 printf "%s\n" "done" >&6; } +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; +esac +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi + if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -19082,7 +19160,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libHX $as_me 4.24, which was +This file was extended by libHX $as_me 4.26, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19150,7 +19228,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -libHX config.status 4.24 +libHX config.status 4.26 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index d44a493..bbc0537 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([libHX], [4.24]) +AC_INIT([libHX], [4.26]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/doc/api.rst b/doc/api.rst index 73aa968..5b2161d 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -9,6 +9,11 @@ Function reference ====== ====== ====== ======================================== RMV MinVer FirstA Name ====== ====== ====== ======================================== +4.25 inline 4.25 HX_isascii +4.25 inline 4.25 HX::make_scope_exit +4.25 inline 4.25 cpu_to_le{16,32,64}p cpu_to_be{16,32,64}p +4.25 inline 4.25 le{16,32,64}p_to_cpu be{16,32,64}p_to_cpu +4.25 4.25 4.25 HXSIZEOF_UNITSEC64 4.24 4.24 4.24 HX_getcwd 4.19 4.18 4.18 HX_getopt5 4.16 4.16 4.16 HX_strtoull_nsec diff --git a/doc/changelog.rst b/doc/changelog.rst index 63380ff..f6f73f8 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -1,3 +1,21 @@ +v4.26 (2025-03-08) +================== + +Fixes: + +* Resolve integer truncation in HX_unit_seconds's output when the result + were to exceeded 2^32 years or months or weeks. + + +v4.25 (2025-03-07) +================== + +Enhancements: + +* New headers endian.h and scope.hpp +* New define HXSIZEOF_UNITSEC64 for the maximum output size of HX_unit_seconds + + v4.24 (2024-07-17) ================== diff --git a/doc/helper_headers.rst b/doc/helper_headers.rst index 7b4c083..05ded38 100644 --- a/doc/helper_headers.rst +++ b/doc/helper_headers.rst @@ -30,6 +30,7 @@ that there is a good reason to do so in the first place. bool HX_isalnum(unsigned char c); bool HX_isalpha(unsigned char c); + bool HX_isascii(unsigned char c); bool HX_isdigit(unsigned char c); bool HX_islower(unsigned char c); bool HX_isprint(unsigned char c); diff --git a/doc/macros.rst b/doc/macros.rst index 752f81e..efc5209 100644 --- a/doc/macros.rst +++ b/doc/macros.rst @@ -27,6 +27,13 @@ Expands to the size needed for a buffer (including ``\0``) to hold the base-10 string representation of 16‑, 32‑ or 64‑bit integer (either signed or unsigned), respectively. +.. code-block:: c + + #define HXSIZEOF_UNITSEC64 + +Expands to the size needed for a buffer (including ``\0``) to hold the largest +result of ``HX_unit_seconds``. + Locators ======== diff --git a/doc/option_parsing.rst b/doc/option_parsing.rst index 2dced82..fa928e0 100644 --- a/doc/option_parsing.rst +++ b/doc/option_parsing.rst @@ -12,7 +12,8 @@ Characteristics: * recognition of the double dash as option list terminator * offers POSIX strictness where the option list terminates at the first non-option argument -* option passthrough +* option passthrough (conceptuall only works for options taking no argument, + or when the argument is joined to a long option with a '=') * the parse function is one-shot; there is no context object (like popt), no global state (like getopt) and no ``while`` loop (either of the two others) * exclusively uses an option table diff --git a/doc/scope.rst b/doc/scope.rst new file mode 100644 index 0000000..84ad69b --- /dev/null +++ b/doc/scope.rst @@ -0,0 +1,22 @@ +============ +Scope guards +============ + +``scope_exit`` +============== + +scope_exit creates an object that runs a predefined function when a scope ends. +This is useful for augmenting C APIs with something of a destructor without +wrapping the stuff in an explicit class of its own. For instance, + +.. code-block:: c++ + + #include <libHX/option.h> + #include <libHX/scope.hpp> + int main() { + auto fa = HXformat_init(); + if (fa == nullptr) + return 0; + auto cleanup_fa = HX::make_scope_exit([&]() { HXformat_free(fa); }); + HXformat_add(fa, "foo", "bar", HXTYPE_STRING); + } diff --git a/doc/string_ops.rst b/doc/string_ops.rst index 91da2f6..aea4896 100644 --- a/doc/string_ops.rst +++ b/doc/string_ops.rst @@ -478,7 +478,10 @@ be 1/12 such a year. This is consistent with the units employed by systemd. ``seconds`` into a string representation broken into days, hours, minutes, and remaining seconds as appropriate. By default, only the d/h/min/s units are emitted. The ``flags`` argument specifies if any other units should be emitted; -``HXUNIT_YEARS``, ``HXUNIT_MONTHS`` and ``HXUNIT_WEEKS`` are available. +``HXUNIT_YEARS``, ``HXUNIT_MONTHS`` and ``HXUNIT_WEEKS`` are available. The +longest string HX_unit_seconds can emit on a contemporary 64-bit POSIX system +with 1970 epoch is 40 characters (so a buffer should be no less than 41 bytes), +cf. ``HXSIZEOF_UNITSEC64``. Examples diff --git a/include/Makefile.am b/include/Makefile.am index 62ad527..82b8289 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,7 +1,8 @@ # -*- Makefile -*- nobase_include_HEADERS = libHX.h libHX/cast.h \ - libHX/ctype_helper.h libHX/defs.h libHX/deque.h libHX/init.h \ + libHX/ctype_helper.h libHX/defs.h libHX/deque.h libHX/endian.h libHX/init.h \ libHX/intdiff.hpp libHX/io.h libHX/list.h \ - libHX/map.h libHX/misc.h libHX/option.h libHX/proc.h libHX/socket.h libHX/string.h \ + libHX/map.h libHX/misc.h libHX/option.h libHX/proc.h \ + libHX/scope.hpp libHX/socket.h libHX/string.h \ libHX/libxml_helper.h libHX/wx_helper.hpp diff --git a/include/Makefile.in b/include/Makefile.in index 8e02ba6..0bfc881 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. +# Makefile.in generated by automake 1.17 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2021 Free Software Foundation, Inc. +# Copyright (C) 1994-2024 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -72,6 +72,8 @@ am__make_running_with_option = \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +am__rm_f = rm -f $(am__rm_f_notfound) +am__rm_rf = rm -rf $(am__rm_f_notfound) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -145,10 +147,9 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ + { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \ } am__installdirs = "$(DESTDIR)$(includedir)" HEADERS = $(nobase_include_HEADERS) @@ -252,8 +253,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__rm_f_notfound = @am__rm_f_notfound@ am__tar = @am__tar@ am__untar = @am__untar@ +am__xargs_n = @am__xargs_n@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -304,9 +307,10 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ nobase_include_HEADERS = libHX.h libHX/cast.h \ - libHX/ctype_helper.h libHX/defs.h libHX/deque.h libHX/init.h \ + libHX/ctype_helper.h libHX/defs.h libHX/deque.h libHX/endian.h libHX/init.h \ libHX/intdiff.hpp libHX/io.h libHX/list.h \ - libHX/map.h libHX/misc.h libHX/option.h libHX/proc.h libHX/socket.h libHX/string.h \ + libHX/map.h libHX/misc.h libHX/option.h libHX/proc.h \ + libHX/scope.hpp libHX/socket.h libHX/string.h \ libHX/libxml_helper.h libHX/wx_helper.hpp all: all-am @@ -487,8 +491,8 @@ mostlyclean-generic: clean-generic: distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -$(am__rm_f) $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -581,3 +585,10 @@ uninstall-am: uninstall-nobase_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: + +# Tell GNU make to disable its built-in pattern rules. +%:: %,v +%:: RCS/%,v +%:: RCS/% +%:: s.% +%:: SCCS/s.% diff --git a/include/libHX/ctype_helper.h b/include/libHX/ctype_helper.h index 2ba0a7a..0f42c4f 100644 --- a/include/libHX/ctype_helper.h +++ b/include/libHX/ctype_helper.h @@ -39,6 +39,11 @@ static __inline__ bool HX_isalpha(unsigned char c) return isalpha(c); } +static __inline__ bool HX_isascii(unsigned char c) +{ + return isascii(c); +} + static __inline__ bool HX_isdigit(unsigned char c) { return isdigit(c); diff --git a/include/libHX/defs.h b/include/libHX/defs.h index ba84b37..2ef5769 100644 --- a/include/libHX/defs.h +++ b/include/libHX/defs.h @@ -12,7 +12,16 @@ # ifndef containerof # include <cstddef> # include <type_traits> -# define containerof(var, T, member) reinterpret_cast<std::conditional<std::is_const<std::remove_pointer<decltype(var)>::type>::value, std::add_const<T>::type, T>::type *>(reinterpret_cast<std::conditional<std::is_const<std::remove_pointer<decltype(var)>::type>::value, const char, char>::type *>(var) - offsetof(T, member)) +namespace { +template<typename Dst, typename Src> static inline auto containerof_cxx(Src *var, size_t ofs) +{ + using K = typename std::is_const<typename std::remove_pointer<Src>::type>; + using Ch = typename std::conditional<K::value, const char, char>::type; + using D2 = typename std::conditional<K::value, const Dst, Dst>::type; + return reinterpret_cast<D2 *>(reinterpret_cast<Ch *>(var) + ofs); +} +} +# define containerof(var, D1, member) containerof_cxx<D1>(var, -offsetof(D1, member)) # endif #else # define HXsizeof_member(type, member) sizeof(((type *)NULL)->member) @@ -86,6 +95,7 @@ #define HXSIZEOF_Z32 sizeof("-4294967296") /* 2^64 and -2^63 have same length */ #define HXSIZEOF_Z64 sizeof("18446744073709551616") +#define HXSIZEOF_UNITSEC64 sizeof("584542046089y11months2weeks2d23h59min59s") #define __HX_STRINGIFY_EXPAND(s) #s #define HX_STRINGIFY(s) __HX_STRINGIFY_EXPAND(s) diff --git a/include/libHX/endian.h b/include/libHX/endian.h new file mode 100644 index 0000000..b1a4b6a --- /dev/null +++ b/include/libHX/endian.h @@ -0,0 +1,202 @@ +#ifndef _LIBHX_ENDIAN_H +#define _LIBHX_ENDIAN_H 1 +/* + * See <https://commandcenter.blogspot.com/2012/04/byte-order-fallacy.html>. + * + * be16p_to_cpu not optimized on LE before gcc-10. + * le16p_to_cpu not optimized away on LE before gcc-10. + * cpu_to_be{16,32,64}p not optimized on LE before gcc-8. + * cpu_to_le{16,32,64}p not optimized away on LE before gcc-8. + * cpu_to_le{16,32,64} not optimized away on LE before gcc-8. + * cpu_to_be16 not optimized on LE before gcc-9. + * cpu_to_be{32,64} not optimized on LE before gcc-8. + * be64_to_cpu not optimized on LE before gcc-10. + */ +#include <stdint.h> +#ifndef LIBHX_DBG_INLINE +# define LIBHX_DBG_INLINE static inline +#endif +#if !defined(LIBHX_OPT_O2) && defined(__GNUC__) && !defined(__clang__) && !defined(__llvm__) +# define LIBHX_OPT_O2 __attribute__((optimize("-O2"))) +#else +# define LIBHX_OPT_O2 +#endif +#ifdef __cplusplus +extern "C" { +#endif + +LIBHX_DBG_INLINE uint16_t LIBHX_OPT_O2 be16p_to_cpu(const void *p) +{ + const uint8_t *q = (const uint8_t *)p; + typedef uint16_t T; + return (T)q[1] | ((T)q[0] << 8); +} + +LIBHX_DBG_INLINE uint16_t LIBHX_OPT_O2 le16p_to_cpu(const void *p) +{ + const uint8_t *q = (const uint8_t *)p; + typedef uint16_t T; + return (T)q[0] | ((T)q[1] << 8); +} + +LIBHX_DBG_INLINE uint32_t LIBHX_OPT_O2 be32p_to_cpu(const void *p) +{ + const uint8_t *q = (const uint8_t *)p; + typedef uint32_t T; + return (T)q[3] | ((T)q[2] << 8) | ((T)q[1] << 16) | ((T)q[0] << 24); +} + +LIBHX_DBG_INLINE uint32_t LIBHX_OPT_O2 le32p_to_cpu(const void *p) +{ + const uint8_t *q = (const uint8_t *)p; + typedef uint32_t T; + return (T)q[0] | ((T)q[1] << 8) | ((T)q[2] << 16) | ((T)q[3] << 24); +} + +LIBHX_DBG_INLINE uint64_t LIBHX_OPT_O2 be64p_to_cpu(const void *p) +{ + const uint8_t *q = (const uint8_t *)p; + typedef uint64_t T; + return (T)q[7] | ((T)q[6] << 8) | ((T)q[5] << 16) | ((T)q[4] << 24) | ((T)q[3] << 32) | + ((T)q[2] << 40) | ((T)q[1] << 48) | ((T)q[0] << 56); +} + +LIBHX_DBG_INLINE uint64_t LIBHX_OPT_O2 le64p_to_cpu(const void *p) +{ + const uint8_t *q = (const uint8_t *)p; + typedef uint64_t T; + return (T)q[0] | ((T)q[1] << 8) | ((T)q[2] << 16) | ((T)q[3] << 24) | ((T)q[4] << 32) | + ((T)q[5] << 40) | ((T)q[6] << 48) | ((T)q[7] << 56); +} + +LIBHX_DBG_INLINE void LIBHX_OPT_O2 cpu_to_be16p(void *p, uint16_t v) +{ + uint8_t *q = (uint8_t *)p; + q[1] = v; + q[0] = v >> 8; +} + +LIBHX_DBG_INLINE void LIBHX_OPT_O2 cpu_to_le16p(void *p, uint16_t v) +{ + uint8_t *q = (uint8_t *)p; + q[0] = v; + q[1] = v >> 8; +} + +LIBHX_DBG_INLINE void LIBHX_OPT_O2 cpu_to_be32p(void *p, uint32_t v) +{ + uint8_t *q = (uint8_t *)p; + q[3] = v; + q[2] = v >> 8; + q[1] = v >> 16; + q[0] = v >> 24; +} + +LIBHX_DBG_INLINE void LIBHX_OPT_O2 cpu_to_le32p(void *p, uint32_t v) +{ + uint8_t *q = (uint8_t *)p; + q[0] = v; + q[1] = v >> 8; + q[2] = v >> 16; + q[3] = v >> 24; +} + +LIBHX_DBG_INLINE void LIBHX_OPT_O2 cpu_to_be64p(void *p, uint64_t v) +{ + uint8_t *q = (uint8_t *)p; + q[7] = v; + q[6] = v >> 8; + q[5] = v >> 16; + q[4] = v >> 24; + q[3] = v >> 32; + q[2] = v >> 40; + q[1] = v >> 48; + q[0] = v >> 56; +} + +LIBHX_DBG_INLINE void LIBHX_OPT_O2 cpu_to_le64p(void *p, uint64_t v) +{ + uint8_t *q = (uint8_t *)p; + q[0] = v; + q[1] = v >> 8; + q[2] = v >> 16; + q[3] = v >> 24; + q[4] = v >> 32; + q[5] = v >> 40; + q[6] = v >> 48; + q[7] = v >> 56; +} + +/* This is in essence the same as htons/htonl/htonll/htonq */ +/* [Do we need to worry about trap representations?] */ +LIBHX_DBG_INLINE uint16_t LIBHX_OPT_O2 be16_to_cpu(uint16_t v) +{ + return be16p_to_cpu(&v); +} + +LIBHX_DBG_INLINE uint32_t LIBHX_OPT_O2 be32_to_cpu(uint32_t v) +{ + return be32p_to_cpu(&v); +} + +LIBHX_DBG_INLINE uint64_t LIBHX_OPT_O2 be64_to_cpu(uint64_t v) +{ + return be64p_to_cpu(&v); +} + +LIBHX_DBG_INLINE uint16_t LIBHX_OPT_O2 le16_to_cpu(uint16_t v) +{ + return le16p_to_cpu(&v); +} + +LIBHX_DBG_INLINE uint32_t LIBHX_OPT_O2 le32_to_cpu(uint32_t v) +{ + return le32p_to_cpu(&v); +} + +LIBHX_DBG_INLINE uint64_t LIBHX_OPT_O2 le64_to_cpu(uint64_t v) +{ + return le64p_to_cpu(&v); +} + +LIBHX_DBG_INLINE uint16_t LIBHX_OPT_O2 cpu_to_be16(uint16_t v) +{ + cpu_to_be16p(&v, v); + return v; +} + +LIBHX_DBG_INLINE uint32_t LIBHX_OPT_O2 cpu_to_be32(uint32_t v) +{ + cpu_to_be32p(&v, v); + return v; +} + +LIBHX_DBG_INLINE uint64_t LIBHX_OPT_O2 cpu_to_be64(uint64_t v) +{ + cpu_to_be64p(&v, v); + return v; +} + +LIBHX_DBG_INLINE uint16_t LIBHX_OPT_O2 cpu_to_le16(uint16_t v) +{ + cpu_to_le16p(&v, v); + return v; +} + +LIBHX_DBG_INLINE uint32_t LIBHX_OPT_O2 cpu_to_le32(uint32_t v) +{ + cpu_to_le32p(&v, v); + return v; +} + +LIBHX_DBG_INLINE uint64_t LIBHX_OPT_O2 cpu_to_le64(uint64_t v) +{ + cpu_to_le64p(&v, v); + return v; +} + +#ifdef __cplusplus +} +#endif + +#endif /* _LIBHX_ENDIAN_H */ diff --git a/include/libHX/scope.hpp b/include/libHX/scope.hpp new file mode 100644 index 0000000..0c0c70d --- /dev/null +++ b/include/libHX/scope.hpp @@ -0,0 +1,35 @@ +#pragma once +#include <exception> +#include <utility> + +namespace HX { + +/* + * Modeled upon the C++ standards proposal P0052r10 / Library Fundamentals v3. + * Not yet present in GNU stdlibc++ or clang libc++. + */ +template<typename F> class scope_exit { + private: + F m_func; + bool m_eod = false; + + public: + explicit scope_exit(F &&f) : m_func(std::move(f)), m_eod(true) {} + scope_exit(scope_exit &&o) : m_func(std::move(o.m_func)), m_eod(o.m_eod) { + o.m_eod = false; + } + ~scope_exit() try { + if (m_eod) + m_func(); + } catch (...) { + } + void operator=(scope_exit &&) = delete; + void release() noexcept { m_eod = false; } +}; + +template<typename F> scope_exit<F> make_scope_exit(F &&f) +{ + return scope_exit<F>(std::move(f)); +} + +} /* namespace */ diff --git a/src/Makefile.in b/src/Makefile.in index 0ad4cde..0768775 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. +# Makefile.in generated by automake 1.17 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2021 Free Software Foundation, Inc. +# Copyright (C) 1994-2024 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -72,6 +72,8 @@ am__make_running_with_option = \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +am__rm_f = rm -f $(am__rm_f_notfound) +am__rm_rf = rm -rf $(am__rm_f_notfound) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -155,10 +157,9 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ + { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) @@ -556,6 +557,7 @@ am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ + $$am__collect_skipped_logs \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the @@ -580,6 +582,11 @@ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ +if test -n '$(IGNORE_SKIPPED_LOGS)'; then \ + am__collect_skipped_logs='--collect-skipped-logs no'; \ +else \ + am__collect_skipped_logs=''; \ +fi; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ @@ -712,8 +719,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__rm_f_notfound = @am__rm_f_notfound@ am__tar = @am__tar@ am__untar = @am__untar@ +am__xargs_n = @am__xargs_n@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -865,13 +874,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list + $(am__rm_f) $(check_PROGRAMS) + test -z "$(EXEEXT)" || $(am__rm_f) $(check_PROGRAMS:$(EXEEXT)=) install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @@ -898,15 +902,13 @@ uninstall-libLTLIBRARIES: done clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + -$(am__rm_f) $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } + echo rm -f $${locs}; \ + $(am__rm_f) $${locs} libHX.la: $(libHX_la_OBJECTS) $(libHX_la_DEPENDENCIES) $(EXTRA_libHX_la_DEPENDENCIES) $(AM_V_CCLD)$(libHX_la_LINK) -rpath $(libdir) $(libHX_la_OBJECTS) $(libHX_la_LIBADD) $(LIBS) @@ -1130,7 +1132,7 @@ distclean-compile: $(am__depfiles_remade): @$(MKDIR_P) $(@D) - @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + @: >>$@ am--depfiles: $(am__depfiles_remade) @@ -1295,7 +1297,6 @@ distclean-tags: am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: - $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ @@ -1371,10 +1372,37 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ + output_system_information () \ + { \ + echo; \ + { uname -a | $(AWK) '{ \ + printf "System information (uname -a):"; \ + for (i = 1; i < NF; ++i) \ + { \ + if (i != 2) \ + printf " %s", $$i; \ + } \ + printf "\n"; \ +}'; } 2>&1; \ + if test -r /etc/os-release; then \ + echo "Distribution information (/etc/os-release):"; \ + sed 8q /etc/os-release; \ + elif test -r /etc/issue; then \ + echo "Distribution information (/etc/issue):"; \ + cat /etc/issue; \ + fi; \ + }; \ + please_report () \ + { \ +echo "Some test(s) failed. Please report this to $(PACKAGE_BUGREPORT),"; \ +echo "together with the test-suite.log file (gzipped) and your system"; \ +echo "information. Thanks."; \ + }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ + output_system_information; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ @@ -1394,26 +1422,25 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG) for debugging.$${std}";\ if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + please_report | sed -e "s/^/$${col}/" -e s/'$$'/"$${std}"/; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: $(check_PROGRAMS) - @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list - @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @$(am__rm_f) $(RECHECK_LOGS) + @$(am__rm_f) $(RECHECK_LOGS:.log=.trs) + @$(am__rm_f) $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ - trs_list=`for i in $$bases; do echo $$i.trs; done`; \ - log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all $(check_PROGRAMS) - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @$(am__rm_f) $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ @@ -1550,15 +1577,15 @@ install-strip: "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + -$(am__rm_f) $(TEST_LOGS) + -$(am__rm_f) $(TEST_LOGS:.log=.trs) + -$(am__rm_f) $(TEST_SUITE_LOG) clean-generic: distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -$(am__rm_f) $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -1569,7 +1596,7 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool mostlyclean-am distclean: distclean-am - -rm -f ./$(DEPDIR)/deque.Plo + -rm -f ./$(DEPDIR)/deque.Plo -rm -f ./$(DEPDIR)/dl.Plo -rm -f ./$(DEPDIR)/format.Plo -rm -f ./$(DEPDIR)/io.Plo @@ -1668,7 +1695,7 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -f ./$(DEPDIR)/deque.Plo + -rm -f ./$(DEPDIR)/deque.Plo -rm -f ./$(DEPDIR)/dl.Plo -rm -f ./$(DEPDIR)/format.Plo -rm -f ./$(DEPDIR)/io.Plo @@ -1764,3 +1791,10 @@ uninstall-am: uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: + +# Tell GNU make to disable its built-in pattern rules. +%:: %,v +%:: RCS/%,v +%:: RCS/% +%:: s.% +%:: SCCS/s.% diff --git a/src/string.c b/src/string.c index e468063..3a85fa8 100644 --- a/src/string.c +++ b/src/string.c @@ -41,7 +41,7 @@ struct HX_quote_rule { const char *chars; }; -static const char HX_hexenc[16] = "0123456789ABCDEF"; +static const char HX_hexenc[] = "0123456789ABCDEF"; EXPORT_SYMBOL char *HX_basename(const char *s) { @@ -1175,7 +1175,7 @@ EXPORT_SYMBOL unsigned long long HX_strtoull_nsec(const char *s, char **out_end) EXPORT_SYMBOL char *HX_unit_seconds(char *out, size_t outsize, unsigned long long secs, unsigned int flags) { - unsigned long years = 0, months = 0, weeks = 0, days, hours, mins; + unsigned long long years = 0, months = 0, weeks = 0, days, hours, mins; char buf[HXSIZEOF_Z64+4]; if (flags & HXUNIT_YEARS) { years = secs / SECONDS_PER_YEAR; @@ -1197,31 +1197,31 @@ EXPORT_SYMBOL char *HX_unit_seconds(char *out, size_t outsize, secs %= 60; *out = '\0'; if (years > 0) { - snprintf(buf, ARRAY_SIZE(buf), "%luy", years); + snprintf(buf, ARRAY_SIZE(buf), "%lluy", years); HX_strlcat(out, buf, outsize); } if (months == 1) { HX_strlcat(out, "1month", outsize); } else if (months > 0) { - snprintf(buf, ARRAY_SIZE(buf), "%lumonths", months); + snprintf(buf, ARRAY_SIZE(buf), "%llumonths", months); HX_strlcat(out, buf, outsize); } if (weeks == 1) { HX_strlcat(out, "1week", outsize); } else if (weeks > 0) { - snprintf(buf, ARRAY_SIZE(buf), "%luweeks", weeks); + snprintf(buf, ARRAY_SIZE(buf), "%lluweeks", weeks); HX_strlcat(out, buf, outsize); } if (days > 0) { - snprintf(buf, ARRAY_SIZE(buf), "%lud", days); + snprintf(buf, ARRAY_SIZE(buf), "%llud", days); HX_strlcat(out, buf, outsize); } if (hours > 0) { - snprintf(buf, ARRAY_SIZE(buf), "%luh", hours); + snprintf(buf, ARRAY_SIZE(buf), "%lluh", hours); HX_strlcat(out, buf, outsize); } if (mins > 0) { - snprintf(buf, ARRAY_SIZE(buf), "%lumin", mins); + snprintf(buf, ARRAY_SIZE(buf), "%llumin", mins); HX_strlcat(out, buf, outsize); } if (secs > 0 || diff --git a/src/tc-compile.c b/src/tc-compile.c index d60ff21..b3f3b0e 100644 --- a/src/tc-compile.c +++ b/src/tc-compile.c @@ -5,6 +5,7 @@ # include <cstdlib> #endif #include <libHX.h> +#include <libHX/endian.h> #define ZZ 64 diff --git a/src/tc-string.c b/src/tc-string.c index e7f90c2..d777268 100644 --- a/src/tc-string.c +++ b/src/tc-string.c @@ -355,8 +355,16 @@ static int t_time_units(void) static const struct { unsigned long long input; unsigned int flags; - const char expect_out[24]; + const char expect_out[41]; } vt[] = { +#define SECONDS_PER_YEAR 31557600 /* 365.25 days */ +#define SECONDS_PER_MONTH 2629800 /* 1/12th of that year = 30.4375 days */ + {18446744073709551615ULL, 0, "213503982334601d7h15s"}, + {18446744073709526399ULL, 0, "213503982334600d23h59min59s"}, + {18446744073709180799ULL, HXUNIT_WEEKS, "30500568904942weeks2d23h59min59s"}, + {18446744073708451799ULL, HXUNIT_MONTHS, "7014504553087months2d23h59min59s"}, + {18446744073707636399ULL, HXUNIT_MONTHS | HXUNIT_WEEKS, "7014504553086months3weeks2d23h59min59s"}, + {18446744073688622999ULL, HXUNIT_YEARS | HXUNIT_MONTHS | HXUNIT_WEEKS, "584542046089y11months2weeks2d23h59min59s"}, {31536000, 0, "365d"}, {31622400, 0, "366d"}, {34819200, HXUNIT_WEEKS, "57weeks4d"}, diff --git a/src/tx-compile.cpp b/src/tx-compile.cpp index 2c21e3b..2bcdb1e 100644 --- a/src/tx-compile.cpp +++ b/src/tx-compile.cpp @@ -1 +1,2 @@ #include "tc-compile.c" +#include <libHX/scope.hpp> |