[vlc-commits] contrib: png: use standard functions
Rafaël Carré
git at videolan.org
Thu May 9 15:20:59 CEST 2013
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Thu May 9 15:20:11 2013 +0200| [56ca35c2fd7e255c5111f3b71ae4abf46b9cedc7] | committer: Rafaël Carré
contrib: png: use standard functions
Those Windows functions bring no benefit and are forbidden in Windows Store apps
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=56ca35c2fd7e255c5111f3b71ae4abf46b9cedc7
---
contrib/src/png/rules.mak | 1 +
contrib/src/png/winrt.patch | 23 +++++++++++++++++++++++
2 files changed, 24 insertions(+)
diff --git a/contrib/src/png/rules.mak b/contrib/src/png/rules.mak
index b9b4646..9ea3bb9 100644
--- a/contrib/src/png/rules.mak
+++ b/contrib/src/png/rules.mak
@@ -14,6 +14,7 @@ $(TARBALLS)/libpng-$(PNG_VERSION).tar.bz2:
png: libpng-$(PNG_VERSION).tar.bz2 .sum-png
$(UNPACK)
+ $(APPLY) $(SRC)/png/winrt.patch
$(MOVE)
DEPS_png = zlib $(DEPS_zlib)
diff --git a/contrib/src/png/winrt.patch b/contrib/src/png/winrt.patch
new file mode 100644
index 0000000..16cde06
--- /dev/null
+++ b/contrib/src/png/winrt.patch
@@ -0,0 +1,23 @@
+--- png/pngpriv.h.orig 2013-05-09 15:17:34.933583625 +0200
++++ png/pngpriv.h 2013-05-09 15:18:33.981581142 +0200
+@@ -360,11 +360,7 @@
+
+ /* Memory model/platform independent fns */
+ #ifndef PNG_ABORT
+-# ifdef _WINDOWS_
+-# define PNG_ABORT() ExitProcess(0)
+-# else
+ # define PNG_ABORT() abort()
+-# endif
+ #endif
+
+ #ifdef USE_FAR_KEYWORD
+@@ -381,7 +377,7 @@
+ # ifdef _WINDOWS_ /* Favor Windows over C runtime fns */
+ # define CVT_PTR(ptr) (ptr)
+ # define CVT_PTR_NOCHECK(ptr) (ptr)
+-# define png_strlen lstrlenA
++# define png_strlen strlen
+ # define png_memcmp memcmp
+ # define png_memcpy CopyMemory
+ # define png_memset memset
More information about the vlc-commits
mailing list