]> granicus.if.org Git - libjpeg-turbo/commitdiff
Not all platforms define __WORDSIZE
authorDRC <dcommander@users.sourceforge.net>
Mon, 28 Sep 2009 08:19:40 +0000 (08:19 +0000)
committerDRC <dcommander@users.sourceforge.net>
Mon, 28 Sep 2009 08:19:40 +0000 (08:19 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@65 632fc199-4ca6-4c93-a231-07263d6284db

jdhuff.h

index 8e50bbfb577463a4073368e3ca122e43c7eb5ee4..a7c8188f29f2f114506af416c26b4ebcea21dba5 100644 (file)
--- a/jdhuff.h
+++ b/jdhuff.h
@@ -73,8 +73,17 @@ EXTERN(void) jpeg_make_d_derived_tbl
  * necessary.
  */
 
-typedef long bit_buf_type;             /* type of bit-extraction buffer */
-#define BIT_BUF_SIZE  __WORDSIZE       /* size of buffer in bits */
+#if __WORDSIZE == 64
+
+typedef long bit_buf_type;     /* type of bit-extraction buffer */
+#define BIT_BUF_SIZE  64               /* size of buffer in bits */
+
+#else
+
+typedef INT32 bit_buf_type;    /* type of bit-extraction buffer */
+#define BIT_BUF_SIZE  32               /* size of buffer in bits */
+
+#endif
 
 /* If long is > 32 bits on your machine, and shifting/masking longs is
  * reasonably fast, making bit_buf_type be long and setting BIT_BUF_SIZE