diff -Nru mpg123-1.32.5/NEWS mpg123-1.32.6/NEWS --- mpg123-1.32.5/NEWS 2024-02-17 09:14:49.000000000 +0000 +++ mpg123-1.32.6/NEWS 2024-04-04 17:28:50.000000000 +0000 @@ -1,3 +1,12 @@ +1.32.6 +------ +- build: Detect forced 64 bit offsets on a dual-mode system that used + to default to 32 bits and drop ambiguous suffix-less symbols in that + case. This avoids subtle ABI breakage (causing memory corruption) + with existing binaries and instead has them fail during runtime linking. + You trigger that when having -D_FILE_OFFSET_BITS=64 in your compiler + flags during mpg123 build. + 1.32.5 ------ diff -Nru mpg123-1.32.5/configure mpg123-1.32.6/configure --- mpg123-1.32.5/configure 2024-02-17 09:15:45.000000000 +0000 +++ mpg123-1.32.6/configure 2024-04-04 17:29:31.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for mpg123 1.32.5. +# Generated by GNU Autoconf 2.71 for mpg123 1.32.6. # # Report bugs to . # @@ -621,8 +621,8 @@ # Identity of this package. PACKAGE_NAME='mpg123' PACKAGE_TARNAME='mpg123' -PACKAGE_VERSION='1.32.5' -PACKAGE_STRING='mpg123 1.32.5' +PACKAGE_VERSION='1.32.6' +PACKAGE_STRING='mpg123 1.32.6' PACKAGE_BUGREPORT='maintainer@mpg123.org' PACKAGE_URL='' @@ -1727,7 +1727,7 @@ # 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 mpg123 1.32.5 to adapt to many kinds of systems. +\`configure' configures mpg123 1.32.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1798,7 +1798,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of mpg123 1.32.5:";; + short | recursive ) echo "Configuration of mpg123 1.32.6:";; esac cat <<\_ACEOF @@ -2076,7 +2076,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -mpg123 configure 1.32.5 +mpg123 configure 1.32.6 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2621,7 +2621,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by mpg123 $as_me 1.32.5, which was +It was created by mpg123 $as_me 1.32.6, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3991,7 +3991,7 @@ # Define the identity of the package. PACKAGE='mpg123' - VERSION='1.32.5' + VERSION='1.32.6' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -17440,8 +17440,19 @@ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $switched_off_size" >&5 printf "%s\n" "$switched_off_size" >&6; } -# If you have predefined _FILE_OFFSET_BITS, I will treat that as a system -# property. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking unswitched off_t size" >&5 +printf %s "checking unswitched off_t size... " >&6; } +if ac_fn_c_compute_int "$LINENO" "sizeof(off_t)" "unswitched_off_size" " +#undef _FILE_OFFSET_BITS +#include +" +then : + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unswitched_off_size" >&5 +printf "%s\n" "$unswitched_off_size" >&6; } +# Now the size without meddling, possibly enforced to 64 bits by system settings. # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. @@ -17501,6 +17512,18 @@ lfs_sensitive=no fi +forced_off_64=no +if test "x$unswitched_off_size" != "x$ac_cv_sizeof_off_t"; then + if test "x$ac_cv_sizeof_off_t" = x8; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Detected system with enforced 64 bit offsets, dropping suffixless symbols for uncryptic ABI breakage." >&5 +printf "%s\n" "$as_me: Detected system with enforced 64 bit offsets, dropping suffixless symbols for uncryptic ABI breakage." >&6;} + +printf "%s\n" "#define FORCED_OFF_64 1" >>confdefs.h + + forced_off_64=yes + fi +fi + use_largefile=auto { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if native off_t is already 64 bits" >&5 @@ -22430,7 +22453,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by mpg123 $as_me 1.32.5, which was +This file was extended by mpg123 $as_me 1.32.6, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22498,7 +22521,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -mpg123 config.status 1.32.5 +mpg123 config.status 1.32.6 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" @@ -24229,8 +24252,16 @@ echo " largefile sensitive ..... $lfs_sensitive" echo " default offsets ......... $default_offset_bits" echo " explicit 64 bit offsets . $use_largefile" +echo " forced 64 bit offsets ... $forced_off_64" echo " only portable API ....... $portable_api" +if test "x$forced_off_64" = xyes; then + echo + echo "Note: Ensure that client programs are built with _FILE_OFFSET_BITS defined to 64, too." + echo " Old binaries built for 32 bit off_t may fail missing symbols in mpg123 libraries." + echo +fi + echo " Core libmpg123 features: Layer I ................. $layer1 diff -Nru mpg123-1.32.5/configure.ac mpg123-1.32.6/configure.ac --- mpg123-1.32.5/configure.ac 2024-02-17 09:14:50.000000000 +0000 +++ mpg123-1.32.6/configure.ac 2024-04-04 17:28:50.000000000 +0000 @@ -1355,8 +1355,13 @@ #include ]) AC_MSG_RESULT([$switched_off_size]) -# If you have predefined _FILE_OFFSET_BITS, I will treat that as a system -# property. +AC_MSG_CHECKING([unswitched off_t size]) +AC_COMPUTE_INT(unswitched_off_size, sizeof(off_t), [ +#undef _FILE_OFFSET_BITS +#include +]) +AC_MSG_RESULT([$unswitched_off_size]) +# Now the size without meddling, possibly enforced to 64 bits by system settings. AC_CHECK_SIZEOF(off_t, [], [ #include ]) @@ -1381,6 +1386,15 @@ lfs_sensitive=no fi +forced_off_64=no +if test "x$unswitched_off_size" != "x$ac_cv_sizeof_off_t"; then + if test "x$ac_cv_sizeof_off_t" = x8; then + AC_MSG_NOTICE([Detected system with enforced 64 bit offsets, dropping suffixless symbols for uncryptic ABI breakage.]) + AC_DEFINE([FORCED_OFF_64], 1, [System setup enforces 64 bit offsets where 32 bit would be native.]) + forced_off_64=yes + fi +fi + use_largefile=auto AC_MSG_CHECKING([if native off_t is already 64 bits]) @@ -2969,8 +2983,16 @@ echo " largefile sensitive ..... $lfs_sensitive" echo " default offsets ......... $default_offset_bits" echo " explicit 64 bit offsets . $use_largefile" +echo " forced 64 bit offsets ... $forced_off_64" echo " only portable API ....... $portable_api" +if test "x$forced_off_64" = xyes; then + echo + echo "Note: Ensure that client programs are built with _FILE_OFFSET_BITS defined to 64, too." + echo " Old binaries built for 32 bit off_t may fail missing symbols in mpg123 libraries." + echo +fi + echo " Core libmpg123 features: Layer I ................. $layer1 diff -Nru mpg123-1.32.5/debian/changelog mpg123-1.32.6/debian/changelog --- mpg123-1.32.5/debian/changelog 2024-04-03 18:29:56.000000000 +0000 +++ mpg123-1.32.6/debian/changelog 2024-04-08 21:05:29.000000000 +0000 @@ -1,24 +1,30 @@ -mpg123 (1.32.5-1ubuntu1) noble; urgency=medium +mpg123 (1.32.6-3) unstable; urgency=medium - [ Steve Langasek ] - * Rename libraries for 64-bit time_t transition. (Closes: #1063140) + * debian/*.symbols: Fix architectures (Closes: #1068623) + Thanks to Christian Marillat. + * debian/control: Bump Standards-Version - [ Simon Chopin ] - * Only include 32bit compat symbols on i386 arches (Closes: #1067562) + -- Sebastian Ramacher Mon, 08 Apr 2024 23:05:29 +0200 - -- Simon Chopin Wed, 03 Apr 2024 20:29:56 +0200 +mpg123 (1.32.6-2) unstable; urgency=medium -mpg123 (1.32.5-1build2) noble; urgency=medium + * debian/: Fix symbols on armel and armhf + * debian/rules: Use upstream recommended CPU settings for arm* architectures - * No-change rebuild for CVE-2024-3094 + -- Sebastian Ramacher Fri, 05 Apr 2024 23:23:43 +0200 - -- Steve Langasek Sun, 31 Mar 2024 08:08:02 +0000 +mpg123 (1.32.6-1) unstable; urgency=medium -mpg123 (1.32.5-1build1) noble; urgency=medium + [ Sebastian Ramacher ] + * New upstream version 1.32.6 - * No-change rebuild against libasound2t64 + [ Steve Langasek ] + * Rename libraries for 64-bit time_t transition. (Closes: #1063140) + + [ Simon Chopin ] + * Only include 32bit compat symbols on i386 arches (Closes: #1067562) - -- Steve Langasek Tue, 12 Mar 2024 06:39:44 +0000 + -- Sebastian Ramacher Fri, 05 Apr 2024 13:31:38 +0200 mpg123 (1.32.5-1) unstable; urgency=medium diff -Nru mpg123-1.32.5/debian/control mpg123-1.32.6/debian/control --- mpg123-1.32.5/debian/control 2024-04-03 18:20:46.000000000 +0000 +++ mpg123-1.32.6/debian/control 2024-04-08 21:05:14.000000000 +0000 @@ -1,13 +1,13 @@ Source: mpg123 Section: sound Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Debian Multimedia Maintainers +Maintainer: Debian Multimedia Maintainers Uploaders: Reinhard Tartler , Miguel A. Colón Vélez , Sebastian Ramacher Build-Depends: + dpkg-dev (>= 1.22.5), debhelper-compat (= 13), libasound2-dev [linux-any], libaudio-dev, @@ -17,7 +17,7 @@ libpulse-dev [!hurd-i386], pkgconf, portaudio19-dev -Standards-Version: 4.6.2 +Standards-Version: 4.7.0 Homepage: http://mpg123.org/ Vcs-Git: https://salsa.debian.org/multimedia-team/mpg123.git Vcs-Browser: https://salsa.debian.org/multimedia-team/mpg123 diff -Nru mpg123-1.32.5/debian/libmpg123-0t64.symbols mpg123-1.32.6/debian/libmpg123-0t64.symbols --- mpg123-1.32.5/debian/libmpg123-0t64.symbols 2024-04-03 18:28:03.000000000 +0000 +++ mpg123-1.32.6/debian/libmpg123-0t64.symbols 2024-04-08 20:52:08.000000000 +0000 @@ -8,7 +8,6 @@ mpg123_current_decoder@Base 1.7.2 mpg123_decode@Base 1.6.2 mpg123_decode_frame64@Base 1.32.3 - mpg123_decode_frame@Base 1.6.2 mpg123_decode_frame_64@Base 1.13.7 mpg123_decoder@Base 1.6.2 mpg123_decoders@Base 1.6.2 @@ -30,7 +29,6 @@ mpg123_feature@Base 1.10.0 mpg123_feed@Base 1.6.2 mpg123_feedseek64@Base 1.32.3 - mpg123_feedseek@Base 1.6.2 mpg123_feedseek_64@Base 1.13.7 mpg123_fmt2@Base 1.26.0 mpg123_fmt@Base 1.6.2 @@ -43,15 +41,12 @@ mpg123_format_none@Base 1.6.2 mpg123_format_support@Base 1.6.2 mpg123_framebyframe_decode64@Base 1.32.3 - mpg123_framebyframe_decode@Base 1.10.0 mpg123_framebyframe_decode_64@Base 1.13.7 mpg123_framebyframe_next@Base 1.10.0 mpg123_framedata@Base 1.14.0 mpg123_framelength64@Base 1.32.3 - mpg123_framelength@Base 1.23.8 mpg123_framelength_64@Base 1.23.8 mpg123_framepos64@Base 1.32.3 - mpg123_framepos@Base 1.14.0 mpg123_framepos_64@Base 1.14.0 mpg123_free@Base 1.26.0 mpg123_free_string@Base 1.6.2 @@ -72,14 +67,12 @@ mpg123_id3@Base 1.6.2 mpg123_id3_raw@Base 1.26.0 mpg123_index64@Base 1.32.3 - mpg123_index@Base 1.6.2 mpg123_index_64@Base 1.13.7 mpg123_info2@Base 1.28.0 mpg123_info@Base 1.6.2 mpg123_init@Base 1.6.2 mpg123_init_string@Base 1.6.2 mpg123_length64@Base 1.32.3 - mpg123_length@Base 1.6.2 mpg123_length_64@Base 1.13.7 mpg123_libversion@Base 1.32.3 mpg123_meta_check@Base 1.6.2 @@ -88,14 +81,10 @@ mpg123_new@Base 1.6.2 mpg123_new_pars@Base 1.6.2 mpg123_new_string@Base 1.26.0 - mpg123_open@Base 1.6.2 mpg123_open_64@Base 1.13.7 - mpg123_open_fd@Base 1.6.2 mpg123_open_fd_64@Base 1.13.7 mpg123_open_feed@Base 1.6.2 - mpg123_open_fixed@Base 1.26.0 mpg123_open_fixed_64@Base 1.26.0 - mpg123_open_handle@Base 1.12.1 mpg123_open_handle_64@Base 1.13.7 mpg123_outblock@Base 1.6.2 mpg123_par2@Base 1.28.0 @@ -105,15 +94,12 @@ mpg123_parnew@Base 1.6.2 mpg123_plain_strerror@Base 1.6.2 mpg123_position64@Base 1.32.3 - mpg123_position@Base 1.6.2 mpg123_position_64@Base 1.13.7 mpg123_rates@Base 1.6.2 mpg123_read@Base 1.6.2 mpg123_reader64@Base 1.32.3 mpg123_replace_buffer@Base 1.6.2 - mpg123_replace_reader@Base 1.6.2 mpg123_replace_reader_64@Base 1.13.7 - mpg123_replace_reader_handle@Base 1.12.1 mpg123_replace_reader_handle_64@Base 1.13.7 mpg123_reset_eq@Base 1.6.2 mpg123_resize_string@Base 1.6.2 @@ -121,16 +107,12 @@ mpg123_same_string@Base 1.26.0 mpg123_scan@Base 1.6.2 mpg123_seek64@Base 1.32.3 - mpg123_seek@Base 1.6.2 mpg123_seek_64@Base 1.13.7 mpg123_seek_frame64@Base 1.32.3 - mpg123_seek_frame@Base 1.6.2 mpg123_seek_frame_64@Base 1.13.7 mpg123_set_filesize64@Base 1.32.3 - mpg123_set_filesize@Base 1.6.2 mpg123_set_filesize_64@Base 1.13.7 mpg123_set_index64@Base 1.32.3 - mpg123_set_index@Base 1.10.0 mpg123_set_index_64@Base 1.13.7 mpg123_set_moreinfo@Base 1.26.0 mpg123_set_string@Base 1.6.2 @@ -142,19 +124,16 @@ mpg123_strlen@Base 1.13.7 mpg123_supported_decoders@Base 1.6.2 mpg123_tell64@Base 1.32.3 - mpg123_tell@Base 1.6.2 mpg123_tell_64@Base 1.13.7 mpg123_tell_stream64@Base 1.32.3 - mpg123_tell_stream@Base 1.6.2 mpg123_tell_stream_64@Base 1.13.7 mpg123_tellframe64@Base 1.32.3 - mpg123_tellframe@Base 1.6.2 mpg123_tellframe_64@Base 1.13.7 mpg123_timeframe64@Base 1.32.3 - mpg123_timeframe@Base 1.6.2 mpg123_timeframe_64@Base 1.13.7 mpg123_tpf@Base 1.6.2 mpg123_volume@Base 1.6.2 mpg123_volume_change@Base 1.6.2 mpg123_volume_change_db@Base 1.30.0 (arch=i386 hurd-i386)#include "libmpg123-0t64.symbols.32bit.in" +(arch=!armel !armhf !hppa !mipsel !powerpc !m68k !sh4 !x32)#include "libmpg123-0t64.symbols.t64.in" diff -Nru mpg123-1.32.5/debian/libmpg123-0t64.symbols.t64.in mpg123-1.32.6/debian/libmpg123-0t64.symbols.t64.in --- mpg123-1.32.5/debian/libmpg123-0t64.symbols.t64.in 1970-01-01 00:00:00.000000000 +0000 +++ mpg123-1.32.6/debian/libmpg123-0t64.symbols.t64.in 2024-04-05 21:07:28.000000000 +0000 @@ -0,0 +1,22 @@ + mpg123_decode_frame@Base 1.6.2 + mpg123_feedseek@Base 1.6.2 + mpg123_framebyframe_decode@Base 1.10.0 + mpg123_framelength@Base 1.23.8 + mpg123_framepos@Base 1.14.0 + mpg123_index@Base 1.6.2 + mpg123_length@Base 1.6.2 + mpg123_open@Base 1.6.2 + mpg123_open_fd@Base 1.6.2 + mpg123_open_fixed@Base 1.26.0 + mpg123_open_handle@Base 1.12.1 + mpg123_position@Base 1.6.2 + mpg123_replace_reader@Base 1.6.2 + mpg123_replace_reader_handle@Base 1.12.1 + mpg123_seek@Base 1.6.2 + mpg123_seek_frame@Base 1.6.2 + mpg123_set_filesize@Base 1.6.2 + mpg123_set_index@Base 1.10.0 + mpg123_tell@Base 1.6.2 + mpg123_tell_stream@Base 1.6.2 + mpg123_tellframe@Base 1.6.2 + mpg123_timeframe@Base 1.6.2 diff -Nru mpg123-1.32.5/debian/libsyn123-0t64.symbols mpg123-1.32.6/debian/libsyn123-0t64.symbols --- mpg123-1.32.5/debian/libsyn123-0t64.symbols 2024-04-03 18:28:54.000000000 +0000 +++ mpg123-1.32.6/debian/libsyn123-0t64.symbols 2024-04-08 20:52:39.000000000 +0000 @@ -32,14 +32,14 @@ syn123_resample_incount@Base 1.26.0 syn123_resample_inexpect@Base 1.26.0 syn123_resample_intotal64@Base 1.32.3 - syn123_resample_intotal@Base 1.26.2 + (arch=!armel !armhf !hppa !mipsel !powerpc !m68k !sh4 !x32)syn123_resample_intotal@Base 1.26.2 (arch=i386 hurd-i386)syn123_resample_intotal_32@Base 1.26.2 syn123_resample_intotal_64@Base 1.26.0 syn123_resample_maxincount@Base 1.26.0 syn123_resample_maxrate@Base 1.26.0 syn123_resample_out@Base 1.32.3 syn123_resample_total64@Base 1.32.3 - syn123_resample_total@Base 1.26.2 + (arch=!armel !armhf !hppa !mipsel !powerpc !m68k !sh4 !x32)syn123_resample_total@Base 1.26.2 (arch=i386 hurd-i386)syn123_resample_total_32@Base 1.26.2 syn123_resample_total_64@Base 1.26.0 syn123_setup_filter@Base 1.26.0 diff -Nru mpg123-1.32.5/debian/rules mpg123-1.32.6/debian/rules --- mpg123-1.32.5/debian/rules 2024-04-03 18:18:35.000000000 +0000 +++ mpg123-1.32.6/debian/rules 2024-04-08 21:05:14.000000000 +0000 @@ -13,7 +13,9 @@ endif CONF_i386:=--with-cpu=x86_dither -CONF_arm:=--with-cpu=generic_fpu +CONF_armel:=--with-cpu=arm_nofpu +CONF_armhf:=--with-cpu=arm_fpu +CONF_arm64:=--with-cpu=aarch64 mpg123-%: debian/mpg123-wrapper.in dh_testdir @@ -26,7 +28,7 @@ --enable-shared \ --enable-lfs-alias \ --includedir=\$${prefix}/include/$(DEB_HOST_MULTIARCH) \ - $(CONF_$(DEB_HOST_ARCH_CPU)) + $(CONF_$(DEB_HOST_ARCH)) override_dh_auto_clean: dh_auto_clean diff -Nru mpg123-1.32.5/mpg123.spec mpg123-1.32.6/mpg123.spec --- mpg123-1.32.5/mpg123.spec 2024-02-17 09:15:54.000000000 +0000 +++ mpg123-1.32.6/mpg123.spec 2024-04-04 17:49:12.000000000 +0000 @@ -3,7 +3,7 @@ # - devel packages for alsa, sdl, etc... to build the respective output modules. Summary: The fast console mpeg audio decoder/player. Name: mpg123 -Version: 1.32.5 +Version: 1.32.6 Release: 1 URL: http://www.mpg123.org/ License: GPL diff -Nru mpg123-1.32.5/src/config.h.in mpg123-1.32.6/src/config.h.in --- mpg123-1.32.5/src/config.h.in 2024-02-17 09:15:45.000000000 +0000 +++ mpg123-1.32.6/src/config.h.in 2024-04-04 17:29:32.000000000 +0000 @@ -37,6 +37,9 @@ /* Define if FIFO support is enabled. */ #undef FIFO +/* System setup enforces 64 bit offsets where 32 bit would be native. */ +#undef FORCED_OFF_64 + /* Define if frame index should be used. */ #undef FRAME_INDEX diff -Nru mpg123-1.32.5/src/genre.c mpg123-1.32.6/src/genre.c --- mpg123-1.32.5/src/genre.c 2024-02-17 09:14:49.000000000 +0000 +++ mpg123-1.32.6/src/genre.c 2024-04-04 17:28:51.000000000 +0000 @@ -6,6 +6,9 @@ initially written by Shane Wegner */ +// Just to trigger recompilation on reconfigure (with differing --host). +#include "config.h" + char *genre_table[] = { "Blues", diff -Nru mpg123-1.32.5/src/libmpg123/lfs_wrap.c mpg123-1.32.6/src/libmpg123/lfs_wrap.c --- mpg123-1.32.5/src/libmpg123/lfs_wrap.c 2024-02-17 09:14:49.000000000 +0000 +++ mpg123-1.32.6/src/libmpg123/lfs_wrap.c 2024-04-04 17:28:50.000000000 +0000 @@ -25,7 +25,7 @@ // Only activate the explicit largefile stuff here. The rest of the code shall // work with abstract 64 bit offsets, or just plain default off_t (possibly -// using _FILE_OFFSET_BYTES magic). +// using _FILE_OFFSET_BITS magic). // Note that this macro does not influence normal off_t-using code. #ifdef LFS_LARGEFILE_64 #define _LARGEFILE64_SOURCE @@ -208,10 +208,13 @@ /* After settling the data... start with some simple wrappers. */ // The fist block of wrappers is always present, using the native off_t width. +// (Exception: If explicitly disabled using FORCED_OFF_64.) // A second block mirrors that in case of sizeof(off_t)==4 with _32 suffix. // A third block follows if 64 bit off_t is available with _64 suffix, just aliasing // the int64_t functions. +#ifndef FORCED_OFF_64 + #define OFF_CONV(value, variable, handle) \ if((value) >= OFF_MIN && (value) <= OFF_MAX) \ variable = (off_t)(value); \ @@ -399,6 +402,8 @@ return MPG123_OK; } +#endif // FORCED_OFF_64 + // _32 aliases only for native 32 bit off_t // Will compilers be smart enough to optimize away the extra function call? #if SIZEOF_OFF_T == 4 @@ -523,6 +528,10 @@ #define OFF64 off_t #endif +#ifndef FORCED_OFF_64 +// When 64 bit offsets are enforced, libmpg123.c defines the _64 functions directly. +// There is no actual wrapper work, anyway. + int attribute_align_arg mpg123_open_64(mpg123_handle *mh, const char *path) { return mpg123_open(mh, path); @@ -543,6 +552,8 @@ { return mpg123_open_handle(mh, iohandle); } +#endif + int attribute_align_arg mpg123_framebyframe_decode_64(mpg123_handle *mh, OFF64 *num, unsigned char **audio, size_t *bytes) { @@ -860,6 +871,13 @@ return read(fd, buf, count); } +// In forced 64 bit offset mode, the only definitions of these are +// the _64 ones. +#ifdef FORCED_OFF_64 +#define mpg123_replace_reader mpg123_replace_reader_64 +#define mpg123_replace_reader_handle mpg123_replace_reader_handle_64 +#endif + /* Reader replacement prepares the hidden handle storage for next mpg123_open_fd() or plain mpg123_open(). */ int attribute_align_arg mpg123_replace_reader(mpg123_handle *mh, mpg123_ssize_t (*r_read) (int, void *, size_t), off_t (*r_lseek)(int, off_t, int) ) { @@ -978,6 +996,8 @@ #elif SIZEOF_OFF_T == 8 +// If 64 bit off_t is enforced, libmpg123.c already defines the _64 functions. +#ifndef FORCED_OFF_64 int attribute_align_arg mpg123_replace_reader_64(mpg123_handle *mh, mpg123_ssize_t (*r_read) (int, void *, size_t), off_t (*r_lseek)(int, off_t, int) ) { return mpg123_replace_reader(mh, r_read, r_lseek); @@ -987,5 +1007,6 @@ { return mpg123_replace_reader_handle(mh, r_read, r_lseek, cleanup); } +#endif #endif diff -Nru mpg123-1.32.5/src/libmpg123/libmpg123.c mpg123-1.32.6/src/libmpg123/libmpg123.c --- mpg123-1.32.5/src/libmpg123/libmpg123.c 2024-02-17 09:14:49.000000000 +0000 +++ mpg123-1.32.6/src/libmpg123/libmpg123.c 2024-04-04 17:28:50.000000000 +0000 @@ -560,6 +560,15 @@ } #ifndef PORTABLE_API + +#ifdef FORCED_OFF_64 +// Only _64 symbols for a system-wide enforced _FILE_OFFSET_BITS=64. +#define mpg123_open mpg123_open_64 +#define mpg123_open_fixed mpg123_open_fixed_64 +#define mpg123_open_fd mpg123_open_fd_64 +#define mpg123_open_handle mpg123_open_handle_64 +#endif + /* plain file access, no http! */ int attribute_align_arg mpg123_open(mpg123_handle *mh, const char *path) { @@ -579,7 +588,9 @@ // The convenience function mpg123_open_fixed() wraps over acual mpg123_open // and hence needs to have the exact same code in lfs_wrap.c. The flesh is // in INT123_open_fixed_pre() and INT123_open_fixed_post(), wich are only defined here. -int INT123_open_fixed_pre(mpg123_handle *mh, int channels, int encoding) +// Update: The open routines are just alias calls now, since the conversion to +// int64_t internally. +static int INT123_open_fixed_pre(mpg123_handle *mh, int channels, int encoding) { if(!mh) return MPG123_BAD_HANDLE; @@ -590,7 +601,7 @@ return err; } -int INT123_open_fixed_post(mpg123_handle *mh, int channels, int encoding) +static int INT123_open_fixed_post(mpg123_handle *mh, int channels, int encoding) { if(!mh) return MPG123_BAD_HANDLE; @@ -637,7 +648,7 @@ ret = INT123_open_stream_handle(mh, mh->wrapperdata); return ret; } -#endif +#endif // PORTABLE_API int attribute_align_arg mpg123_open_handle(mpg123_handle *mh, void *iohandle) { diff -Nru mpg123-1.32.5/src/libmpg123/mpg123lib_intern.h mpg123-1.32.6/src/libmpg123/mpg123lib_intern.h --- mpg123-1.32.5/src/libmpg123/mpg123lib_intern.h 2024-02-17 09:14:49.000000000 +0000 +++ mpg123-1.32.6/src/libmpg123/mpg123lib_intern.h 2024-04-04 17:28:50.000000000 +0000 @@ -323,9 +323,6 @@ /* Postprocessing format conversion of freshly decoded buffer. */ void INT123_postprocess_buffer(mpg123_handle *fr); -int INT123_open_fixed_pre(mpg123_handle *mh, int channels, int encoding); -int INT123_open_fixed_post(mpg123_handle *mh, int channels, int encoding); - /* If networking is enabled and we really mean internal networking, the timeout_read function is available. */ #if defined (NETWORK) && !defined (WANT_WIN32_SOCKETS) /* Does not work with win32 */ diff -Nru mpg123-1.32.5/src/libsyn123/resample.c mpg123-1.32.6/src/libsyn123/resample.c --- mpg123-1.32.5/src/libsyn123/resample.c 2024-02-17 09:14:49.000000000 +0000 +++ mpg123-1.32.6/src/libsyn123/resample.c 2024-04-04 17:28:51.000000000 +0000 @@ -2038,8 +2038,10 @@ } #if SIZEOF_OFF_T == 8 +#ifndef FORCED_OFF_64 resample_total_alias(off_t, syn123_resample_total, syn123_resample_total64) resample_total_alias(off_t, syn123_resample_intotal, syn123_resample_intotal64) +#endif resample_total_alias(off_t, syn123_resample_total_64, syn123_resample_total64) resample_total_alias(off_t, syn123_resample_intotal_64, syn123_resample_intotal64) #elif SIZEOF_OFF_T == 4 diff -Nru mpg123-1.32.5/src/tests/plain_id3.c mpg123-1.32.6/src/tests/plain_id3.c --- mpg123-1.32.5/src/tests/plain_id3.c 2024-02-17 09:14:49.000000000 +0000 +++ mpg123-1.32.6/src/tests/plain_id3.c 2024-04-04 17:28:51.000000000 +0000 @@ -1,5 +1,6 @@ /* Just printing out ID3 tags with plain data from libmpg123 and explicitly called conversion routine. */ +#include "config.h" #include "../compat/compat.h" #include #include "../common/debug.h" diff -Nru mpg123-1.32.5/src/tests/resample_total.c mpg123-1.32.6/src/tests/resample_total.c --- mpg123-1.32.5/src/tests/resample_total.c 2024-02-17 09:14:49.000000000 +0000 +++ mpg123-1.32.6/src/tests/resample_total.c 2024-04-04 17:28:51.000000000 +0000 @@ -3,10 +3,12 @@ //#define _FILE_OFFSET_BITS 64 //#define _FILE_OFFSET_BITS 32 #define SYN123_PORTABLE_API +#include "config.h" #include #include + #ifdef SYN123_PORTABLE_API typedef int64_t synoff; typedef int64_t synprint; diff -Nru mpg123-1.32.5/src/tests/seek_accuracy.c mpg123-1.32.6/src/tests/seek_accuracy.c --- mpg123-1.32.5/src/tests/seek_accuracy.c 2024-02-17 09:14:49.000000000 +0000 +++ mpg123-1.32.6/src/tests/seek_accuracy.c 2024-04-04 17:28:51.000000000 +0000 @@ -8,6 +8,7 @@ arguments: decoder preframes testfile.mpeg */ +#include "config.h" #include #include #include diff -Nru mpg123-1.32.5/src/tests/seek_whence.c mpg123-1.32.6/src/tests/seek_whence.c --- mpg123-1.32.5/src/tests/seek_whence.c 2024-02-17 09:14:49.000000000 +0000 +++ mpg123-1.32.6/src/tests/seek_whence.c 2024-04-04 17:28:51.000000000 +0000 @@ -1,3 +1,4 @@ +#include "config.h" #include "../compat/compat.h" #include #include "../common/debug.h" diff -Nru mpg123-1.32.5/src/tests/sweeper.c mpg123-1.32.6/src/tests/sweeper.c --- mpg123-1.32.5/src/tests/sweeper.c 2024-02-17 09:14:49.000000000 +0000 +++ mpg123-1.32.6/src/tests/sweeper.c 2024-04-04 17:28:51.000000000 +0000 @@ -1,3 +1,4 @@ +#include "config.h" #define SYN123_PORTABLE_API #include #include diff -Nru mpg123-1.32.5/src/tests/text.c mpg123-1.32.6/src/tests/text.c --- mpg123-1.32.5/src/tests/text.c 2024-02-17 09:14:49.000000000 +0000 +++ mpg123-1.32.6/src/tests/text.c 2024-04-04 17:28:51.000000000 +0000 @@ -8,6 +8,7 @@ arguments: decoder testfile.mpeg */ +#include "config.h" #include #include "../compat/compat.h" diff -Nru mpg123-1.32.5/src/tests/volume.c mpg123-1.32.6/src/tests/volume.c --- mpg123-1.32.5/src/tests/volume.c 2024-02-17 09:14:49.000000000 +0000 +++ mpg123-1.32.6/src/tests/volume.c 2024-04-04 17:28:51.000000000 +0000 @@ -1,3 +1,4 @@ +#include "config.h" #include "syn123.h" #include #include diff -Nru mpg123-1.32.5/src/version.h mpg123-1.32.6/src/version.h --- mpg123-1.32.5/src/version.h 2024-02-17 09:15:07.000000000 +0000 +++ mpg123-1.32.6/src/version.h 2024-04-04 17:29:03.000000000 +0000 @@ -16,7 +16,7 @@ // only single spaces as separator to ease parsing by build scripts #define MPG123_MAJOR 1 #define MPG123_MINOR 32 -#define MPG123_PATCH 5 +#define MPG123_PATCH 6 // Don't get too wild with that to avoid confusing m4. No brackets. // Also, it should fit well into a sane file name for the tarball. #define MPG123_SUFFIX ""