[vlc-commits] contrib: tiff: disable call to file mapping on Winstore builds

Steve Lhomme git at videolan.org
Fri Mar 8 16:30:57 CET 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Mar  7 12:01:25 2019 +0100| [4b3d903861a502c11e523fa4077e329112f245ea] | committer: Steve Lhomme

contrib: tiff: disable call to file mapping on Winstore builds

It's not used by SDL_image anyway

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4b3d903861a502c11e523fa4077e329112f245ea
---

 contrib/src/tiff/rules.mak           |  1 +
 contrib/src/tiff/tiff-winstore.patch | 41 ++++++++++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+)

diff --git a/contrib/src/tiff/rules.mak b/contrib/src/tiff/rules.mak
index b568699e40..378bd538de 100644
--- a/contrib/src/tiff/rules.mak
+++ b/contrib/src/tiff/rules.mak
@@ -11,6 +11,7 @@ $(TARBALLS)/tiff-$(TIFF_VERSION).tar.gz:
 tiff: tiff-$(TIFF_VERSION).tar.gz .sum-tiff
 	$(UNPACK)
 	$(UPDATE_AUTOCONFIG)
+	$(APPLY) $(SRC)/tiff/tiff-winstore.patch
 	$(MOVE)
 	mv tiff/config.sub tiff/config.guess tiff/config
 
diff --git a/contrib/src/tiff/tiff-winstore.patch b/contrib/src/tiff/tiff-winstore.patch
new file mode 100644
index 0000000000..1b5d112d87
--- /dev/null
+++ b/contrib/src/tiff/tiff-winstore.patch
@@ -0,0 +1,41 @@
+--- tiff/libtiff/tif_win32.c.winstore	2019-03-07 11:51:43.944778200 +0100
++++ tiff/libtiff/tif_win32.c	2019-03-07 11:58:04.931465200 +0100
+@@ -56,6 +56,7 @@
+ #include "tiffiop.h"
+ 
+ #include <windows.h>
++#include <winapifamily.h>
+ 
+ static tmsize_t
+ _tiffReadProc(thandle_t fd, void* buf, tmsize_t size)
+@@ -181,6 +182,7 @@ _tiffDummyMapProc(thandle_t fd, void** p
+ static int
+ _tiffMapProc(thandle_t fd, void** pbase, toff_t* psize)
+ {
++#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+ 	uint64 size;
+ 	tmsize_t sizem;
+ 	HANDLE hMapFile;
+@@ -201,6 +203,9 @@ _tiffMapProc(thandle_t fd, void** pbase,
+ 		return (0);
+ 	*psize = size;
+ 	return(1);
++#else
++	return(0);
++#endif
+ }
+ 
+ static void
+@@ -235,8 +240,12 @@ TIFFFdOpen(int ifd, const char* name, co
+ 	{
+ 		if (mode[m]=='u')
+ 		{
++#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+ 			fSuppressMap=1;
+ 			break;
++#else
++			return NULL;
++#endif
+ 		}
+ 	}
+ 	tif = TIFFClientOpen(name, mode, (thandle_t)ifd, /* FIXME: WIN64 cast to pointer warning */



More information about the vlc-commits mailing list