Commit 9ebdec7e authored by Tristan Matthews's avatar Tristan Matthews

contrib: update to flac 1.3.3

parent f501c7dc
63910e8ebbe508316d446ffc9eb6d02efbd5f47d29d2ea7864da9371843c8e671854db6e89ba043fe08aef1845b8ece70db80f1cce853f591ca30d56ef7c3a15 flac-1.3.2.tar.xz
d6417e14fab0c41b2df369e5e39ce62a5f588e491af4d465b0162f74e171e5549b2f061867f344bfbf8aaccd246bf5f2acd697e532a2c7901c920c69429b1a28 flac-1.3.3.tar.xz
diff -urN flac-orig/configure.ac flac/configure.ac
--- flac-orig/configure.ac 2017-01-01 03:46:35.224989057 +0200
+++ flac/configure.ac 2018-02-26 00:37:22.876134887 +0200
@@ -178,7 +178,6 @@
--- flac-orig/configure.ac 2019-08-26 11:13:17.604801738 -0400
+++ flac/configure.ac 2019-08-26 11:13:46.624689160 -0400
@@ -208,7 +208,6 @@
os_is_windows=no
case "$host" in
*-*-cygwin|*mingw*)
*mingw*)
- CPPFLAGS="-D__MSVCRT_VERSION__=0x0601 $CPPFLAGS"
os_is_windows=yes
;;
......
--- flac/src/libFLAC/windows_unicode_filenames.c.orig 2017-01-05 16:36:45.696358168 +0100
+++ flac/src/libFLAC/windows_unicode_filenames.c 2017-01-05 17:03:41.052478210 +0100
@@ -35,6 +35,7 @@
--- flac-orig/src/share/win_utf8_io/win_utf8_io.c 2019-08-26 11:13:17.600801754 -0400
+++ flac/src/share/win_utf8_io/win_utf8_io.c 2019-08-26 11:20:27.895132487 -0400
@@ -34,8 +34,10 @@
#endif
#include <io.h>
#include <windows.h>
+#include <winapifamily.h>
#include "share/win_utf8_io.h"
#include "share/windows_unicode_filenames.h"
+#include <winapifamily.h>
/* convert UTF-8 back to WCHAR. Caller is responsible for freeing memory */
static wchar_t *wchar_from_utf8(const char *str)
@@ -186,7 +187,11 @@
HANDLE WINAPI flac_internal_CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile)
#define UTF8_BUFFER_SIZE 32768
@@ -153,7 +155,11 @@
HANDLE WINAPI CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile)
{
if (!utf8_filenames) {
if (!flac_internal_get_utf8_filenames()) {
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
return CreateFileA(lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile);
+#else
......@@ -20,3 +23,37 @@
} else {
wchar_t *wname;
HANDLE handle = INVALID_HANDLE_VALUE;
@@ -182,11 +188,13 @@
int win_get_console_width(void)
{
int width = 80;
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
CONSOLE_SCREEN_BUFFER_INFO csbi;
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
if(hOut != INVALID_HANDLE_VALUE && hOut != NULL)
if (GetConsoleScreenBufferInfo(hOut, &csbi) != 0)
width = csbi.dwSize.X;
+#endif
return width;
}
@@ -194,6 +202,11 @@
static int wprint_console(FILE *stream, const wchar_t *text, size_t len)
{
+#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+ (void)stream;
+ OutputDebugStringW(text);
+ return len;
+#else
DWORD out;
int ret;
@@ -220,6 +233,7 @@
if (ret < 0)
return ret;
return len;
+#endif
}
int printf_utf8(const char *format, ...)
--- flac/src/share/grabbag/file.c.orig 2014-11-27 02:19:47.048799991 +0100
+++ flac/src/share/grabbag/file.c 2016-05-13 16:32:33.727811662 +0200
@@ -117,34 +117,7 @@
--- flac-orig/src/share/grabbag/file.c 2019-08-26 11:13:17.600801754 -0400
+++ flac/src/share/grabbag/file.c 2019-08-26 11:27:16.801546222 -0400
@@ -118,34 +118,7 @@
FLAC__bool grabbag__file_are_same(const char *f1, const char *f2)
{
#if defined _MSC_VER || defined __MINGW32__
#if defined _WIN32 && !defined __CYGWIN__
- /* see
- * http://www.hydrogenaudio.org/forums/index.php?showtopic=49439&pid=444300&st=0
- * http://www.hydrogenaudio.org/forums/index.php?showtopic=49439&pid=444300&st=0
- * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/getfileinformationbyhandle.asp
- * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/by_handle_file_information_str.asp
- * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/createfile.asp
......@@ -32,7 +32,7 @@
- if(h2 != INVALID_HANDLE_VALUE)
- CloseHandle(h2);
- return same;
+ return true;
+ return true;
#else
struct flac_stat_s s1, s2;
return f1 && f2 && flac_stat(f1, &s1) == 0 && flac_stat(f2, &s2) == 0 && s1.st_ino == s2.st_ino && s1.st_dev == s2.st_dev;
# FLAC
FLAC_VERSION := 1.3.2
FLAC_VERSION := 1.3.3
FLAC_URL := http://downloads.xiph.org/releases/flac/flac-$(FLAC_VERSION).tar.xz
PKGS += flac
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment