[prev in list] [next in list] [prev in thread] [next in thread]
List: flac-dev
Subject: Re: [flac-dev] Patch to fix compiler warnings and error status collisions
From: Erik de Castro Lopo <mle+la () mega-nerd ! com>
Date: 2014-04-15 8:32:50
Message-ID: 20140415183250.fb0855ca81eb9a8857f2f7fb () mega-nerd ! com
[Download RAW message or body]
Lenny Maiorani wrote:
> This also causes a warning and looks like it is the wrong #ifdef. ioctl()
> is only used inside of a '#if !defined __ANDROID__'.
>
> Note, this compiler warning was generated when compiling on Mac OSX 10.9
> with clang:
>
> utils.c:189:6: warning: implicit declaration of function 'ioctl' is
> invalid in C99 [-Wimplicit-function-declaration]
Sorry for the delay in replying to this.
Looking at the code I can see why you thought:
-#ifdef GWINSZ_IN_SYS_IOCTL
+#if !defined __ANDROID__
was the appropriate fix for this, but I think instead the fix should
be:
int s[2];
_scrsize (s);
width = s[0];
-#elif !defined __ANDROID__
+#elif defined GWINSZ_IN_SYS_IOCTL
struct winsize w;
if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) != -1) width = w.ws_col;
I've commited this to git. Please test.
> Also, at the moment, TOT does not compile. It is missing the file
> fixed_intrin_sse2.c
Yeah, I got couple of notifications about that. It was fixed a couple of
days ago.
Cheers,
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
_______________________________________________
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic