Erik de Castro Lopo
2014-Apr-09 08:12 UTC
[flac-dev] Patch to fix compiler warnings and error status collisions
Erik de Castro Lopo wrote:> This could also be fixed by adding a: > > decoder->protected_->initstate > > and using that correctly. Right? > > I'm going to play with this idea.That fixed it. Commit is here: https://git.xiph.org/?p=flac.git;a=commit;h=3f5208c30022b7cbd0b9095ad3550c4f6cb348c9 What didn't get added was this: diff --git a/src/flac/utils.c b/src/flac/utils.c index 4bf05e2..941a958 100644 --- a/src/flac/utils.c +++ b/src/flac/utils.c @@ -35,7 +35,7 @@ #ifdef HAVE_TERMIOS_H # include <termios.h> #endif -#ifdef GWINSZ_IN_SYS_IOCTL +#if !defined __ANDROID__ # include <sys/ioctl.h> #endif #endif because that seemed completely un-related. What's this bit all about? Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
Lenny Maiorani
2014-Apr-11 16:51 UTC
[flac-dev] Patch to fix compiler warnings and error status collisions
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]
Also, at the moment, TOT does not compile. It is missing the file
fixed_intrin_sse2.c
-Lenny
On Wed, Apr 9, 2014 at 2:12 AM, Erik de Castro Lopo <mle+la at
mega-nerd.com>wrote:
> Erik de Castro Lopo wrote:
>
> > This could also be fixed by adding a:
> >
> > decoder->protected_->initstate
> >
> > and using that correctly. Right?
> >
> > I'm going to play with this idea.
>
> That fixed it. Commit is here:
>
>
>
https://git.xiph.org/?p=flac.git;a=commit;h=3f5208c30022b7cbd0b9095ad3550c4f6cb348c9
>
>
> What didn't get added was this:
>
> diff --git a/src/flac/utils.c b/src/flac/utils.c
> index 4bf05e2..941a958 100644
> --- a/src/flac/utils.c
> +++ b/src/flac/utils.c
> @@ -35,7 +35,7 @@
> #ifdef HAVE_TERMIOS_H
> # include <termios.h>
> #endif
> -#ifdef GWINSZ_IN_SYS_IOCTL
> +#if !defined __ANDROID__
> # include <sys/ioctl.h>
> #endif
> #endif
>
> because that seemed completely un-related. What's this bit all about?
>
> Erik
> --
> ----------------------------------------------------------------------
> Erik de Castro Lopo
> http://www.mega-nerd.com/
> _______________________________________________
> flac-dev mailing list
> flac-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/flac-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.xiph.org/pipermail/flac-dev/attachments/20140411/477e30f7/attachment.htm
Erik de Castro Lopo
2014-Apr-15 08:32 UTC
[flac-dev] Patch to fix compiler warnings and error status collisions
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.cYeah, 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/
Maybe Matching Threads
- Patch to fix compiler warnings and error status collisions
- Patch to fix compiler warnings and error status collisions
- [PATCH 14] preprocessor macros in lpc_intrin_sseN.c
- Patch to fix compiler warnings and error status collisions
- [PATCH] simpler xmm -> int64 code