fix word size detection

Due to the order in which jconfig.h was included in
jinclude.h, __WORDSIZE was not yet defined, so that
SIZEOF_SIZE_T was always defined as 4 even on 64bit architectures.
Also jinclude.h and jconfig.h had no include guard and where
included more than once which lead to redefinitions of the
SIZEOF_SIZE_T macro.

This patch
 * makes SIZEOF_SIZE_T defined as __SIZEOF_SIZE_T__, which is predefined
   by the compiler,
 * makes the preprocessor emit an error if __SIZEOF_SIZE_T__ is not
   predefined, and
 * adds an include guard to jconfig.h.

(cherrypick of b4ab00215cfc72d42f6e19684fa7375203b2f675.)

Change-Id: Icb029a6faafdc847e2b735bd9adb465868f1b17d
1 file changed
tree: 7a81fbdacc60f5a01189f085485ed32afa31dc18
  1. cmakescripts/
  2. doc/
  3. java/
  4. md5/
  5. release/
  6. sharedlib/
  7. simd/
  8. testimages/
  9. win/
  10. .gitignore
  11. acinclude.m4
  12. Android.mk
  13. bmp.c
  14. bmp.h
  15. BUILDING.txt
  16. cderror.h
  17. cdjpeg.c
  18. cdjpeg.h
  19. change.log
  20. ChangeLog.txt
  21. cjpeg.1
  22. cjpeg.c
  23. CMakeLists.txt
  24. coderules.txt
  25. configure.ac
  26. djpeg.1
  27. djpeg.c
  28. doxygen-extra.css
  29. doxygen.config
  30. example.c
  31. jaricom.c
  32. jcapimin.c
  33. jcapistd.c
  34. jcarith.c
  35. jccoefct.c
  36. jccolext.c
  37. jccolor.c
  38. jcdctmgr.c
  39. jchuff.c
  40. jchuff.h
  41. jcinit.c
  42. jcmainct.c
  43. jcmarker.c
  44. jcmaster.c
  45. jcomapi.c
  46. jconfig.h
  47. jconfig.txt
  48. jconfigint.h
  49. jcparam.c
  50. jcphuff.c
  51. jcprepct.c
  52. jcsample.c
  53. jcstest.c
  54. jctrans.c
  55. jdapimin.c
  56. jdapistd.c
  57. jdarith.c
  58. jdatadst-tj.c
  59. jdatadst.c
  60. jdatasrc-tj.c
  61. jdatasrc.c
  62. jdcoefct.c
  63. jdcoefct.h
  64. jdcol565.c
  65. jdcolext.c
  66. jdcolor.c
  67. jdct.h
  68. jddctmgr.c
  69. jdhuff.c
  70. jdhuff.h
  71. jdinput.c
  72. jdmainct.c
  73. jdmainct.h
  74. jdmarker.c
  75. jdmaster.c
  76. jdmaster.h
  77. jdmerge.c
  78. jdmrg565.c
  79. jdmrgext.c
  80. jdphuff.c
  81. jdpostct.c
  82. jdsample.c
  83. jdsample.h
  84. jdtrans.c
  85. jerror.c
  86. jerror.h
  87. jfdctflt.c
  88. jfdctfst.c
  89. jfdctint.c
  90. jidctflt.c
  91. jidctfst.c
  92. jidctint.c
  93. jidctred.c
  94. jinclude.h
  95. jmemmgr.c
  96. jmemnobs.c
  97. jmemsys.h
  98. jmorecfg.h
  99. jpeg_nbits_table.h
  100. jpegcomp.h
  101. jpegint.h
  102. jpeglib.h
  103. jpegtran.1
  104. jpegtran.c
  105. jquant1.c
  106. jquant2.c
  107. jsimd.h
  108. jsimd_none.c
  109. jsimddct.h
  110. jstdhuff.c
  111. jutils.c
  112. jversion.h
  113. libjpeg.map.in
  114. libjpeg.txt
  115. LICENSE.txt
  116. Makefile.am
  117. rdbmp.c
  118. rdcolmap.c
  119. rdgif.c
  120. rdjpgcom.1
  121. rdjpgcom.c
  122. rdppm.c
  123. rdrle.c
  124. rdswitch.c
  125. rdtarga.c
  126. README
  127. README-turbo.txt
  128. README.android
  129. README.version
  130. structure.txt
  131. tjbench.c
  132. tjbenchtest.in
  133. tjbenchtest.java.in
  134. tjexampletest.in
  135. tjunittest.c
  136. tjutil.c
  137. tjutil.h
  138. transupp.c
  139. transupp.h
  140. turbojpeg-jni.c
  141. turbojpeg-mapfile
  142. turbojpeg-mapfile.jni
  143. turbojpeg.c
  144. turbojpeg.h
  145. usage.txt
  146. wizard.txt
  147. wrbmp.c
  148. wrgif.c
  149. wrjpgcom.1
  150. wrjpgcom.c
  151. wrppm.c
  152. wrppm.h
  153. wrrle.c
  154. wrtarga.c