diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-09-10 18:47:17 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-09-10 18:47:17 +0200 |
commit | ec66c414866572fcd77a5bf7e4a444e84d8aa804 (patch) | |
tree | 50b95bea4fdc18396e581506369bd7d67bcc438b | |
parent | 41aba5755c9fa6082aec99c4fec6c571f8e5062a (diff) | |
parent | 4fbd529e776527e548b343a82e14d1cb7eb30764 (diff) |
Merge branch 'release/experimental/3.25-1_exp1' into masterexperimental/3.25-1_exp1
39 files changed, 360 insertions, 563 deletions
@@ -591,7 +591,6 @@ dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -AM_SILENT_RULES([yes]) # 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 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libHX 3.24. +# Generated by GNU Autoconf 2.69 for libHX 3.25. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libHX' PACKAGE_TARNAME='libhx' -PACKAGE_VERSION='3.24' -PACKAGE_STRING='libHX 3.24' +PACKAGE_VERSION='3.25' +PACKAGE_STRING='libHX 3.25' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1342,7 +1342,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 3.24 to adapt to many kinds of systems. +\`configure' configures libHX 3.25 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1412,7 +1412,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libHX 3.24:";; + short | recursive ) echo "Configuration of libHX 3.25:";; esac cat <<\_ACEOF @@ -1527,7 +1527,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libHX configure 3.24 +libHX configure 3.25 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2253,7 +2253,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 3.24, which was +It was created by libHX $as_me 3.25, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3119,7 +3119,7 @@ fi # Define the identity of the package. PACKAGE='libhx' - VERSION='3.24' + VERSION='3.25' cat >>confdefs.h <<_ACEOF @@ -3254,45 +3254,6 @@ $as_echo "$am_cv_prog_tar_pax" >&6; } -# Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; 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} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo '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 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$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='\' - # 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 @@ -17720,7 +17681,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 3.24, which was +This file was extended by libHX $as_me 3.25, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17786,7 +17747,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libHX config.status 3.24 +libHX config.status 3.25 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index f03a863..119bd7f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([libHX], [3.24]) +AC_INIT([libHX], [3.25]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/debian/changelog b/debian/changelog index 57e2e10..eaf471c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,25 @@ +libhx (3.25-1~exp1) experimental; urgency=medium + + * New upstream release. + * Migrate to debhelper 13: + - Bump minimum debhelper-compat version in debian/control to = 13. + * Declare compliance with Debian Policy 4.5.0 (No changes needed). + * Bump package name depending on the SONAME to libhx32. + * debian/copyright: + - Refresh years. + - Add Upstream-Contact. + - Replace Homepage. + - Fix lintian *-globbing-patterns errors. + * debian/control: + - Change homepage. + - Add Replaces / Breaks. + - Add Rules-Requires-Root: no. + * Refresh patch. + * debian/libhx-dev.lintian-overrides: + - Rename tags. + + -- Jörg Frings-Fürst <debian@jff.email> Sun, 30 Aug 2020 21:56:37 +0200 + libhx (3.24-1) unstable; urgency=medium * New upstream release. diff --git a/debian/compat b/debian/compat deleted file mode 100644 index b4de394..0000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -11 diff --git a/debian/control b/debian/control index e22560f..bd61fb0 100644 --- a/debian/control +++ b/debian/control @@ -2,16 +2,19 @@ Source: libhx Priority: optional Maintainer: Jörg Frings-Fürst <debian@jff.email> Build-Depends: - debhelper (>= 11) -Standards-Version: 4.2.1 + debhelper-compat (= 13) +Standards-Version: 4.5.0 Section: libs -Homepage: http://libhx.sourceforge.net/ +Rules-Requires-Root: no +Homepage: https://inai.de/projects/libhx/ Vcs-Git: git://jff.email/opt/git/libhx.git Vcs-Browser: https://jff.email/cgit/libhx.git -Package: libhx28 +Package: libhx32 Architecture: any Multi-Arch: same +Replaces: libhx28 (<< 3.25.1-1~) +Breaks: libhx28 (<< 3.25.1-1~) Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, @@ -29,7 +32,7 @@ Section: libdevel Architecture: any Pre-Depends: ${misc:Pre-Depends} Depends: - libhx28 (= ${binary:Version}), + libhx32 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: Development files for libhx diff --git a/debian/copyright b/debian/copyright index 4aada04..817eb20 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,27 +1,25 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: libhx -Source: http://libhx.sourceforge.net/ +Upstream-Contact: Jan Engelhardt <jengelh@inai.de> +Source: https://inai.de/projects/libhx/ Files: * - src/tc-compile.c - src/tc-deque.c - src/tc-link.c Copyright: 1999-2014 Jan Engelhardt <jengelh@gmx.de> License: LGPL-2.1+ Files: debian/* Copyright: 2007-2014 Bastian Kleineidam <calvin@debian.org> - 2015-2018 Jörg Frings-Fürst <debian@jff.email> + 2015-2020 Jörg Frings-Fürst <debian@jff.email> License: GPL-3+ Files: debian/patches/* Copyright: 2009-2014 Bastian Kleineidam <calvin@debian.org> - 2015-2018 Jörg Frings-Fürst <debianæjff.email> + 2015-2020 Jörg Frings-Fürst <debian@jff.email> License: LGPL-2.1+ Files: build-aux/* m4/* -Copyright: 1992-2013 Free Software Foundation, Inc. +Copyright: 1992-2017 Free Software Foundation, Inc. License: GPL-2+ Files: src/tc-*.c diff --git a/debian/libhx-dev.lintian-overrides b/debian/libhx-dev.lintian-overrides index 9d5810c..15979c8 100644 --- a/debian/libhx-dev.lintian-overrides +++ b/debian/libhx-dev.lintian-overrides @@ -1,3 +1,4 @@ # libHX_rtcheck is used to enable more internal checks dynamically libhx-dev: package-name-doesnt-match-sonames libHX-rtcheck -libhx-dev: shlib-without-versioned-soname usr/lib/x86_64-linux-gnu/libHX_rtcheck.so libHX_rtcheck.so +libhx-dev: shared-library-lacks-version usr/lib/x86_64-linux-gnu/libHX_rtcheck.so libHX_rtcheck.so +libhx-dev: shared-library-lacks-prerequisites usr/lib/x86_64-linux-gnu/libHX_rtcheck.so diff --git a/debian/libhx-dev.symbols b/debian/libhx-dev.symbols index cc4d11b..abfb1ac 100644 --- a/debian/libhx-dev.symbols +++ b/debian/libhx-dev.symbols @@ -1,18 +1,3 @@ libHX_rtcheck.so libhx-dev #MINVER# - LIBHX_1.10.0@LIBHX_1.10.0 3.22 - LIBHX_1.25@LIBHX_1.25 3.22 - LIBHX_1.26@LIBHX_1.26 3.22 - LIBHX_2.0@LIBHX_2.0 3.22 - LIBHX_2.2@LIBHX_2.2 3.22 - LIBHX_2.6@LIBHX_2.6 3.22 - LIBHX_2.9@LIBHX_2.9 3.22 - LIBHX_3.0@LIBHX_3.0 3.22 - LIBHX_3.10@LIBHX_3.10 3.22 - LIBHX_3.12@LIBHX_3.12 3.22 - LIBHX_3.13@LIBHX_3.13 3.22 - LIBHX_3.15@LIBHX_3.15 3.22 - LIBHX_3.18@LIBHX_3.18 3.22 - LIBHX_3.2@LIBHX_3.2 3.22 - LIBHX_3.3@LIBHX_3.3 3.22 - LIBHX_3.4@LIBHX_3.4 3.22 - LIBHX_3.9@LIBHX_3.9 3.22 +* Build-Depends-Package: libhx-dev + LIBHX_3.25@LIBHX_3.25 3.25 diff --git a/debian/libhx28.symbols b/debian/libhx28.symbols deleted file mode 100644 index 3bbd283..0000000 --- a/debian/libhx28.symbols +++ /dev/null @@ -1,143 +0,0 @@ -libHX.so.28 libhx28 #MINVER# - HX_basename@LIBHX_1.10.0 3.22 - HX_basename_exact@LIBHX_2.9 3.22 - HX_chomp@LIBHX_1.10.0 3.22 - HX_copy_dir@LIBHX_1.10.0 3.22 - HX_copy_file@LIBHX_1.10.0 3.22 - HX_diff_timespec@LIBHX_3.0 3.22 - HX_diff_timeval@LIBHX_3.0 3.22 - HX_dirname@LIBHX_1.10.0 3.22 - HX_dlclose@LIBHX_1.10.0 3.22 - HX_dlerror@LIBHX_1.10.0 3.22 - HX_dlopen@LIBHX_1.10.0 3.22 - HX_dlsym@LIBHX_1.10.0 3.22 - HX_drand@LIBHX_3.3 3.22 - HX_exit@LIBHX_3.4 3.22 - HX_ffs@LIBHX_1.10.0 3.22 - HX_fls@LIBHX_2.6 3.22 - HX_getl@LIBHX_1.25 3.22 - HX_getopt@LIBHX_1.10.0 3.22 - HX_getopt_help@LIBHX_1.10.0 3.22 - HX_getopt_help_cb@LIBHX_3.12 3.22 - HX_getopt_usage@LIBHX_1.10.0 3.22 - HX_getopt_usage_cb@LIBHX_3.12 3.22 - HX_hexdump@LIBHX_1.26 3.22 - HX_init@LIBHX_3.4 3.22 - HX_irand@LIBHX_1.10.0 3.22 - HX_memmem@LIBHX_3.4 3.22 - HX_mkdir@LIBHX_3.12 3.22 - HX_rand@LIBHX_1.10.0 3.22 - HX_readlink@LIBHX_3.10 3.22 - HX_realpath@LIBHX_3.10 3.22 - HX_rrmdir@LIBHX_1.10.0 3.22 - HX_shconfig@LIBHX_1.10.0 3.22 - HX_shconfig_free@LIBHX_1.10.0 3.22 - HX_shconfig_map@LIBHX_3.3 3.22 - HX_shconfig_pv@LIBHX_1.10.0 3.22 - HX_split4@LIBHX_2.2 3.22 - HX_split5@LIBHX_1.10.0 3.22 - HX_split@LIBHX_1.10.0 3.22 - HX_stpltrim@LIBHX_3.18 3.22 - HX_strbchr@LIBHX_1.10.0 3.22 - HX_strchr2@LIBHX_3.15 3.22 - HX_strclone@LIBHX_1.10.0 3.22 - HX_strdup@LIBHX_3.12 3.22 - HX_strlcat@LIBHX_3.12 3.22 - HX_strlcpy@LIBHX_3.12 3.22 - HX_strlncat@LIBHX_3.12 3.22 - HX_strlower@LIBHX_1.10.0 3.22 - HX_strltrim@LIBHX_1.10.0 3.22 - HX_strmid@LIBHX_1.10.0 3.22 - HX_strndup@LIBHX_3.12 3.22 - HX_strnlen@LIBHX_3.12 3.22 - HX_strquote@LIBHX_3.2 3.22 - HX_strrcspn@LIBHX_1.10.0 3.22 - HX_strrev@LIBHX_1.10.0 3.22 - HX_strrtrim@LIBHX_1.10.0 3.22 - HX_strsep2@LIBHX_1.10.0 3.22 - HX_strsep@LIBHX_1.10.0 3.22 - HX_strupper@LIBHX_1.10.0 3.22 - HX_time_compare@LIBHX_1.26 3.22 - HX_timespec_add@LIBHX_3.13 3.22 - HX_timespec_isneg@LIBHX_3.13 3.22 - HX_timespec_mul@LIBHX_3.13 3.22 - HX_timespec_mulf@LIBHX_3.13 3.22 - HX_timespec_neg@LIBHX_3.13 3.22 - HX_timespec_sub@LIBHX_3.13 3.22 - HX_timeval_sub@LIBHX_3.13 3.22 - HX_zvecfree@LIBHX_1.10.0 3.22 - HXdeque_del@LIBHX_1.10.0 3.22 - HXdeque_find@LIBHX_1.10.0 3.22 - HXdeque_free@LIBHX_1.10.0 3.22 - HXdeque_genocide2@LIBHX_3.3 3.22 - HXdeque_get@LIBHX_1.10.0 3.22 - HXdeque_init@LIBHX_1.10.0 3.22 - HXdeque_move@LIBHX_1.10.0 3.22 - HXdeque_pop@LIBHX_1.10.0 3.22 - HXdeque_push@LIBHX_1.10.0 3.22 - HXdeque_shift@LIBHX_1.10.0 3.22 - HXdeque_to_vec@LIBHX_1.10.0 3.22 - HXdeque_unshift@LIBHX_1.10.0 3.22 - HXdir_close@LIBHX_1.10.0 3.22 - HXdir_open@LIBHX_1.10.0 3.22 - HXdir_read@LIBHX_1.10.0 3.22 - HXformat_add@LIBHX_3.0 3.22 - HXformat_aprintf@LIBHX_3.12 3.22 - HXformat_fprintf@LIBHX_3.12 3.22 - HXformat_free@LIBHX_3.0 3.22 - HXformat_init@LIBHX_3.0 3.22 - HXformat_sprintf@LIBHX_3.12 3.22 - HXhash_djb2@LIBHX_3.0 3.22 - HXhash_jlookup3@LIBHX_3.0 3.22 - HXhash_jlookup3s@LIBHX_3.0 3.22 - HXhash_primes@LIBHX_3.0 3.22 - HXio_fullread@LIBHX_3.9 3.22 - HXio_fullwrite@LIBHX_3.9 3.22 - HXmap_add@LIBHX_3.0 3.22 - HXmap_del@LIBHX_3.0 3.22 - HXmap_find@LIBHX_3.0 3.22 - HXmap_free@LIBHX_3.0 3.22 - HXmap_get@LIBHX_3.0 3.22 - HXmap_init5@LIBHX_3.12 3.22 - HXmap_init@LIBHX_3.12 3.22 - HXmap_keysvalues@LIBHX_3.0 3.22 - HXmap_qfe@LIBHX_3.0 3.22 - HXmap_traverse@LIBHX_3.0 3.22 - HXmap_travfree@LIBHX_3.0 3.22 - HXmap_travinit@LIBHX_3.0 3.22 - HXmc_free@LIBHX_1.25 3.22 - HXmc_length@LIBHX_1.25 3.22 - HXmc_memcat@LIBHX_1.25 3.22 - HXmc_memcpy@LIBHX_1.25 3.22 - HXmc_memdel@LIBHX_1.25 3.22 - HXmc_meminit@LIBHX_1.25 3.22 - HXmc_memins@LIBHX_1.25 3.22 - HXmc_mempcat@LIBHX_1.25 3.22 - HXmc_setlen@LIBHX_2.0 3.22 - HXmc_strcat@LIBHX_1.25 3.22 - HXmc_strcpy@LIBHX_1.25 3.22 - HXmc_strinit@LIBHX_1.25 3.22 - HXmc_strins@LIBHX_1.25 3.22 - HXmc_strpcat@LIBHX_1.25 3.22 - HXmc_trunc@LIBHX_1.25 3.22 - HXmc_zvecfree@LIBHX_3.3 3.22 - HXproc_run_async@LIBHX_2.2 3.22 - HXproc_run_sync@LIBHX_2.2 3.22 - HXproc_wait@LIBHX_2.2 3.22 - LIBHX_1.10.0@LIBHX_1.10.0 3.22 - LIBHX_1.25@LIBHX_1.25 3.22 - LIBHX_1.26@LIBHX_1.26 3.22 - LIBHX_2.0@LIBHX_2.0 3.22 - LIBHX_2.2@LIBHX_2.2 3.22 - LIBHX_2.6@LIBHX_2.6 3.22 - LIBHX_2.9@LIBHX_2.9 3.22 - LIBHX_3.0@LIBHX_3.0 3.22 - LIBHX_3.10@LIBHX_3.10 3.22 - LIBHX_3.12@LIBHX_3.12 3.22 - LIBHX_3.13@LIBHX_3.13 3.22 - LIBHX_3.15@LIBHX_3.15 3.22 - LIBHX_3.18@LIBHX_3.18 3.22 - LIBHX_3.2@LIBHX_3.2 3.22 - LIBHX_3.3@LIBHX_3.3 3.22 - LIBHX_3.4@LIBHX_3.4 3.22 - LIBHX_3.9@LIBHX_3.9 3.22 diff --git a/debian/libhx28.dirs b/debian/libhx32.dirs index 6845771..6845771 100644 --- a/debian/libhx28.dirs +++ b/debian/libhx32.dirs diff --git a/debian/libhx28.install b/debian/libhx32.install index 3ddde58..3ddde58 100644 --- a/debian/libhx28.install +++ b/debian/libhx32.install diff --git a/debian/libhx32.symbols b/debian/libhx32.symbols new file mode 100644 index 0000000..4e58b1d --- /dev/null +++ b/debian/libhx32.symbols @@ -0,0 +1,126 @@ +libHX.so.32 libhx32 #MINVER# +* Build-Depends-Package: libhx-dev + HX_basename@LIBHX_3.25 3.25 + HX_basename_exact@LIBHX_3.25 3.25 + HX_chomp@LIBHX_3.25 3.25 + HX_copy_dir@LIBHX_3.25 3.25 + HX_copy_file@LIBHX_3.25 3.25 + HX_dirname@LIBHX_3.25 3.25 + HX_dlclose@LIBHX_3.25 3.25 + HX_dlerror@LIBHX_3.25 3.25 + HX_dlopen@LIBHX_3.25 3.25 + HX_dlsym@LIBHX_3.25 3.25 + HX_drand@LIBHX_3.25 3.25 + HX_exit@LIBHX_3.25 3.25 + HX_ffs@LIBHX_3.25 3.25 + HX_fls@LIBHX_3.25 3.25 + HX_getl@LIBHX_3.25 3.25 + HX_getopt@LIBHX_3.25 3.25 + HX_getopt_help@LIBHX_3.25 3.25 + HX_getopt_help_cb@LIBHX_3.25 3.25 + HX_getopt_usage@LIBHX_3.25 3.25 + HX_getopt_usage_cb@LIBHX_3.25 3.25 + HX_hexdump@LIBHX_3.25 3.25 + HX_init@LIBHX_3.25 3.25 + HX_irand@LIBHX_3.25 3.25 + HX_memmem@LIBHX_3.25 3.25 + HX_mkdir@LIBHX_3.25 3.25 + HX_rand@LIBHX_3.25 3.25 + HX_readlink@LIBHX_3.25 3.25 + HX_realpath@LIBHX_3.25 3.25 + HX_rrmdir@LIBHX_3.25 3.25 + HX_shconfig@LIBHX_3.25 3.25 + HX_shconfig_free@LIBHX_3.25 3.25 + HX_shconfig_map@LIBHX_3.25 3.25 + HX_shconfig_pv@LIBHX_3.25 3.25 + HX_split@LIBHX_3.25 3.25 + HX_split_fixed@LIBHX_3.25 3.25 + HX_split_inplace@LIBHX_3.25 3.25 + HX_stpltrim@LIBHX_3.25 3.25 + HX_strbchr@LIBHX_3.25 3.25 + HX_strchr2@LIBHX_3.25 3.25 + HX_strclone@LIBHX_3.25 3.25 + HX_strdup@LIBHX_3.25 3.25 + HX_strlcat@LIBHX_3.25 3.25 + HX_strlcpy@LIBHX_3.25 3.25 + HX_strlncat@LIBHX_3.25 3.25 + HX_strlower@LIBHX_3.25 3.25 + HX_strltrim@LIBHX_3.25 3.25 + HX_strmid@LIBHX_3.25 3.25 + HX_strndup@LIBHX_3.25 3.25 + HX_strnlen@LIBHX_3.25 3.25 + HX_strquote@LIBHX_3.25 3.25 + HX_strrcspn@LIBHX_3.25 3.25 + HX_strrev@LIBHX_3.25 3.25 + HX_strrtrim@LIBHX_3.25 3.25 + HX_strsep2@LIBHX_3.25 3.25 + HX_strsep@LIBHX_3.25 3.25 + HX_strupper@LIBHX_3.25 3.25 + HX_time_compare@LIBHX_3.25 3.25 + HX_timespec_add@LIBHX_3.25 3.25 + HX_timespec_isneg@LIBHX_3.25 3.25 + HX_timespec_mul@LIBHX_3.25 3.25 + HX_timespec_mulf@LIBHX_3.25 3.25 + HX_timespec_neg@LIBHX_3.25 3.25 + HX_timespec_sub@LIBHX_3.25 3.25 + HX_timeval_sub@LIBHX_3.25 3.25 + HX_zvecfree@LIBHX_3.25 3.25 + HXdeque_del@LIBHX_3.25 3.25 + HXdeque_find@LIBHX_3.25 3.25 + HXdeque_free@LIBHX_3.25 3.25 + HXdeque_genocide2@LIBHX_3.25 3.25 + HXdeque_get@LIBHX_3.25 3.25 + HXdeque_init@LIBHX_3.25 3.25 + HXdeque_move@LIBHX_3.25 3.25 + HXdeque_pop@LIBHX_3.25 3.25 + HXdeque_push@LIBHX_3.25 3.25 + HXdeque_shift@LIBHX_3.25 3.25 + HXdeque_to_vec@LIBHX_3.25 3.25 + HXdeque_unshift@LIBHX_3.25 3.25 + HXdir_close@LIBHX_3.25 3.25 + HXdir_open@LIBHX_3.25 3.25 + HXdir_read@LIBHX_3.25 3.25 + HXformat_add@LIBHX_3.25 3.25 + HXformat_aprintf@LIBHX_3.25 3.25 + HXformat_fprintf@LIBHX_3.25 3.25 + HXformat_free@LIBHX_3.25 3.25 + HXformat_init@LIBHX_3.25 3.25 + HXformat_sprintf@LIBHX_3.25 3.25 + HXhash_djb2@LIBHX_3.25 3.25 + HXhash_jlookup3@LIBHX_3.25 3.25 + HXhash_jlookup3s@LIBHX_3.25 3.25 + HXhash_primes@LIBHX_3.25 3.25 + HXio_fullread@LIBHX_3.25 3.25 + HXio_fullwrite@LIBHX_3.25 3.25 + HXmap_add@LIBHX_3.25 3.25 + HXmap_del@LIBHX_3.25 3.25 + HXmap_find@LIBHX_3.25 3.25 + HXmap_free@LIBHX_3.25 3.25 + HXmap_get@LIBHX_3.25 3.25 + HXmap_init5@LIBHX_3.25 3.25 + HXmap_init@LIBHX_3.25 3.25 + HXmap_keysvalues@LIBHX_3.25 3.25 + HXmap_qfe@LIBHX_3.25 3.25 + HXmap_traverse@LIBHX_3.25 3.25 + HXmap_travfree@LIBHX_3.25 3.25 + HXmap_travinit@LIBHX_3.25 3.25 + HXmc_free@LIBHX_3.25 3.25 + HXmc_length@LIBHX_3.25 3.25 + HXmc_memcat@LIBHX_3.25 3.25 + HXmc_memcpy@LIBHX_3.25 3.25 + HXmc_memdel@LIBHX_3.25 3.25 + HXmc_meminit@LIBHX_3.25 3.25 + HXmc_memins@LIBHX_3.25 3.25 + HXmc_mempcat@LIBHX_3.25 3.25 + HXmc_setlen@LIBHX_3.25 3.25 + HXmc_strcat@LIBHX_3.25 3.25 + HXmc_strcpy@LIBHX_3.25 3.25 + HXmc_strinit@LIBHX_3.25 3.25 + HXmc_strins@LIBHX_3.25 3.25 + HXmc_strpcat@LIBHX_3.25 3.25 + HXmc_trunc@LIBHX_3.25 3.25 + HXmc_zvecfree@LIBHX_3.25 3.25 + HXproc_run_async@LIBHX_3.25 3.25 + HXproc_run_sync@LIBHX_3.25 3.25 + HXproc_wait@LIBHX_3.25 3.25 + LIBHX_3.25@LIBHX_3.25 3.25 diff --git a/debian/not-installed b/debian/not-installed new file mode 100644 index 0000000..68cbb21 --- /dev/null +++ b/debian/not-installed @@ -0,0 +1,2 @@ +usr/lib/*/*.la +usr/share/doc/libhx/libHX_Documentation.pdf diff --git a/debian/patches/hurd-path-max-define b/debian/patches/hurd-path-max-define index 05994a7..da80024 100644 --- a/debian/patches/hurd-path-max-define +++ b/debian/patches/hurd-path-max-define @@ -1,4 +1,5 @@ Description: Add missing define of PATH_MAX for hurd. +Forwarded: not-needed Last-Update: 2015-02-04 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ diff --git a/debian/rules b/debian/rules index c5a1756..4101bc0 100755 --- a/debian/rules +++ b/debian/rules @@ -17,10 +17,10 @@ override_dh_installchangelogs: override_dh_makeshlibs: dh_makeshlibs - dpkg-gensymbols -v$(VERSION) -Pdebian/libhx28 -plibhx28 + dpkg-gensymbols -v$(VERSION) -Pdebian/libhx32 -plibhx32 dpkg-gensymbols -v$(VERSION) -Pdebian/libhx-dev -plibhx-dev override_dh_installdocs: dh_installdocs -i -plibhx-doc --doc-main-package=libhx-doc dh_installdocs -a -plibhx-dev - dh_installdocs -a -plibhx28 + dh_installdocs -a -plibhx32 diff --git a/doc/api.txt b/doc/api.txt index eb3b06b..4649515 100644 --- a/doc/api.txt +++ b/doc/api.txt @@ -15,6 +15,8 @@ F column: Function first seen in version, possibly with different API. RMV MinVer FirstA Name ---------------------------------------------------------------------- +3.25 3.25 3.25 HX_split_fixed +3.25 3.25 3.25 HX_split_inplace 3.22 3.22 3.22 HXQUOTE_SQLBQUOTE 3.21 3.21 3.21 xml_getnsprop 3.19 3.19 3.19 HXQUOTE_SQLSQUOTE @@ -24,7 +26,6 @@ RMV MinVer FirstA Name 3.16 3.16 3.16 container_of 3.16 3.16 3.16 wxCDF 3.16 3.16 3.16 wxDSPAN -3.15 3.15 3.15 FIELD_SIZEOF 3.15 3.15 3.15 HXQUOTE_URIENC 3.15 3.15 3.15 HX_strchr2 3.13 3.13 3.13 DEMOTE_TO_PTR @@ -116,8 +117,6 @@ RMV MinVer FirstA Name 3.0 3.0 3.0 HXMAPT_RBTREE 3.0 3.0 3.0 HXMAP_DTRAV 3.0 3.0 3.0 HXMAP_NOREPLACE -3.0 3.0 3.0 HX_diff_timespec -3.0 3.0 3.0 HX_diff_timeval 3.0 3.0 3.0 HXhash_djb2 3.0 3.0 3.0 HXhash_jlookup3 3.0 3.0 3.0 HXhash_jlookup3s @@ -145,7 +144,6 @@ RMV MinVer FirstA Name 2.6 2.6 2.6 wxfv8 2.6 2.6 2.6 wxtu8 2.6 2.6 2.6 xml_strcasecmp -2.3 2.0 2.0 offsetof 2.3 1.25 1.25 HXmc_length 2.2 2.2 2.2 HXPROC_A0 2.2 2.2 2.2 HXPROC_EXECV diff --git a/doc/changelog.txt b/doc/changelog.txt index 9aff713..ffe75c1 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -1,4 +1,15 @@ +v3.25 (2020-05-14) +================== +Fixes: +* string: fix out-of-bounds access when calling HX_strlcpy(x,y,0) +Changes: +* string: HX_split4 renamed to HX_split_inplace +* string: HX_split5 renamed to HX_split_fixed +* defs.h: removed partially implementation of FIELD_SIZEOF +* defs.h: removed custom offsetof definition; you will need to include + <stddef.h> or <cstddef> now. + v3.24 (2018-10-17) ================== diff --git a/doc/generate b/doc/generate index ed3b8aa..3fd48cf 100755 --- a/doc/generate +++ b/doc/generate @@ -3,4 +3,17 @@ if [ -z "$srcdir" ]; then srcdir="."; fi; -exec lyx -e pdf2 "$srcdir/libHX_Documentation.lyx"; +rm -f libHX_Documentation.pdf +lyx -e pdf2 "$srcdir/libHX_Documentation.lyx" || : +# lyx-2.3.2 does not work with texlive-babel-2017.135.3 +# """ +# Package babel Error: You haven't specified a language option. +# ...ry to proceed from here, type x to quit.) +# +# You need to specify a language, either as a global option +# or as an optional argument to the \usepackage command; +# You shouldn't try to proceed form here, type x to quit. +# """ +# babel you so stupid for breaking backward comapt. + +test -e libHX_Documentation.pdf diff --git a/doc/libHX_Documentation.lyx b/doc/libHX_Documentation.lyx index a28f1c6..9e2e9f5 100644 --- a/doc/libHX_Documentation.lyx +++ b/doc/libHX_Documentation.lyx @@ -91,7 +91,7 @@ \begin_body \begin_layout Title -libHX 3.24 +libHX 3.25 \begin_inset Newline newline \end_inset @@ -2620,26 +2620,6 @@ Locators \end_layout \begin_layout LyX-Code - -\series bold -long -\series default - offsetof(type, member); -\begin_inset Index idx -status open - -\begin_layout Plain Layout - -\family typewriter -offsetof -\end_layout - -\end_inset - - -\begin_inset Newline newline -\end_inset - output_type \series bold * @@ -2668,14 +2648,14 @@ containerof \series bold size_t \series default - FIELD_SIZEOF(struct_type, member); + HXsizeof_member(struct_type, member); \begin_inset Index idx status open \begin_layout Plain Layout \family typewriter -FIELD_SIZEOF +HXsizeof_member \end_layout \end_inset @@ -2700,55 +2680,6 @@ HXtypeof_member \end_layout \begin_layout Standard -In case -\family typewriter -offsetof -\family default - and -\family typewriter -containerof -\family default - have not already defined by inclusion of another header file, libHX's defs.h - will define these accessors. - -\family typewriter -offsetof -\family default - is defined in -\family typewriter -stddef.h -\family default - (for C) or -\family typewriter -cstddef -\family default - (C++), but inclusion of these is not necessary if you have included -\family typewriter -defs.h -\family default -. - -\family typewriter -defs.h -\family default - will use GCC's -\family typewriter -__builtin_\SpecialChar softhyphen -offsetof -\family default - if available, which does some extra sanity checks in C++ mode. -\end_layout - -\begin_layout Standard - -\family typewriter -offsetof -\family default - calculates the offset of the specified member in the type, which needs - to be a struct or union. -\end_layout - -\begin_layout Standard \family typewriter containerof @@ -2831,30 +2762,14 @@ struct \begin_layout Standard \family typewriter -FIELD_SIZEOF -\family default - (formerly -\family typewriter HXsizeof_member \family default - -\begin_inset Index idx -status open - -\begin_layout Plain Layout - -\family typewriter -HXsizeof_member -\end_layout - -\end_inset - -) and + and \family typewriter HXtypeof_member \family default - are convenient shortcuts to get the size or type of a named member in a - given struct: + are shortcuts (mainly for the C language) to get the size or type of a + named member in a given struct: \end_layout \begin_layout LyX-Code @@ -2869,6 +2784,18 @@ struct foo, baz)]; \end_layout +\begin_layout Standard +In C++, one can simply use +\family typewriter +sizeof(foo::baz) +\family default + and +\family typewriter +decltype(foo::baz) +\family default +. +\end_layout + \begin_layout Subsection Array size \end_layout @@ -12252,7 +12179,7 @@ HX_split \series bold char ** \series default -HX_split4( +HX_split_inplace( \series bold char * \series default @@ -12277,7 +12204,7 @@ status open \family typewriter \size normal \color none -HX_split4 +HX_split_inplace \end_layout \end_inset @@ -12290,7 +12217,7 @@ HX_split4 \series bold int \series default - HX_split5( + HX_split_fixed( \series bold char * \series default @@ -12306,7 +12233,7 @@ int \series bold char ** \series default -stack); +arr); \begin_inset Index idx status open @@ -12315,7 +12242,7 @@ status open \family typewriter \size normal \color none -HX_split5 +HX_split_fixed \end_layout \end_inset @@ -12456,7 +12383,7 @@ s \begin_layout Description \family typewriter -HX_split4 +HX_split_inplace \family default Split the string \family typewriter @@ -12499,7 +12426,7 @@ HX_split \begin_layout Description \family typewriter -HX_split5 +HX_split_fixed \family default Split the string \family typewriter @@ -12521,7 +12448,7 @@ delimiters The array for the substring pointers must be provided by the user through the \family typewriter -stack +arr \family default argument. @@ -13195,10 +13122,10 @@ Examples \end_layout \begin_layout Subsubsection -Using HX_split5 +Using HX_split_fixed \begin_inset CommandInset label LatexCommand label -name "subsec:string-ex-HX_split5" +name "subsec:string-ex-HX_split_fixed" \end_inset @@ -13208,31 +13135,10 @@ name "subsec:string-ex-HX_split5" \begin_layout Standard \family typewriter -HX_split5 -\family default -, where the -\begin_inset Quotes eld -\end_inset - -5 -\begin_inset Quotes erd -\end_inset - - should be interpreted (with a bit of imagination and the knowledge of leetspeak -) as an -\begin_inset Quotes eld -\end_inset - -S -\begin_inset Quotes erd -\end_inset - - for stack, as -\family typewriter -HX_split5 +HX_split_fixed \family default - is often used only with on-stack variables and where the field count of - interest is fixed, as the example for parsing + is often used just with scoped automatic-storage variables and where the + field count of interest is fixed, as the example for parsing \family typewriter /etc/passwd \family default @@ -13292,7 +13198,7 @@ while \series bold if \series default - (HX_split5(line, ":", ARRAY_SIZE(field), field) < 7) { + (HX_split_fixed(line, ":", ARRAY_SIZE(field), field) < 7) { \begin_inset Newline newline \end_inset @@ -13324,14 +13230,14 @@ n", field[0]); \end_layout \begin_layout Subsubsection -Using HX_split4 +Using HX_split_inplace \end_layout \begin_layout Standard Where the number of fields is not previously known and/or estimatable, but the string can be modified in place, one uses \family typewriter -HX_split4 +HX_split_inplace \family default as follows: \end_layout @@ -13377,7 +13283,7 @@ while \series bold char ** \series default -field = HX_split4(line, ":", NULL, 0); +field = HX_split_inplace(line, ":", NULL, 0); \begin_inset Newline newline \end_inset diff --git a/doc/libHX_Documentation.pdf b/doc/libHX_Documentation.pdf Binary files differindex 1e9db69..673a851 100644 --- a/doc/libHX_Documentation.pdf +++ b/doc/libHX_Documentation.pdf diff --git a/include/libHX/defs.h b/include/libHX/defs.h index 9ecdd32..1ace518 100644 --- a/include/libHX/defs.h +++ b/include/libHX/defs.h @@ -2,23 +2,14 @@ #define _LIBHX_DEFS_H 1 #ifdef __cplusplus -# define FIELD_SIZEOF(type, member) \ - sizeof(static_cast<type *>(NULL)->member) -# define HXsizeof_member(type, member) FIELD_SIZEOF(type, member) -# define HXtypeof_member(type, member) \ - __typeof__(static_cast<type *>(NULL)->member) -# if defined(__GNUC__) && __GNUC__ >= 4 && !defined(offsetof) - /* - * This is here so most programs can skip inclusion - * of stddef.h just to get offsetof. - */ -# define offsetof(type, member) __builtin_offsetof(type, member) -# endif -# ifndef offsetof -# define offsetof(type, member) \ - reinterpret_cast<long>(&(static_cast<type *>(NULL)->member)) +# define HXsizeof_member(type, member) sizeof(type::member) +# if __cplusplus >= 201100L +# define HXtypeof_member(type, member) decltype(type::member) +# else +# define HXtypeof_member(type, member) __typeof__(type::member)) # endif # ifndef containerof +# include <cstddef> # define containerof(var, type, member) reinterpret_cast<type *>( \ reinterpret_cast<char *>(var) - offsetof(type, member)) # endif @@ -139,14 +130,8 @@ static __inline__ new_type signed_cast(unsigned char *expr) # ifndef reinterpret_cast # define reinterpret_cast(type, expr) ((type)(expr)) # endif -# if defined(__GNUC__) && __GNUC__ >= 4 && !defined(offsetof) -# define offsetof(type, member) __builtin_offsetof(type, member) -# endif -# ifndef offsetof -# define offsetof(type, member) \ - reinterpret_cast(long, &(static_cast(type *, NULL)->member)) -# endif # ifndef containerof +# include <stddef.h> # define containerof(var, type, member) reinterpret_cast(type *, \ reinterpret_cast(char *, var) - offsetof(type, member)) # endif diff --git a/include/libHX/libxml_helper.h b/include/libHX/libxml_helper.h index 599ede1..ebe5613 100644 --- a/include/libHX/libxml_helper.h +++ b/include/libHX/libxml_helper.h @@ -6,7 +6,6 @@ #else # include <string.h> #endif -#include <libHX/defs.h> #include <libxml/parser.h> #ifdef __cplusplus diff --git a/include/libHX/misc.h b/include/libHX/misc.h index 3f68917..adebf22 100644 --- a/include/libHX/misc.h +++ b/include/libHX/misc.h @@ -11,8 +11,6 @@ # include <cstdarg> # include <cstdio> #endif -#include <libHX/defs.h> -#include <libHX/io.h> #ifdef __cplusplus extern "C" { diff --git a/include/libHX/string.h b/include/libHX/string.h index f7146b5..4dc4c11 100644 --- a/include/libHX/string.h +++ b/include/libHX/string.h @@ -66,8 +66,10 @@ extern char *HX_dirname(const char *); extern hxmc_t *HX_getl(hxmc_t **, FILE *); extern void *HX_memmem(const void *, size_t, const void *, size_t); extern char **HX_split(const char *, const char *, int *, int); -extern char **HX_split4(char *, const char *, int *, int); -extern int HX_split5(char *, const char *, int, char **); +extern int HX_split_fixed(char *, const char *, int, char **); +extern char **HX_split_inplace(char *, const char *, int *, int); +#define HX_split4(a, b, c, d) HX_split_inplace((a), (b), (c), (d)) +#define HX_split5(a, b, c, d) HX_split_fixed((a), (b), (c), (d)) extern char *HX_strbchr(const char *, const char *, char); extern char *HX_strchr2(const char *, const char *); extern char *HX_strclone(char **, const char *); diff --git a/src/Makefile.am b/src/Makefile.am index 6788ddd..73a6bdb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -13,7 +13,7 @@ libHX_la_SOURCES = deque.c dl.c format.c io.c map.c \ mc.c misc.c opt.c \ rand.c string.c time.c libHX_la_LIBADD = ${libdl_LIBS} ${libpthread_LIBS} ${librt_LIBS} -libHX_la_LDFLAGS = -no-undefined -version-info 31:0:3 +libHX_la_LDFLAGS = -no-undefined -version-info 32:0:0 if WITH_GNU_LD libHX_la_LDFLAGS += -Wl,--version-script=${srcdir}/libHX.map endif diff --git a/src/Makefile.in b/src/Makefile.in index fd611ca..632d4ab 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -738,7 +738,7 @@ lib_LTLIBRARIES = libHX.la $(am__append_1) libHX_la_SOURCES = deque.c dl.c format.c io.c map.c mc.c misc.c opt.c \ rand.c string.c time.c $(am__append_3) $(am__append_4) libHX_la_LIBADD = ${libdl_LIBS} ${libpthread_LIBS} ${librt_LIBS} -libHX_la_LDFLAGS = -no-undefined -version-info 31:0:3 $(am__append_2) +libHX_la_LDFLAGS = -no-undefined -version-info 32:0:0 $(am__append_2) EXTRA_libHX_la_DEPENDENCIES = libHX.map libHX_rtcheck_la_SOURCES = rtcheck.c libHX_rtcheck_la_LIBADD = ${libdl_LIBS} diff --git a/src/internal.h b/src/internal.h index 83d2b9c..d348520 100644 --- a/src/internal.h +++ b/src/internal.h @@ -54,10 +54,4 @@ struct timeval; extern hxmc_t *HXparse_dequote_fmt(const char *, const char *, const char **); -/* time.c - these are obsolete, but kept for ABI */ -extern void HX_diff_timespec(struct timespec *, const struct timespec *, - const struct timespec *); -extern void HX_diff_timeval(struct timeval *, const struct timeval *, - const struct timeval *); - #endif /* LIBHX_INTERNAL_H */ @@ -13,6 +13,7 @@ #include <limits.h> #include <stdarg.h> #include <stdbool.h> +#include <stddef.h> #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/src/libHX.map b/src/libHX.map index ebd97b2..d5ea9c7 100644 --- a/src/libHX.map +++ b/src/libHX.map @@ -1,6 +1,7 @@ -LIBHX_1.10.0 { +LIBHX_3.25 { global: HX_basename; + HX_basename_exact; HX_chomp; HX_copy_dir; HX_copy_file; @@ -9,33 +10,65 @@ global: HX_dlerror; HX_dlopen; HX_dlsym; + HX_drand; + HX_exit; HX_ffs; + HX_fls; + HX_getl; HX_getopt; HX_getopt_help; + HX_getopt_help_cb; HX_getopt_usage; + HX_getopt_usage_cb; + HX_hexdump; + HX_init; HX_irand; + HX_memmem; + HX_mkdir; HX_rand; + HX_readlink; + HX_realpath; HX_rrmdir; HX_shconfig; HX_shconfig_free; + HX_shconfig_map; HX_shconfig_pv; - HX_split5; HX_split; + HX_split_fixed; + HX_split_inplace; + HX_stpltrim; HX_strbchr; + HX_strchr2; HX_strclone; + HX_strdup; + HX_strlcat; + HX_strlcpy; + HX_strlncat; HX_strlower; HX_strltrim; HX_strmid; + HX_strndup; + HX_strnlen; + HX_strquote; HX_strrcspn; HX_strrev; HX_strrtrim; HX_strsep2; HX_strsep; HX_strupper; + HX_time_compare; + HX_timespec_add; + HX_timespec_isneg; + HX_timespec_mul; + HX_timespec_mulf; + HX_timespec_neg; + HX_timespec_sub; + HX_timeval_sub; HX_zvecfree; HXdeque_del; HXdeque_find; HXdeque_free; + HXdeque_genocide2; HXdeque_get; HXdeque_init; HXdeque_move; @@ -47,151 +80,49 @@ global: HXdir_close; HXdir_open; HXdir_read; -local: - *; -}; - -LIBHX_1.25 { -global: - HX_getl; - HXmc_free; - HXmc_length; - HXmc_memcat; - HXmc_memcpy; - HXmc_memdel; - HXmc_meminit; - HXmc_memins; - HXmc_mempcat; - HXmc_strcat; - HXmc_strcpy; - HXmc_strinit; - HXmc_strins; - HXmc_strpcat; - HXmc_trunc; -} LIBHX_1.10.0; - -LIBHX_1.26 { -global: - HX_hexdump; - HX_time_compare; -} LIBHX_1.25; - -LIBHX_2.0 { -global: - HXmc_setlen; -} LIBHX_1.26; - -LIBHX_2.2 { -global: - HX_split4; - HXproc_run_async; - HXproc_run_sync; - HXproc_wait; -} LIBHX_2.0; - -LIBHX_2.6 { -global: - HX_fls; -} LIBHX_2.2; - -LIBHX_2.9 { -global: - HX_basename_exact; -} LIBHX_2.6; - -LIBHX_3.0 { -global: - HX_diff_timespec; - HX_diff_timeval; HXformat_add; + HXformat_aprintf; + HXformat_fprintf; HXformat_free; HXformat_init; + HXformat_sprintf; HXhash_djb2; HXhash_jlookup3; HXhash_jlookup3s; HXhash_primes; + HXio_fullread; + HXio_fullwrite; HXmap_add; HXmap_del; HXmap_find; HXmap_free; HXmap_get; + HXmap_init5; + HXmap_init; HXmap_keysvalues; HXmap_qfe; HXmap_traverse; HXmap_travfree; HXmap_travinit; -} LIBHX_2.9; - -LIBHX_3.2 { -global: - HX_strquote; -} LIBHX_3.0; - -LIBHX_3.3 { -global: - HX_drand; - HX_shconfig_map; - HXdeque_genocide2; + HXmc_free; + HXmc_length; + HXmc_memcat; + HXmc_memcpy; + HXmc_memdel; + HXmc_meminit; + HXmc_memins; + HXmc_mempcat; + HXmc_setlen; + HXmc_strcat; + HXmc_strcpy; + HXmc_strinit; + HXmc_strins; + HXmc_strpcat; + HXmc_trunc; HXmc_zvecfree; -} LIBHX_3.2; - -LIBHX_3.4 { -global: - HX_exit; - HX_init; - HX_memmem; -} LIBHX_3.3; - -LIBHX_3.9 { -global: - HXio_fullread; - HXio_fullwrite; -} LIBHX_3.4; - -LIBHX_3.10 { -global: - HX_readlink; - HX_realpath; -} LIBHX_3.9; - -LIBHX_3.12 { -global: - HX_getopt_help_cb; - HX_getopt_usage_cb; - HX_mkdir; - HX_strdup; - HX_strlcat; - HX_strlcpy; - HX_strlncat; - HX_strndup; - HX_strnlen; - HXformat_aprintf; - HXformat_fprintf; - HXformat_sprintf; - HXmap_init5; - HXmap_init; -} LIBHX_3.10; - -# ABI 29 -LIBHX_3.13 { -global: - HX_timespec_add; - HX_timespec_isneg; - HX_timespec_mul; - HX_timespec_mulf; - HX_timespec_neg; - HX_timespec_sub; - HX_timeval_sub; -} LIBHX_3.12; - -# ABI 30 -LIBHX_3.15 { -global: - HX_strchr2; -} LIBHX_3.13; - -# ABI 31 -LIBHX_3.18 { -global: - HX_stpltrim; -} LIBHX_3.15; + HXproc_run_async; + HXproc_run_sync; + HXproc_wait; +local: + *; +}; @@ -1236,7 +1236,7 @@ static struct HXrbnode *HXrbtrav_rewalk(struct HXrbtrav *trav) } else { /* Search for the specific node to rebegin traversal at. */ const struct HXrbnode *newpath[RBT_MAXDEP]; - unsigned char newdir[RBT_MAXDEP]; + unsigned char newdir[RBT_MAXDEP] = {}; int newdepth = 0, res; bool found = false; @@ -82,6 +82,8 @@ EXPORT_SYMBOL void HX_hexdump(FILE *fp, const void *vptr, unsigned int len) EXPORT_SYMBOL void HX_zvecfree(char **args) { char **travp; + if (args == NULL) + return; for (travp = args; *travp != NULL; ++travp) free(*travp); free(args); diff --git a/src/rtcheck.c b/src/rtcheck.c index d9f623c..6f04baa 100644 --- a/src/rtcheck.c +++ b/src/rtcheck.c @@ -153,12 +153,8 @@ stub3(HX_timespec_mulf, (struct timespec *a, const struct timespec *b, stub2(HX_timespec_neg, (struct timespec *a, const struct timespec *b)); stub3(HX_timespec_sub, (struct timespec *a, const struct timespec *b, const struct timespec *c)); -stub3(HX_diff_timespec, (struct timespec *a, const struct timespec *b, - const struct timespec *c)); stub3(HX_timeval_sub, (struct timeval *a, const struct timeval *b, const struct timeval *c)); -stub3(HX_diff_timeval, (struct timeval *a, const struct timeval *b, - const struct timeval *c)); stub3(HX_time_compare, (const struct stat *a, const struct stat *b, char c)); stub1v(HX_zvecfree, (char **a)); @@ -255,8 +251,8 @@ stub1(HX_dirname, (const char *a)); stub2(HX_getl, (hxmc_t **a, FILE *b)); stub4(HX_memmem, (const void *a, size_t b, const void *c, size_t d)); stub4(HX_split, (const char *a, const char *b, int *c, int d)); -stub4(HX_split4, (char *a, const char *b, int *c, int d)); -stub4(HX_split5, (char *a, const char *b, int c, char **d)); +stub4(HX_split_inplace, (char *a, const char *b, int *c, int d)); +stub4(HX_split_fixed, (char *a, const char *b, int c, char **d)); stub1(HX_stpltrim, (const char *a)); stub1(HX_stprtrim, (char *a)); stub3(HX_strbchr, (const char *a, const char *b, char c)); diff --git a/src/string.c b/src/string.c index 2761276..354a409 100644 --- a/src/string.c +++ b/src/string.c @@ -232,7 +232,7 @@ EXPORT_SYMBOL char **HX_split(const char *str, const char *delim, return ret; } -EXPORT_SYMBOL char **HX_split4(char *s, const char *delim, int *fld, int max) +EXPORT_SYMBOL char **HX_split_inplace(char *s, const char *delim, int *fld, int max) { char **stk; const char *p = s; @@ -248,22 +248,22 @@ EXPORT_SYMBOL char **HX_split4(char *s, const char *delim, int *fld, int max) if (stk == NULL) return NULL; stk[count] = NULL; - count = HX_split5(s, delim, count, stk); + count = HX_split_fixed(s, delim, count, stk); if (fld != NULL) *fld = count; return stk; } -EXPORT_SYMBOL int HX_split5(char *s, const char *delim, int max, char **stk) +EXPORT_SYMBOL int HX_split_fixed(char *s, const char *delim, int max, char **stk) { /* - * HX_split5 - the "stack split" (we try to avoid using the heap): + * HX_split_fixed - the "stack split" (we try to avoid using the heap): * Split @s (modifies it, so must be writable!) at @delim with at most * @max fields and putting the results into @stk[0..@max-1]. * * Example on @max: * char *stk[max]; - * HX_split5(s, delim, max, stk); + * HX_split_fixed(s, delim, max, stk); */ int i = 0; char *p; @@ -336,6 +336,8 @@ EXPORT_SYMBOL char *HX_strlcat(char *dest, const char *src, size_t len) EXPORT_SYMBOL char *HX_strlcpy(char *dest, const char *src, size_t n) { + if (n == 0) + return dest; strncpy(dest, src, n); dest[n-1] = '\0'; return dest; diff --git a/src/tc-dir.c b/src/tc-dir.c index b87517a..d2e3885 100644 --- a/src/tc-dir.c +++ b/src/tc-dir.c @@ -13,6 +13,7 @@ # include <cstdlib> #endif #include <libHX/init.h> +#include <libHX/io.h> #include <libHX/misc.h> static void lookatdir(const char *dname) diff --git a/src/tc-link.c b/src/tc-link.c index e508ca9..f20bfd7 100644 --- a/src/tc-link.c +++ b/src/tc-link.c @@ -95,8 +95,8 @@ static void *funcs[] = { HX_getl, HX_memmem, HX_split, - HX_split4, - HX_split5, + HX_split_fixed, + HX_split_inplace, HX_stpltrim, HX_strbchr, HX_strchr2, @@ -117,12 +117,6 @@ static void *funcs[] = { HX_strsep2, HX_strquote, HX_strupper, -#ifdef HAVE_STRUCT_TIMEVAL_TV_USEC - HX_diff_timeval, -#endif -#ifdef HAVE_STRUCT_TIMESPEC_TV_NSEC - HX_diff_timespec, -#endif HX_time_compare, #ifdef HAVE_STRUCT_TIMESPEC_TV_NSEC HX_timespec_add, diff --git a/src/tc-memmem.c b/src/tc-memmem.c index 9c59c7f..342500f 100644 --- a/src/tc-memmem.c +++ b/src/tc-memmem.c @@ -9,6 +9,7 @@ #include <stdio.h> #include <stdlib.h> #include <time.h> +#include <libHX/defs.h> #include <libHX/init.h> #include <libHX/misc.h> #include <libHX/string.h> diff --git a/src/tc-string.c b/src/tc-string.c index 112a845..6e85f66 100644 --- a/src/tc-string.c +++ b/src/tc-string.c @@ -160,8 +160,8 @@ static void t_split(void) memcpy(t2, t1, sizeof(t1)); a0 = HX_split(t1, ":", &f0, 0); - a1 = HX_split4(t1, ":", &f1, 0); - f2 = HX_split5(t2, ":", ARRAY_SIZE(a2), a2); + a1 = HX_split_inplace(t1, ":", &f1, 0); + f2 = HX_split_fixed(t2, ":", ARRAY_SIZE(a2), a2); /* complete allocation */ printf("HX_split1: a0[%p]:", a0); @@ -170,7 +170,7 @@ static void t_split(void) printf("\n"); /* array allocated */ - printf("HX_split4: a1[%p]:", a1); + printf("HX_split_inplace: a1[%p]:", a1); for (wp = a1; *wp != NULL; ++wp) printf(" %s[%p]", *wp, *wp); printf("\n"); @@ -202,6 +202,8 @@ extern char *f_strlcpy_mem(char *, const char *, size_t); EXPORT_SYMBOL char *f_strlcpy_str(char *d, const char *s, size_t n) { + if (n == 0) + return d; strncpy(d, s, n); d[n-1] = '\0'; return d; @@ -279,6 +281,13 @@ static void t_strlcpy(void) } } +static void t_strlcpy2(void) +{ + char a[3] = {49, 49, 49}; + HX_strlcpy(&a[1], &a[1], 0); + assert(a[0] == 49 && a[0] == a[1] && a[1] == a[2]); +} + int main(int argc, const char **argv) { hxmc_t *tx = NULL; @@ -308,6 +317,7 @@ int main(int argc, const char **argv) t_split(); t_split2(); t_strlcpy(); + t_strlcpy2(); HXmc_free(tx); HX_exit(); return EXIT_SUCCESS; @@ -81,12 +81,6 @@ EXPORT_SYMBOL struct timespec *HX_timespec_sub(struct timespec *r, return HX_timespec_add(r, a, HX_timespec_neg(&b2, b)); } -EXPORT_SYMBOL void HX_diff_timespec(struct timespec *delta, - const struct timespec *future, const struct timespec *past) -{ - HX_timespec_sub(delta, future, past); -} - EXPORT_SYMBOL struct timespec * HX_timespec_mul(struct timespec *r, const struct timespec *a, int f) { @@ -141,12 +135,6 @@ EXPORT_SYMBOL struct timeval *HX_timeval_sub(struct timeval *delta, } return delta; } - -EXPORT_SYMBOL void HX_diff_timeval(struct timeval *delta, - const struct timeval *future, const struct timeval *past) -{ - HX_timeval_sub(delta, future, past); -} #endif EXPORT_SYMBOL long HX_time_compare(const struct stat *a, @@ -210,6 +198,17 @@ EXPORT_SYMBOL long HX_time_compare(const struct stat *a, return a->st_atime - b->st_atime; else if (sel == 'c') return a->st_ctime - b->st_ctime; +#elif defined(HAVE_STRUCT_STAT_ST_MTIM) + if (sel == 'm') + return a->st_mtim - b->st_mtim; +#ifdef HAVE_STRUCT_STAT_ST_OTIM + else if (sel == 'o') + return a->st_otim - b->st_otim; +#endif + else if (sel == 'a') + return a->st_atim - b->st_atim; + else if (sel == 'c') + return a->st_ctim - b->st_ctim; #else # error Tis not ending well. #endif |