Correct, portable definition of INT_BIT
authorMåns Rullgård <mans@mansr.com>
Sat, 21 Feb 2009 16:03:30 +0000 (16:03 +0000)
committerMåns Rullgård <mans@mansr.com>
Sat, 21 Feb 2009 16:03:30 +0000 (16:03 +0000)
Originally committed as revision 17480 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavutil/internal.h

index 7041be2..f5f769e 100644 (file)
 #endif
 
 #ifndef INT_BIT
-#    if INT_MAX != 2147483647
-#        define INT_BIT 64
-#    else
-#        define INT_BIT 32
-#    endif
+#    define INT_BIT (CHAR_BIT * sizeof(int))
 #endif
 
 #if ( defined(__PIC__) || defined(__pic__) ) && ! defined(PIC)