[FFmpeg-devel] [PATCH] djgpp port

Diego Biurrun diego
Mon Dec 24 13:47:56 CET 2007


On Mon, Dec 24, 2007 at 02:24:09PM +0300, Michael Kostylev wrote:
> 
> At Mon, 24 Dec 2007 04:21:50 +0100,
> Michael Niedermayer wrote:
> 
> > this stuff is not ok, the reason is that you add more ugly and fragile 
> > ifdeffery (which will break for example if a futue version of DJGPP adds these
> > functions ...)
> > each of these should be checked for by configure ...
> > also the implementation of round* is wrong
> 
> Agree, yet another "better than nothing implementation"(tm) follows.
> 
> > also did you or anyone else report these missing function to the djgpp
> > maintainer/developers/whatever? it would be much better if these would
> > be added to djgpp instead of every program which wants to be compileable
> > under djgpp
> 
> Looks like no one needs it.
> 
> --- ffmpeg-export-2007-12-23/libavformat/os_support.c	2007-12-09 17:39:01.000000000 +0300
> +++ ffmpeg-export-2007-12-23_djgpp/libavformat/os_support.c	2007-12-24 01:18:53.000000000 +0300
> @@ -30,9 +30,11 @@
>  #ifdef HAVE_WINSOCK2_H
>  #include <winsock2.h>
>  #else
> +#ifdef HAVE_SYS_SELECT_H 
>  #include <sys/select.h>
>  #endif
>  #endif
> +#endif

What I said in the other mail still applies.

> --- ffmpeg-export-2007-12-23/configure	2007-12-17 22:30:04.000000000 +0300
> +++ ffmpeg-export-2007-12-23_djgpp/configure	2007-12-24 12:59:19.000000000 +0300
> @@ -1584,12 +1597,14 @@
>  
>  check_lib math.h sin -lm
>  
> -# test for lrintf in math.h
> -check_exec <<EOF && enable lrintf || disable lrintf
> +# test for C99 functions in math.h
> +for func in llrint lrint lrintf round roundf; do
> +    check_exec <<EOF && enable $func || disable $func
>  #define _ISOC9X_SOURCE  1
>  #include <math.h>
> -int main(void) { return (lrintf(3.999f) > 0)?0:1; }
> +int main(void) { return ($func(3.999) > 0)?0:1; }

You removed the "f", is this still correct?

> --- ffmpeg-export-2007-12-23/libavutil/internal.h	2007-11-19 13:40:11.000000000 +0300
> +++ ffmpeg-export-2007-12-23_djgpp/libavutil/internal.h	2007-12-24 13:21:25.000000000 +0300
> @@ -276,8 +276,36 @@
>  /* btw, rintf() is existing on fbsd too -- alex */
>  static av_always_inline long int lrintf(float x)
>  {
> -    return (int)(rint(x));
> +    return (long int)(rint(x));

What Michael said in the other mail still applies.

I just applied the third patch.

Diego




More information about the ffmpeg-devel mailing list