From: <sv...@op...> - 2024-04-04 18:12:31
|
Author: manx Date: Thu Apr 4 20:12:19 2024 New Revision: 20495 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20495 Log: [Var] mpg123: Update to 1.32.6 (2024-04-04). Modified: trunk/OpenMPT/include/mpg123/OpenMPT.txt trunk/OpenMPT/include/mpg123/src/libmpg123/lfs_wrap.c trunk/OpenMPT/include/mpg123/src/libmpg123/libmpg123.c trunk/OpenMPT/include/mpg123/src/libmpg123/mpg123lib_intern.h trunk/OpenMPT/include/mpg123/src/version.h Modified: trunk/OpenMPT/include/mpg123/OpenMPT.txt ============================================================================== --- trunk/OpenMPT/include/mpg123/OpenMPT.txt Thu Apr 4 20:08:32 2024 (r20494) +++ trunk/OpenMPT/include/mpg123/OpenMPT.txt Thu Apr 4 20:12:19 2024 (r20495) @@ -1,4 +1,4 @@ -libmpg123 library version 1.32.5 (2024-02-17). +libmpg123 library version 1.32.6 (2024-04-04). The following changes have been made: * `ports/makefile/config.h` has been added for plain `Makefile` builds. * `ports/MSVC++/config.h` has been added for MSVC builds. Modified: trunk/OpenMPT/include/mpg123/src/libmpg123/lfs_wrap.c ============================================================================== --- trunk/OpenMPT/include/mpg123/src/libmpg123/lfs_wrap.c Thu Apr 4 20:08:32 2024 (r20494) +++ trunk/OpenMPT/include/mpg123/src/libmpg123/lfs_wrap.c Thu Apr 4 20:12:19 2024 (r20495) @@ -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 Modified: trunk/OpenMPT/include/mpg123/src/libmpg123/libmpg123.c ============================================================================== --- trunk/OpenMPT/include/mpg123/src/libmpg123/libmpg123.c Thu Apr 4 20:08:32 2024 (r20494) +++ trunk/OpenMPT/include/mpg123/src/libmpg123/libmpg123.c Thu Apr 4 20:12:19 2024 (r20495) @@ -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) { Modified: trunk/OpenMPT/include/mpg123/src/libmpg123/mpg123lib_intern.h ============================================================================== --- trunk/OpenMPT/include/mpg123/src/libmpg123/mpg123lib_intern.h Thu Apr 4 20:08:32 2024 (r20494) +++ trunk/OpenMPT/include/mpg123/src/libmpg123/mpg123lib_intern.h Thu Apr 4 20:12:19 2024 (r20495) @@ -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 */ Modified: trunk/OpenMPT/include/mpg123/src/version.h ============================================================================== --- trunk/OpenMPT/include/mpg123/src/version.h Thu Apr 4 20:08:32 2024 (r20494) +++ trunk/OpenMPT/include/mpg123/src/version.h Thu Apr 4 20:12:19 2024 (r20495) @@ -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 "" |