0000_misc.patch 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. commit 1a734229a8ed6f35f953349bc9bc09cb37d2f5c8
  2. Author: CYBERDEViL <cyberdevil@notabug.org>
  3. Date: Sun Dec 17 18:29:28 2023 +0100
  4. Fix some compiler warnings (invalid header definitions)
  5. commit 5aa7fe5e858dbd5adfc6bf8fb31549050f9cacc1
  6. Author: CYBERDEViL <cyberdevil@notabug.org>
  7. Date: Sun Dec 17 03:01:40 2023 +0100
  8. "Cleanup: remove use of deprecated uint32, utin16 types"
  9. Fully applied Blender upstream ref: e12a8aedce52a05a635a4a70721a33352fe5de58
  10. commit ebed5793e447501c1d6d60b643f6e6cd3a6ca0b0
  11. Author: CYBERDEViL <cyberdevil@notabug.org>
  12. Date: Sun Dec 17 02:57:35 2023 +0100
  13. misc: "Cleanup: pass arguments as const"
  14. Partially applied Blender upstream ref: 357acd1d5053b2ff9c8a09b9b6ad2e170c10b875
  15. commit 6d64717fdb0e3d74af99ee824fe364619424cd0b
  16. Author: CYBERDEViL <cyberdevil@notabug.org>
  17. Date: Sun Dec 17 01:03:16 2023 +0100
  18. "Cleanup: compiler warnings, use const"
  19. Partially applied Blender upstream ref: e159ec8bc1871da8766b319fcda5c76eff1c0a48
  20. commit e586b0156029339b3d651746ff27f818f4ab22d6
  21. Author: CYBERDEViL <cyberdevil@notabug.org>
  22. Date: Fri Dec 15 22:43:37 2023 +0100
  23. inter: fix missing include (could not find std::cout)
  24. "error: ‘cout’ is not a member of ‘std’"
  25. commit 06a03f283d71a7eb6a1595476fb186638c6f1141
  26. Author: CYBERDEViL <cyberdevil@notabug.org>
  27. Date: Fri Dec 15 22:35:50 2023 +0100
  28. intern: "Added extra "const" to satisfy the strict clang version in Xcode 9"
  29. Fully applied Blender upstream ref: ee30a4381f8989ed9f39b4baae9f74e45c9dcdc9
  30. commit a7bfbf39c45757df1fc866418595e48f9d99c242
  31. Author: CYBERDEViL <cyberdevil@notabug.org>
  32. Date: Fri Dec 15 22:28:33 2023 +0100
  33. intern: "Fix for GCC9 new OpenMP data sharing"
  34. Applied whole Blender upstream ref: d780409156e838e366f4da5126e6aeab44174d62
  35. diff --git a/blender-2.79b/intern/elbeem/intern/solver_main.cpp b/blender-2.79b/intern/elbeem/intern/solver_main.cpp
  36. index 68f7c04..514087b 100644
  37. --- a/blender-2.79b/intern/elbeem/intern/solver_main.cpp
  38. +++ b/blender-2.79b/intern/elbeem/intern/solver_main.cpp
  39. @@ -381,7 +381,7 @@ LbmFsgrSolver::mainLoop(const int lev)
  40. GRID_REGION_INIT();
  41. #if PARALLEL==1
  42. const int gDebugLevel = ::gDebugLevel;
  43. -#pragma omp parallel default(none) num_threads(mNumOMPThreads) \
  44. +#pragma omp parallel num_threads(mNumOMPThreads) \
  45. reduction(+: \
  46. calcCurrentMass,calcCurrentVolume, \
  47. calcCellsFilled,calcCellsEmptied, \
  48. @@ -1126,7 +1126,7 @@ LbmFsgrSolver::preinitGrids()
  49. GRID_REGION_INIT();
  50. #if PARALLEL==1
  51. const int gDebugLevel = ::gDebugLevel;
  52. -#pragma omp parallel default(none) num_threads(mNumOMPThreads) \
  53. +#pragma omp parallel num_threads(mNumOMPThreads) \
  54. reduction(+: \
  55. calcCurrentMass,calcCurrentVolume, \
  56. calcCellsFilled,calcCellsEmptied, \
  57. @@ -1164,7 +1164,7 @@ LbmFsgrSolver::standingFluidPreinit()
  58. GRID_REGION_INIT();
  59. #if PARALLEL==1
  60. const int gDebugLevel = ::gDebugLevel;
  61. -#pragma omp parallel default(none) num_threads(mNumOMPThreads) \
  62. +#pragma omp parallel num_threads(mNumOMPThreads) \
  63. reduction(+: \
  64. calcCurrentMass,calcCurrentVolume, \
  65. calcCellsFilled,calcCellsEmptied, \
  66. diff --git a/blender-2.79b/intern/itasc/kdl/tree.hpp b/blender-2.79b/intern/itasc/kdl/tree.hpp
  67. index c8a253f..bd35f82 100644
  68. --- a/blender-2.79b/intern/itasc/kdl/tree.hpp
  69. +++ b/blender-2.79b/intern/itasc/kdl/tree.hpp
  70. @@ -34,7 +34,7 @@ namespace KDL
  71. //Forward declaration
  72. class TreeElement;
  73. // Eigen allocator is needed for alignment of Eigen data types
  74. - typedef std::map<std::string,TreeElement, std::less<std::string>, Eigen::aligned_allocator<std::pair<std::string, TreeElement> > > SegmentMap;
  75. + typedef std::map<std::string,TreeElement, std::less<std::string>, Eigen::aligned_allocator<std::pair<const std::string, TreeElement> > > SegmentMap;
  76. class TreeElement
  77. {
  78. diff --git a/blender-2.79b/intern/locale/boost_locale_wrapper.cpp b/blender-2.79b/intern/locale/boost_locale_wrapper.cpp
  79. index 0707c0d..580c7a4 100644
  80. --- a/blender-2.79b/intern/locale/boost_locale_wrapper.cpp
  81. +++ b/blender-2.79b/intern/locale/boost_locale_wrapper.cpp
  82. @@ -27,6 +27,7 @@
  83. */
  84. #include <stdio.h>
  85. +#include <iostream> // std::cout
  86. #include <boost/locale.hpp>
  87. #include "boost_locale_wrapper.h"
  88. diff --git a/blender-2.79b/intern/mikktspace/mikktspace.c b/blender-2.79b/intern/mikktspace/mikktspace.c
  89. index 99e945d..67f0c2b 100644
  90. --- a/blender-2.79b/intern/mikktspace/mikktspace.c
  91. +++ b/blender-2.79b/intern/mikktspace/mikktspace.c
  92. @@ -1193,7 +1193,7 @@ static tbool AssignRecur(const int piTriListIn[], STriInfo psTriInfos[],
  93. static tbool CompareSubGroups(const SSubGroup * pg1, const SSubGroup * pg2);
  94. static void QuickSort(int* pSortBuffer, int iLeft, int iRight, unsigned int uSeed);
  95. -static STSpace EvalTspace(int face_indices[], const int iFaces, const int piTriListIn[], const STriInfo pTriInfos[], const SMikkTSpaceContext * pContext, const int iVertexRepresentitive);
  96. +static STSpace EvalTspace(const int face_indices[], const int iFaces, const int piTriListIn[], const STriInfo pTriInfos[], const SMikkTSpaceContext * pContext, const int iVertexRepresentitive);
  97. static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], const SGroup pGroups[],
  98. const int iNrActiveGroups, const int piTriListIn[], const float fThresCos,
  99. @@ -1364,7 +1364,7 @@ static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], con
  100. return TTRUE;
  101. }
  102. -static STSpace EvalTspace(int face_indices[], const int iFaces, const int piTriListIn[], const STriInfo pTriInfos[],
  103. +static STSpace EvalTspace(const int face_indices[], const int iFaces, const int piTriListIn[], const STriInfo pTriInfos[],
  104. const SMikkTSpaceContext * pContext, const int iVertexRepresentitive)
  105. {
  106. STSpace res;
  107. diff --git a/blender-2.79b/source/blender/blenlib/BLI_math_geom.h b/blender-2.79b/source/blender/blenlib/BLI_math_geom.h
  108. index 0fef849..7e06fff 100644
  109. --- a/blender-2.79b/source/blender/blenlib/BLI_math_geom.h
  110. +++ b/blender-2.79b/source/blender/blenlib/BLI_math_geom.h
  111. @@ -429,9 +429,9 @@ MINLINE void add_sh_shsh(float r[9], const float a[9], const float b[9]);
  112. MINLINE float dot_shsh(const float a[9], const float b[9]);
  113. MINLINE float eval_shv3(float r[9], const float v[3]);
  114. -MINLINE float diffuse_shv3(float r[9], const float v[3]);
  115. +MINLINE float diffuse_shv3(const float r[9], const float v[3]);
  116. MINLINE void vec_fac_to_sh(float r[9], const float v[3], const float f);
  117. -MINLINE void madd_sh_shfl(float r[9], const float sh[3], const float f);
  118. +MINLINE void madd_sh_shfl(float r[9], const float sh[9], const float f);
  119. /********************************* Form Factor *******************************/
  120. diff --git a/blender-2.79b/source/blender/blenlib/BLI_math_vector.h b/blender-2.79b/source/blender/blenlib/BLI_math_vector.h
  121. index 4fdb339..c5f286f 100644
  122. --- a/blender-2.79b/source/blender/blenlib/BLI_math_vector.h
  123. +++ b/blender-2.79b/source/blender/blenlib/BLI_math_vector.h
  124. @@ -120,16 +120,16 @@ MINLINE void mul_v2_v2(float r[2], const float a[2]);
  125. MINLINE void mul_v3_v3(float r[3], const float a[3]);
  126. MINLINE void mul_v3_v3v3(float r[3], const float a[3], const float b[3]);
  127. MINLINE void mul_v4_fl(float r[4], float f);
  128. -MINLINE void mul_v4_v4fl(float r[3], const float a[3], float f);
  129. +MINLINE void mul_v4_v4fl(float r[4], const float a[3], float f);
  130. MINLINE void mul_v2_v2_cw(float r[2], const float mat[2], const float vec[2]);
  131. MINLINE void mul_v2_v2_ccw(float r[2], const float mat[2], const float vec[2]);
  132. MINLINE float mul_project_m4_v3_zfac(float mat[4][4], const float co[3]) ATTR_WARN_UNUSED_RESULT;
  133. -MINLINE float dot_m3_v3_row_x(float M[3][3], const float a[3]) ATTR_WARN_UNUSED_RESULT;
  134. -MINLINE float dot_m3_v3_row_y(float M[3][3], const float a[3]) ATTR_WARN_UNUSED_RESULT;
  135. -MINLINE float dot_m3_v3_row_z(float M[3][3], const float a[3]) ATTR_WARN_UNUSED_RESULT;
  136. -MINLINE float dot_m4_v3_row_x(float M[4][4], const float a[3]) ATTR_WARN_UNUSED_RESULT;
  137. -MINLINE float dot_m4_v3_row_y(float M[4][4], const float a[3]) ATTR_WARN_UNUSED_RESULT;
  138. -MINLINE float dot_m4_v3_row_z(float M[4][4], const float a[3]) ATTR_WARN_UNUSED_RESULT;
  139. +MINLINE float dot_m3_v3_row_x(const float M[3][3], const float a[3]) ATTR_WARN_UNUSED_RESULT;
  140. +MINLINE float dot_m3_v3_row_y(const float M[3][3], const float a[3]) ATTR_WARN_UNUSED_RESULT;
  141. +MINLINE float dot_m3_v3_row_z(const float M[3][3], const float a[3]) ATTR_WARN_UNUSED_RESULT;
  142. +MINLINE float dot_m4_v3_row_x(const float M[4][4], const float a[3]) ATTR_WARN_UNUSED_RESULT;
  143. +MINLINE float dot_m4_v3_row_y(const float M[4][4], const float a[3]) ATTR_WARN_UNUSED_RESULT;
  144. +MINLINE float dot_m4_v3_row_z(const float M[4][4], const float a[3]) ATTR_WARN_UNUSED_RESULT;
  145. MINLINE void madd_v2_v2fl(float r[2], const float a[2], float f);
  146. MINLINE void madd_v3_v3fl(float r[3], const float a[3], float f);
  147. @@ -145,7 +145,7 @@ MINLINE void negate_v2_v2(float r[2], const float a[2]);
  148. MINLINE void negate_v3(float r[3]);
  149. MINLINE void negate_v3_v3(float r[3], const float a[3]);
  150. MINLINE void negate_v4(float r[4]);
  151. -MINLINE void negate_v4_v4(float r[4], const float a[3]);
  152. +MINLINE void negate_v4_v4(float r[4], const float a[4]);
  153. MINLINE void negate_v3_short(short r[3]);
  154. MINLINE void negate_v3_db(double r[3]);
  155. @@ -171,7 +171,7 @@ MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3]);
  156. MINLINE void add_newell_cross_v3_v3v3(float n[3], const float v_prev[3], const float v_curr[3]);
  157. -MINLINE void star_m3_v3(float rmat[3][3], float a[3]);
  158. +MINLINE void star_m3_v3(float rmat[3][3], const float a[3]);
  159. /*********************************** Length **********************************/
  160. @@ -246,7 +246,7 @@ void flip_v2_v2v2(float v[2], const float v1[2], const float v2[2]);
  161. /********************************* Comparison ********************************/
  162. -MINLINE bool is_zero_v2(const float a[3]) ATTR_WARN_UNUSED_RESULT;
  163. +MINLINE bool is_zero_v2(const float a[2]) ATTR_WARN_UNUSED_RESULT;
  164. MINLINE bool is_zero_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT;
  165. MINLINE bool is_zero_v4(const float a[4]) ATTR_WARN_UNUSED_RESULT;
  166. diff --git a/blender-2.79b/source/blender/blenlib/intern/math_geom_inline.c b/blender-2.79b/source/blender/blenlib/intern/math_geom_inline.c
  167. index 68a2e68..3b672e2 100644
  168. --- a/blender-2.79b/source/blender/blenlib/intern/math_geom_inline.c
  169. +++ b/blender-2.79b/source/blender/blenlib/intern/math_geom_inline.c
  170. @@ -99,7 +99,7 @@ MINLINE float dot_shsh(const float a[9], const float b[9])
  171. return r;
  172. }
  173. -MINLINE float diffuse_shv3(float sh[9], const float v[3])
  174. +MINLINE float diffuse_shv3(const float sh[9], const float v[3])
  175. {
  176. /* See formula (13) in:
  177. * "An Efficient Representation for Irradiance Environment Maps" */
  178. diff --git a/blender-2.79b/source/blender/blenlib/intern/math_vector_inline.c b/blender-2.79b/source/blender/blenlib/intern/math_vector_inline.c
  179. index ee5e865..3f8f2c5 100644
  180. --- a/blender-2.79b/source/blender/blenlib/intern/math_vector_inline.c
  181. +++ b/blender-2.79b/source/blender/blenlib/intern/math_vector_inline.c
  182. @@ -501,15 +501,15 @@ MINLINE float mul_project_m4_v3_zfac(float mat[4][4], const float co[3])
  183. /**
  184. * Has the effect of #mul_m3_v3(), on a single axis.
  185. */
  186. -MINLINE float dot_m3_v3_row_x(float M[3][3], const float a[3])
  187. +MINLINE float dot_m3_v3_row_x(const float M[3][3], const float a[3])
  188. {
  189. return M[0][0] * a[0] + M[1][0] * a[1] + M[2][0] * a[2];
  190. }
  191. -MINLINE float dot_m3_v3_row_y(float M[3][3], const float a[3])
  192. +MINLINE float dot_m3_v3_row_y(const float M[3][3], const float a[3])
  193. {
  194. return M[0][1] * a[0] + M[1][1] * a[1] + M[2][1] * a[2];
  195. }
  196. -MINLINE float dot_m3_v3_row_z(float M[3][3], const float a[3])
  197. +MINLINE float dot_m3_v3_row_z(const float M[3][3], const float a[3])
  198. {
  199. return M[0][2] * a[0] + M[1][2] * a[1] + M[2][2] * a[2];
  200. }
  201. @@ -518,15 +518,15 @@ MINLINE float dot_m3_v3_row_z(float M[3][3], const float a[3])
  202. * Has the effect of #mul_mat3_m4_v3(), on a single axis.
  203. * (no adding translation)
  204. */
  205. -MINLINE float dot_m4_v3_row_x(float M[4][4], const float a[3])
  206. +MINLINE float dot_m4_v3_row_x(const float M[4][4], const float a[3])
  207. {
  208. return M[0][0] * a[0] + M[1][0] * a[1] + M[2][0] * a[2];
  209. }
  210. -MINLINE float dot_m4_v3_row_y(float M[4][4], const float a[3])
  211. +MINLINE float dot_m4_v3_row_y(const float M[4][4], const float a[3])
  212. {
  213. return M[0][1] * a[0] + M[1][1] * a[1] + M[2][1] * a[2];
  214. }
  215. -MINLINE float dot_m4_v3_row_z(float M[4][4], const float a[3])
  216. +MINLINE float dot_m4_v3_row_z(const float M[4][4], const float a[3])
  217. {
  218. return M[0][2] * a[0] + M[1][2] * a[1] + M[2][2] * a[2];
  219. }
  220. @@ -756,7 +756,7 @@ MINLINE void add_newell_cross_v3_v3v3(float n[3], const float v_prev[3], const f
  221. n[2] += (v_prev[0] - v_curr[0]) * (v_prev[1] + v_curr[1]);
  222. }
  223. -MINLINE void star_m3_v3(float rmat[3][3], float a[3])
  224. +MINLINE void star_m3_v3(float rmat[3][3], const float a[3])
  225. {
  226. rmat[0][0] = rmat[1][1] = rmat[2][2] = 0.0;
  227. rmat[0][1] = -a[2];
  228. diff --git a/blender-2.79b/source/blender/editors/transform/transform.h b/blender-2.79b/source/blender/editors/transform/transform.h
  229. index d60eb2f..b2a308a 100644
  230. --- a/blender-2.79b/source/blender/editors/transform/transform.h
  231. +++ b/blender-2.79b/source/blender/editors/transform/transform.h
  232. @@ -120,12 +120,12 @@ typedef struct TransCon {
  233. void (*drawExtra)(struct TransInfo *t);
  234. /* For constraints that needs to draw differently from the other
  235. * uses this instead of the generic draw function */
  236. - void (*applyVec)(struct TransInfo *t, struct TransData *td, const float in[3], float out[3], float pvec[3]);
  237. + void (*applyVec)(struct TransInfo *t, const struct TransData *td, const float in[3], float out[3], float pvec[3]);
  238. /* Apply function pointer for linear vectorial transformation */
  239. /* The last three parameters are pointers to the in/out/printable vectors */
  240. - void (*applySize)(struct TransInfo *t, struct TransData *td, float smat[3][3]);
  241. + void (*applySize)(struct TransInfo *t, const struct TransData *td, float smat[3][3]);
  242. /* Apply function pointer for size transformation */
  243. - void (*applyRot)(struct TransInfo *t, struct TransData *td, float vec[3], float *angle);
  244. + void (*applyRot)(struct TransInfo *t, const struct TransData *td, float vec[3], float *angle);
  245. /* Apply function pointer for rotation transformation */
  246. } TransCon;
  247. diff --git a/blender-2.79b/source/blender/editors/transform/transform_constraints.c b/blender-2.79b/source/blender/editors/transform/transform_constraints.c
  248. index 5621eed..a06e15f 100644
  249. --- a/blender-2.79b/source/blender/editors/transform/transform_constraints.c
  250. +++ b/blender-2.79b/source/blender/editors/transform/transform_constraints.c
  251. @@ -331,7 +331,7 @@ static void planeProjection(TransInfo *t, const float in[3], float out[3])
  252. *
  253. */
  254. -static void applyAxisConstraintVec(TransInfo *t, TransData *td, const float in[3], float out[3], float pvec[3])
  255. +static void applyAxisConstraintVec(TransInfo *t, const TransData *td, const float in[3], float out[3], float pvec[3])
  256. {
  257. copy_v3_v3(out, in);
  258. if (!td && t->con.mode & CON_APPLY) {
  259. @@ -378,7 +378,7 @@ static void applyAxisConstraintVec(TransInfo *t, TransData *td, const float in[3
  260. * Further down, that vector is mapped to each data's space.
  261. */
  262. -static void applyObjectConstraintVec(TransInfo *t, TransData *td, const float in[3], float out[3], float pvec[3])
  263. +static void applyObjectConstraintVec(TransInfo *t, const TransData *td, const float in[3], float out[3], float pvec[3])
  264. {
  265. copy_v3_v3(out, in);
  266. if (t->con.mode & CON_APPLY) {
  267. @@ -436,7 +436,7 @@ static void applyObjectConstraintVec(TransInfo *t, TransData *td, const float in
  268. * Generic callback for constant spatial constraints applied to resize motion
  269. */
  270. -static void applyAxisConstraintSize(TransInfo *t, TransData *td, float smat[3][3])
  271. +static void applyAxisConstraintSize(TransInfo *t, const TransData *td, float smat[3][3])
  272. {
  273. if (!td && t->con.mode & CON_APPLY) {
  274. float tmat[3][3];
  275. @@ -460,7 +460,7 @@ static void applyAxisConstraintSize(TransInfo *t, TransData *td, float smat[3][3
  276. * Callback for object based spatial constraints applied to resize motion
  277. */
  278. -static void applyObjectConstraintSize(TransInfo *t, TransData *td, float smat[3][3])
  279. +static void applyObjectConstraintSize(TransInfo *t, const TransData *td, float smat[3][3])
  280. {
  281. if (td && t->con.mode & CON_APPLY) {
  282. float tmat[3][3];
  283. @@ -500,7 +500,7 @@ static void applyObjectConstraintSize(TransInfo *t, TransData *td, float smat[3]
  284. * (ie: not doing counterclockwise rotations when the mouse moves clockwise).
  285. */
  286. -static void applyAxisConstraintRot(TransInfo *t, TransData *td, float vec[3], float *angle)
  287. +static void applyAxisConstraintRot(TransInfo *t, const TransData *td, float vec[3], float *angle)
  288. {
  289. if (!td && t->con.mode & CON_APPLY) {
  290. int mode = t->con.mode & (CON_AXIS0 | CON_AXIS1 | CON_AXIS2);
  291. @@ -542,7 +542,7 @@ static void applyAxisConstraintRot(TransInfo *t, TransData *td, float vec[3], fl
  292. * (ie: not doing counterclockwise rotations when the mouse moves clockwise).
  293. */
  294. -static void applyObjectConstraintRot(TransInfo *t, TransData *td, float vec[3], float *angle)
  295. +static void applyObjectConstraintRot(TransInfo *t, const TransData *td, float vec[3], float *angle)
  296. {
  297. if (t->con.mode & CON_APPLY) {
  298. int mode = t->con.mode & (CON_AXIS0 | CON_AXIS1 | CON_AXIS2);
  299. diff --git a/blender-2.79b/source/blender/imbuf/intern/tiff.c b/blender-2.79b/source/blender/imbuf/intern/tiff.c
  300. index afd28bb..110cbef 100644
  301. --- a/blender-2.79b/source/blender/imbuf/intern/tiff.c
  302. +++ b/blender-2.79b/source/blender/imbuf/intern/tiff.c
  303. @@ -351,7 +351,7 @@ static void scanline_separate_32bit(float *rectf, const float *fbuf, int scanlin
  304. static void imb_read_tiff_resolution(ImBuf *ibuf, TIFF *image)
  305. {
  306. - uint16 unit;
  307. + uint16_t unit;
  308. float xres;
  309. float yres;
  310. @@ -535,7 +535,7 @@ ImBuf *imb_loadtiff(const unsigned char *mem, size_t size, int flags, char color
  311. TIFF *image = NULL;
  312. ImBuf *ibuf = NULL, *hbuf;
  313. ImbTIFFMemFile memFile;
  314. - uint32 width, height;
  315. + uint32_t width, height;
  316. char *format = NULL;
  317. int level;
  318. short spp;
  319. @@ -656,7 +656,7 @@ ImBuf *imb_loadtiff(const unsigned char *mem, size_t size, int flags, char color
  320. void imb_loadtiletiff(ImBuf *ibuf, const unsigned char *mem, size_t size, int tx, int ty, unsigned int *rect)
  321. {
  322. TIFF *image = NULL;
  323. - uint32 width, height;
  324. + uint32_t width, height;
  325. ImbTIFFMemFile memFile;
  326. image = imb_tiff_client_open(&memFile, mem, size);
  327. @@ -710,7 +710,7 @@ void imb_loadtiletiff(ImBuf *ibuf, const unsigned char *mem, size_t size, int tx
  328. int imb_savetiff(ImBuf *ibuf, const char *name, int flags)
  329. {
  330. TIFF *image = NULL;
  331. - uint16 samplesperpixel, bitspersample;
  332. + uint16_t samplesperpixel, bitspersample;
  333. size_t npixels;
  334. unsigned char *pixels = NULL;
  335. unsigned char *from = NULL, *to = NULL;
  336. @@ -723,7 +723,7 @@ int imb_savetiff(ImBuf *ibuf, const char *name, int flags)
  337. /* check for a valid number of bytes per pixel. Like the PNG writer,
  338. * the TIFF writer supports 1, 3 or 4 bytes per pixel, corresponding
  339. * to gray, RGB, RGBA respectively. */
  340. - samplesperpixel = (uint16)((ibuf->planes + 7) >> 3);
  341. + samplesperpixel = (uint16_t)((ibuf->planes + 7) >> 3);
  342. if ((samplesperpixel > 4) || (samplesperpixel == 2)) {
  343. fprintf(stderr,
  344. "imb_savetiff: unsupported number of bytes per "