[Ffmpeg-devel] uint_fast64_t in vorbis.c
Jacob Meuser
jakemsr
Tue Jun 7 12:25:50 CEST 2005
On Tue, Jun 07, 2005 at 10:18:59AM -0000, Wolfram Gloger wrote:
> Hi,
>
> > > > as a result, FFmpeg does not currently build on systems that don't
> > > > define uint_fast64_t.
> > >
> > > Just out of curiosity, what system are you using that doesn't define
> > > this type?
> >
> > OpenBSD
>
> You should file a bug, because ISO C _requires_ uint_fast64_t
> (surprised me, too).
yeah, yeah, yeah ... they know.
> How about this?
it's not "fast".
--
<jakemsr at jakemsr.com>
-------------- next part --------------
Index: libavcodec/common.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/common.h,v
retrieving revision 1.150
diff -u -r1.150 common.h
--- libavcodec/common.h 21 May 2005 21:37:07 -0000 1.150
+++ libavcodec/common.h 7 Jun 2005 10:24:32 -0000
@@ -124,6 +124,14 @@
#define UINT64_MAX uint64_t_C(0xFFFFFFFFFFFFFFFF)
#endif
+#ifndef INT_BIT
+# if INT_MAX != 2147483647
+# define INT_BIT 64
+# else
+# define INT_BIT 32
+# endif
+#endif
+
#ifdef EMULATE_FAST_INT
/* note that we don't emulate 64bit ints */
typedef signed char int_fast8_t;
@@ -132,14 +140,11 @@
typedef unsigned char uint_fast8_t;
typedef unsigned int uint_fast16_t;
typedef unsigned int uint_fast32_t;
+#if INT_BIT == 64
+typedef unsigned int uint_fast64_t;
+#else
+typedef unsigned long uint_fast64_t;
#endif
-
-#ifndef INT_BIT
-# if INT_MAX != 2147483647
-# define INT_BIT 64
-# else
-# define INT_BIT 32
-# endif
#endif
#if defined(CONFIG_OS2) || defined(CONFIG_SUNOS)
More information about the ffmpeg-devel
mailing list