Hello community, here is the log from the commit of package mpg123 for openSUSE:Factory checked in at 2020-07-09 13:15:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mpg123 (Old) and /work/SRC/openSUSE:Factory/.mpg123.new.3060 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mpg123" Thu Jul 9 13:15:49 2020 rev:16 rq:818840 version:1.26.2 Changes: -------- --- /work/SRC/openSUSE:Factory/mpg123/mpg123.changes 2020-06-02 14:34:04.362654577 +0200 +++ /work/SRC/openSUSE:Factory/.mpg123.new.3060/mpg123.changes 2020-07-09 13:15:51.656604637 +0200 @@ -1,0 +2,15 @@ +Sun Jul 5 10:53:59 UTC 2020 - Luigi Baldoni <aloi...@gmx.com> + +- Update to version 1.26.2 + * Enable terminal control by default only when both input and + output are connected to a terminal. This avoids messing with + terminal settings when piping stderr to a pager, which takes + over terminal input anyway, while mpg123 still thinks it got + control. + * More CMake build fixes + * Use PROG_LIBS for output modules, to reinstate not + necessarily proper but previous behaviour + * Refine LFS support in libsyn123, avoiding + architecture-dependent syn123.h + +------------------------------------------------------------------- Old: ---- mpg123-1.26.1.tar.bz2 mpg123-1.26.1.tar.bz2.sig New: ---- mpg123-1.26.2.tar.bz2 mpg123-1.26.2.tar.bz2.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mpg123.spec ++++++ --- /var/tmp/diff_new_pack.BT6yGa/_old 2020-07-09 13:15:53.144609340 +0200 +++ /var/tmp/diff_new_pack.BT6yGa/_new 2020-07-09 13:15:53.144609340 +0200 @@ -18,7 +18,7 @@ %define sover 0 Name: mpg123 -Version: 1.26.1 +Version: 1.26.2 Release: 0 Summary: Console MPEG audio player and decoder library License: LGPL-2.1-only ++++++ mpg123-1.26.1.tar.bz2 -> mpg123-1.26.2.tar.bz2 ++++++ ++++ 1664 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpg123-1.26.1/NEWS new/mpg123-1.26.2/NEWS --- old/mpg123-1.26.1/NEWS 2020-05-30 14:03:48.000000000 +0200 +++ new/mpg123-1.26.2/NEWS 2020-07-04 10:06:07.000000000 +0200 @@ -1,3 +1,18 @@ +1.26.2 +------ +- Enable terminal control by default only when both input and output + are connected to a terminal. This avoids messing with terminal settings + when piping stderr to a pager, which takes over terminal input anyway, + while mpg123 still thinks it got control. +- Windows build fixes for UWP and without GetThreadErrorMode when not + building modules, thanks to Steve LHomme. +- Android build fix regarding off64_t use, thanks to Steve LHomme. +- More CMake build fixes thanks to David Callu (bug 290). +- Use PROG_LIBS for output modules, to reinstate not necessarily proper but + previous behaviour and fix FreeBSD port build (bug 291). +- Refine LFS support in libsyn123, avoiding architecture-dependent syn123.h + (debian bug 963205). + 1.26.1 ------ - Fix cmake build by actually including the read_api_version file in the distro. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpg123-1.26.1/configure.ac new/mpg123-1.26.2/configure.ac --- old/mpg123-1.26.1/configure.ac 2020-05-30 14:03:49.000000000 +0200 +++ new/mpg123-1.26.2/configure.ac 2020-07-04 10:06:05.000000000 +0200 @@ -8,7 +8,7 @@ AC_PREREQ(2.57) dnl ############# Initialisation -AC_INIT([mpg123], [1.26.1], [maintai...@mpg123.org]) +AC_INIT([mpg123], [1.26.2], [maintai...@mpg123.org]) dnl Increment API_VERSION when the API gets changes (new functions). dnl libmpg123 @@ -21,7 +21,7 @@ dnl libsyn123 SYNAPI_VERSION=1 -SYNLIB_PATCHLEVEL=0 +SYNLIB_PATCHLEVEL=1 dnl Since we want to be backwards compatible, both sides get set to API_VERSION. LIBMPG123_VERSION=$API_VERSION:$LIB_PATCHLEVEL:$API_VERSION @@ -159,9 +159,42 @@ dnl We need the windows header also for checking the module mechanism. AC_CHECK_HEADERS([windows.h]) +android_build=no case "$host" in *-*-mingw*) win32=yes + AC_MSG_CHECKING([if this is a UWP build]) + AC_PREPROC_IFELSE([AC_LANG_PROGRAM( + [[#include <winapifamily.h> + #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) + # error Win32 Desktop build + #endif + ]],[[;]]) + ],[ + uwp_build=yes + AC_MSG_RESULT([yes]) + ],[ + uwp_build=no + AC_MSG_RESULT([no]) + ]) + if test x"$uwp_build" = xyes; then + AC_DEFINE( [WINDOWS_UWP], 1, [Windows UWP build] ) + fi + ;; + linux*) + dnl Android is linux, but a bit different + AC_MSG_CHECKING([for an Android system]) + AC_PREPROC_IFELSE([AC_LANG_PROGRAM( + [[#ifndef __ANDROID__ + # error Not Android + #endif + ]],[[;]]) + ],[ + android_build=yes + AC_MSG_RESULT([yes]) + ],[ + AC_MSG_RESULT([no]) + ]) ;; *) win32=no @@ -1141,6 +1174,7 @@ AC_CHECK_SIZEOF(size_t,4) AC_CHECK_SIZEOF(ssize_t,4) AC_CHECK_SIZEOF(off_t,4) +AC_CHECK_SIZEOF(off64_t,8) AC_CHECK_SIZEOF(int32_t) AC_CHECK_SIZEOF(long,4) @@ -1150,6 +1184,9 @@ if test "x$largefile_sensitive" = xyes; then lfs_alias_type=long lfs_alias_size=$ac_cv_sizeof_long +elif test "x$android_build" = xyes; then + lfs_alias_type=off64_t + lfs_alias_size=$ac_cv_sizeof_off64_t else lfs_alias_type=off_t lfs_alias_size=$ac_cv_sizeof_off_t @@ -2284,6 +2321,9 @@ if test "x$win32_specific_codes" = xenabled; then #### Check for Wide functions AC_CHECK_FUNC([_wopen], [win32_unicode=enabled],[win32_unicode=disabled]) + if test "x$uwp_build" = xyes; then + AC_DEFINE([WANT_WIN32_UNICODE], [1], [ Define to use Unicode for Windows ]) + else AC_MSG_CHECKING([if we want Unicode File Open for Win32]) if test "x$win32_unicode" = xenabled; then dnl We need to include the header for PathCombineW checking as @@ -2331,6 +2371,7 @@ else AC_MSG_ERROR([Unicode File Open for Win32 not available]) fi + fi #### Check for Network functions AC_CHECK_HEADERS([ws2tcpip.h], [win32_sockets=enabled], [AC_MSG_WARN([Please update your headers to support winsock 2.2.])]) @@ -2414,27 +2455,29 @@ AC_MSG_RESULT([no]) fi # Check GetThreadErrorMode - AC_MSG_CHECKING([if we have GetThreadErrorMode]) - AC_LINK_IFELSE([AC_LANG_SOURCE([ - #include <windows.h> - int main(){ - return GetThreadErrorMode(); - }])],[win32_thread_error=yes],[win32_winver_bump=yes]) - if test "x$win32_thread_error" != "xyes"; then + if test x"$modules" != xdisabled; then AC_MSG_CHECKING([if we have GetThreadErrorMode]) AC_LINK_IFELSE([AC_LANG_SOURCE([ - #define WINVER 0x600 - #define _WIN32_WINNT 0x600 #include <windows.h> int main(){ return GetThreadErrorMode(); - }])],[win32_thread_error=yes],[win32_thread_error=no]) - fi - if test "x$win32_thread_error" = "xyes"; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - AC_ERROR([GetThreadErrorMode is required but not found]) + }])],[win32_thread_error=yes],[win32_winver_bump=yes]) + if test "x$win32_thread_error" != "xyes"; then + AC_MSG_CHECKING([if we have GetThreadErrorMode]) + AC_LINK_IFELSE([AC_LANG_SOURCE([ + #define WINVER 0x600 + #define _WIN32_WINNT 0x600 + #include <windows.h> + int main(){ + return GetThreadErrorMode(); + }])],[win32_thread_error=yes],[win32_thread_error=no]) + fi + if test "x$win32_thread_error" = "xyes"; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + AC_ERROR([GetThreadErrorMode is required but not found]) + fi fi fi @@ -2633,7 +2676,11 @@ echo echo " CPPFLAGS='$CPPFLAGS'" echo " CFLAGS='$CFLAGS'" -echo " LIBS='$PROG_LIBS'" -echo " (derived from LIBS, only used for end-user binaries)" +echo " PROG_LIBS='$PROG_LIBS'" +echo " (derived from LIBS, only used for end-user binaries and modules)" +echo " LIBDL='$LIBDL'" +echo " LIBMPG123_LIBS='$LIBMPG123_LIBS'" +echo " LIBSYN123_LIBS='$LIBSYN123_LIBS'" +echo " LIBOUT123_LIBS='$LIBOUT123_LIBS'" echo echo "Next type 'make' and then 'make install'." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpg123-1.26.1/mpg123.spec new/mpg123-1.26.2/mpg123.spec --- old/mpg123-1.26.1/mpg123.spec 2020-05-30 14:04:32.000000000 +0200 +++ new/mpg123-1.26.2/mpg123.spec 2020-07-04 10:28:21.000000000 +0200 @@ -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.26.1 +Version: 1.26.2 Release: 1 URL: http://www.mpg123.org/ License: GPL diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpg123-1.26.1/ports/cmake/src/CMakeLists.txt new/mpg123-1.26.2/ports/cmake/src/CMakeLists.txt --- old/mpg123-1.26.1/ports/cmake/src/CMakeLists.txt 2020-05-30 14:03:49.000000000 +0200 +++ new/mpg123-1.26.2/ports/cmake/src/CMakeLists.txt 2020-07-04 10:06:07.000000000 +0200 @@ -109,6 +109,10 @@ if(LFS_SENSITIVE) set(LFS_ALIAS_TYPE long) math(EXPR LFS_ALIAS_BITS "${SIZEOF_LONG} * 8") +elseif(CMAKE_ANDROID_ARCH_ABI) + check_type_size(off64_t SIZEOF_OFF64_T) + set(LFS_ALIAS_TYPE off64_t) + math(EXPR LFS_ALIAS_BITS "${SIZEOF_OFF64_T} * 8") else() set(LFS_ALIAS_TYPE off_t) math(EXPR LFS_ALIAS_BITS "${SIZEOF_OFF_T} * 8") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpg123-1.26.1/ports/cmake/src/config.cmake.h.in new/mpg123-1.26.2/ports/cmake/src/config.cmake.h.in --- old/mpg123-1.26.1/ports/cmake/src/config.cmake.h.in 2020-05-30 14:03:49.000000000 +0200 +++ new/mpg123-1.26.2/ports/cmake/src/config.cmake.h.in 2020-07-04 10:06:07.000000000 +0200 @@ -162,5 +162,8 @@ #cmakedefine WORDS_BIGENDIAN 1 +// Number of bits in a file offset, on hosts where this is settable. +#cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@ + // Define to the native offset type (long or actually off_t). #define lfs_alias_t @LFS_ALIAS_TYPE@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpg123-1.26.1/ports/cmake/src/libmpg123/CMakeLists.txt new/mpg123-1.26.2/ports/cmake/src/libmpg123/CMakeLists.txt --- old/mpg123-1.26.1/ports/cmake/src/libmpg123/CMakeLists.txt 2020-05-30 14:03:49.000000000 +0200 +++ new/mpg123-1.26.2/ports/cmake/src/libmpg123/CMakeLists.txt 2020-07-04 10:06:07.000000000 +0200 @@ -80,7 +80,7 @@ else() set(PLATFORM_DEFINITIONS OPT_GENERIC) endif() -elseif((MSVC AND CMAKE_GENERATOR_PLATFORM MATCHES "|Win32") OR (NOT MSVC AND CMAKE_SYSTEM_PROCESSOR MATCHES "i386")) +elseif((MSVC AND CMAKE_GENERATOR_PLATFORM MATCHES "|Win32") OR (NOT MSVC AND CMAKE_SYSTEM_PROCESSOR MATCHES "i.86")) if(TRUE) set(PLATFORM_DEFINITIONS OPT_I386) target_sources(${TARGET} PRIVATE @@ -126,7 +126,7 @@ endif() if((MSVC AND CMAKE_GENERATOR_PLATFORM STREQUAL "x64") OR (NOT MSVC AND CMAKE_SYSTEM_PROCESSOR MATCHES "([xX]86_|AMD|amd)64")) set(MACHINE amd64) - elseif((MSVC AND CMAKE_GENERATOR_PLATFORM MATCHES "|Win32") OR (NOT MSVC AND CMAKE_SYSTEM_PROCESSOR MATCHES "i386")) + elseif((MSVC AND CMAKE_GENERATOR_PLATFORM MATCHES "|Win32") OR (NOT MSVC AND CMAKE_SYSTEM_PROCESSOR MATCHES "i.86")) set(MACHINE x86) endif() list(TRANSFORM PLATFORM_DEFINITIONS PREPEND /D) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpg123-1.26.1/src/config.h.in new/mpg123-1.26.2/src/config.h.in --- old/mpg123-1.26.1/src/config.h.in 2020-05-30 14:04:13.000000000 +0200 +++ new/mpg123-1.26.2/src/config.h.in 2020-07-04 10:28:36.000000000 +0200 @@ -414,6 +414,9 @@ /* The size of `long', as computed by sizeof. */ #undef SIZEOF_LONG +/* The size of `off64_t', as computed by sizeof. */ +#undef SIZEOF_OFF64_T + /* The size of `off_t', as computed by sizeof. */ #undef SIZEOF_OFF_T @@ -450,6 +453,9 @@ /* Define to use Unicode for Windows */ #undef WANT_WIN32_UNICODE +/* Windows UWP build */ +#undef WINDOWS_UWP + /* Windows Vista and later APIs */ #undef WINVER diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpg123-1.26.1/src/libout123/modules/Makemodule.am new/mpg123-1.26.2/src/libout123/modules/Makemodule.am --- old/mpg123-1.26.1/src/libout123/modules/Makemodule.am 2020-05-30 14:03:48.000000000 +0200 +++ new/mpg123-1.26.2/src/libout123/modules/Makemodule.am 2020-07-04 10:06:05.000000000 +0200 @@ -38,7 +38,7 @@ # -export-dynamic -export-symbols-regex '"'"'^mpg123_'"'"' \\ # \@${big}_LDFLAGS\@ #src_libout123_modules_output_${_}_la_CFLAGS = \@${big}_CFLAGS\@ -#src_libout123_modules_output_${_}_la_LIBADD = \\ +#src_libout123_modules_output_${_}_la_LIBADD = \@PROG_LIBS\@ \\ # src/compat/libcompat_str.la \\ # \@${big}_LIBS\@ #src_libout123_modules_outout_${_}_la_CPPFLAGS = \\ @@ -51,7 +51,7 @@ # src/libout123/modules/$_.c #src_libout123_modules_libdefaultmodule_la_CFLAGS = \@${big}_CFLAGS\@ #src_libout123_modules_libdefaultmodule_la_LDFLAGS = \@${big}_LDFLAGS\@ -#src_libout123_modules_libdefaultmodule_la_LIBADD = \@${big}_LIBS\@ +#src_libout123_modules_libdefaultmodule_la_LIBADD = \@PROG_LIBS\@ \@${big}_LIBS\@ #src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \\ # \$(AM_CPPFLAGS) \\ # \$(libout123_mod_cppflags) @@ -71,7 +71,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @DUMMY_LDFLAGS@ src_libout123_modules_output_dummy_la_CFLAGS = @DUMMY_CFLAGS@ -src_libout123_modules_output_dummy_la_LIBADD = \ +src_libout123_modules_output_dummy_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @DUMMY_LIBS@ src_libout123_modules_outout_dummy_la_CPPFLAGS = \ @@ -84,7 +84,7 @@ src/libout123/modules/dummy.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @DUMMY_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @DUMMY_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @DUMMY_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @DUMMY_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -101,7 +101,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @TINYALSA_LDFLAGS@ src_libout123_modules_output_tinyalsa_la_CFLAGS = @TINYALSA_CFLAGS@ -src_libout123_modules_output_tinyalsa_la_LIBADD = \ +src_libout123_modules_output_tinyalsa_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @TINYALSA_LIBS@ src_libout123_modules_outout_tinyalsa_la_CPPFLAGS = \ @@ -114,7 +114,7 @@ src/libout123/modules/tinyalsa.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @TINYALSA_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @TINYALSA_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @TINYALSA_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @TINYALSA_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -131,7 +131,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @ALSA_LDFLAGS@ src_libout123_modules_output_alsa_la_CFLAGS = @ALSA_CFLAGS@ -src_libout123_modules_output_alsa_la_LIBADD = \ +src_libout123_modules_output_alsa_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @ALSA_LIBS@ src_libout123_modules_outout_alsa_la_CPPFLAGS = \ @@ -144,7 +144,7 @@ src/libout123/modules/alsa.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @ALSA_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @ALSA_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @ALSA_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @ALSA_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -161,7 +161,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @QSA_LDFLAGS@ src_libout123_modules_output_qsa_la_CFLAGS = @QSA_CFLAGS@ -src_libout123_modules_output_qsa_la_LIBADD = \ +src_libout123_modules_output_qsa_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @QSA_LIBS@ src_libout123_modules_outout_qsa_la_CPPFLAGS = \ @@ -174,7 +174,7 @@ src/libout123/modules/qsa.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @QSA_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @QSA_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @QSA_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @QSA_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -191,7 +191,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @COREAUDIO_LDFLAGS@ src_libout123_modules_output_coreaudio_la_CFLAGS = @COREAUDIO_CFLAGS@ -src_libout123_modules_output_coreaudio_la_LIBADD = \ +src_libout123_modules_output_coreaudio_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @COREAUDIO_LIBS@ src_libout123_modules_outout_coreaudio_la_CPPFLAGS = \ @@ -204,7 +204,7 @@ src/libout123/modules/coreaudio.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @COREAUDIO_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @COREAUDIO_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @COREAUDIO_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @COREAUDIO_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -221,7 +221,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @ESD_LDFLAGS@ src_libout123_modules_output_esd_la_CFLAGS = @ESD_CFLAGS@ -src_libout123_modules_output_esd_la_LIBADD = \ +src_libout123_modules_output_esd_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @ESD_LIBS@ src_libout123_modules_outout_esd_la_CPPFLAGS = \ @@ -234,7 +234,7 @@ src/libout123/modules/esd.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @ESD_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @ESD_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @ESD_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @ESD_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -251,7 +251,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @JACK_LDFLAGS@ src_libout123_modules_output_jack_la_CFLAGS = @JACK_CFLAGS@ -src_libout123_modules_output_jack_la_LIBADD = \ +src_libout123_modules_output_jack_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @JACK_LIBS@ src_libout123_modules_outout_jack_la_CPPFLAGS = \ @@ -264,7 +264,7 @@ src/libout123/modules/jack.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @JACK_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @JACK_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @JACK_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @JACK_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -281,7 +281,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @NAS_LDFLAGS@ src_libout123_modules_output_nas_la_CFLAGS = @NAS_CFLAGS@ -src_libout123_modules_output_nas_la_LIBADD = \ +src_libout123_modules_output_nas_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @NAS_LIBS@ src_libout123_modules_outout_nas_la_CPPFLAGS = \ @@ -294,7 +294,7 @@ src/libout123/modules/nas.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @NAS_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @NAS_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @NAS_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @NAS_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -311,7 +311,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @OSS_LDFLAGS@ src_libout123_modules_output_oss_la_CFLAGS = @OSS_CFLAGS@ -src_libout123_modules_output_oss_la_LIBADD = \ +src_libout123_modules_output_oss_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @OSS_LIBS@ src_libout123_modules_outout_oss_la_CPPFLAGS = \ @@ -324,7 +324,7 @@ src/libout123/modules/oss.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @OSS_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @OSS_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @OSS_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @OSS_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -341,7 +341,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @PORTAUDIO_LDFLAGS@ src_libout123_modules_output_portaudio_la_CFLAGS = @PORTAUDIO_CFLAGS@ -src_libout123_modules_output_portaudio_la_LIBADD = \ +src_libout123_modules_output_portaudio_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @PORTAUDIO_LIBS@ src_libout123_modules_outout_portaudio_la_CPPFLAGS = \ @@ -354,7 +354,7 @@ src/libout123/modules/portaudio.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @PORTAUDIO_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @PORTAUDIO_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @PORTAUDIO_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @PORTAUDIO_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -371,7 +371,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @PULSE_LDFLAGS@ src_libout123_modules_output_pulse_la_CFLAGS = @PULSE_CFLAGS@ -src_libout123_modules_output_pulse_la_LIBADD = \ +src_libout123_modules_output_pulse_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @PULSE_LIBS@ src_libout123_modules_outout_pulse_la_CPPFLAGS = \ @@ -384,7 +384,7 @@ src/libout123/modules/pulse.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @PULSE_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @PULSE_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @PULSE_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @PULSE_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -401,7 +401,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @SDL_LDFLAGS@ src_libout123_modules_output_sdl_la_CFLAGS = @SDL_CFLAGS@ -src_libout123_modules_output_sdl_la_LIBADD = \ +src_libout123_modules_output_sdl_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @SDL_LIBS@ src_libout123_modules_outout_sdl_la_CPPFLAGS = \ @@ -414,7 +414,7 @@ src/libout123/modules/sdl.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @SDL_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @SDL_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @SDL_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @SDL_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -431,7 +431,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @SNDIO_LDFLAGS@ src_libout123_modules_output_sndio_la_CFLAGS = @SNDIO_CFLAGS@ -src_libout123_modules_output_sndio_la_LIBADD = \ +src_libout123_modules_output_sndio_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @SNDIO_LIBS@ src_libout123_modules_outout_sndio_la_CPPFLAGS = \ @@ -444,7 +444,7 @@ src/libout123/modules/sndio.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @SNDIO_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @SNDIO_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @SNDIO_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @SNDIO_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -461,7 +461,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @SUN_LDFLAGS@ src_libout123_modules_output_sun_la_CFLAGS = @SUN_CFLAGS@ -src_libout123_modules_output_sun_la_LIBADD = \ +src_libout123_modules_output_sun_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @SUN_LIBS@ src_libout123_modules_outout_sun_la_CPPFLAGS = \ @@ -474,7 +474,7 @@ src/libout123/modules/sun.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @SUN_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @SUN_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @SUN_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @SUN_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -491,7 +491,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @WIN32_LDFLAGS@ src_libout123_modules_output_win32_la_CFLAGS = @WIN32_CFLAGS@ -src_libout123_modules_output_win32_la_LIBADD = \ +src_libout123_modules_output_win32_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @WIN32_LIBS@ src_libout123_modules_outout_win32_la_CPPFLAGS = \ @@ -504,7 +504,7 @@ src/libout123/modules/win32.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @WIN32_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @WIN32_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @WIN32_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @WIN32_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -521,7 +521,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @WIN32_WASAPI_LDFLAGS@ src_libout123_modules_output_win32_wasapi_la_CFLAGS = @WIN32_WASAPI_CFLAGS@ -src_libout123_modules_output_win32_wasapi_la_LIBADD = \ +src_libout123_modules_output_win32_wasapi_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @WIN32_WASAPI_LIBS@ src_libout123_modules_outout_win32_wasapi_la_CPPFLAGS = \ @@ -534,7 +534,7 @@ src/libout123/modules/win32_wasapi.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @WIN32_WASAPI_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @WIN32_WASAPI_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @WIN32_WASAPI_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @WIN32_WASAPI_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -551,7 +551,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @AIX_LDFLAGS@ src_libout123_modules_output_aix_la_CFLAGS = @AIX_CFLAGS@ -src_libout123_modules_output_aix_la_LIBADD = \ +src_libout123_modules_output_aix_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @AIX_LIBS@ src_libout123_modules_outout_aix_la_CPPFLAGS = \ @@ -564,7 +564,7 @@ src/libout123/modules/aix.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @AIX_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @AIX_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @AIX_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @AIX_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -581,7 +581,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @ALIB_LDFLAGS@ src_libout123_modules_output_alib_la_CFLAGS = @ALIB_CFLAGS@ -src_libout123_modules_output_alib_la_LIBADD = \ +src_libout123_modules_output_alib_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @ALIB_LIBS@ src_libout123_modules_outout_alib_la_CPPFLAGS = \ @@ -594,7 +594,7 @@ src/libout123/modules/alib.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @ALIB_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @ALIB_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @ALIB_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @ALIB_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -611,7 +611,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @ARTS_LDFLAGS@ src_libout123_modules_output_arts_la_CFLAGS = @ARTS_CFLAGS@ -src_libout123_modules_output_arts_la_LIBADD = \ +src_libout123_modules_output_arts_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @ARTS_LIBS@ src_libout123_modules_outout_arts_la_CPPFLAGS = \ @@ -624,7 +624,7 @@ src/libout123/modules/arts.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @ARTS_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @ARTS_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @ARTS_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @ARTS_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -641,7 +641,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @HP_LDFLAGS@ src_libout123_modules_output_hp_la_CFLAGS = @HP_CFLAGS@ -src_libout123_modules_output_hp_la_LIBADD = \ +src_libout123_modules_output_hp_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @HP_LIBS@ src_libout123_modules_outout_hp_la_CPPFLAGS = \ @@ -654,7 +654,7 @@ src/libout123/modules/hp.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @HP_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @HP_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @HP_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @HP_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -671,7 +671,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @OS2_LDFLAGS@ src_libout123_modules_output_os2_la_CFLAGS = @OS2_CFLAGS@ -src_libout123_modules_output_os2_la_LIBADD = \ +src_libout123_modules_output_os2_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @OS2_LIBS@ src_libout123_modules_outout_os2_la_CPPFLAGS = \ @@ -684,7 +684,7 @@ src/libout123/modules/os2.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @OS2_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @OS2_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @OS2_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @OS2_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -701,7 +701,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @SGI_LDFLAGS@ src_libout123_modules_output_sgi_la_CFLAGS = @SGI_CFLAGS@ -src_libout123_modules_output_sgi_la_LIBADD = \ +src_libout123_modules_output_sgi_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @SGI_LIBS@ src_libout123_modules_outout_sgi_la_CPPFLAGS = \ @@ -714,7 +714,7 @@ src/libout123/modules/sgi.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @SGI_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @SGI_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @SGI_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @SGI_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -731,7 +731,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @MINT_LDFLAGS@ src_libout123_modules_output_mint_la_CFLAGS = @MINT_CFLAGS@ -src_libout123_modules_output_mint_la_LIBADD = \ +src_libout123_modules_output_mint_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @MINT_LIBS@ src_libout123_modules_outout_mint_la_CPPFLAGS = \ @@ -744,7 +744,7 @@ src/libout123/modules/mint.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @MINT_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @MINT_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @MINT_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @MINT_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) @@ -761,7 +761,7 @@ -export-dynamic -export-symbols-regex '^mpg123_' \ @OPENAL_LDFLAGS@ src_libout123_modules_output_openal_la_CFLAGS = @OPENAL_CFLAGS@ -src_libout123_modules_output_openal_la_LIBADD = \ +src_libout123_modules_output_openal_la_LIBADD = @PROG_LIBS@ \ src/compat/libcompat_str.la \ @OPENAL_LIBS@ src_libout123_modules_outout_openal_la_CPPFLAGS = \ @@ -774,7 +774,7 @@ src/libout123/modules/openal.c src_libout123_modules_libdefaultmodule_la_CFLAGS = @OPENAL_CFLAGS@ src_libout123_modules_libdefaultmodule_la_LDFLAGS = @OPENAL_LDFLAGS@ -src_libout123_modules_libdefaultmodule_la_LIBADD = @OPENAL_LIBS@ +src_libout123_modules_libdefaultmodule_la_LIBADD = @PROG_LIBS@ @OPENAL_LIBS@ src_libout123_modules_libdefaultmodule_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(libout123_mod_cppflags) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpg123-1.26.1/src/libsyn123/resample.c new/mpg123-1.26.2/src/libsyn123/resample.c --- old/mpg123-1.26.1/src/libsyn123/resample.c 2020-05-30 14:03:48.000000000 +0200 +++ new/mpg123-1.26.2/src/libsyn123/resample.c 2020-07-04 10:06:05.000000000 +0200 @@ -1899,14 +1899,24 @@ return (tot <= INT64_MAX) ? (int64_t)tot : SYN123_OVERFLOW; } -#if SIZEOF_LONG == 4 -long attribute_align_arg -syn123_resample_total_32(long inrate, long outrate, long ins) +int32_t attribute_align_arg +syn123_resample_total_32(int32_t inrate, int32_t outrate, int32_t ins) { int64_t tot = syn123_resample_total_64(inrate, outrate, ins); - return (tot <= LONG_MAX) ? (long)tot : SYN123_OVERFLOW; + return (tot <= INT32_MAX) ? (int32_t)tot : SYN123_OVERFLOW; } + +lfs_alias_t syn123_resample_total(long inrate, long outrate, lfs_alias_t ins) +{ +#if LFS_ALIAS_BITS+0 == 64 + return syn123_resample_total_64(inrate, outrate, ins); +#elif LFS_ALIAS_BITS+0 == 32 + return syn123_resample_total_32(inrate, outrate, ins); +#else + #error "Unexpected LFS_ALIAS_BITS value." #endif +} + // The inverse function: How many input samples are needed to get at least // the desired amount of output? @@ -1959,16 +1969,23 @@ return (tot <= INT64_MAX) ? (int64_t)tot : SYN123_OVERFLOW; } -#if SIZEOF_LONG == 4 -long attribute_align_arg -syn123_resample_intotal_32(long inrate, long outrate, long outs) +int32_t attribute_align_arg +syn123_resample_intotal_32(int32_t inrate, int32_t outrate, int32_t outs) { int64_t tot = syn123_resample_intotal_64(inrate, outrate, outs); - return (tot <= LONG_MAX) ? (long)tot : SYN123_OVERFLOW; + return (tot <= INT32_MAX) ? (int32_t)tot : SYN123_OVERFLOW; } -#endif -#define syn123_resample_total syn123_resample_total_64 +lfs_alias_t syn123_resample_intotal(long inrate, long outrate, lfs_alias_t outs) +{ +#if LFS_ALIAS_BITS+0 == 64 + return syn123_resample_intotal_64(inrate, outrate, outs); +#elif LFS_ALIAS_BITS+0 == 32 + return syn123_resample_intotal_32(inrate, outrate, outs); +#else + #error "Unexpected LFS_ALIAS_BITS value." +#endif +} // As any sensible return value is at least 1, this uses the unsigned // type and 0 for error/pathological input. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpg123-1.26.1/src/libsyn123/syn123.h new/mpg123-1.26.2/src/libsyn123/syn123.h --- old/mpg123-1.26.1/src/libsyn123/syn123.h 2020-05-30 14:04:32.000000000 +0200 +++ new/mpg123-1.26.2/src/libsyn123/syn123.h 2020-07-04 10:28:21.000000000 +0200 @@ -964,6 +964,12 @@ ssize_t syn123_resample_inexpect(syn123_handle *sh, size_t outs); +#ifndef SYN123_NO_LARGEFUNC + +/* The whole block of off_t-using API is optional to be able to build + the underlying code without confusing the compiler with prototype + mismatch. */ + /* Lightweight large file hackery to enable worry-reduced use of off_t. Depending on the size of off_t in your client build, the corresponding library function needs to be chosen. */ @@ -977,9 +983,6 @@ # else # error "Unpredicted _FILE_OFFSET_BITS value." # endif -#else -# define syn123_resample_total syn123_resample_total_64 -# define syn123_resample_intotal syn123_resample_intotal_64 #endif /** Give exact output sample count for total input sample count. @@ -1019,6 +1022,8 @@ MPG123_EXPORT off_t syn123_resample_intotal(long inrate, long outrate, off_t outs); +#endif + /** Resample input buffer to output buffer. * * This executes the resampling configured by syn123_setup_resample(). The diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpg123-1.26.1/src/libsyn123/syn123.h.in new/mpg123-1.26.2/src/libsyn123/syn123.h.in --- old/mpg123-1.26.1/src/libsyn123/syn123.h.in 2020-05-30 14:03:48.000000000 +0200 +++ new/mpg123-1.26.2/src/libsyn123/syn123.h.in 2020-07-04 10:06:05.000000000 +0200 @@ -964,6 +964,12 @@ ssize_t syn123_resample_inexpect(syn123_handle *sh, size_t outs); +#ifndef SYN123_NO_LARGEFUNC + +/* The whole block of off_t-using API is optional to be able to build + the underlying code without confusing the compiler with prototype + mismatch. */ + /* Lightweight large file hackery to enable worry-reduced use of off_t. Depending on the size of off_t in your client build, the corresponding library function needs to be chosen. */ @@ -977,9 +983,6 @@ # else # error "Unpredicted _FILE_OFFSET_BITS value." # endif -#else -# define syn123_resample_total syn123_resample_total_@LFS_ALIAS_BITS@ -# define syn123_resample_intotal syn123_resample_intotal_@LFS_ALIAS_BITS@ #endif /** Give exact output sample count for total input sample count. @@ -1019,6 +1022,8 @@ MPG123_EXPORT off_t syn123_resample_intotal(long inrate, long outrate, off_t outs); +#endif + /** Resample input buffer to output buffer. * * This executes the resampling configured by syn123_setup_resample(). The diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpg123-1.26.1/src/libsyn123/syn123_int.h new/mpg123-1.26.2/src/libsyn123/syn123_int.h --- old/mpg123-1.26.1/src/libsyn123/syn123_int.h 2020-05-30 14:03:48.000000000 +0200 +++ new/mpg123-1.26.2/src/libsyn123/syn123_int.h 2020-07-04 10:06:05.000000000 +0200 @@ -1,7 +1,7 @@ /* syn123_int: internal header for libsyn123 - copyright 2018 by the mpg123 project, + copyright 2018-2020 by the mpg123 project, licensed under the terms of the LGPL 2.1 see COPYING and AUTHORS files in distribution or http://mpg123.org @@ -17,6 +17,7 @@ #include "intsym.h" #include "compat.h" #include "abi_align.h" +#define SYN123_NO_LARGEFUNC #include "syn123.h" // Generally, a number of samples we work on in one go to diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpg123-1.26.1/src/mpg123.c new/mpg123-1.26.2/src/mpg123.c --- old/mpg123-1.26.1/src/mpg123.c 2020-05-30 14:03:48.000000000 +0200 +++ new/mpg123-1.26.2/src/mpg123.c 2020-07-04 10:06:05.000000000 +0200 @@ -1056,8 +1056,12 @@ _wildcard(&argc,&argv); #endif #ifdef HAVE_TERMIOS - /* Detect terminal on input side, enable control by default. */ - param.term_ctrl = !(term_width(STDIN_FILENO) < 0); + // Detect terminal, enable control by default. + // Only if both input and output are connected, though. You got strange effects + // otherwise, for example mpg123 messing up settings if piping debugging output + // to another interactive program. + param.term_ctrl = !(term_width(STDIN_FILENO) < 0) && + !(term_width(STDERR_FILENO) < 0); #endif stderr_is_term = term_width(STDERR_FILENO) >= 0; stdout_is_term = term_width(STDOUT_FILENO) >= 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpg123-1.26.1/src/tests/Makemodule.am new/mpg123-1.26.2/src/tests/Makemodule.am --- old/mpg123-1.26.1/src/tests/Makemodule.am 2020-05-30 14:03:49.000000000 +0200 +++ new/mpg123-1.26.2/src/tests/Makemodule.am 2020-07-04 10:06:05.000000000 +0200 @@ -4,6 +4,7 @@ src/tests/decode_fixed.sh \ src/tests/seek_whence.sh \ src/tests/seek_accuracy.sh \ + src/tests/resample_total \ src/tests/text \ src/tests/textprint @@ -28,6 +29,7 @@ src/tests/decode_fixed \ src/tests/seek_whence \ src/tests/seek_accuracy \ + src/tests/resample_total \ src/tests/text \ src/tests/textprint @@ -77,6 +79,11 @@ src/libsyn123/libsyn123.la \ src/libout123/libout123.la +src_tests_resample_total_SOURCES = \ + src/tests/resample_total.c +src_tests_resample_total_LDADD = \ + src/libsyn123/libsyn123.la + src_tests_text_SOURCES = \ src/tests/text.c \ src/tests/testtext.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mpg123-1.26.1/src/tests/resample_total.c new/mpg123-1.26.2/src/tests/resample_total.c --- old/mpg123-1.26.1/src/tests/resample_total.c 1970-01-01 01:00:00.000000000 +0100 +++ new/mpg123-1.26.2/src/tests/resample_total.c 2020-07-04 10:06:05.000000000 +0200 @@ -0,0 +1,27 @@ +// Those select the specific syn123 functions, without +// this, the native wrapper is used, hopefully matching off_t. +//#define _FILE_OFFSET_BITS 64 +//#define _FILE_OFFSET_BITS 32 +#include <syn123.h> + +#include <stdio.h> + +const long arate = 8000; +const long brate = 48000; +const off_t ins = 12637; +const off_t outs = 75822; + +int main() +{ + off_t outs2 = syn123_resample_total(arate,brate,ins); + off_t ins2 = syn123_resample_intotal(arate,brate,outs); + int err = 0; + if(outs2 != outs && ++err) + fprintf(stderr, "total mismatch: %ld != %ld\n" + , (long)outs2, (long)outs ); + if(ins2 != ins && ++err) + fprintf(stderr, "intotal mismatch: %ld != %ld\n" + , (long)ins2, (long)ins ); + printf("%s\n", err ? "FAIL" : "PASS"); + return err; +}