diff options
author | Kamil TrzciĆski <ayufan@ayufan.eu> | 2013-09-17 23:38:31 +0300 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-20 13:54:16 +0200 |
commit | 29cc33b916c06ab30ca42b4d39d663fcccac5e76 (patch) | |
tree | 66110120af61755d5cf4678917194ba995984f8b /src/3rdparty/libpng | |
parent | 83bc5eb0e112fe0bf2d81aa0f4c50938015354f5 (diff) |
libpng: Add WinRT compatibility
A _WINRT_ macro is added for Windows Runtime and a few codepaths are
changed with it.
Change-Id: I99ca5636d03c39b0a05b7f75f13522d012fdec07
Done-with: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Diffstat (limited to 'src/3rdparty/libpng')
-rw-r--r-- | src/3rdparty/libpng/pngpriv.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/3rdparty/libpng/pngpriv.h b/src/3rdparty/libpng/pngpriv.h index f3441ee2a1..592d4ee0cb 100644 --- a/src/3rdparty/libpng/pngpriv.h +++ b/src/3rdparty/libpng/pngpriv.h @@ -362,6 +362,9 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp; #if defined(WIN32) || defined(_Windows) || defined(_WINDOWS) || \ defined(_WIN32) || defined(__WIN32__) # include <windows.h> /* defines _WINDOWS_ macro */ +# if defined(WINAPI_FAMILY) && ((WINAPI_FAMILY & WINAPI_FAMILY_DESKTOP_APP) == WINAPI_PARTITION_APP) +# define _WINRT_ /* Define a macro for Windows Runtime builds */ +# endif #endif /* Moved here around 1.5.0beta36 from pngconf.h */ @@ -371,7 +374,7 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp; /* Memory model/platform independent fns */ #ifndef PNG_ABORT -# if defined(_WINDOWS_) || defined(_WIN32_WCE) +# if (defined(_WINDOWS_) || defined(_WIN32_WCE)) && !defined(_WINRT_) # define PNG_ABORT() ExitProcess(0) # else # define PNG_ABORT() abort() @@ -389,7 +392,7 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp; # define png_memcpy _fmemcpy # define png_memset _fmemset #else -# ifdef _WINDOWS_ /* Favor Windows over C runtime fns */ +# if defined(_WINDOWS_) && !defined(_WINRT_) /* Favor Windows over C runtime fns */ # define CVT_PTR(ptr) (ptr) # define CVT_PTR_NOCHECK(ptr) (ptr) # define png_strlen lstrlenA |