@@ -7774,6 +7774,13 @@ tiff_image_p (Lisp_Object object)
7774
7774
7775
7775
# include <tiffio.h>
7776
7776
7777
+ /* libtiff version 4.3.0 deprecated uint32 typedef. */
7778
+ #if TIFFLIB_VERSION >= 20210416
7779
+ # define UINT32 uint32_t
7780
+ #else
7781
+ # define UINT32 uint32
7782
+ #endif
7783
+
7777
7784
# ifdef WINDOWSNT
7778
7785
7779
7786
/* TIFF library details. */
@@ -7785,7 +7792,7 @@ DEF_DLL_FN (TIFF *, TIFFClientOpen,
7785
7792
TIFFReadWriteProc , TIFFSeekProc , TIFFCloseProc , TIFFSizeProc ,
7786
7793
TIFFMapFileProc , TIFFUnmapFileProc ));
7787
7794
DEF_DLL_FN (int , TIFFGetField , (TIFF * , ttag_t , ...));
7788
- DEF_DLL_FN (int , TIFFReadRGBAImage , (TIFF * , uint32 , uint32 , uint32 * , int ));
7795
+ DEF_DLL_FN (int , TIFFReadRGBAImage , (TIFF * , UINT32 , UINT32 , UINT32 * , int ));
7789
7796
DEF_DLL_FN (void , TIFFClose , (TIFF * ) );
7790
7797
DEF_DLL_FN (int , TIFFSetDirectory , (TIFF * , tdir_t ));
7791
7798
@@ -7977,7 +7984,7 @@ tiff_load (struct frame *f, struct image *img)
7977
7984
Lisp_Object specified_data ;
7978
7985
TIFF * tiff ;
7979
7986
int width , height , x , y , count ;
7980
- uint32 * buf ;
7987
+ UINT32 * buf ;
7981
7988
int rc ;
7982
7989
Emacs_Pix_Container ximg ;
7983
7990
tiff_memory_source memsrc ;
@@ -8103,11 +8110,11 @@ tiff_load (struct frame *f, struct image *img)
8103
8110
/* Process the pixel raster. Origin is in the lower-left corner. */
8104
8111
for (y = 0 ; y < height ; ++ y )
8105
8112
{
8106
- uint32 * row = buf + y * width ;
8113
+ UINT32 * row = buf + y * width ;
8107
8114
8108
8115
for (x = 0 ; x < width ; ++ x )
8109
8116
{
8110
- uint32 abgr = row [x ];
8117
+ UINT32 abgr = row [x ];
8111
8118
int r = TIFFGetR (abgr ) << 8 ;
8112
8119
int g = TIFFGetG (abgr ) << 8 ;
8113
8120
int b = TIFFGetB (abgr ) << 8 ;
0 commit comments