contrib: png: use standard functions

Those Windows functions bring no benefit and are forbidden in Windows Store apps
This commit is contained in:
Rafaël Carré 2013-05-09 15:20:11 +02:00
parent 41edeb7380
commit 56ca35c2fd
2 changed files with 24 additions and 0 deletions

View File

@ -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)

View File

@ -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