[MPlayer-dev-eng] [PATCH] use inttypes.h if stdint.h is not available.

Diego Biurrun diego at biurrun.de
Thu Nov 22 17:58:57 CET 2007


On Thu, Nov 22, 2007 at 03:09:22PM +0100, Ralf Menzel wrote:
> 
> Solaris 9 has no stdint.h. This patch tests for its presence and uses
> inttypes.h if there is no stdint.h.

stdint.h is part of C99 (one of the gurus will correct me if I am
wrong) or some other relevant standard.  If Solaris 9 does not support
that - bad luck.

> --- vidix/mtrr.c	(revision 25137)
> +++ vidix/mtrr.c	(working copy)
> @@ -31,7 +31,11 @@
>  #if defined (__i386__) && defined (__NetBSD__)
>  #include <sys/param.h>
>  #if __NetBSD_Version__ > 105240000
> +#ifdef HAVE_STDINT_H
>  #include <stdint.h>
> +#else
> +#include <inttypes.h>
> +#endif

You are patching the NetBSD section, this is nonsense.

> --- libavutil/adler32.h	(revision 11075)
> +++ libavutil/adler32.h	(working copy)
> @@ -21,7 +21,11 @@
>  #ifndef FFMPEG_ADLER32_H
>  #define FFMPEG_ADLER32_H
>  
> +#ifdef HAVE_STDINT_H
>  #include <stdint.h>
> +#else
> +#include <inttypes.h>
> +#endif

This patch belongs on ffmpeg-devel, not mplayer-dev-eng.

I doubt this ugly #ifdef will be accepted.  However, if it works, you
could try exchanging all or most occurrences of stdint.h with
inttypes.h.  If that is more portable, it might be accepted.

Diego



More information about the MPlayer-dev-eng mailing list