Ulrich Klauer
2013-May-15 16:14 UTC
[flac-dev] FLAC currently won't compile for Android [bisected]
Felix Homann wrote:> Here are the warnings I get with 03a9e6064d406e3656afacdbe50e8e47ebfa0de3:It seems Android sys/param.h doesn't define MIN/MAX. Could you try to revert this commit on current master (or simply change line 35 of src/libFLAC/include/private/macros.h back to #if defined(__GNUC__) ) and recompile? Or possibly bisect 03a9e60..master to find out when the src/flac/utils.c error starts to appear? Ulrich
Felix Homann
2013-May-22 14:03 UTC
[flac-dev] FLAC currently won't compile for Android [bisected]
Sorry that it took so long to reply. As mentioned in an earlier mail my first bisect session wasn't accurate. I've done a new one: git bisect bad d0c219f1978dbaa00a063ac82aa75c8af152cbbb is the first bad commit commit d0c219f1978dbaa00a063ac82aa75c8af152cbbb Author: Erik de Castro Lopo <erikd at mega-nerd.com> Date: Sun Apr 21 16:16:44 2013 +1000 A set of windows utf8 patches fromJanne Hyv?rinen <cse at sci.fi>. :040000 040000 a95dce6a0693a0a234673783b0223d71f2b25b02 21c7a6e2ba38b7dba2c700b999240b82f93a3b65 M src The relevant part seems to be this one: +int get_console_width() +{ + int width = 80; +#ifdef _WIN32 + width = win_get_console_width(); +#else + struct winsize w; + if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) != -1) width = w.ws_col; +#endif + return width; +} -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/flac-dev/attachments/20130522/959aa465/attachment.htm
Janne Hyvärinen
2013-May-23 10:44 UTC
[flac-dev] FLAC currently won't compile for Android [bisected]
On 22.5.2013 17:03, Felix Homann wrote:> Sorry that it took so long to reply. As mentioned in an earlier mail > my first bisect session wasn't accurate. I've done a new one: > >Here's my patch suggestion but I'm no Android guy. -------------- next part -------------- diff --git a/src/flac/utils.c b/src/flac/utils.c index e908706..6f6382e 100644 --- a/src/flac/utils.c +++ b/src/flac/utils.c @@ -171,13 +171,13 @@ static int console_chars_left; int get_console_width(void) { int width = 80; -#ifdef _WIN32 +#if defined _WIN32 width = win_get_console_width(); #elif defined __EMX__ - int s[2]; - _scrsize (s); - width = s[0]; -#else + int s[2]; + _scrsize (s); + width = s[0]; +#elif !defined __ANDROID__ struct winsize w; if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) != -1) width = w.ws_col; #endif