external libs: updated libmpg123, rebuilt SDL-1.2
authorOzkan Sezer <sezeroz@gmail.com>
Sun, 29 Dec 2019 17:00:10 +0300
branchSDL-1.2
changeset 1128f3ba2c5e2bef
parent 1126 0a038da72ba2
external libs: updated libmpg123, rebuilt
VisualC/external/include/mpg123.h
VisualC/external/lib/x64/libmpg123-0.dll
VisualC/external/lib/x86/libmpg123-0.dll
Xcode/Frameworks/mpg123.framework/Versions/A/Headers/mpg123.h
Xcode/Frameworks/mpg123.framework/Versions/A/mpg123
external/libmpg123/Makefile.in
external/libmpg123/NEWS
external/libmpg123/NEWS.libmpg123
external/libmpg123/build/mkinstalldirs
external/libmpg123/configure
external/libmpg123/configure.ac
external/libmpg123/dylibversion.patch
external/libmpg123/m4/libtool.m4
external/libmpg123/src/Makefile.am
external/libmpg123/src/Makefile.in
external/libmpg123/src/OS2_MSVC/mpg123.h
external/libmpg123/src/lfs_alias.c
external/libmpg123/src/lfs_wrap.c
external/libmpg123/src/libmpg123.c
external/libmpg123/src/mpg123.h.in
external/libmpg123/src/stringbuf.c
     1.1 --- a/VisualC/external/include/mpg123.h	Sat Dec 28 01:55:00 2019 +0300
     1.2 +++ b/VisualC/external/include/mpg123.h	Sun Dec 29 17:00:10 2019 +0300
     1.3 @@ -12,7 +12,7 @@
     1.4  
     1.5  /* A macro to check at compile time which set of API functions to expect.
     1.6     This should be incremented at least each time a new symbol is added to the header. */
     1.7 -#define MPG123_API_VERSION 41
     1.8 +#define MPG123_API_VERSION 42
     1.9  
    1.10  /* These aren't actually in use... seems to work without using libtool. */
    1.11  #ifdef BUILD_MPG123_DLL
    1.12 @@ -28,6 +28,7 @@
    1.13  #endif
    1.14  #endif
    1.15  
    1.16 +/* This is for Visual Studio, so this header works as distributed in the binary downloads */
    1.17  #if defined(_MSC_VER) && !defined(MPG123_DEF_SSIZE_T)
    1.18  #define MPG123_DEF_SSIZE_T
    1.19  #include <stddef.h>
    1.20 @@ -85,6 +86,7 @@
    1.21  #define mpg123_set_index    MPG123_LARGENAME(mpg123_set_index)
    1.22  #define mpg123_position     MPG123_LARGENAME(mpg123_position)
    1.23  #define mpg123_length       MPG123_LARGENAME(mpg123_length)
    1.24 +#define mpg123_framelength  MPG123_LARGENAME(mpg123_framelength)
    1.25  #define mpg123_set_filesize MPG123_LARGENAME(mpg123_set_filesize)
    1.26  #define mpg123_replace_reader MPG123_LARGENAME(mpg123_replace_reader)
    1.27  #define mpg123_replace_reader_handle MPG123_LARGENAME(mpg123_replace_reader_handle)
    1.28 @@ -683,6 +685,7 @@
    1.29  
    1.30  /** Get information about current and remaining frames/seconds.
    1.31   *  WARNING: This function is there because of special usage by standalone mpg123 and may be removed in the final version of libmpg123!
    1.32 + *  broken for various cases (p.ex. 24 bit output). Do never use.
    1.33   *  You provide an offset (in frames) from now and a number of output bytes 
    1.34   *  served by libmpg123 but not yet played. You get the projected current frame 
    1.35   *  and seconds, as well as the remaining frames/seconds. This does _not_ care 
    1.36 @@ -811,6 +814,10 @@
    1.37   */
    1.38  MPG123_EXPORT int mpg123_scan(mpg123_handle *mh);
    1.39  
    1.40 +/** Return, if possible, the full (expected) length of current track in frames.
    1.41 +  * \return length >= 0 or MPG123_ERR if there is no length guess possible. */
    1.42 +MPG123_EXPORT off_t mpg123_framelength(mpg123_handle *mh);
    1.43 +
    1.44  /** Return, if possible, the full (expected) length of current track in samples.
    1.45    * \return length >= 0 or MPG123_ERR if there is no length guess possible. */
    1.46  MPG123_EXPORT off_t mpg123_length(mpg123_handle *mh);
     2.1 Binary file VisualC/external/lib/x64/libmpg123-0.dll has changed
     3.1 Binary file VisualC/external/lib/x86/libmpg123-0.dll has changed
     4.1 --- a/Xcode/Frameworks/mpg123.framework/Versions/A/Headers/mpg123.h	Sat Dec 28 01:55:00 2019 +0300
     4.2 +++ b/Xcode/Frameworks/mpg123.framework/Versions/A/Headers/mpg123.h	Sun Dec 29 17:00:10 2019 +0300
     4.3 @@ -12,7 +12,7 @@
     4.4  
     4.5  /* A macro to check at compile time which set of API functions to expect.
     4.6     This should be incremented at least each time a new symbol is added to the header. */
     4.7 -#define MPG123_API_VERSION 41
     4.8 +#define MPG123_API_VERSION 42
     4.9  
    4.10  /* These aren't actually in use... seems to work without using libtool. */
    4.11  #ifdef BUILD_MPG123_DLL
    4.12 @@ -28,6 +28,13 @@
    4.13  #endif
    4.14  #endif
    4.15  
    4.16 +/* This is for Visual Studio, so this header works as distributed in the binary downloads */
    4.17 +#if defined(_MSC_VER) && !defined(MPG123_DEF_SSIZE_T)
    4.18 +#define MPG123_DEF_SSIZE_T
    4.19 +#include <stddef.h>
    4.20 +typedef ptrdiff_t ssize_t;
    4.21 +#endif
    4.22 +
    4.23  #ifndef MPG123_NO_CONFIGURE /* Enable use of this file without configure. */
    4.24  #include <stdlib.h>
    4.25  #include <sys/types.h>
    4.26 @@ -79,6 +86,7 @@
    4.27  #define mpg123_set_index    MPG123_LARGENAME(mpg123_set_index)
    4.28  #define mpg123_position     MPG123_LARGENAME(mpg123_position)
    4.29  #define mpg123_length       MPG123_LARGENAME(mpg123_length)
    4.30 +#define mpg123_framelength  MPG123_LARGENAME(mpg123_framelength)
    4.31  #define mpg123_set_filesize MPG123_LARGENAME(mpg123_set_filesize)
    4.32  #define mpg123_replace_reader MPG123_LARGENAME(mpg123_replace_reader)
    4.33  #define mpg123_replace_reader_handle MPG123_LARGENAME(mpg123_replace_reader_handle)
    4.34 @@ -677,6 +685,7 @@
    4.35  
    4.36  /** Get information about current and remaining frames/seconds.
    4.37   *  WARNING: This function is there because of special usage by standalone mpg123 and may be removed in the final version of libmpg123!
    4.38 + *  broken for various cases (p.ex. 24 bit output). Do never use.
    4.39   *  You provide an offset (in frames) from now and a number of output bytes 
    4.40   *  served by libmpg123 but not yet played. You get the projected current frame 
    4.41   *  and seconds, as well as the remaining frames/seconds. This does _not_ care 
    4.42 @@ -805,6 +814,10 @@
    4.43   */
    4.44  MPG123_EXPORT int mpg123_scan(mpg123_handle *mh);
    4.45  
    4.46 +/** Return, if possible, the full (expected) length of current track in frames.
    4.47 +  * \return length >= 0 or MPG123_ERR if there is no length guess possible. */
    4.48 +MPG123_EXPORT off_t mpg123_framelength(mpg123_handle *mh);
    4.49 +
    4.50  /** Return, if possible, the full (expected) length of current track in samples.
    4.51    * \return length >= 0 or MPG123_ERR if there is no length guess possible. */
    4.52  MPG123_EXPORT off_t mpg123_length(mpg123_handle *mh);
     5.1 Binary file Xcode/Frameworks/mpg123.framework/Versions/A/mpg123 has changed
     6.1 --- a/external/libmpg123/Makefile.in	Sat Dec 28 01:55:00 2019 +0300
     6.2 +++ b/external/libmpg123/Makefile.in	Sun Dec 29 17:00:10 2019 +0300
     6.3 @@ -82,10 +82,9 @@
     6.4  DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
     6.5  	$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
     6.6  	$(top_srcdir)/configure $(am__configure_deps) \
     6.7 -	$(top_srcdir)/build/mkinstalldirs $(srcdir)/libmpg123.pc.in \
     6.8 -	COPYING TODO build/compile build/config.guess build/config.sub \
     6.9 -	build/depcomp build/install-sh build/missing \
    6.10 -	build/mkinstalldirs build/ltmain.sh \
    6.11 +	$(srcdir)/libmpg123.pc.in COPYING TODO build/compile \
    6.12 +	build/config.guess build/config.sub build/depcomp \
    6.13 +	build/install-sh build/missing build/ltmain.sh \
    6.14  	$(top_srcdir)/build/compile $(top_srcdir)/build/config.guess \
    6.15  	$(top_srcdir)/build/config.sub $(top_srcdir)/build/install-sh \
    6.16  	$(top_srcdir)/build/ltmain.sh $(top_srcdir)/build/missing
    6.17 @@ -98,7 +97,7 @@
    6.18  	$(ACLOCAL_M4)
    6.19  am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
    6.20   configure.lineno config.status.lineno
    6.21 -mkinstalldirs = $(SHELL) $(top_srcdir)/build/mkinstalldirs
    6.22 +mkinstalldirs = $(install_sh) -d
    6.23  CONFIG_HEADER = $(top_builddir)/src/config.h
    6.24  CONFIG_CLEAN_FILES = libmpg123.pc
    6.25  CONFIG_CLEAN_VPATH_FILES =
     7.1 --- a/external/libmpg123/NEWS	Sat Dec 28 01:55:00 2019 +0300
     7.2 +++ b/external/libmpg123/NEWS	Sun Dec 29 17:00:10 2019 +0300
     7.3 @@ -1,4 +1,4 @@
     7.4 -1.22.x-sezero (libmpg123 updates)
     7.5 +1.22.x-sezero (changes made by sezero)
     7.6  ---
     7.7  - Added nasm versions of x86 asm sources.
     7.8  - Open Watcom and MSVC6 compatibility.
     7.9 @@ -8,6 +8,8 @@
    7.10  
    7.11  1.22.x-sezero (backports)
    7.12  ---
    7.13 +- Make mpg123_resize_string() terminate the string if shrinking (fill now
    7.14 +  limited to new size).
    7.15  - Reset the flag for having a frame to decode before trying to
    7.16    parse a new one. This prevents very unkind behaviour (crashes)
    7.17    when combinging mpg123_scan() with decoding later on for damaged
     8.1 --- a/external/libmpg123/NEWS.libmpg123	Sat Dec 28 01:55:00 2019 +0300
     8.2 +++ b/external/libmpg123/NEWS.libmpg123	Sun Dec 29 17:00:10 2019 +0300
     8.3 @@ -1,6 +1,8 @@
     8.4  Changes in libmpg123 libtool interface versions...
     8.5  
     8.6 -(backports from 42.0.42)
     8.7 +42.0.42
     8.8 +	- added mpg123_framelength()
     8.9 +	  Now mpg123_position() is truly obsolete!
    8.10  	- hardened string API to not crash if given NULL pointers
    8.11  	  (except mpg123_init_string())
    8.12  	- equalizer feature optional
     9.1 --- a/external/libmpg123/build/mkinstalldirs	Sat Dec 28 01:55:00 2019 +0300
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,162 +0,0 @@
     9.4 -#! /bin/sh
     9.5 -# mkinstalldirs --- make directory hierarchy
     9.6 -
     9.7 -scriptversion=2009-04-28.21; # UTC
     9.8 -
     9.9 -# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
    9.10 -# Created: 1993-05-16
    9.11 -# Public domain.
    9.12 -#
    9.13 -# This file is maintained in Automake, please report
    9.14 -# bugs to <bug-automake@gnu.org> or send patches to
    9.15 -# <automake-patches@gnu.org>.
    9.16 -
    9.17 -nl='
    9.18 -'
    9.19 -IFS=" ""	$nl"
    9.20 -errstatus=0
    9.21 -dirmode=
    9.22 -
    9.23 -usage="\
    9.24 -Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
    9.25 -
    9.26 -Create each directory DIR (with mode MODE, if specified), including all
    9.27 -leading file name components.
    9.28 -
    9.29 -Report bugs to <bug-automake@gnu.org>."
    9.30 -
    9.31 -# process command line arguments
    9.32 -while test $# -gt 0 ; do
    9.33 -  case $1 in
    9.34 -    -h | --help | --h*)         # -h for help
    9.35 -      echo "$usage"
    9.36 -      exit $?
    9.37 -      ;;
    9.38 -    -m)                         # -m PERM arg
    9.39 -      shift
    9.40 -      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
    9.41 -      dirmode=$1
    9.42 -      shift
    9.43 -      ;;
    9.44 -    --version)
    9.45 -      echo "$0 $scriptversion"
    9.46 -      exit $?
    9.47 -      ;;
    9.48 -    --)                         # stop option processing
    9.49 -      shift
    9.50 -      break
    9.51 -      ;;
    9.52 -    -*)                         # unknown option
    9.53 -      echo "$usage" 1>&2
    9.54 -      exit 1
    9.55 -      ;;
    9.56 -    *)                          # first non-opt arg
    9.57 -      break
    9.58 -      ;;
    9.59 -  esac
    9.60 -done
    9.61 -
    9.62 -for file
    9.63 -do
    9.64 -  if test -d "$file"; then
    9.65 -    shift
    9.66 -  else
    9.67 -    break
    9.68 -  fi
    9.69 -done
    9.70 -
    9.71 -case $# in
    9.72 -  0) exit 0 ;;
    9.73 -esac
    9.74 -
    9.75 -# Solaris 8's mkdir -p isn't thread-safe.  If you mkdir -p a/b and
    9.76 -# mkdir -p a/c at the same time, both will detect that a is missing,
    9.77 -# one will create a, then the other will try to create a and die with
    9.78 -# a "File exists" error.  This is a problem when calling mkinstalldirs
    9.79 -# from a parallel make.  We use --version in the probe to restrict
    9.80 -# ourselves to GNU mkdir, which is thread-safe.
    9.81 -case $dirmode in
    9.82 -  '')
    9.83 -    if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
    9.84 -      echo "mkdir -p -- $*"
    9.85 -      exec mkdir -p -- "$@"
    9.86 -    else
    9.87 -      # On NextStep and OpenStep, the 'mkdir' command does not
    9.88 -      # recognize any option.  It will interpret all options as
    9.89 -      # directories to create, and then abort because '.' already
    9.90 -      # exists.
    9.91 -      test -d ./-p && rmdir ./-p
    9.92 -      test -d ./--version && rmdir ./--version
    9.93 -    fi
    9.94 -    ;;
    9.95 -  *)
    9.96 -    if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
    9.97 -       test ! -d ./--version; then
    9.98 -      echo "mkdir -m $dirmode -p -- $*"
    9.99 -      exec mkdir -m "$dirmode" -p -- "$@"
   9.100 -    else
   9.101 -      # Clean up after NextStep and OpenStep mkdir.
   9.102 -      for d in ./-m ./-p ./--version "./$dirmode";
   9.103 -      do
   9.104 -        test -d $d && rmdir $d
   9.105 -      done
   9.106 -    fi
   9.107 -    ;;
   9.108 -esac
   9.109 -
   9.110 -for file
   9.111 -do
   9.112 -  case $file in
   9.113 -    /*) pathcomp=/ ;;
   9.114 -    *)  pathcomp= ;;
   9.115 -  esac
   9.116 -  oIFS=$IFS
   9.117 -  IFS=/
   9.118 -  set fnord $file
   9.119 -  shift
   9.120 -  IFS=$oIFS
   9.121 -
   9.122 -  for d
   9.123 -  do
   9.124 -    test "x$d" = x && continue
   9.125 -
   9.126 -    pathcomp=$pathcomp$d
   9.127 -    case $pathcomp in
   9.128 -      -*) pathcomp=./$pathcomp ;;
   9.129 -    esac
   9.130 -
   9.131 -    if test ! -d "$pathcomp"; then
   9.132 -      echo "mkdir $pathcomp"
   9.133 -
   9.134 -      mkdir "$pathcomp" || lasterr=$?
   9.135 -
   9.136 -      if test ! -d "$pathcomp"; then
   9.137 -	errstatus=$lasterr
   9.138 -      else
   9.139 -	if test ! -z "$dirmode"; then
   9.140 -	  echo "chmod $dirmode $pathcomp"
   9.141 -	  lasterr=
   9.142 -	  chmod "$dirmode" "$pathcomp" || lasterr=$?
   9.143 -
   9.144 -	  if test ! -z "$lasterr"; then
   9.145 -	    errstatus=$lasterr
   9.146 -	  fi
   9.147 -	fi
   9.148 -      fi
   9.149 -    fi
   9.150 -
   9.151 -    pathcomp=$pathcomp/
   9.152 -  done
   9.153 -done
   9.154 -
   9.155 -exit $errstatus
   9.156 -
   9.157 -# Local Variables:
   9.158 -# mode: shell-script
   9.159 -# sh-indentation: 2
   9.160 -# eval: (add-hook 'write-file-hooks 'time-stamp)
   9.161 -# time-stamp-start: "scriptversion="
   9.162 -# time-stamp-format: "%:y-%02m-%02d.%02H"
   9.163 -# time-stamp-time-zone: "UTC"
   9.164 -# time-stamp-end: "; # UTC"
   9.165 -# End:
    10.1 --- a/external/libmpg123/configure	Sat Dec 28 01:55:00 2019 +0300
    10.2 +++ b/external/libmpg123/configure	Sun Dec 29 17:00:10 2019 +0300
    10.3 @@ -2595,8 +2595,8 @@
    10.4  ac_compiler_gnu=$ac_cv_c_compiler_gnu
    10.5  
    10.6  
    10.7 -API_VERSION=41
    10.8 -LIB_PATCHLEVEL=2
    10.9 +API_VERSION=42
   10.10 +LIB_PATCHLEVEL=0
   10.11  LIBMPG123_VERSION=$API_VERSION:$LIB_PATCHLEVEL:$API_VERSION
   10.12  
   10.13  
   10.14 @@ -2655,7 +2655,6 @@
   10.15    MAINT=$MAINTAINER_MODE_TRUE
   10.16  
   10.17  
   10.18 -cflags_save="$CFLAGS"
   10.19  # Make sure we can run config.sub.
   10.20  $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
   10.21    as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
   10.22 @@ -2727,7 +2726,6 @@
   10.23  case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
   10.24  
   10.25  
   10.26 -CFLAGS="$cflags_save"
   10.27  
   10.28  am__api_version='1.14'
   10.29  
   10.30 @@ -3367,7 +3365,6 @@
   10.31  $as_echo "$as_me: WARNING: Use -static in LDFLAGS for all-static linking! Your compiler may blow up on that -all-static. " >&2;}
   10.32  fi
   10.33  
   10.34 -cflags_save="$CFLAGS"
   10.35  DEPDIR="${am__leading_dot}deps"
   10.36  
   10.37  ac_config_commands="$ac_config_commands depfiles"
   10.38 @@ -5406,7 +5403,6 @@
   10.39  ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
   10.40  ac_compiler_gnu=$ac_cv_c_compiler_gnu
   10.41  
   10.42 -CFLAGS="$cflags_save"
   10.43  
   10.44  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
   10.45  $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
   10.46 @@ -11130,7 +11126,7 @@
   10.47  	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
   10.48  	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
   10.49  	emximp -o $lib $output_objdir/$libname.def'
   10.50 -      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
   10.51 +      old_archive_from_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
   10.52        enable_shared_with_static_runtimes=yes
   10.53        file_list_spec='@'
   10.54        ;;
   10.55 @@ -11985,7 +11981,7 @@
   10.56  	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
   10.57  	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
   10.58  	emximp -o $lib $output_objdir/$libname.def'
   10.59 -      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
   10.60 +      old_archive_from_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
   10.61        enable_shared_with_static_runtimes=yes
   10.62        file_list_spec='@'
   10.63        ;;
   10.64 @@ -15989,13 +15985,6 @@
   10.65    ;;
   10.66  esac
   10.67  
   10.68 -case $host in
   10.69 -  x86_64-apple-darwin*)
   10.70 -    ADD_CFLAGS="$ADD_CFLAGS -mmacosx-version-min=10.5"
   10.71 -    ADD_LDFLAGS="$ADD_LDFLAGS -mmacosx-version-min=10.5"
   10.72 -  ;;
   10.73 -esac
   10.74 -
   10.75  # Use yasm instead of the default assembler for AVX sources
   10.76  if test "x$use_yasm_for_avx" = "xyes"; then
   10.77  	case $host_os in
    11.1 --- a/external/libmpg123/configure.ac	Sat Dec 28 01:55:00 2019 +0300
    11.2 +++ b/external/libmpg123/configure.ac	Sun Dec 29 17:00:10 2019 +0300
    11.3 @@ -10,8 +10,8 @@
    11.4  dnl ############# Initialisation
    11.5  AC_INIT([mpg123], [1.22.4], [mpg123-devel@lists.sourceforge.net])
    11.6  dnl Increment API_VERSION when the API gets changes (new functions).
    11.7 -API_VERSION=41
    11.8 -LIB_PATCHLEVEL=2
    11.9 +API_VERSION=42
   11.10 +LIB_PATCHLEVEL=0
   11.11  dnl Since we want to be backwards compatible, both sides get set to API_VERSION.
   11.12  LIBMPG123_VERSION=$API_VERSION:$LIB_PATCHLEVEL:$API_VERSION
   11.13  AC_SUBST(LIBMPG123_VERSION)
   11.14 @@ -21,9 +21,7 @@
   11.15  AC_CONFIG_AUX_DIR(build)
   11.16  AC_CONFIG_MACRO_DIR([m4])
   11.17  AM_MAINTAINER_MODE
   11.18 -cflags_save="$CFLAGS"
   11.19  AC_CANONICAL_HOST
   11.20 -CFLAGS="$cflags_save"
   11.21  
   11.22  dnl Version 1.7 of automake is recommended
   11.23  AM_INIT_AUTOMAKE(1.7)
   11.24 @@ -75,12 +73,10 @@
   11.25  	AC_MSG_WARN( Use -static in LDFLAGS for all-static linking! Your compiler may blow up on that -all-static. )
   11.26  fi
   11.27  
   11.28 -cflags_save="$CFLAGS"
   11.29  AM_PROG_AS
   11.30  AC_PROG_CC
   11.31  AM_PROG_CC_C_O
   11.32  AC_PROG_CPP
   11.33 -CFLAGS="$cflags_save"
   11.34  AC_PROG_INSTALL
   11.35  dnl "Checking for egrep is broken after removal of libltdl stuff... checks use $EGREP, so searching it here."
   11.36  AC_PROG_EGREP
   11.37 @@ -1271,13 +1267,6 @@
   11.38    ;;
   11.39  esac
   11.40  
   11.41 -case $host in
   11.42 -  x86_64-apple-darwin*)
   11.43 -    ADD_CFLAGS="$ADD_CFLAGS -mmacosx-version-min=10.5"
   11.44 -    ADD_LDFLAGS="$ADD_LDFLAGS -mmacosx-version-min=10.5"
   11.45 -  ;;
   11.46 -esac
   11.47 -
   11.48  # Use yasm instead of the default assembler for AVX sources
   11.49  if test "x$use_yasm_for_avx" = "xyes"; then
   11.50  	case $host_os in
    12.1 --- a/external/libmpg123/dylibversion.patch	Sat Dec 28 01:55:00 2019 +0300
    12.2 +++ b/external/libmpg123/dylibversion.patch	Sun Dec 29 17:00:10 2019 +0300
    12.3 @@ -1,8 +1,8 @@
    12.4  link the osx dylib with compatibility version set to 25.0
    12.5  (corresponds to MPG123_API_VERSION 24)
    12.6  
    12.7 ---- mpg123-1.22.4/build/ltmain.sh-2.4.6.orig
    12.8 -+++ mpg123-1.22.4-edit/build/ltmain.sh
    12.9 +--- mpg123-1.22.4/build/ltmain.sh~
   12.10 ++++ mpg123-1.22.4/build/ltmain.sh
   12.11  @@ -8882,15 +8882,15 @@
   12.12   	  # Darwin ld doesn't like 0 for these options...
   12.13   	  func_arith $current + 1
    13.1 --- a/external/libmpg123/m4/libtool.m4	Sat Dec 28 01:55:00 2019 +0300
    13.2 +++ b/external/libmpg123/m4/libtool.m4	Sun Dec 29 17:00:10 2019 +0300
    13.3 @@ -5166,7 +5166,7 @@
    13.4  	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
    13.5  	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
    13.6  	emximp -o $lib $output_objdir/$libname.def'
    13.7 -      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
    13.8 +      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
    13.9        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
   13.10        _LT_TAGVAR(file_list_spec, $1)='@'
   13.11        ;;
   13.12 @@ -5872,7 +5872,7 @@
   13.13  	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
   13.14  	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
   13.15  	emximp -o $lib $output_objdir/$libname.def'
   13.16 -      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
   13.17 +      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
   13.18        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
   13.19        _LT_TAGVAR(file_list_spec, $1)='@'
   13.20        ;;
   13.21 @@ -6742,7 +6742,7 @@
   13.22  	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
   13.23  	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
   13.24  	  emximp -o $lib $output_objdir/$libname.def'
   13.25 -	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
   13.26 +	_LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
   13.27  	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
   13.28  	_LT_TAGVAR(file_list_spec, $1)='@'
   13.29  	;;
    14.1 --- a/external/libmpg123/src/Makefile.am	Sat Dec 28 01:55:00 2019 +0300
    14.2 +++ b/external/libmpg123/src/Makefile.am	Sun Dec 29 17:00:10 2019 +0300
    14.3 @@ -4,7 +4,7 @@
    14.4  ## see COPYING and AUTHORS files in distribution or http://mpg123.org
    14.5  ## initially written by Nicholas J. Humfrey
    14.6  
    14.7 -#AM_CFLAGS = @AUDIO_CFLAGS@
    14.8 +#AM_CFLAGS = 
    14.9  #AM_LDFLAGS = 
   14.10  AM_CPPFLAGS = -I$(top_srcdir)/src
   14.11  
    15.1 --- a/external/libmpg123/src/Makefile.in	Sat Dec 28 01:55:00 2019 +0300
    15.2 +++ b/external/libmpg123/src/Makefile.in	Sun Dec 29 17:00:10 2019 +0300
    15.3 @@ -82,8 +82,8 @@
    15.4  EXTRA_PROGRAMS = testcpu$(EXEEXT)
    15.5  subdir = src
    15.6  DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
    15.7 -	$(srcdir)/config.h.in $(top_srcdir)/build/mkinstalldirs \
    15.8 -	$(srcdir)/mpg123.h.in $(top_srcdir)/build/depcomp
    15.9 +	$(srcdir)/config.h.in $(srcdir)/mpg123.h.in \
   15.10 +	$(top_srcdir)/build/depcomp
   15.11  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
   15.12  am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
   15.13  	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
   15.14 @@ -91,7 +91,7 @@
   15.15  	$(top_srcdir)/configure.ac
   15.16  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
   15.17  	$(ACLOCAL_M4)
   15.18 -mkinstalldirs = $(SHELL) $(top_srcdir)/build/mkinstalldirs
   15.19 +mkinstalldirs = $(install_sh) -d
   15.20  CONFIG_HEADER = config.h
   15.21  CONFIG_CLEAN_FILES = mpg123.h
   15.22  CONFIG_CLEAN_VPATH_FILES =
   15.23 @@ -350,7 +350,7 @@
   15.24  top_builddir = @top_builddir@
   15.25  top_srcdir = @top_srcdir@
   15.26  
   15.27 -#AM_CFLAGS = @AUDIO_CFLAGS@
   15.28 +#AM_CFLAGS = 
   15.29  #AM_LDFLAGS = 
   15.30  AM_CPPFLAGS = -I$(top_srcdir)/src
   15.31  EXTRA_DIST = mpg123.h.in
    16.1 --- a/external/libmpg123/src/OS2_MSVC/mpg123.h	Sat Dec 28 01:55:00 2019 +0300
    16.2 +++ b/external/libmpg123/src/OS2_MSVC/mpg123.h	Sun Dec 29 17:00:10 2019 +0300
    16.3 @@ -12,7 +12,7 @@
    16.4  
    16.5  /* A macro to check at compile time which set of API functions to expect.
    16.6     This should be incremented at least each time a new symbol is added to the header. */
    16.7 -#define MPG123_API_VERSION 41
    16.8 +#define MPG123_API_VERSION 42
    16.9  
   16.10  /* These aren't actually in use... seems to work without using libtool. */
   16.11  #ifdef BUILD_MPG123_DLL
   16.12 @@ -86,6 +86,7 @@
   16.13  #define mpg123_set_index    MPG123_LARGENAME(mpg123_set_index)
   16.14  #define mpg123_position     MPG123_LARGENAME(mpg123_position)
   16.15  #define mpg123_length       MPG123_LARGENAME(mpg123_length)
   16.16 +#define mpg123_framelength  MPG123_LARGENAME(mpg123_framelength)
   16.17  #define mpg123_set_filesize MPG123_LARGENAME(mpg123_set_filesize)
   16.18  #define mpg123_replace_reader MPG123_LARGENAME(mpg123_replace_reader)
   16.19  #define mpg123_replace_reader_handle MPG123_LARGENAME(mpg123_replace_reader_handle)
   16.20 @@ -684,6 +685,7 @@
   16.21  
   16.22  /** Get information about current and remaining frames/seconds.
   16.23   *  WARNING: This function is there because of special usage by standalone mpg123 and may be removed in the final version of libmpg123!
   16.24 + *  broken for various cases (p.ex. 24 bit output). Do never use.
   16.25   *  You provide an offset (in frames) from now and a number of output bytes 
   16.26   *  served by libmpg123 but not yet played. You get the projected current frame 
   16.27   *  and seconds, as well as the remaining frames/seconds. This does _not_ care 
   16.28 @@ -812,6 +814,10 @@
   16.29   */
   16.30  MPG123_EXPORT int mpg123_scan(mpg123_handle *mh);
   16.31  
   16.32 +/** Return, if possible, the full (expected) length of current track in frames.
   16.33 +  * \return length >= 0 or MPG123_ERR if there is no length guess possible. */
   16.34 +MPG123_EXPORT off_t mpg123_framelength(mpg123_handle *mh);
   16.35 +
   16.36  /** Return, if possible, the full (expected) length of current track in samples.
   16.37    * \return length >= 0 or MPG123_ERR if there is no length guess possible. */
   16.38  MPG123_EXPORT off_t mpg123_length(mpg123_handle *mh);
    17.1 --- a/external/libmpg123/src/lfs_alias.c	Sat Dec 28 01:55:00 2019 +0300
    17.2 +++ b/external/libmpg123/src/lfs_alias.c	Sun Dec 29 17:00:10 2019 +0300
    17.3 @@ -196,6 +196,12 @@
    17.4  	return NATIVE_NAME(mpg123_position)(mh, frame_offset, buffered_bytes, current_frame, frames_left, current_seconds, seconds_left);
    17.5  }
    17.6  
    17.7 +lfs_alias_t NATIVE_NAME(mpg123_framelength)(mpg123_handle *mh);
    17.8 +lfs_alias_t attribute_align_arg ALIAS_NAME(mpg123_framelength)(mpg123_handle *mh)
    17.9 +{
   17.10 +	return NATIVE_NAME(mpg123_framelength)(mh);
   17.11 +}
   17.12 +
   17.13  lfs_alias_t NATIVE_NAME(mpg123_length)(mpg123_handle *mh);
   17.14  lfs_alias_t attribute_align_arg ALIAS_NAME(mpg123_length)(mpg123_handle *mh)
   17.15  {
    18.1 --- a/external/libmpg123/src/lfs_wrap.c	Sat Dec 28 01:55:00 2019 +0300
    18.2 +++ b/external/libmpg123/src/lfs_wrap.c	Sun Dec 29 17:00:10 2019 +0300
    18.3 @@ -467,6 +467,23 @@
    18.4  	return MPG123_OK;
    18.5  }
    18.6  
    18.7 +#undef mpg123_framelength
    18.8 +/* off_t mpg123_framelength(mpg123_handle *mh); */
    18.9 +long attribute_align_arg mpg123_framelength(mpg123_handle *mh)
   18.10 +{
   18.11 +	long val;
   18.12 +	off_t largeval;
   18.13 +
   18.14 +	largeval = MPG123_LARGENAME(mpg123_framelength)(mh);
   18.15 +	val = largeval;
   18.16 +	if(val != largeval)
   18.17 +	{
   18.18 +		mh->err = MPG123_LFS_OVERFLOW;
   18.19 +		return MPG123_ERR;
   18.20 +	}
   18.21 +	return val;
   18.22 +}
   18.23 +
   18.24  #undef mpg123_length
   18.25  /* off_t mpg123_length(mpg123_handle *mh); */
   18.26  long attribute_align_arg mpg123_length(mpg123_handle *mh)
    19.1 --- a/external/libmpg123/src/libmpg123.c	Sat Dec 28 01:55:00 2019 +0300
    19.2 +++ b/external/libmpg123/src/libmpg123.c	Sun Dec 29 17:00:10 2019 +0300
    19.3 @@ -1312,6 +1312,31 @@
    19.4  	return MPG123_OK;
    19.5  }
    19.6  
    19.7 +off_t attribute_align_arg mpg123_framelength(mpg123_handle *mh)
    19.8 +{
    19.9 +	int b;
   19.10 +	if(mh == NULL)
   19.11 +		return MPG123_ERR;
   19.12 +	b = init_track(mh);
   19.13 +	if(b<0)
   19.14 +		return b;
   19.15 +	if(mh->track_frames > 0)
   19.16 +		return mh->track_frames;
   19.17 +	if(mh->rdat.filelen > 0)
   19.18 +	{ /* A bad estimate. Ignoring tags 'n stuff. */
   19.19 +		double bpf = mh->mean_framesize > 0.
   19.20 +			? mh->mean_framesize
   19.21 +			: compute_bpf(mh);
   19.22 +		return (off_t)((double)(mh->rdat.filelen)/bpf+0.5);
   19.23 +	}
   19.24 +	/* Last resort: No view of the future, can at least count the frames that
   19.25 +	   were already parsed. */
   19.26 +	if(mh->num > -1)
   19.27 +		return mh->num+1;
   19.28 +	/* Giving up. */
   19.29 +	return MPG123_ERR;
   19.30 +}
   19.31 +
   19.32  off_t attribute_align_arg mpg123_length(mpg123_handle *mh)
   19.33  {
   19.34  	int b;
    20.1 --- a/external/libmpg123/src/mpg123.h.in	Sat Dec 28 01:55:00 2019 +0300
    20.2 +++ b/external/libmpg123/src/mpg123.h.in	Sun Dec 29 17:00:10 2019 +0300
    20.3 @@ -86,6 +86,7 @@
    20.4  #define mpg123_set_index    MPG123_LARGENAME(mpg123_set_index)
    20.5  #define mpg123_position     MPG123_LARGENAME(mpg123_position)
    20.6  #define mpg123_length       MPG123_LARGENAME(mpg123_length)
    20.7 +#define mpg123_framelength  MPG123_LARGENAME(mpg123_framelength)
    20.8  #define mpg123_set_filesize MPG123_LARGENAME(mpg123_set_filesize)
    20.9  #define mpg123_replace_reader MPG123_LARGENAME(mpg123_replace_reader)
   20.10  #define mpg123_replace_reader_handle MPG123_LARGENAME(mpg123_replace_reader_handle)
   20.11 @@ -684,6 +685,7 @@
   20.12  
   20.13  /** Get information about current and remaining frames/seconds.
   20.14   *  WARNING: This function is there because of special usage by standalone mpg123 and may be removed in the final version of libmpg123!
   20.15 + *  broken for various cases (p.ex. 24 bit output). Do never use.
   20.16   *  You provide an offset (in frames) from now and a number of output bytes 
   20.17   *  served by libmpg123 but not yet played. You get the projected current frame 
   20.18   *  and seconds, as well as the remaining frames/seconds. This does _not_ care 
   20.19 @@ -812,6 +814,10 @@
   20.20   */
   20.21  MPG123_EXPORT int mpg123_scan(mpg123_handle *mh);
   20.22  
   20.23 +/** Return, if possible, the full (expected) length of current track in frames.
   20.24 +  * \return length >= 0 or MPG123_ERR if there is no length guess possible. */
   20.25 +MPG123_EXPORT off_t mpg123_framelength(mpg123_handle *mh);
   20.26 +
   20.27  /** Return, if possible, the full (expected) length of current track in samples.
   20.28    * \return length >= 0 or MPG123_ERR if there is no length guess possible. */
   20.29  MPG123_EXPORT off_t mpg123_length(mpg123_handle *mh);
    21.1 --- a/external/libmpg123/src/stringbuf.c	Sat Dec 28 01:55:00 2019 +0300
    21.2 +++ b/external/libmpg123/src/stringbuf.c	Sun Dec 29 17:00:10 2019 +0300
    21.3 @@ -58,6 +58,12 @@
    21.4  		{
    21.5  			sb->p = t;
    21.6  			sb->size = new;
    21.7 +			if(sb->size < sb->fill)
    21.8 +			{
    21.9 +				// Cut short the existing data, properly.
   21.10 +				sb->fill = sb->size;
   21.11 +				sb->p[sb->fill-1] = 0;
   21.12 +			}
   21.13  			return 1;
   21.14  		}
   21.15  		else return 0;