aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db>2009-09-28 08:19:40 +0000
committerdcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db>2009-09-28 08:19:40 +0000
commit5d3ac4da25f1a17705ebf619477c80c6c30c8237 (patch)
tree2d9c2246fa933a53077cf6de1330d1a032aef012
parente0e0919c7f28a6b4a0077f41ebb13f79cb05059b (diff)
Not all platforms define __WORDSIZE
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@65 632fc199-4ca6-4c93-a231-07263d6284db
-rw-r--r--jdhuff.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/jdhuff.h b/jdhuff.h
index 8e50bbf..a7c8188 100644
--- 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